From fa09c0f371364938b8e230a65147c343d88ee77b Mon Sep 17 00:00:00 2001 From: livello Date: Tue, 13 Mar 2018 00:59:26 +0300 Subject: [PATCH 01/21] pio megaatmega2560 and due compilation fix. Still need to patch https://github.com/anklimov/Arduino-Temperature-Control-Library.git --- platformio.ini | 105 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 15 deletions(-) diff --git a/platformio.ini b/platformio.ini index 316f61e..b4c05fa 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,4 +1,4 @@ -; PlatformIO Project Configuration File +; PlatformIO Project Configuration File (for copy and paste) ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags @@ -10,22 +10,97 @@ [platformio] src_dir = lighthub +[env:due] +platform = atmelsam +framework = arduino +board = due +lib_deps = +https://github.com/sebnil/DueFlashStorage +; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 +https://github.com/anklimov/Arduino-Temperature-Control-Library.git +https://github.com/anklimov/DS2482_OneWire +https://github.com/anklimov/DmxDue +https://github.com/arduino-libraries/ArduinoHttpClient +https://github.com/anklimov/aJson +https://github.com/anklimov/CmdArduino +https://github.com/anklimov/ModbusMaster +https://github.com/anklimov/Ethernet +https://github.com/PaulStoffregen/SPI.git +https://github.com/knolleary/pubsubclient.git +https://github.com/anklimov/Artnet.git +FastLED + +[env:due-5500] +platform = atmelsam +framework = arduino +board = due +build_flags = -D Wiz5500 +lib_deps = +https://github.com/sebnil/DueFlashStorage +https://github.com/anklimov/Arduino-Temperature-Control-Library.git +https://github.com/anklimov/DS2482_OneWire +https://github.com/anklimov/DmxDue +https://github.com/arduino-libraries/ArduinoHttpClient +https://github.com/anklimov/aJson +https://github.com/anklimov/CmdArduino +https://github.com/anklimov/ModbusMaster +https://github.com/anklimov/Ethernet2 +https://github.com/PaulStoffregen/SPI.git +https://github.com/knolleary/pubsubclient.git +https://github.com/anklimov/Artnet.git + [env:megaatmega2560] platform = atmelavr board = megaatmega2560 framework = arduino -build_flags = - -D Wiz5500 lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/HTTPClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet2 - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git +; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED + +[env:megaatmega2560-5500] +platform = atmelavr +board = megaatmega2560 +framework = arduino +build_flags = -D Wiz5500 +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + +[env:espressif8266] +platform= espressif8266 +framework = arduino +board = nodemcuv2 +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/ESP-Dmx + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + From 2593389560d1ea75eee4350b37e6d6644ca58299 Mon Sep 17 00:00:00 2001 From: livello Date: Tue, 13 Mar 2018 01:03:51 +0300 Subject: [PATCH 02/21] pio megaatmega2560 and due compilation fix --- platformio.ini | 124 ++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/platformio.ini b/platformio.ini index b4c05fa..ebaa6d7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,19 +15,19 @@ platform = atmelsam framework = arduino board = due lib_deps = -https://github.com/sebnil/DueFlashStorage -; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 -https://github.com/anklimov/Arduino-Temperature-Control-Library.git -https://github.com/anklimov/DS2482_OneWire -https://github.com/anklimov/DmxDue -https://github.com/arduino-libraries/ArduinoHttpClient -https://github.com/anklimov/aJson -https://github.com/anklimov/CmdArduino -https://github.com/anklimov/ModbusMaster -https://github.com/anklimov/Ethernet -https://github.com/PaulStoffregen/SPI.git -https://github.com/knolleary/pubsubclient.git -https://github.com/anklimov/Artnet.git + https://github.com/sebnil/DueFlashStorage +; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git FastLED [env:due-5500] @@ -36,38 +36,38 @@ framework = arduino board = due build_flags = -D Wiz5500 lib_deps = -https://github.com/sebnil/DueFlashStorage -https://github.com/anklimov/Arduino-Temperature-Control-Library.git -https://github.com/anklimov/DS2482_OneWire -https://github.com/anklimov/DmxDue -https://github.com/arduino-libraries/ArduinoHttpClient -https://github.com/anklimov/aJson -https://github.com/anklimov/CmdArduino -https://github.com/anklimov/ModbusMaster -https://github.com/anklimov/Ethernet2 -https://github.com/PaulStoffregen/SPI.git -https://github.com/knolleary/pubsubclient.git -https://github.com/anklimov/Artnet.git + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git [env:megaatmega2560] platform = atmelavr board = megaatmega2560 framework = arduino lib_deps = -; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED +; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git +FastLED [env:megaatmega2560-5500] platform = atmelavr @@ -75,32 +75,32 @@ board = megaatmega2560 framework = arduino build_flags = -D Wiz5500 lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet2 - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git [env:espressif8266] -platform= espressif8266 +platform = espressif8266 framework = arduino board = nodemcuv2 lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/ESP-Dmx - https://github.com/arduino-libraries/ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/ESP-Dmx + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git From 628c9c668705ff4cb086b0e151ac4d72092d06e8 Mon Sep 17 00:00:00 2001 From: livello Date: Tue, 13 Mar 2018 01:06:55 +0300 Subject: [PATCH 03/21] pio megaatmega2560 and due compilation fix --- platformio.ini | 79 +-------------------------------- platformio.txt | 118 ++++++++++++++++++++++++++----------------------- 2 files changed, 64 insertions(+), 133 deletions(-) diff --git a/platformio.ini b/platformio.ini index ebaa6d7..8408de8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,4 +1,4 @@ -; PlatformIO Project Configuration File (for copy and paste) +; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags @@ -10,45 +10,6 @@ [platformio] src_dir = lighthub -[env:due] -platform = atmelsam -framework = arduino -board = due -lib_deps = - https://github.com/sebnil/DueFlashStorage -; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - https://github.com/arduino-libraries/ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git -FastLED - -[env:due-5500] -platform = atmelsam -framework = arduino -board = due -build_flags = -D Wiz5500 -lib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - https://github.com/arduino-libraries/ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet2 - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - [env:megaatmega2560] platform = atmelavr board = megaatmega2560 @@ -67,40 +28,4 @@ lib_deps = https://github.com/PaulStoffregen/SPI.git https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git -FastLED - -[env:megaatmega2560-5500] -platform = atmelavr -board = megaatmega2560 -framework = arduino -build_flags = -D Wiz5500 -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet2 - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - -[env:espressif8266] -platform = espressif8266 -framework = arduino -board = nodemcuv2 -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/ESP-Dmx - https://github.com/arduino-libraries/ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - + FastLED diff --git a/platformio.txt b/platformio.txt index ccab70f..a7b40bb 100644 --- a/platformio.txt +++ b/platformio.txt @@ -9,52 +9,56 @@ ; http://docs.platformio.org/page/projectconf.html [platformio] src_dir = lighthub + [env:due] - platform = atmelsam - framework = arduino - board = due - build_flags = - -D Wiz5500 - ib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - https://github.com/arduino-libraries/ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet2 - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - [env:megaatmega2560-5500] - platform = atmelavr - board = megaatmega2560 - framework = arduino - build_flags = -D Wiz5500 - lib_deps = +platform = atmelsam +framework = arduino +board = due +lib_deps = + https://github.com/sebnil/DueFlashStorage +; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/HTTPClient + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git +FastLED + +[env:due-5500] +platform = atmelsam +framework = arduino +board = due +build_flags = -D Wiz5500 +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient https://github.com/anklimov/aJson https://github.com/anklimov/CmdArduino https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial https://github.com/anklimov/Ethernet2 https://github.com/PaulStoffregen/SPI.git https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git - [env:megaatmega2560] - platform = atmelavr - board = megaatmega2560 - framework = arduino - lib_deps = + +[env:megaatmega2560] +platform = atmelavr +board = megaatmega2560 +framework = arduino +lib_deps = +; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DmxSimple - https://github.com/anklimov/HTTPClient + https://github.com/anklimov/httpClient https://github.com/anklimov/aJson https://github.com/anklimov/CmdArduino https://github.com/anklimov/ModbusMaster @@ -63,31 +67,32 @@ src_dir = lighthub https://github.com/PaulStoffregen/SPI.git https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git + FastLED +[env:megaatmega2560-5500] +platform = atmelavr +board = megaatmega2560 +framework = arduino +build_flags = -D Wiz5500 +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git - [env:due] - platform = atmelsam - framework = arduino - board = due - ib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - https://github.com/arduino-libraries/ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet - https://github.com/PaulStoffregen/SPI.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - - [env:espressif8266] - platform= espressif8266 - framework = arduino - board = nodemcuv2 - ib_deps = +[env:espressif8266] +platform = espressif8266 +framework = arduino +board = nodemcuv2 +lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/ESP-Dmx @@ -98,3 +103,4 @@ src_dir = lighthub https://github.com/anklimov/DMXSerial https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git + From e3086e82f41a2232d73e5c47052f82a0b41e7b3e Mon Sep 17 00:00:00 2001 From: livello Date: Tue, 13 Mar 2018 02:39:01 +0300 Subject: [PATCH 04/21] lighthub.ino code moved to main.cpp and main.h. lighthub.ino is now just a stub. --- lighthub/lighthub.ino | 1201 +---------------------------------------- lighthub/main.cpp | 1200 ++++++++++++++++++++++++++++++++++++++++ lighthub/main.h | 47 ++ 3 files changed, 1252 insertions(+), 1196 deletions(-) create mode 100644 lighthub/main.cpp create mode 100644 lighthub/main.h diff --git a/lighthub/lighthub.ino b/lighthub/lighthub.ino index 036288e..6b6e960 100644 --- a/lighthub/lighthub.ino +++ b/lighthub/lighthub.ino @@ -1,1198 +1,7 @@ -/* Copyright © 2017-2018 Andrey Klimov. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Homepage: http://lazyhome.ru -GIT: https://github.com/anklimov/lighthub -e-mail anklimov@gmail.com - - - - * - * - * Done: - * MQMT/openhab - * 1-wire - * DMX - out - * DMX IN - * 1809 strip out (discarded) - * Modbus master Out - * DHCP - * JSON config - * cli - * PWM Out 7,8,9 - * 1-w relay out - * Termostat out - -Todo -=== -A/C control/Dimmer ? -rotary encoder local ctrl -analog in local ctrl -Smooth regulation/fading -PID Termostat out -dmx relay out -Relay array channel -Relay DMX array channel -Config URL configuration - -todo DUE related: -HTTP -PWM freq fix -Config webserver - -todo ESP: -Ethernet - to wifi portation -DMX-OUT deploy on USART1 -Config webserver - -*/ -#if defined(__ESP__) -#include //this needs to be first, or it all crashes and burns... -#endif - -// Configuration of drivers enabled -#include "options.h" - - -#include -#include -#include "utils.h" - -#include -#include -#include "aJSON.h" -#include -#include "stdarg.h" - -#if defined(__AVR__) -#include "HTTPClient.h" -#include -#include -#define wdt_en() wdt_enable(WDTO_8S) -#define wdt_dis() wdt_disable() -#define wdt_res() wdt_reset() -#else -#include -#endif - -#if defined(__SAM3X8E__) -#include - DueFlashStorage EEPROM; -#include -#define wdt_res() watchdogReset() -#define wdt_en() -#define wdt_dis() - -#else -#include -#endif - -#if defined(__ESP__) -#include "esp.h" -#define wdt_res() -#define wdt_en() -#define wdt_dis() - - -#else - -#ifdef Wiz5500 -#include -#else -#include -#endif - -EthernetClient ethClient; -#endif - -#ifdef _owire -#include "owTerm.h" -#endif - -#if defined(_dmxin) || defined(_dmxout) || defined (_artnet) -#include "dmx.h" -#endif - -#include "item.h" -#include "inputs.h" - -#ifdef _artnet -#include -extern Artnet *artnet; -#endif - -// Hardcoded definitions -//Thermostate histeresys -#define GIST 2 -//#define serverip "192.168.88.2" -//IPAddress server(192, 168, 88, 2); //TODO - configure it -//char* inprefix=("/myhome/in/"); -//char* outprefix=("/myhome/s_out/"); -//char* subprefix=("/myhome/in/#"); - -#define inprefix "/myhome/in/" -const char outprefix[] PROGMEM = "/myhome/s_out/"; -#define subprefix "/myhome/in/#" - -aJsonObject *root = NULL; -aJsonObject *items = NULL; -aJsonObject *inputs = NULL; - -aJsonObject *mqttArr = NULL; -aJsonObject *modbusArr = NULL; -aJsonObject *owArr = NULL; -aJsonObject *dmxArr = NULL; - -unsigned long modbuscheck=0; -unsigned long incheck =0; -unsigned long lanCheck =0; -unsigned long thermocheck=0; - -aJsonObject * modbusitem= NULL; - -bool owReady = false; -int lanStatus = 0; - -#ifdef _modbus -ModbusMaster node; -#endif - -byte mac[6]; - - -PubSubClient client(ethClient); - - -void watchdogSetup(void){} //Do not remove - strong re-definition WDT Init for DUE - -// MQTT Callback routine -void callback(char* topic, byte* payload, unsigned int length) { - payload[length]=0; - Serial.print(F("[")); - Serial.print(topic); - Serial.print("] "); - - int fr = freeRam(); - if (fr<250) {Serial.println(F("OOM!"));return;} - - #define sublen 20 - char subtopic[sublen]=""; - int cmd = 0; - - for (int i=0;ibegin(); - #endif - - break; - case 2: // IP Ready, config loaded, Connecting broker & subscribe -//Arming Watchdog - wdt_res(); -{ -short n=0; -int port=1883; -char empty=0; -char * user = ∅ -char * pass = ∅ - -if (!client.connected() && mqttArr && ((n=aJson.getArraySize(mqttArr))>1)) { - char *c=aJson.getArrayItem(mqttArr,0)->valuestring; - char *servername=aJson.getArrayItem(mqttArr,1)->valuestring; - if (n>=3) port=aJson.getArrayItem(mqttArr,2)->valueint; - - if (n>=4) user=aJson.getArrayItem(mqttArr,3)->valuestring; - if (n>=5) pass=aJson.getArrayItem(mqttArr,4)->valuestring; - - client.setServer(servername,port); - - Serial.print(F("Attempting MQTT connection to ")); - Serial.print(servername); - Serial.print(F(":")); - Serial.print(port); - Serial.print(F(" user:")); - Serial.print(user); - Serial.print(F(" ...")); - - if (client.connect(c,user,pass)) { - Serial.print(F("connected as "));Serial.println(c); - - - // ... and resubscribe - client.subscribe(subprefix); - - - restoreState(); - // if (_once) {DMXput(); _once=0;} - lanStatus=3; - } else { - Serial.print(F("failed, rc=")); - Serial.print(client.state()); - Serial.println(F(" try again in 5 seconds")); - lanCheck=millis()+5000; - lanStatus=-12; - } -} -break; -} - case 3: //operation - if (!client.connected()) lanStatus=2; - break; - -//Awaiting address -case -10: if (millis()>lanCheck) - lanStatus=0; -break; -//Reconnect -case -12: if (millis()>lanCheck) - - lanStatus=2; -break; - // read or Re-read config - case -11: - if (loadConfig(0,NULL)) lanStatus=2; - else {lanCheck=millis()+5000;lanStatus=-10;} -break; - - case -14: ; - // do notghing with net -} - - -{ -#ifndef __ESP__ -wdt_dis(); -if (lanStatus>0) - switch (Ethernet.maintain()) - { - case 1: - //renewed fail - Serial.println(F("Error: renewed fail")); - lanStatus = -10; - break; - - case 2: - //renewed success - Serial.println(F("Renewed success")); - - //print your local IP address: - printIPAddress(); - break; - - case 3: - //rebind fail - Serial.println(F("Error: rebind fail")); - lanStatus = -10; - break; - - case 4: - //rebind success - Serial.println(F("Rebind success")); - - //print your local IP address: - printIPAddress(); - break; - - default: - //nothing happened - break; - - } - - wdt_en(); -#endif - } - -return lanStatus; - -} - -#ifdef _owire -void Changed (int i, DeviceAddress addr, int val) -{ - char addrstr[32]="NIL"; - char addrbuf[17]; - char valstr[16]="NIL"; - char *owEmit = NULL; - char *owItem = NULL; - - //PrintBytes(addr,8); - // Serial.print("Emit: "); - SetBytes(addr,8,addrbuf);addrbuf[17]=0; - - //Serial.println(addrbuf); - - aJsonObject *owObj = aJson.getObjectItem(owArr, addrbuf); - if (owObj) - { - owEmit = aJson.getObjectItem(owObj, "emit")->valuestring; - if (owEmit) - { - strncpy(addrbuf,owEmit,sizeof(addrbuf)); - Serial.print(owEmit);Serial.print("=");Serial.println(val); - } - owItem = aJson.getObjectItem(owObj, "item")->valuestring; - } else Serial.println(F("Not find")); - - - /* No sw support anymore - switch (addr[0]){ - case 0x29: // DS2408 - snprintf(addrstr,sizeof(addrstr),"%sS0%s",outprefix,addrbuf); - // Serial.println(addrstr); - client.publish(addrstr, (val & SW_STAT0)?"ON":"OFF"); - snprintf(addrstr,sizeof(addrstr),"%sS1%s",outprefix,addrbuf); - // Serial.println(addrstr); - client.publish(addrstr, (val & SW_STAT1)?"ON":"OFF"); - snprintf(addrstr,sizeof(addrstr),"%sS2%s",outprefix,addrbuf); - // Serial.println(addrstr); - client.publish(addrstr, (val & SW_AUX0)?"OFF":"ON"); - snprintf(addrstr,sizeof(addrstr),"%sS3%s",outprefix,addrbuf); - // Serial.println(addrstr); - client.publish(addrstr, (val & SW_AUX1)?"OFF":"ON"); - break; - - case 0x28: // Thermomerer - - snprintf(addrstr,sizeof(addrstr),"%s%s",outprefix,addrbuf); - sprintf(valstr,"%d",val); - //Serial.println(val); - //Serial.println(valstr); - client.publish(addrstr, valstr); - - if (owItem) - { - thermoSetCurTemp(owItem,val); - } - break; - - case 0x01: - case 0x81: - snprintf(addrstr,sizeof(addrstr),"%sDS%s",outprefix,addrbuf); - if (val) sprintf(valstr,"%s","ON"); else sprintf(valstr,"%s","OFF"); - client.publish(addrstr, valstr); - } - */ - - if ((val==-127) || (val==85)) - { -// Serial.print("Temp err ");Serial.println(t); - return; - } - - strcpy_P (addrstr,outprefix); - strncat (addrstr,addrbuf,sizeof(addrstr)); - //snprintf(addrstr,sizeof(addrstr),"%s%s",F(outprefix),addrbuf); - sprintf(valstr,"%d",val); - client.publish(addrstr, valstr); - - if (owItem) - { - thermoSetCurTemp(owItem,val); ///TODO: Refactore using Items interface - } -} -#endif - -void modbusIdle(void) ; - -void _handleHelp(int arg_cnt, char **args) -//(char* tokens) -{ - Serial.println(F("Use the commands: 'help' - this text\n'save' - save config in NVRAM\n'get' - get config from pre-configured URL\n'load' - load config from NVRAM\n'kill' - test watchdog")); -} - -void _kill(int arg_cnt, char **args) -{ - for (short i=17;i>0;i--) {delay(1000);Serial.println(i);}; -} - -#define EEPROM_offset 32+6 - -void parseConfig() -{ int mc,incnt; - //DMX out is configured - aJsonObject *dmxoutArr = aJson.getObjectItem(root, "dmx"); - #ifdef _dmxout - if (dmxoutArr && aJson.getArraySize(dmxoutArr)==2) - { - DMXoutSetup(mc=aJson.getArrayItem(dmxoutArr,1)->valueint,aJson.getArrayItem(dmxoutArr,0)->valueint); - Serial.print(F("DMX out started. Channels: ")); - Serial.println(mc); - } - #endif - //DMX in is configured - #ifdef _dmxin - dmxArr= aJson.getObjectItem(root, "dmxin"); - if (dmxArr && (incnt=aJson.getArraySize(dmxArr))) - { - DMXinSetup(incnt*4); - Serial.print(F("DMX in started. Channels:")); - Serial.println(incnt*4); - } - #endif - - items = aJson.getObjectItem(root,"items"); - modbusitem = items->child; - inputs = aJson.getObjectItem(root,"in"); - - #ifdef _modbus - modbusArr= aJson.getObjectItem(root, "modbus"); - #endif - - mqttArr= aJson.getObjectItem(root, "mqtt"); - - #ifdef _owire - owArr= aJson.getObjectItem(root, "ow"); - #endif - - Serial.println(F("Configured:")); - - Serial.print(F("items ")); printBool(items); - Serial.print(F("inputs ")); printBool(inputs); - Serial.print(F("modbus ")); printBool(modbusArr); - Serial.print(F("mqtt ")); printBool(mqttArr); - Serial.print(F("1-wire ")); printBool(owArr); - - #ifdef _owire - if (owArr && !owReady) - { - aJsonObject * item= owArr->child; - owReady=owSetup(&Changed); - - while (item) - { - if ((item->type==aJson_Object) ) - { - DeviceAddress addr; - //Serial.print(F("Add:")),Serial.println(item->name); - SetAddr(item->name,addr); - owAdd(addr); - } - item=item->next; - } - - } - #endif -} - -void _loadConfig (int arg_cnt, char **args) {loadConfig(arg_cnt,args);restoreState();} -int loadConfig (int arg_cnt, char **args) -//(char* tokens) -{ char ch; - Serial.println(F("loading Config")); - - ch=EEPROM.read(EEPROM_offset); - if (ch=='{') - { - aJsonEEPROMStream as=aJsonEEPROMStream(EEPROM_offset); - aJson.deleteItem(root); - root = aJson.parse(&as); - Serial.println(); - if (!root) - { - Serial.println(F("load failed")); - return 0; - } - Serial.println(F("Loaded")); - parseConfig(); - return 1; - } - else - { - Serial.println(F("No stored config")); - return 0; - - } -} - -void _mqttConfigReq (int arg_cnt, char **args) {mqttConfigReq(arg_cnt,args);restoreState();} - - -int mqttConfigReq (int arg_cnt, char **args) -//(char* tokens) -{ - char buf[25] ="/"; - Serial.println(F("request MQTT Config")); - SetBytes((uint8_t*)mac,6,buf+1); - buf[13]=0; - strncat(buf,"/resp/#",25); - Serial.println(buf); - client.subscribe(buf); - buf[13]=0; - strncat(buf,"/req/conf",25); - Serial.println(buf); - client.publish(buf,"1"); - - } - - -int mqttConfigResp (char * as) -{ - Serial.println(F("got MQTT Config")); - - //aJsonEEPROMStream as=aJsonEEPROMStream(EEPROM_offset); - - //aJson.deleteItem(root); - root = aJson.parse(as); - Serial.println(); - if (!root) - { - Serial.println(F("load failed")); - return 0; - } - Serial.println(F("Loaded")); - parseConfig(); - return 1; -} - -void _saveConfig(int arg_cnt, char **args) -//(char* tokens) -{ - aJsonEEPROMStream es=aJsonEEPROMStream(EEPROM_offset); - Serial.println(F("Saving config..")); - aJson.print(root,&es); - es.putEOF(); - Serial.println(F("Saved")); - -} - - -void _setConfig(int arg_cnt, char **args) -{ - - //Serial.print("Got:"); - //Serial.println(args[1]); - if (sscanf(args[1], "%x:%x:%x:%x:%x:%x%с", - &mac[0], - &mac[1], - &mac[2], - &mac[3], - &mac[4], - &mac[5]) < 6) -{ - Serial.print(F("could not parse: ")); - Serial.println(args[1]); - return; -} - printMACAddress(); - for (short i=0;i<6;i++) { EEPROM.write(i, mac[i]);} - Serial.println(F("Updated")); - -} - -void _getConfig(int arg_cnt, char **args) {getConfig(arg_cnt,args);restoreState();} - -void printBool (bool arg) -{if (arg) Serial.println(F("on")); else Serial.println(F("off"));} - - -void saveFlash(short n, char* str) -{} - -void loadFlash(short n, char* str) -{} - -int getConfig (int arg_cnt, char **args) -//(char *tokens) -{ - - - int returnCode =0; - char ch; - char URI [32]; - char server[32] = "lazyhome.ru"; - if (arg_cnt>0) { - strncpy(server,args[1],sizeof(server)-1); - saveFlash(0,server); - } - else loadFlash(0,server); - - snprintf(URI, sizeof(URI), "/%02x-%02x-%02x-%02x-%02x-%02x.config.json",mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); - Serial.println(F("Config URI: "));Serial.print(F("http://"));Serial.print(server);Serial.println(URI); - - #if defined(__AVR__) - FILE* result; - //byte hserver[] = { 192,168,88,2 }; - wdt_dis(); - HTTPClient hclient(server,80); - - - // FILE is the return STREAM type of the HTTPClient - result = hclient.getURI( URI); - returnCode = hclient.getLastReturnCode(); - wdt_en(); - if (result!=NULL) { - if (returnCode==200) { - - Serial.println(F("got Config")); - aJsonFileStream as=aJsonFileStream(result); - aJson.deleteItem(root); - root = aJson.parse(&as); - hclient.closeStream(result); // this is very important -- be sure to close the STREAM - - if (!root) - { - Serial.println(F("Config parsing failed")); - lanCheck=millis()+15000; - return -11; - } - else - { - char * outstr=aJson.print(root); - Serial.println(outstr); - free (outstr); - - parseConfig(); - - - } - - } - else { - Serial.print(F("ERROR: Server returned ")); - Serial.println(returnCode); - lanCheck=millis()+5000; - return -11; - } - - } - else { - Serial.println(F("failed to connect")); - Serial.println(F(" try again in 5 seconds")); - lanCheck=millis()+5000; - return -11; - } - - #else - //Non AVR code - String response; - - HttpClient htclient = HttpClient(ethClient, server, 80); - htclient.setHttpResponseTimeout(4000); - wdt_res(); - //Serial.println("making GET request"); - htclient.beginRequest(); - htclient.get(URI); - htclient.endRequest(); - - - // read the status code and body of the response - returnCode = htclient.responseStatusCode(); - response = htclient.responseBody(); - htclient.stop(); - wdt_res(); - Serial.print("HTTP Status code: "); - Serial.println(returnCode); - //Serial.print("GET Response: "); - - if (returnCode==200) - { - aJson.deleteItem(root); - root = aJson.parse((char*) response.c_str()); - - if (!root) - { - Serial.println(F("Config parsing failed")); - // lanCheck=millis()+15000; - return -11; //Load from NVRAM - } - else - { - /* - char * outstr=aJson.print(root); - Serial.println(outstr); - free (outstr); - */ - Serial.println(response); - parseConfig(); - - - } - } - else - { - Serial.println(F("Config retrieving failed")); - //lanCheck=millis()+15000; - return -11; //Load from NVRAM - } - - - #endif - return 2; -} - -#define TXEnablePin 13 -void preTransmission() -{ - digitalWrite(TXEnablePin, 1); -} - -void postTransmission() -{ - //modbusSerial.flush(); - digitalWrite(TXEnablePin, 0); -} - -void setup() { - cmdInit(115200); - - Serial.println(F("\nLazyhome.ru LightHub controller v0.97")); - - cmdAdd("help", _handleHelp); - cmdAdd("save", _saveConfig); - cmdAdd("load", _loadConfig); - cmdAdd("get", _getConfig); - cmdAdd("set", _setConfig); - cmdAdd("kill", _kill); - cmdAdd("req", _mqttConfigReq); - - - #ifdef __ESP__ - espSetup(); - #endif - - short macvalid=0; - byte defmac[6]={0xDE,0xAD,0xBE,0xEF,0xFE,0}; - - for (short i=0;i<6;i++) - { - mac[i]=EEPROM.read(i); - if (mac[i]!=0 && mac[i]!=0xff) macvalid=1; - } - if (!macvalid) - { - Serial.println(F("Invalid MAC: set default")); - memcpy(mac,defmac,6); - } - printMACAddress(); - - loadConfig(0,NULL); - - #ifdef _modbus - pinMode(TXEnablePin,OUTPUT); - modbusSerial.begin(9600); - - node.idle(&modbusIdle); - // Callbacks allow us to configure the RS485 transceiver correctly - node.preTransmission(preTransmission); - node.postTransmission(postTransmission); - #endif - - delay(20); - - owReady=0; - - #ifdef _owire - if (net) net->idle(&owIdle); - #endif - - //client.setServer(server, 1883); - client.setCallback(callback); - - - #ifdef _artnet - ArtnetSetup(); - #endif - -#if defined(__SAM3X8E__) -// checkForRemoteSketchUpdate(); -#endif - - -} - - void loop(){ - wdt_res(); - - //commandLine.update(); - cmdPoll(); -if (lanLoop() >1) - { - client.loop(); - #ifdef _artnet - if (artnet) artnet->read(); - #endif - } - -#ifdef _owire -if (owReady && owArr) owLoop(); -#endif - -#ifdef _dmxin -// unsigned long lastpacket = DMXSerial.noDataSince(); - DMXCheck(); -#endif - // if (lastpacket && (lastpacket%10==0)) Serial.println(lastpacket); - - - - #ifdef _modbus - if (modbusArr && items) modbusLoop(); - #endif - - #ifdef _owire - if (items) thermoLoop(); - #endif - - if (inputs) inputLoop(); - -#if defined (_espdmx) - dmxout.update(); -#endif - -} - -// Idle handlers -void owIdle(void) -{ -#ifdef _artnet - if (artnet) artnet->read(); -#endif - - wdt_res(); - return;/// - Serial.print("o"); - -if (lanLoop() == 1) client.loop(); -//if (owReady) owLoop(); - -#ifdef _dmxin - DMXCheck(); -#endif - -#if defined (_espdmx) - dmxout.update(); -#endif - - //modbusLoop(); - } - - -void modbusIdle(void) -{ - //Serial.print("m"); - - wdt_res(); -if (lanLoop() > 1) - { - client.loop(); - #ifdef _artnet - if (artnet) artnet->read(); - #endif - } - -//if (owReady) owLoop(); -#ifdef _dmxin - DMXCheck(); -#endif - -#if defined (_espdmx) - dmxout.update(); -#endif - - //modbusloop(); - } - - - -// Loops - - - -void inputLoop(void) -{ - - if (millis()>incheck) - { - - aJsonObject * input= inputs->child; - - while (input) - { - if ((input->type==aJson_Object) ) - { - Input in(input); - in.Pool(); - } - input=input->next; - } - - - incheck=millis()+50; - - } - -} - -void modbusLoop(void) -{ - boolean done=false; - if (millis()>modbuscheck) - { - while (modbusitem && !done) - { - if (modbusitem->type==aJson_Array) - { - switch (aJson.getArrayItem(modbusitem, 0)->valueint) - { - case CH_MODBUS: - //case CH_VCTEMP: - case CH_VC: - { - Item it(modbusitem); - it.Pool(); - modbuscheck=millis()+2000; - done=true; - break; //case; - } - } //switch - - }//if - modbusitem=modbusitem->next; - if (!modbusitem) {modbusitem=items->child;return;} //start from 1-st element - } //while - }//if -} - - -// To be refactored - -void thermoLoop(void) -{ -#define T_ATTEMPTS 200 -#define IET_TEMP 0 -#define IET_ATTEMPTS 1 - - if (millis()>thermocheck) - { - - aJsonObject * item= items->child; - - while (item) - { - if ((item->type==aJson_Array) && (aJson.getArrayItem(item, 0)->valueint==CH_THERMO) && (aJson.getArraySize(item)>4)) - { - int pin=aJson.getArrayItem(item, I_ARG)->valueint; - int temp=aJson.getArrayItem(item, I_VAL)->valueint; - - int cmd=aJson.getArrayItem(item, I_CMD)->valueint; - - aJsonObject * extArr=aJson.getArrayItem(item, I_EXT); - - if (extArr && (aJson.getArraySize(extArr)>1) ) - { - int curtemp = aJson.getArrayItem(extArr, IET_TEMP)->valueint; - if (!aJson.getArrayItem(extArr, IET_ATTEMPTS)->valueint) - { - Serial.print(item->name);Serial.println(F(" Expired")); - - } - else - { - if (! (--aJson.getArrayItem(extArr, IET_ATTEMPTS)->valueint)) client.publish("/alarm",item->name); - - } - Serial.print(item->name);Serial.print(F(" Set:"));Serial.print(temp); Serial.print(F(" Curtemp:"));Serial.print(curtemp); Serial.print(F( " cmd:")); Serial.print(cmd), - - pinMode(pin,OUTPUT); - if (cmd==CMD_OFF || cmd==CMD_HALT || aJson.getArrayItem(extArr, IET_ATTEMPTS)->valueint==0) {digitalWrite(pin,LOW);Serial.println(F(" OFF"));} - else - { - if (curtemp+GISTnext; - } - - - thermocheck=millis()+5000; - Serial.println(freeRam()); - } - -} - - - -short thermoSetCurTemp(char * name, short t) -{ -if (items) - { - aJsonObject *item= aJson.getObjectItem(items, name); - if (item && (item->type==aJson_Array) && (aJson.getArrayItem(item, I_TYPE)->valueint==CH_THERMO) && (aJson.getArraySize(item)>=4)) - { - aJsonObject * extArray =NULL; - - if (aJson.getArraySize(item)==4) //No thermo extension yet - { - extArray = aJson.createArray(); //Create Ext Array - - aJsonObject * ocurt=aJson.createItem(t); //Create int - aJsonObject * oattempts=aJson.createItem(T_ATTEMPTS); //Create int - aJson.addItemToArray(extArray,ocurt); - aJson.addItemToArray(extArray,oattempts); - aJson.addItemToArray(item,extArray); //Adding to item - } //if - else if (extArray=aJson.getArrayItem(item,I_EXT)) - { - aJsonObject * att = aJson.getArrayItem(extArray, IET_ATTEMPTS); - aJson.getArrayItem(extArray, IET_TEMP)->valueint=t; - if (att->valueint == 0) client.publish("/alarmoff",item->name); - att->valueint =(int) T_ATTEMPTS; - } //if - - - } //if -} // if items - -} //proc + loop_main(); +} \ No newline at end of file diff --git a/lighthub/main.cpp b/lighthub/main.cpp new file mode 100644 index 0000000..cb34fb3 --- /dev/null +++ b/lighthub/main.cpp @@ -0,0 +1,1200 @@ +/* Copyright © 2017-2018 Andrey Klimov. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Homepage: http://lazyhome.ru +GIT: https://github.com/anklimov/lighthub +e-mail anklimov@gmail.com + + + + * + * + * Done: + * MQMT/openhab + * 1-wire + * DMX - out + * DMX IN + * 1809 strip out (discarded) + * Modbus master Out + * DHCP + * JSON config + * cli + * PWM Out 7,8,9 + * 1-w relay out + * Termostat out + +Todo +=== +A/C control/Dimmer ? +rotary encoder local ctrl +analog in local ctrl +Smooth regulation/fading +PID Termostat out +dmx relay out +Relay array channel +Relay DMX array channel +Config URL configuration + +todo DUE related: +HTTP +PWM freq fix +Config webserver + +todo ESP: +Ethernet - to wifi portation +DMX-OUT deploy on USART1 +Config webserver + +*/ +#if defined(__ESP__) +#include //this needs to be first, or it all crashes and burns... +#endif + +#include "main.h" + +// Configuration of drivers enabled +#include "options.h" + + +#include +#include +#include "utils.h" + +#include +#include +#include "aJSON.h" +#include +#include "stdarg.h" + +#if defined(__AVR__) +#include "HTTPClient.h" +#include +#include +#define wdt_en() wdt_enable(WDTO_8S) +#define wdt_dis() wdt_disable() +#define wdt_res() wdt_reset() +#else +#include +#endif + +#if defined(__SAM3X8E__) +#include + DueFlashStorage EEPROM; +#include +#define wdt_res() watchdogReset() +#define wdt_en() +#define wdt_dis() + +#else +#include +#endif + +#if defined(__ESP__) +#include "esp.h" +#define wdt_res() +#define wdt_en() +#define wdt_dis() + + +#else + +#ifdef Wiz5500 +#include +#else +#include +#endif + +EthernetClient ethClient; +#endif + +#ifdef _owire +#include "owTerm.h" +#endif + +#if defined(_dmxin) || defined(_dmxout) || defined (_artnet) +#include "dmx.h" +#endif + +#include "item.h" +#include "inputs.h" + +#ifdef _artnet +#include +extern Artnet *artnet; +#endif + +// Hardcoded definitions +//Thermostate histeresys +#define GIST 2 +//#define serverip "192.168.88.2" +//IPAddress server(192, 168, 88, 2); //TODO - configure it +//char* inprefix=("/myhome/in/"); +//char* outprefix=("/myhome/s_out/"); +//char* subprefix=("/myhome/in/#"); + +#define inprefix "/myhome/in/" +const char outprefix[] PROGMEM = "/myhome/s_out/"; +#define subprefix "/myhome/in/#" + +aJsonObject *root = NULL; +aJsonObject *items = NULL; +aJsonObject *inputs = NULL; + +aJsonObject *mqttArr = NULL; +aJsonObject *modbusArr = NULL; +aJsonObject *owArr = NULL; +aJsonObject *dmxArr = NULL; + +unsigned long modbuscheck=0; +unsigned long incheck =0; +unsigned long lanCheck =0; +unsigned long thermocheck=0; + +aJsonObject * modbusitem= NULL; + +bool owReady = false; +int lanStatus = 0; + +#ifdef _modbus +ModbusMaster node; +#endif + +byte mac[6]; + + +PubSubClient client(ethClient); + + +void watchdogSetup(void){} //Do not remove - strong re-definition WDT Init for DUE + +// MQTT Callback routine +void callback(char* topic, byte* payload, unsigned int length) { + payload[length]=0; + Serial.print(F("[")); + Serial.print(topic); + Serial.print("] "); + + int fr = freeRam(); + if (fr<250) {Serial.println(F("OOM!"));return;} + +#define sublen 20 + char subtopic[sublen]=""; + int cmd = 0; + + for (int i=0;ibegin(); +#endif + + break; + case 2: // IP Ready, config loaded, Connecting broker & subscribe +//Arming Watchdog + wdt_res(); + { + short n=0; + int port=1883; + char empty=0; + char * user = ∅ + char * pass = ∅ + + if (!client.connected() && mqttArr && ((n=aJson.getArraySize(mqttArr))>1)) { + char *c=aJson.getArrayItem(mqttArr,0)->valuestring; + char *servername=aJson.getArrayItem(mqttArr,1)->valuestring; + if (n>=3) port=aJson.getArrayItem(mqttArr,2)->valueint; + + if (n>=4) user=aJson.getArrayItem(mqttArr,3)->valuestring; + if (n>=5) pass=aJson.getArrayItem(mqttArr,4)->valuestring; + + client.setServer(servername,port); + + Serial.print(F("Attempting MQTT connection to ")); + Serial.print(servername); + Serial.print(F(":")); + Serial.print(port); + Serial.print(F(" user:")); + Serial.print(user); + Serial.print(F(" ...")); + + if (client.connect(c,user,pass)) { + Serial.print(F("connected as "));Serial.println(c); + + + // ... and resubscribe + client.subscribe(subprefix); + + + restoreState(); + // if (_once) {DMXput(); _once=0;} + lanStatus=3; + } else { + Serial.print(F("failed, rc=")); + Serial.print(client.state()); + Serial.println(F(" try again in 5 seconds")); + lanCheck=millis()+5000; + lanStatus=-12; + } + } + break; + } + case 3: //operation + if (!client.connected()) lanStatus=2; + break; + +//Awaiting address + case -10: if (millis()>lanCheck) + lanStatus=0; + break; +//Reconnect + case -12: if (millis()>lanCheck) + + lanStatus=2; + break; + // read or Re-read config + case -11: + if (loadConfig(0,NULL)) lanStatus=2; + else {lanCheck=millis()+5000;lanStatus=-10;} + break; + + case -14: ; + // do notghing with net + } + + + { +#ifndef __ESP__ + wdt_dis(); + if (lanStatus>0) + switch (Ethernet.maintain()) + { + case 1: + //renewed fail + Serial.println(F("Error: renewed fail")); + lanStatus = -10; + break; + + case 2: + //renewed success + Serial.println(F("Renewed success")); + + //print your local IP address: + printIPAddress(); + break; + + case 3: + //rebind fail + Serial.println(F("Error: rebind fail")); + lanStatus = -10; + break; + + case 4: + //rebind success + Serial.println(F("Rebind success")); + + //print your local IP address: + printIPAddress(); + break; + + default: + //nothing happened + break; + + } + + wdt_en(); +#endif + } + + return lanStatus; + +} + +#ifdef _owire +void Changed (int i, DeviceAddress addr, int val) +{ + char addrstr[32]="NIL"; + char addrbuf[17]; + char valstr[16]="NIL"; + char *owEmit = NULL; + char *owItem = NULL; + + //PrintBytes(addr,8); + // Serial.print("Emit: "); + SetBytes(addr,8,addrbuf);addrbuf[17]=0; + + //Serial.println(addrbuf); + + aJsonObject *owObj = aJson.getObjectItem(owArr, addrbuf); + if (owObj) + { + owEmit = aJson.getObjectItem(owObj, "emit")->valuestring; + if (owEmit) + { + strncpy(addrbuf,owEmit,sizeof(addrbuf)); + Serial.print(owEmit);Serial.print("=");Serial.println(val); + } + owItem = aJson.getObjectItem(owObj, "item")->valuestring; + } else Serial.println(F("Not find")); + + + /* No sw support anymore + switch (addr[0]){ + case 0x29: // DS2408 + snprintf(addrstr,sizeof(addrstr),"%sS0%s",outprefix,addrbuf); + // Serial.println(addrstr); + client.publish(addrstr, (val & SW_STAT0)?"ON":"OFF"); + snprintf(addrstr,sizeof(addrstr),"%sS1%s",outprefix,addrbuf); + // Serial.println(addrstr); + client.publish(addrstr, (val & SW_STAT1)?"ON":"OFF"); + snprintf(addrstr,sizeof(addrstr),"%sS2%s",outprefix,addrbuf); + // Serial.println(addrstr); + client.publish(addrstr, (val & SW_AUX0)?"OFF":"ON"); + snprintf(addrstr,sizeof(addrstr),"%sS3%s",outprefix,addrbuf); + // Serial.println(addrstr); + client.publish(addrstr, (val & SW_AUX1)?"OFF":"ON"); + break; + + case 0x28: // Thermomerer + + snprintf(addrstr,sizeof(addrstr),"%s%s",outprefix,addrbuf); + sprintf(valstr,"%d",val); + //Serial.println(val); + //Serial.println(valstr); + client.publish(addrstr, valstr); + + if (owItem) + { + thermoSetCurTemp(owItem,val); + } + break; + + case 0x01: + case 0x81: + snprintf(addrstr,sizeof(addrstr),"%sDS%s",outprefix,addrbuf); + if (val) sprintf(valstr,"%s","ON"); else sprintf(valstr,"%s","OFF"); + client.publish(addrstr, valstr); + } + */ + + if ((val==-127) || (val==85)) + { +// Serial.print("Temp err ");Serial.println(t); + return; + } + + strcpy_P (addrstr,outprefix); + strncat (addrstr,addrbuf,sizeof(addrstr)); + //snprintf(addrstr,sizeof(addrstr),"%s%s",F(outprefix),addrbuf); + sprintf(valstr,"%d",val); + client.publish(addrstr, valstr); + + if (owItem) + { + thermoSetCurTemp(owItem,val); ///TODO: Refactore using Items interface + } +} +#endif + +void modbusIdle(void) ; + +void _handleHelp(int arg_cnt, char **args) +//(char* tokens) +{ + Serial.println(F("Use the commands: 'help' - this text\n'save' - save config in NVRAM\n'get' - get config from pre-configured URL\n'load' - load config from NVRAM\n'kill' - test watchdog")); +} + +void _kill(int arg_cnt, char **args) +{ + for (short i=17;i>0;i--) {delay(1000);Serial.println(i);}; +} + +#define EEPROM_offset 32+6 + +void parseConfig() +{ int mc,incnt; + //DMX out is configured + aJsonObject *dmxoutArr = aJson.getObjectItem(root, "dmx"); +#ifdef _dmxout + if (dmxoutArr && aJson.getArraySize(dmxoutArr)==2) + { + DMXoutSetup(mc=aJson.getArrayItem(dmxoutArr,1)->valueint,aJson.getArrayItem(dmxoutArr,0)->valueint); + Serial.print(F("DMX out started. Channels: ")); + Serial.println(mc); + } +#endif + //DMX in is configured +#ifdef _dmxin + dmxArr= aJson.getObjectItem(root, "dmxin"); + if (dmxArr && (incnt=aJson.getArraySize(dmxArr))) + { + DMXinSetup(incnt*4); + Serial.print(F("DMX in started. Channels:")); + Serial.println(incnt*4); + } +#endif + + items = aJson.getObjectItem(root,"items"); + modbusitem = items->child; + inputs = aJson.getObjectItem(root,"in"); + +#ifdef _modbus + modbusArr= aJson.getObjectItem(root, "modbus"); +#endif + + mqttArr= aJson.getObjectItem(root, "mqtt"); + +#ifdef _owire + owArr= aJson.getObjectItem(root, "ow"); +#endif + + Serial.println(F("Configured:")); + + Serial.print(F("items ")); printBool(items); + Serial.print(F("inputs ")); printBool(inputs); + Serial.print(F("modbus ")); printBool(modbusArr); + Serial.print(F("mqtt ")); printBool(mqttArr); + Serial.print(F("1-wire ")); printBool(owArr); + +#ifdef _owire + if (owArr && !owReady) + { + aJsonObject * item= owArr->child; + owReady=owSetup(&Changed); + + while (item) + { + if ((item->type==aJson_Object) ) + { + DeviceAddress addr; + //Serial.print(F("Add:")),Serial.println(item->name); + SetAddr(item->name,addr); + owAdd(addr); + } + item=item->next; + } + + } +#endif +} + +void _loadConfig (int arg_cnt, char **args) {loadConfig(arg_cnt,args);restoreState();} +int loadConfig (int arg_cnt, char **args) +//(char* tokens) +{ char ch; + Serial.println(F("loading Config")); + + ch=EEPROM.read(EEPROM_offset); + if (ch=='{') + { + aJsonEEPROMStream as=aJsonEEPROMStream(EEPROM_offset); + aJson.deleteItem(root); + root = aJson.parse(&as); + Serial.println(); + if (!root) + { + Serial.println(F("load failed")); + return 0; + } + Serial.println(F("Loaded")); + parseConfig(); + return 1; + } + else + { + Serial.println(F("No stored config")); + return 0; + + } +} + +void _mqttConfigReq (int arg_cnt, char **args) {mqttConfigReq(arg_cnt,args);restoreState();} + + +int mqttConfigReq (int arg_cnt, char **args) +//(char* tokens) +{ + char buf[25] ="/"; + Serial.println(F("request MQTT Config")); + SetBytes((uint8_t*)mac,6,buf+1); + buf[13]=0; + strncat(buf,"/resp/#",25); + Serial.println(buf); + client.subscribe(buf); + buf[13]=0; + strncat(buf,"/req/conf",25); + Serial.println(buf); + client.publish(buf,"1"); + +} + + +int mqttConfigResp (char * as) +{ + Serial.println(F("got MQTT Config")); + + //aJsonEEPROMStream as=aJsonEEPROMStream(EEPROM_offset); + + //aJson.deleteItem(root); + root = aJson.parse(as); + Serial.println(); + if (!root) + { + Serial.println(F("load failed")); + return 0; + } + Serial.println(F("Loaded")); + parseConfig(); + return 1; +} + +void _saveConfig(int arg_cnt, char **args) +//(char* tokens) +{ + aJsonEEPROMStream es=aJsonEEPROMStream(EEPROM_offset); + Serial.println(F("Saving config..")); + aJson.print(root,&es); + es.putEOF(); + Serial.println(F("Saved")); + +} + + +void _setConfig(int arg_cnt, char **args) +{ + + //Serial.print("Got:"); + //Serial.println(args[1]); + if (sscanf(args[1], "%x:%x:%x:%x:%x:%x%с", + &mac[0], + &mac[1], + &mac[2], + &mac[3], + &mac[4], + &mac[5]) < 6) + { + Serial.print(F("could not parse: ")); + Serial.println(args[1]); + return; + } + printMACAddress(); + for (short i=0;i<6;i++) { EEPROM.write(i, mac[i]);} + Serial.println(F("Updated")); + +} + +void _getConfig(int arg_cnt, char **args) {getConfig(arg_cnt,args);restoreState();} + +void printBool (bool arg) +{if (arg) Serial.println(F("on")); else Serial.println(F("off"));} + + +void saveFlash(short n, char* str) +{} + +void loadFlash(short n, char* str) +{} + +int getConfig (int arg_cnt, char **args) +//(char *tokens) +{ + + + int returnCode =0; + char ch; + char URI [32]; + char server[32] = "lazyhome.ru"; + if (arg_cnt>0) { + strncpy(server,args[1],sizeof(server)-1); + saveFlash(0,server); + } + else loadFlash(0,server); + + snprintf(URI, sizeof(URI), "/%02x-%02x-%02x-%02x-%02x-%02x.config.json",mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + Serial.println(F("Config URI: "));Serial.print(F("http://"));Serial.print(server);Serial.println(URI); + +#if defined(__AVR__) + FILE* result; + //byte hserver[] = { 192,168,88,2 }; + wdt_dis(); + HTTPClient hclient(server,80); + + + // FILE is the return STREAM type of the HTTPClient + result = hclient.getURI( URI); + returnCode = hclient.getLastReturnCode(); + wdt_en(); + if (result!=NULL) { + if (returnCode==200) { + + Serial.println(F("got Config")); + aJsonFileStream as=aJsonFileStream(result); + aJson.deleteItem(root); + root = aJson.parse(&as); + hclient.closeStream(result); // this is very important -- be sure to close the STREAM + + if (!root) + { + Serial.println(F("Config parsing failed")); + lanCheck=millis()+15000; + return -11; + } + else + { + char * outstr=aJson.print(root); + Serial.println(outstr); + free (outstr); + + parseConfig(); + + + } + + } + else { + Serial.print(F("ERROR: Server returned ")); + Serial.println(returnCode); + lanCheck=millis()+5000; + return -11; + } + + } + else { + Serial.println(F("failed to connect")); + Serial.println(F(" try again in 5 seconds")); + lanCheck=millis()+5000; + return -11; + } + +#else + //Non AVR code + String response; + + HttpClient htclient = HttpClient(ethClient, server, 80); + htclient.setHttpResponseTimeout(4000); + wdt_res(); + //Serial.println("making GET request"); + htclient.beginRequest(); + htclient.get(URI); + htclient.endRequest(); + + + // read the status code and body of the response + returnCode = htclient.responseStatusCode(); + response = htclient.responseBody(); + htclient.stop(); + wdt_res(); + Serial.print("HTTP Status code: "); + Serial.println(returnCode); + //Serial.print("GET Response: "); + + if (returnCode==200) + { + aJson.deleteItem(root); + root = aJson.parse((char*) response.c_str()); + + if (!root) + { + Serial.println(F("Config parsing failed")); + // lanCheck=millis()+15000; + return -11; //Load from NVRAM + } + else + { + /* + char * outstr=aJson.print(root); + Serial.println(outstr); + free (outstr); + */ + Serial.println(response); + parseConfig(); + + + } + } + else + { + Serial.println(F("Config retrieving failed")); + //lanCheck=millis()+15000; + return -11; //Load from NVRAM + } + + +#endif + return 2; +} + +#define TXEnablePin 13 +void preTransmission() +{ + digitalWrite(TXEnablePin, 1); +} + +void postTransmission() +{ + //modbusSerial.flush(); + digitalWrite(TXEnablePin, 0); +} + +void setup_main() { + cmdInit(115200); + + Serial.println(F("\nLazyhome.ru LightHub controller v0.97")); + + cmdAdd("help", _handleHelp); + cmdAdd("save", _saveConfig); + cmdAdd("load", _loadConfig); + cmdAdd("get", _getConfig); + cmdAdd("set", _setConfig); + cmdAdd("kill", _kill); + cmdAdd("req", _mqttConfigReq); + + +#ifdef __ESP__ + espSetup(); +#endif + + short macvalid=0; + byte defmac[6]={0xDE,0xAD,0xBE,0xEF,0xFE,0}; + + for (short i=0;i<6;i++) + { + mac[i]=EEPROM.read(i); + if (mac[i]!=0 && mac[i]!=0xff) macvalid=1; + } + if (!macvalid) + { + Serial.println(F("Invalid MAC: set default")); + memcpy(mac,defmac,6); + } + printMACAddress(); + + loadConfig(0,NULL); + +#ifdef _modbus + pinMode(TXEnablePin,OUTPUT); + modbusSerial.begin(9600); + + node.idle(&modbusIdle); + // Callbacks allow us to configure the RS485 transceiver correctly + node.preTransmission(preTransmission); + node.postTransmission(postTransmission); +#endif + + delay(20); + + owReady=0; + +#ifdef _owire + if (net) net->idle(&owIdle); +#endif + + //client.setServer(server, 1883); + client.setCallback(callback); + + +#ifdef _artnet + ArtnetSetup(); +#endif + +#if defined(__SAM3X8E__) + // checkForRemoteSketchUpdate(); +#endif + + +} + + +void loop_main(){ + wdt_res(); + + //commandLine.update(); + cmdPoll(); + if (lanLoop() >1) + { + client.loop(); +#ifdef _artnet + if (artnet) artnet->read(); +#endif + } + +#ifdef _owire + if (owReady && owArr) owLoop(); +#endif + +#ifdef _dmxin +// unsigned long lastpacket = DMXSerial.noDataSince(); + DMXCheck(); +#endif + // if (lastpacket && (lastpacket%10==0)) Serial.println(lastpacket); + + + +#ifdef _modbus + if (modbusArr && items) modbusLoop(); +#endif + +#ifdef _owire + if (items) thermoLoop(); +#endif + + if (inputs) inputLoop(); + +#if defined (_espdmx) + dmxout.update(); +#endif + +} + +// Idle handlers +void owIdle(void) +{ +#ifdef _artnet + if (artnet) artnet->read(); +#endif + + wdt_res(); + return;/// + Serial.print("o"); + + if (lanLoop() == 1) client.loop(); +//if (owReady) owLoop(); + +#ifdef _dmxin + DMXCheck(); +#endif + +#if defined (_espdmx) + dmxout.update(); +#endif + + //modbusLoop(); +} + + +void modbusIdle(void) +{ + //Serial.print("m"); + + wdt_res(); + if (lanLoop() > 1) + { + client.loop(); +#ifdef _artnet + if (artnet) artnet->read(); +#endif + } + +//if (owReady) owLoop(); +#ifdef _dmxin + DMXCheck(); +#endif + +#if defined (_espdmx) + dmxout.update(); +#endif + + //modbusloop(); +} + + + +// Loops + + + +void inputLoop(void) +{ + + if (millis()>incheck) + { + + aJsonObject * input= inputs->child; + + while (input) + { + if ((input->type==aJson_Object) ) + { + Input in(input); + in.Pool(); + } + input=input->next; + } + + + incheck=millis()+50; + + } + +} + +void modbusLoop(void) +{ + boolean done=false; + if (millis()>modbuscheck) + { + while (modbusitem && !done) + { + if (modbusitem->type==aJson_Array) + { + switch (aJson.getArrayItem(modbusitem, 0)->valueint) + { + case CH_MODBUS: + //case CH_VCTEMP: + case CH_VC: + { + Item it(modbusitem); + it.Pool(); + modbuscheck=millis()+2000; + done=true; + break; //case; + } + } //switch + + }//if + modbusitem=modbusitem->next; + if (!modbusitem) {modbusitem=items->child;return;} //start from 1-st element + } //while + }//if +} + + +// To be refactored + +void thermoLoop(void) +{ +#define T_ATTEMPTS 200 +#define IET_TEMP 0 +#define IET_ATTEMPTS 1 + + if (millis()>thermocheck) + { + + aJsonObject * item= items->child; + + while (item) + { + if ((item->type==aJson_Array) && (aJson.getArrayItem(item, 0)->valueint==CH_THERMO) && (aJson.getArraySize(item)>4)) + { + int pin=aJson.getArrayItem(item, I_ARG)->valueint; + int temp=aJson.getArrayItem(item, I_VAL)->valueint; + + int cmd=aJson.getArrayItem(item, I_CMD)->valueint; + + aJsonObject * extArr=aJson.getArrayItem(item, I_EXT); + + if (extArr && (aJson.getArraySize(extArr)>1) ) + { + int curtemp = aJson.getArrayItem(extArr, IET_TEMP)->valueint; + if (!aJson.getArrayItem(extArr, IET_ATTEMPTS)->valueint) + { + Serial.print(item->name);Serial.println(F(" Expired")); + + } + else + { + if (! (--aJson.getArrayItem(extArr, IET_ATTEMPTS)->valueint)) client.publish("/alarm",item->name); + + } + Serial.print(item->name);Serial.print(F(" Set:"));Serial.print(temp); Serial.print(F(" Curtemp:"));Serial.print(curtemp); Serial.print(F( " cmd:")); Serial.print(cmd), + + pinMode(pin,OUTPUT); + if (cmd==CMD_OFF || cmd==CMD_HALT || aJson.getArrayItem(extArr, IET_ATTEMPTS)->valueint==0) {digitalWrite(pin,LOW);Serial.println(F(" OFF"));} + else + { + if (curtemp+GISTnext; + } + + + thermocheck=millis()+5000; + Serial.println(freeRam()); + } + +} + + + +short thermoSetCurTemp(char * name, short t) +{ + if (items) + { + aJsonObject *item= aJson.getObjectItem(items, name); + if (item && (item->type==aJson_Array) && (aJson.getArrayItem(item, I_TYPE)->valueint==CH_THERMO) && (aJson.getArraySize(item)>=4)) + { + aJsonObject * extArray =NULL; + + if (aJson.getArraySize(item)==4) //No thermo extension yet + { + extArray = aJson.createArray(); //Create Ext Array + + aJsonObject * ocurt=aJson.createItem(t); //Create int + aJsonObject * oattempts=aJson.createItem(T_ATTEMPTS); //Create int + aJson.addItemToArray(extArray,ocurt); + aJson.addItemToArray(extArray,oattempts); + aJson.addItemToArray(item,extArray); //Adding to item + } //if + else if (extArray=aJson.getArrayItem(item,I_EXT)) + { + aJsonObject * att = aJson.getArrayItem(extArray, IET_ATTEMPTS); + aJson.getArrayItem(extArray, IET_TEMP)->valueint=t; + if (att->valueint == 0) client.publish("/alarmoff",item->name); + att->valueint =(int) T_ATTEMPTS; + } //if + + + } //if + } // if items + +} //proc diff --git a/lighthub/main.h b/lighthub/main.h new file mode 100644 index 0000000..16ce1e9 --- /dev/null +++ b/lighthub/main.h @@ -0,0 +1,47 @@ +// +// Created by livello on 13.03.18. +// + +#ifndef LIGHTHUB_MAIN_H +#define LIGHTHUB_MAIN_H + +#endif //LIGHTHUB_MAIN_H + +#include "Arduino.h" +#include "DallasTemperature.h" + +void watchdogSetup(void); +void callback(char* topic, byte* payload, unsigned int length); +#ifndef __ESP__ +void printIPAddress(); +#endif +void printMACAddress(); +void restoreState(); +int lanLoop(); +void Changed (int i, DeviceAddress addr, int val); +void modbusIdle(void); +void _handleHelp(int arg_cnt, char **args); +void _kill(int arg_cnt, char **args); +void parseConfig(); +void _loadConfig (int arg_cnt, char **args); +int loadConfig (int arg_cnt, char **args); +void _mqttConfigReq (int arg_cnt, char **args); +int mqttConfigReq (int arg_cnt, char **args); +int mqttConfigResp (char * as); +void _saveConfig(int arg_cnt, char **args); +void _setConfig(int arg_cnt, char **args); +void _getConfig(int arg_cnt, char **args); +void printBool (bool arg); +void saveFlash(short n, char* str); +void loadFlash(short n, char* str); +int getConfig (int arg_cnt, char **args); +void preTransmission(); +void postTransmission(); +void setup_main(); +void loop_main(); +void owIdle(void); +void modbusIdle(void); +void inputLoop(void); +void modbusLoop(void); +void thermoLoop(void); +short thermoSetCurTemp(char * name, short t); From cbb606fc651710ea0f2a1b8315329c46ad7c5a42 Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 00:42:47 +0300 Subject: [PATCH 05/21] pio-my --- lighthub/main.cpp | 3 +-- platformio.ini | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lighthub/main.cpp b/lighthub/main.cpp index cb34fb3..2aac7f0 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -334,8 +334,7 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1; #endif break; - case 2: // IP Ready, config loaded, Connecting broker & subscribe -//Arming Watchdog + case 2: // IP Ready, config loaded, Connecting broker & subscribeArming Watchdog wdt_res(); { short n=0; diff --git a/platformio.ini b/platformio.ini index 8408de8..c9db7f0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,8 +15,8 @@ platform = atmelavr board = megaatmega2560 framework = arduino lib_deps = -; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 - https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 +; https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DmxSimple https://github.com/anklimov/httpClient From d11652e1dcde4ffa87da891a323ea33ebbf03c89 Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 01:02:58 +0300 Subject: [PATCH 06/21] wdt disable --- lighthub/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 2aac7f0..1b7ba8a 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -81,9 +81,12 @@ Config webserver #include "HTTPClient.h" #include #include -#define wdt_en() wdt_enable(WDTO_8S) +//#define wdt_en() wdt_enable(WDTO_8S) +//#define wdt_dis() wdt_disable() +//#define wdt_res() wdt_reset() +#define wdt_en() wdt_disable() #define wdt_dis() wdt_disable() -#define wdt_res() wdt_reset() +#define wdt_res() wdt_disable() #else #include #endif From 9b946bb19a8180cdb2f2e019996fc2cf1b5766b0 Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 01:27:42 +0300 Subject: [PATCH 07/21] env_default, libdeps_dir --- platformio.ini | 83 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index c9db7f0..0e64364 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,4 +1,4 @@ -; PlatformIO Project Configuration File +; PlatformIO Project Configuration File (for copy and paste) ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags @@ -9,11 +9,54 @@ ; http://docs.platformio.org/page/projectconf.html [platformio] src_dir = lighthub +env_default = megaatmega2560,due + +[env:due] +platform = atmelsam +framework = arduino +board = due +libdeps_dir = .piolibdeps/due +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 +; https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED + +[env:due-5500] +platform = atmelsam +framework = arduino +board = due +build_flags = -D Wiz5500 +libdeps_dir = .piolibdeps/due-5500 +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git [env:megaatmega2560] platform = atmelavr board = megaatmega2560 framework = arduino +libdeps_dir = .piolibdeps/megaatmega2560 lib_deps = https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 ; https://github.com/anklimov/Arduino-Temperature-Control-Library.git @@ -29,3 +72,41 @@ lib_deps = https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git FastLED + +[env:megaatmega2560-5500] +platform = atmelavr +board = megaatmega2560 +framework = arduino +libdeps_dir = .piolibdeps/megaatmega2560-5500 +build_flags = -D Wiz5500 +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + +[env:espressif8266] +platform = espressif8266 +framework = arduino +board = nodemcuv2 +libdeps_dir = .piolibdeps/espressif8266 +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/ESP-Dmx + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + From 954aa42e3750b079ac0717823ee353011968e69b Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 01:29:22 +0300 Subject: [PATCH 08/21] env_default, libdeps_dir --- platformio.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 0e64364..7bb2a18 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,9 @@ ; http://docs.platformio.org/page/projectconf.html [platformio] src_dir = lighthub -env_default = megaatmega2560,due +env_default = + megaatmega2560 + due [env:due] platform = atmelsam From cfe96adc0c8770b7327dfb17624f05105b3df072 Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 02:23:32 +0300 Subject: [PATCH 09/21] env_default, libdeps_dir does not help --- lighthub/lighthub.ino | 2 +- platformio.ini | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lighthub/lighthub.ino b/lighthub/lighthub.ino index 6b6e960..467cc94 100644 --- a/lighthub/lighthub.ino +++ b/lighthub/lighthub.ino @@ -4,4 +4,4 @@ void setup(){ } void loop(){ loop_main(); -} \ No newline at end of file +} diff --git a/platformio.ini b/platformio.ini index 7bb2a18..1fefee3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,13 +11,12 @@ src_dir = lighthub env_default = megaatmega2560 - due +; due [env:due] platform = atmelsam framework = arduino board = due -libdeps_dir = .piolibdeps/due lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 @@ -39,7 +38,6 @@ platform = atmelsam framework = arduino board = due build_flags = -D Wiz5500 -libdeps_dir = .piolibdeps/due-5500 lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/anklimov/Arduino-Temperature-Control-Library.git @@ -58,7 +56,6 @@ lib_deps = platform = atmelavr board = megaatmega2560 framework = arduino -libdeps_dir = .piolibdeps/megaatmega2560 lib_deps = https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 ; https://github.com/anklimov/Arduino-Temperature-Control-Library.git @@ -79,7 +76,6 @@ lib_deps = platform = atmelavr board = megaatmega2560 framework = arduino -libdeps_dir = .piolibdeps/megaatmega2560-5500 build_flags = -D Wiz5500 lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git @@ -99,7 +95,6 @@ lib_deps = platform = espressif8266 framework = arduino board = nodemcuv2 -libdeps_dir = .piolibdeps/espressif8266 lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire From 389dc31c058d8e4d98983b7c3a617795e7440381 Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 02:32:32 +0300 Subject: [PATCH 10/21] env_default, libdeps_dir does not help --- pio_run_error_log.txt | 1848 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1848 insertions(+) create mode 100644 pio_run_error_log.txt diff --git a/pio_run_error_log.txt b/pio_run_error_log.txt new file mode 100644 index 0000000..91de2e2 --- /dev/null +++ b/pio_run_error_log.txt @@ -0,0 +1,1848 @@ +livello@lserver ~/PROG/lighthub $ rm .piolibdeps/ -R -f && pio run -e megaatmega2560 + +[Wed Mar 14 02:13:43 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino) +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +LibraryManager: Installing Arduino-Temperature-Control-Library +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-d4rqwB-package»… +remote: Counting objects: 337, done. +remote: Compressing objects: 100% (6/6), done. +remote: Total 337 (delta 1), reused 0 (delta 0), pack-reused 331 +Получение объектов: 100% (337/337), 151.23 KiB | 0 bytes/s, готово. +Определение изменений: 100% (174/174), готово. +Проверка соединения… готово. +HEAD сейчас на 1306c49 Update OneWire.cpp +LibraryManager: Installing DS2482_OneWire +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-_j6w1l-package»… +remote: Counting objects: 14, done. +remote: Compressing objects: 100% (10/10), done. +remote: Total 14 (delta 1), reused 7 (delta 0), pack-reused 0 +Распаковка объектов: 100% (14/14), готово. +Проверка соединения… готово. +LibraryManager: Installing DmxSimple +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-9UrkaE-package»… +remote: Counting objects: 15, done. +remote: Compressing objects: 100% (12/12), done. +remote: Total 15 (delta 0), reused 13 (delta 0), pack-reused 0 +Распаковка объектов: 100% (15/15), готово. +Проверка соединения… готово. +LibraryManager: Installing httpClient +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-fzHDYg-package»… +remote: Counting objects: 13, done. +remote: Compressing objects: 100% (11/11), done. +remote: Total 13 (delta 0), reused 9 (delta 0), pack-reused 0 +Распаковка объектов: 100% (13/13), готово. +Проверка соединения… готово. +LibraryManager: Installing aJson +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-t91cPW-package»… +remote: Counting objects: 20, done. +remote: Compressing objects: 100% (16/16), done. +remote: Total 20 (delta 0), reused 13 (delta 0), pack-reused 0 +Распаковка объектов: 100% (20/20), готово. +Проверка соединения… готово. +LibraryManager: Installing CmdArduino +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-K87pw4-package»… +remote: Counting objects: 17, done. +remote: Compressing objects: 100% (14/14), done. +remote: Total 17 (delta 2), reused 15 (delta 1), pack-reused 0 +Распаковка объектов: 100% (17/17), готово. +Проверка соединения… готово. +LibraryManager: Installing ModbusMaster +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-MpOaw_-package»… +remote: Counting objects: 41, done. +remote: Compressing objects: 100% (35/35), done. +remote: Total 41 (delta 0), reused 18 (delta 0), pack-reused 0 +Распаковка объектов: 100% (41/41), готово. +Проверка соединения… готово. +LibraryManager: Installing DMXSerial +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-8uNNCf-package»… +remote: Counting objects: 17, done. +remote: Compressing objects: 100% (14/14), done. +remote: Total 17 (delta 0), reused 9 (delta 0), pack-reused 0 +Распаковка объектов: 100% (17/17), готово. +Проверка соединения… готово. +LibraryManager: Installing Ethernet +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-kgiEoN-package»… +remote: Counting objects: 48, done. +remote: Compressing objects: 100% (41/41), done. +remote: Total 48 (delta 4), reused 20 (delta 1), pack-reused 0 +Распаковка объектов: 100% (48/48), готово. +Проверка соединения… готово. +LibraryManager: Installing SPI +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-HL64L4-package»… +remote: Counting objects: 12, done. +remote: Compressing objects: 100% (11/11), done. +remote: Total 12 (delta 0), reused 6 (delta 0), pack-reused 0 +Распаковка объектов: 100% (12/12), готово. +Проверка соединения… готово. +LibraryManager: Installing pubsubclient +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-Sn_BZN-package»… +remote: Counting objects: 56, done. +remote: Compressing objects: 100% (48/48), done. +remote: Total 56 (delta 5), reused 26 (delta 1), pack-reused 0 +Распаковка объектов: 100% (56/56), готово. +Проверка соединения… готово. +LibraryManager: Installing Artnet +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-7FI8Ud-package»… +remote: Counting objects: 37, done. +remote: Compressing objects: 100% (32/32), done. +remote: Total 37 (delta 8), reused 17 (delta 0), pack-reused 0 +Распаковка объектов: 100% (37/37), готово. +Проверка соединения… готово. +LibraryManager: Installing id=126 +Downloading [####################################] 100% +Unpacking [####################################] 100% +Verbose mode can be enabled via `-v, --verbose` option +PLATFORM: Atmel AVR > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) +SYSTEM: ATMEGA2560 16MHz 8KB RAM (248KB Flash) +Converting lighthub.ino +Library Dependency Finder -> http://bit.ly/configure-pio-ldf +LDF MODES: FINDER(chain) COMPATIBILITY(light) +Collected 37 compatible libraries +Scanning dependencies... +Dependency Graph +|-- #1306c49 +| |-- #3ef01fc +| | |-- v1.0 +| |-- v2.0.1 #4a429bf +|-- #3ef01fc +| |-- v1.0 +|-- v3.1 #62f0959 +|-- #007e22e +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 +|-- #60e5d57 +| |-- v2.0 +|-- #c94cd3f +|-- v2.0.1 #4a429bf +|-- v1.3.0 #4db73b3 +|-- v1.1.2 #238e8fc +| |-- v1.0 #8d59205 +|-- v1.0 #8d59205 +|-- v2.6 #f029640 +|-- #3d39995 +| |-- v1.2.7 +| | |-- v1.0 #8d59205 +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 +|-- v3.1.8 +| |-- v1.0 +| |-- v3.1 #62f0959 +| |-- v1.3.0 #4db73b3 +|-- v1.0 +|-- v2.0 +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/FastLED.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/bitswap.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/colorpalettes.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/colorutils.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/hsv2rgb.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/lib8tion.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/noise.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/power_mgt.cpp.o +Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/wiring.cpp.o +Compiling .pioenvs/megaatmega2560/src/dmx.cpp.o +Compiling .pioenvs/megaatmega2560/src/esp.cpp.o +Compiling .pioenvs/megaatmega2560/src/inputs.cpp.o +lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': +lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +lighthub/dmx.cpp: In function 'void DMXput()': +lighthub/dmx.cpp:111:5: warning: unused variable 't' [-Wunused-variable] +int t; +^ +lighthub/dmx.cpp: In function 'void onDmxFrame(uint16_t, uint16_t, uint8_t, uint8_t*, IPAddress)': +lighthub/dmx.cpp:186:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +for (int i = 0 ; i < length && idmxMax) dmxMaxChannel(channel); +^ +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/Dhcp.cpp.o +Archiving .pioenvs/megaatmega2560/lib60c/libDmxSimple.a +In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, +from lighthub/item.cpp:29: +lighthub/item.cpp: At top level: +.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'crc16_update' defined but not used [-Wunused-function] +static uint16_t crc16_update(uint16_t crc, uint8_t a) +^ +Archiving .pioenvs/megaatmega2560/lib704/libDallasTemperature.a +Indexing .pioenvs/megaatmega2560/lib60c/libDmxSimple.a +Indexing .pioenvs/megaatmega2560/lib704/libDallasTemperature.a +Archiving .pioenvs/megaatmega2560/libecc/libModbusMaster.a +Indexing .pioenvs/megaatmega2560/libecc/libModbusMaster.a +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/Dns.cpp.o +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/Ethernet.cpp.o +Archiving .pioenvs/megaatmega2560/lib465/libSPI.a +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/EthernetClient.cpp.o +Indexing .pioenvs/megaatmega2560/lib465/libSPI.a +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/EthernetServer.cpp.o +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/EthernetUdp.cpp.o +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/utility/socket.cpp.o +Compiling .pioenvs/megaatmega2560/libab3/Ethernet/utility/w5100.cpp.o +Compiling .pioenvs/megaatmega2560/liba60/httpClient/HTTPClient.cpp.o +Archiving .pioenvs/megaatmega2560/libf1a/libEEPROM.a +Compiling .pioenvs/megaatmega2560/lib9dd/aJson/aJSON.cpp.o +Indexing .pioenvs/megaatmega2560/libf1a/libEEPROM.a +In file included from .piolibdeps/httpClient/HTTPClient.cpp:41:0: +.piolibdeps/httpClient/HTTPClient.h: In constructor 'HTTPClient::HTTPClient(char*, uint8_t*)': +.piolibdeps/httpClient/HTTPClient.h:186:8: warning: 'HTTPClient::debugCommunication' will be initialized after [-Wreorder] +char debugCommunication; +^ +.piolibdeps/httpClient/HTTPClient.h:180:12: warning: 'uint8_t* HTTPClient::ip' [-Wreorder] +uint8_t* ip; +^ +.piolibdeps/httpClient/HTTPClient.cpp:56:1: warning: when initialized here [-Wreorder] +HTTPClient::HTTPClient(char* host, uint8_t* ip) : +^ +In file included from .piolibdeps/httpClient/HTTPClient.cpp:41:0: +.piolibdeps/httpClient/HTTPClient.h: In constructor 'HTTPClient::HTTPClient(char*, uint8_t*, uint16_t)': +.piolibdeps/httpClient/HTTPClient.h:186:8: warning: 'HTTPClient::debugCommunication' will be initialized after [-Wreorder] +char debugCommunication; +^ +.piolibdeps/httpClient/HTTPClient.h:180:12: warning: 'uint8_t* HTTPClient::ip' [-Wreorder] +uint8_t* ip; +^ +.piolibdeps/httpClient/HTTPClient.cpp:62:1: warning: when initialized here [-Wreorder] +HTTPClient::HTTPClient(char* host, uint8_t* ip, uint16_t port) : +^ +In file included from .piolibdeps/httpClient/HTTPClient.cpp:41:0: +.piolibdeps/httpClient/HTTPClient.h: In constructor 'HTTPClient::HTTPClient(char*, uint16_t)': +.piolibdeps/httpClient/HTTPClient.h:186:8: warning: 'HTTPClient::debugCommunication' will be initialized after [-Wreorder] +char debugCommunication; +^ +.piolibdeps/httpClient/HTTPClient.h:180:12: warning: 'uint8_t* HTTPClient::ip' [-Wreorder] +uint8_t* ip; +^ +.piolibdeps/httpClient/HTTPClient.cpp:68:1: warning: when initialized here [-Wreorder] +HTTPClient::HTTPClient(char* host, uint16_t port) : +^ +.piolibdeps/httpClient/HTTPClient.cpp: In member function 'char HTTPClient::sendUriAndHeaders(FILE*, char*, const char*, char*, http_client_parameter*, http_client_parameter*)': +.piolibdeps/httpClient/HTTPClient.cpp:260:51: warning: array subscript has type 'char' [-Wchar-subscripts] +parameter = ¶meters[parameter_number]; +^ +.piolibdeps/httpClient/HTTPClient.cpp:270:34: warning: array subscript has type 'char' [-Wchar-subscripts] +while (headers[headerNumber].name != NULL) +^ +.piolibdeps/httpClient/HTTPClient.cpp:272:35: warning: array subscript has type 'char' [-Wchar-subscripts] +if (headers[headerNumber].value != NULL) +^ +.piolibdeps/httpClient/HTTPClient.cpp:274:73: warning: array subscript has type 'char' [-Wchar-subscripts] +fprintf_P(stream, PSTR("%s: %s\r\n"), headers[headerNumber].name, +^ +.piolibdeps/httpClient/HTTPClient.cpp:275:39: warning: array subscript has type 'char' [-Wchar-subscripts] +headers[headerNumber].value); +^ +.piolibdeps/httpClient/HTTPClient.cpp: In static member function 'static int HTTPClient::clientWrite(char, FILE*)': +.piolibdeps/httpClient/HTTPClient.cpp:349:38: warning: array subscript has type 'char' [-Wchar-subscripts] +client->write(encoded[i]); +^ +.piolibdeps/httpClient/HTTPClient.cpp:352:41: warning: array subscript has type 'char' [-Wchar-subscripts] +Serial.print(encoded[i]); +^ +.piolibdeps/httpClient/HTTPClient.cpp: In member function 'int HTTPClient::skipHeader(FILE*)': +.piolibdeps/httpClient/HTTPClient.cpp:435:18: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] +lastReturnCode = NULL; +^ +.piolibdeps/httpClient/HTTPClient.cpp:437:30: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] +if (stream == NULL) return NULL; +^ +.piolibdeps/httpClient/HTTPClient.cpp:447:22: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] +if (res!=1) return NULL; +^ +.piolibdeps/httpClient/HTTPClient.cpp:464:18: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] +Compiling .pioenvs/megaatmega2560/lib9dd/aJson/utility/stringbuffer.c.o +return NULL; +^ +Compiling .pioenvs/megaatmega2560/libf1a/CmdArduino/Cmd.cpp.o +.piolibdeps/aJson/aJSON.cpp: In member function 'virtual bool aJsonEEPROMStream::available()': +.piolibdeps/aJson/aJSON.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +while (addr+offsetprint('[') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:862:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(',') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:868:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(']') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp: In member function 'int aJsonStream::printObject(aJsonObject*)': +.piolibdeps/aJson/aJSON.cpp:960:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print('{') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:970:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(':') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:981:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(',') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:987:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print('}') == EOF) +^ +Archiving .pioenvs/megaatmega2560/libab3/libEthernet.a +Indexing .pioenvs/megaatmega2560/libab3/libEthernet.a +Compiling .pioenvs/megaatmega2560/lib231/DMXSerial/DMXSerial.cpp.o +.piolibdeps/CmdArduino/Cmd.cpp: In function 'void cmd_parse(char*)': +.piolibdeps/CmdArduino/Cmd.cpp:78:10: warning: unused variable 'buf' [-Wunused-variable] +char buf[50]; +^ +Compiling .pioenvs/megaatmega2560/lib9a2/PubSubClient/PubSubClient.cpp.o +.piolibdeps/DMXSerial/src/DMXSerial.cpp:157:0: warning: "SERIAL_8N1" redefined +#define SERIAL_8N1 ((0< _dmxMaxChannel) channel = _dmxMaxChannel; +^ +.piolibdeps/DMXSerial/src/DMXSerial.cpp: In member function 'void DMXSerialClass::write(int, uint8_t)': +.piolibdeps/DMXSerial/src/DMXSerial.cpp:336:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (channel > _dmxMaxChannel) channel = _dmxMaxChannel; +^ +.piolibdeps/DMXSerial/src/DMXSerial.cpp: In function 'void __vector_37()': +.piolibdeps/DMXSerial/src/DMXSerial.cpp:543:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (_dmxChannel > _dmxMaxChannel) { +^ +Compiling .pioenvs/megaatmega2560/lib255/WiFi/WiFiClient.cpp.o +Archiving .pioenvs/megaatmega2560/lib231/libDMXSerial.a +Archiving .pioenvs/megaatmega2560/libf1a/libCmdArduino.a +Archiving .pioenvs/megaatmega2560/liba60/libhttpClient.a +Indexing .pioenvs/megaatmega2560/lib231/libDMXSerial.a +Indexing .pioenvs/megaatmega2560/libf1a/libCmdArduino.a +Indexing .pioenvs/megaatmega2560/liba60/libhttpClient.a +Compiling .pioenvs/megaatmega2560/lib255/WiFi/WiFiServer.cpp.o +Archiving .pioenvs/megaatmega2560/lib9a2/libPubSubClient.a +Archiving .pioenvs/megaatmega2560/lib9dd/libaJson.a +Indexing .pioenvs/megaatmega2560/lib9a2/libPubSubClient.a +Compiling .pioenvs/megaatmega2560/lib255/WiFi/WiFiUdp.cpp.o +Indexing .pioenvs/megaatmega2560/lib9dd/libaJson.a +Compiling .pioenvs/megaatmega2560/lib255/WiFi/utility/server_drv.cpp.o +Compiling .pioenvs/megaatmega2560/lib255/WiFi/utility/spi_drv.cpp.o +Compiling .pioenvs/megaatmega2560/lib255/WiFi/utility/wifi_drv.cpp.o +Compiling .pioenvs/megaatmega2560/libc78/Artnet/Artnet.cpp.o +Compiling .pioenvs/megaatmega2560/lib988/SoftwareSerial/SoftwareSerial.cpp.o +Archiving .pioenvs/megaatmega2560/libFrameworkArduinoVariant.a +/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp: In static member function 'static uint8_t WiFiDrv::getEncTypeNetowrks(uint8_t)': +/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp:451:10: warning: converting to non-pointer type 'uint8_t {aka unsigned char}' from NULL [-Wconversion-null] +return NULL; +^ +/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp: In static member function 'static int32_t WiFiDrv::getRSSINetoworks(uint8_t)': +/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp:476:10: warning: converting to non-pointer type 'int32_t {aka long int}' from NULL [-Wconversion-null] +return NULL; +^ +In file included from /home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/spi_drv.cpp:22:0: +/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/spi_drv.h:41:13: warning: 'initialized' defined but not used [-Wunused-variable] +static bool initialized = false; +^ +.piolibdeps/Artnet/Artnet.cpp: In member function 'uint16_t Artnet::read()': +.piolibdeps/Artnet/Artnet.cpp:94:40: warning: embedded '\0' in format [-Wformat-contains-nul] +sprintf((char *)id, "Art-Net\0"); +^ +.piolibdeps/Artnet/Artnet.cpp:107:54: warning: embedded '\0' in format [-Wformat-contains-nul] +sprintf((char *)shortname, "artnet arduino\0"); +^ +.piolibdeps/Artnet/Artnet.cpp:108:64: warning: embedded '\0' in format [-Wformat-contains-nul] +sprintf((char *)longname, "Art-Net -> Arduino Bridge\0"); +^ +.piolibdeps/Artnet/Artnet.cpp:143:109: warning: embedded '\0' in format [-Wformat-contains-nul] +sprintf((char *)ArtPollReply.nodereport, "%i DMX output universes active.\0", ArtPollReply.numbports); +^ +.piolibdeps/Artnet/Artnet.cpp:160:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +Indexing .pioenvs/megaatmega2560/libFrameworkArduinoVariant.a +Compiling .pioenvs/megaatmega2560/FrameworkArduino/CDC.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial.cpp.o +Archiving .pioenvs/megaatmega2560/libc78/libArtnet.a +Archiving .pioenvs/megaatmega2560/lib255/libWiFi.a +Indexing .pioenvs/megaatmega2560/libc78/libArtnet.a +Indexing .pioenvs/megaatmega2560/lib255/libWiFi.a +Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial0.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial1.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial2.cpp.o +Archiving .pioenvs/megaatmega2560/lib988/libSoftwareSerial.a +Indexing .pioenvs/megaatmega2560/lib988/libSoftwareSerial.a +Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial3.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/IPAddress.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/PluggableUSB.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/Print.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/Stream.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/Tone.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/USBCore.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/WInterrupts.c.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/WMath.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/WString.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/_wiring_pulse.S.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/abi.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/hooks.c.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/main.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/new.cpp.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring.c.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_analog.c.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_digital.c.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_pulse.c.o +Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_shift.c.o +Archiving .pioenvs/megaatmega2560/libFrameworkArduino.a +Indexing .pioenvs/megaatmega2560/libFrameworkArduino.a +Linking .pioenvs/megaatmega2560/firmware.elf +Calculating size .pioenvs/megaatmega2560/firmware.elf +Building .pioenvs/megaatmega2560/firmware.hex +AVR Memory Usage +---------------- +Device: atmega2560 + +Program: 56650 bytes (21.6% Full) +(.text + .data + .bootloader) + +Data: 2559 bytes (31.2% Full) +(.data + .bss + .noinit) + + +======================================================================================= [SUCCESS] Took 25.45 seconds ======================================================================================= + +================================================================================================= [SUMMARY] ================================================================================================= +Environment due [SKIP] +Environment due-5500 [SKIP] +Environment megaatmega2560 [SUCCESS] +Environment megaatmega2560-5500 [SKIP] +Environment espressif8266 [SKIP] +======================================================================================= [SUCCESS] Took 25.45 seconds ======================================================================================= +livello@lserver ~/PROG/lighthub $ pio run -e due +[Wed Mar 14 02:14:22 2018] Processing due (platform: atmelsam; board: due; framework: arduino) +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +LibraryManager: Installing DueFlashStorage +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-IcfSg7-package»… +remote: Counting objects: 19, done. +remote: Compressing objects: 100% (16/16), done. +remote: Total 19 (delta 3), reused 15 (delta 3), pack-reused 0 +Распаковка объектов: 100% (19/19), готово. +Проверка соединения… готово. +LibraryManager: Installing DmxDue +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-6V6WxO-package»… +remote: Counting objects: 7, done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 7 (delta 0), reused 5 (delta 0), pack-reused 0 +Распаковка объектов: 100% (7/7), готово. +Проверка соединения… готово. +LibraryManager: Installing ArduinoHttpClient +git version 2.7.4 +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-SAsCAo-package»… +remote: Counting objects: 45, done. +remote: Compressing objects: 100% (41/41), done. +remote: Total 45 (delta 9), reused 22 (delta 3), pack-reused 0 +Распаковка объектов: 100% (45/45), готово. +Проверка соединения… готово. +Verbose mode can be enabled via `-v, --verbose` option +PLATFORM: Atmel SAM > Arduino Due (Programming Port) +SYSTEM: AT91SAM3X8E 84MHz 32KB RAM (512KB Flash) +DEBUG: CURRENT(blackmagic) EXTERNAL(blackmagic, jlink) +Converting lighthub.ino +Library Dependency Finder -> http://bit.ly/configure-pio-ldf +LDF MODES: FINDER(chain) COMPATIBILITY(light) +Collected 19 compatible libraries +Scanning dependencies... +Dependency Graph +|-- v1.0.0 #a41b206 +|-- #1306c49 +| |-- #3ef01fc +| | |-- v1.0 +| |-- v2.0.1 #4a429bf +|-- #3ef01fc +| |-- v1.0 +|-- #bf7ffb2 +|-- #acde3dc +|-- #60e5d57 +| |-- v1.0.0 #a41b206 +|-- #c94cd3f +|-- v2.0.1 #4a429bf +|-- v1.1.2 #238e8fc +| |-- v1.0 #8d59205 +|-- v1.0 #8d59205 +|-- v2.6 #f029640 +|-- #3d39995 +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 +|-- v3.1.8 +| |-- v3.1 #62f0959 +| |-- v1.3.0 #4db73b3 +|-- v1.0 +|-- v3.1 #62f0959 +|-- #007e22e +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 +|-- v1.3.0 #4db73b3 +Compiling .pioenvs/due/libc0c/FastLED_ID126/FastLED.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/bitswap.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/colorpalettes.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/colorutils.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/hsv2rgb.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/lib8tion.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/noise.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/power_mgt.cpp.o +Compiling .pioenvs/due/libc0c/FastLED_ID126/wiring.cpp.o +Compiling .pioenvs/due/src/dmx.cpp.o +Compiling .pioenvs/due/src/esp.cpp.o +Compiling .pioenvs/due/src/inputs.cpp.o +Compiling .pioenvs/due/src/item.cpp.o +lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': +lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +lighthub/dmx.cpp: In function 'void DMXput()': +lighthub/dmx.cpp:111:5: warning: unused variable 't' [-Wunused-variable] +int t; +^ +Compiling .pioenvs/due/src/lighthub.ino.cpp.o +Compiling .pioenvs/due/src/main.cpp.o +In file included from lighthub/inputs.cpp:23:0: +lighthub/item.h: In member function 'int Item::On()': +lighthub/item.h:85:33: warning: no return statement in function returning non-void [-Wreturn-type] +inline int On (){Ctrl(CMD_ON);}; +^ +lighthub/item.h: In member function 'int Item::Off()': +lighthub/item.h:86:34: warning: no return statement in function returning non-void [-Wreturn-type] +inline int Off(){Ctrl(CMD_OFF);}; +^ +lighthub/item.h: In member function 'int Item::Toggle()': +lighthub/item.h:87:40: warning: no return statement in function returning non-void [-Wreturn-type] +inline int Toggle(){Ctrl(CMD_TOGGLE);}; +^ +Compiling .pioenvs/due/src/owSwitch.cpp.o +In file included from lighthub/item.cpp:21:0: +lighthub/item.h: In member function 'int Item::On()': +lighthub/item.h:85:33: warning: no return statement in function returning non-void [-Wreturn-type] +inline int On (){Ctrl(CMD_ON);}; +^ +lighthub/item.h: In member function 'int Item::Off()': +lighthub/item.h:86:34: warning: no return statement in function returning non-void [-Wreturn-type] +inline int Off(){Ctrl(CMD_OFF);}; +^ +lighthub/item.h: In member function 'int Item::Toggle()': +lighthub/item.h:87:40: warning: no return statement in function returning non-void [-Wreturn-type] +inline int Toggle(){Ctrl(CMD_TOGGLE);}; +^ +In file included from lighthub/item.cpp:26:0: +.piolibdeps/FastLED_ID126/FastLED.h: At global scope: +.piolibdeps/FastLED_ID126/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008 +# pragma message "FastLED version 3.001.008" +^ +Compiling .pioenvs/due/src/owTerm.cpp.o +Compiling .pioenvs/due/src/utils.cpp.o +In file included from lighthub/main.cpp:71:0: +.piolibdeps/SPI/SPI.h:1028:8: error: 'SPIClass' does not name a type +extern SPIClass SPI; +^ +In file included from lighthub/main.cpp:132:0: +lighthub/item.h: In member function 'int Item::On()': +lighthub/item.h:85:33: warning: no return statement in function returning non-void [-Wreturn-type] +inline int On (){Ctrl(CMD_ON);}; +^ +lighthub/item.h: In member function 'int Item::Off()': +lighthub/item.h:86:34: warning: no return statement in function returning non-void [-Wreturn-type] +inline int Off(){Ctrl(CMD_OFF);}; +^ +lighthub/item.h: In member function 'int Item::Toggle()': +lighthub/item.h:87:40: warning: no return statement in function returning non-void [-Wreturn-type] +inline int Toggle(){Ctrl(CMD_TOGGLE);}; +^ +lighthub/main.cpp: In function 'void callback(char*, byte*, unsigned int)': +lighthub/main.cpp:198:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +for (int i=0;i Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) +SYSTEM: ATMEGA2560 16MHz 8KB RAM (248KB Flash) +Converting lighthub.ino +Library Dependency Finder -> http://bit.ly/configure-pio-ldf +LDF MODES: FINDER(chain) COMPATIBILITY(light) +Collected 40 compatible libraries +Scanning dependencies... +Dependency Graph +|-- #1306c49 +| |-- #3ef01fc +| | |-- v1.0 +| |-- v2.0.1 #4a429bf +|-- #3ef01fc +| |-- v1.0 +|-- v3.1 #62f0959 +|-- #007e22e +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 +|-- #60e5d57 +| |-- v2.0 +| |-- v1.0.0 #a41b206 +|-- #c94cd3f +|-- v2.0.1 #4a429bf +|-- v1.3.0 #4db73b3 +|-- v1.1.2 #238e8fc +| |-- v1.0 #8d59205 +|-- v1.0 #8d59205 +|-- v2.6 #f029640 +|-- #3d39995 +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 +| |-- v1.2.7 +| | |-- v1.0 #8d59205 +|-- v3.1.8 +| |-- v3.1 #62f0959 +| |-- v1.0 +| |-- v1.3.0 #4db73b3 +|-- v1.0.0 #a41b206 +|-- v2.0 +|-- #acde3dc +|-- v1.0 +|-- #bf7ffb2 +Compiling .pioenvs/megaatmega2560/src/dmx.cpp.o +Compiling .pioenvs/megaatmega2560/src/item.cpp.o +Compiling .pioenvs/megaatmega2560/src/lighthub.ino.cpp.o +lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': +lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +lighthub/dmx.cpp: In function 'void DMXput()': +lighthub/dmx.cpp:111:5: warning: unused variable 't' [-Wunused-variable] +int t; +^ +lighthub/dmx.cpp: In function 'void onDmxFrame(uint16_t, uint16_t, uint8_t, uint8_t*, IPAddress)': +lighthub/dmx.cpp:186:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +for (int i = 0 ; i < length && i= (IFLASH1_ADDR + IFLASH1_SIZE)) { +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:57:56: error: 'IFLASH1_SIZE' was not declared in this scope +if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) { +^ +In file included from .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:1:0: +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:62:18: note: in expansion of macro 'FLASH_START' +if (((uint32_t)FLASH_START+address & 3) != 0) { +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:68:36: note: in expansion of macro 'FLASH_START' +retCode = flash_unlock((uint32_t)FLASH_START+address, (uint32_t)FLASH_START+address + dataLength - 1, 0, 0); +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte)': +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:97:35: note: in expansion of macro 'FLASH_START' +retCode = flash_write((uint32_t)FLASH_START+address, &value, byteLength, 1); +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:94:9: warning: unused variable 'data' [-Wunused-variable] +byte *data; +^ +In file included from .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:1:0: +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte*, uint32_t)': +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:111:17: note: in expansion of macro 'FLASH_START' +if ((uint32_t)FLASH_START+address < IFLASH1_ADDR) { +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:116:17: note: in expansion of macro 'FLASH_START' +if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) { +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:116:56: error: 'IFLASH1_SIZE' was not declared in this scope +if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) { +^ +In file included from .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:1:0: +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:121:18: note: in expansion of macro 'FLASH_START' +if (((uint32_t)FLASH_START+address & 3) != 0) { +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope +#define FLASH_START ((byte *)IFLASH1_ADDR) +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:127:35: note: in expansion of macro 'FLASH_START' +retCode = flash_write((uint32_t)FLASH_START+address, data, dataLength, 1); +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'byte DueFlashStorage::read(uint32_t)': +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'byte* DueFlashStorage::readAddress(uint32_t)': +.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': +lighthub/item.cpp:668:11: warning: unused variable 'j' [-Wunused-variable] +uint8_t j, result; +^ +lighthub/item.cpp:668:14: warning: unused variable 'result' [-Wunused-variable] +uint8_t j, result; +^ +lighthub/item.cpp:669:12: warning: unused variable 'data' [-Wunused-variable] +uint16_t data[1]; +^ +*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/DueFlashStorage.cpp.o] Error 1 +lighthub/item.cpp: In member function 'int Item::checkModbus()': +lighthub/item.cpp:914:93: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) +^ +lighthub/item.cpp:914:121: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) +^ +lighthub/item.cpp:890:13: warning: unused variable 'mask' [-Wunused-variable] +short mask = getArg(2); +^ +lighthub/item.cpp: In member function 'int Item::checkModbus(int)': +lighthub/item.cpp:932:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses] +if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy +^ +lighthub/item.cpp:932:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses] +if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy +^ +lighthub/item.cpp:950:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::Pool()': +lighthub/item.cpp:962:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: +.piolibdeps/DueFlashStorage/src/efc.h:116:19: error: 'Efc' was not declared in this scope +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:24: error: 'p_efc' was not declared in this scope +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:40: error: expected primary-expression before 'ul_access_mode' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:65: error: expected primary-expression before 'ul_fws' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:71: warning: expression list treated as compound expression in initializer [-fpermissive] +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: variable or field 'efc_enable_frdy_interrupt' declared void +void efc_enable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:117:37: error: 'p_efc' was not declared in this scope +void efc_enable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void +void efc_disable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:118:38: error: 'p_efc' was not declared in this scope +void efc_disable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: variable or field 'efc_set_flash_access_mode' declared void +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); +^ +.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:119:37: error: 'p_efc' was not declared in this scope +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); +^ +.piolibdeps/DueFlashStorage/src/efc.h:119:53: error: expected primary-expression before 'ul_mode' +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); +^ +.piolibdeps/DueFlashStorage/src/efc.h:120:36: error: 'Efc' was not declared in this scope +uint32_t efc_get_flash_access_mode(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:120:41: error: 'p_efc' was not declared in this scope +uint32_t efc_get_flash_access_mode(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: variable or field 'efc_set_wait_state' declared void +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:121:30: error: 'p_efc' was not declared in this scope +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:121:46: error: expected primary-expression before 'ul_fws' +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:122:29: error: 'Efc' was not declared in this scope +uint32_t efc_get_wait_state(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:122:34: error: 'p_efc' was not declared in this scope +uint32_t efc_get_wait_state(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:123:30: error: 'Efc' was not declared in this scope +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.h:123:35: error: 'p_efc' was not declared in this scope +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.h:123:51: error: expected primary-expression before 'ul_command' +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.h:124:12: error: expected primary-expression before 'ul_argument' +uint32_t ul_argument); +^ +.piolibdeps/DueFlashStorage/src/efc.h:124:23: warning: expression list treated as compound expression in initializer [-fpermissive] +uint32_t ul_argument); +^ +.piolibdeps/DueFlashStorage/src/efc.h:125:25: error: 'Efc' was not declared in this scope +uint32_t efc_get_status(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:125:30: error: 'p_efc' was not declared in this scope +uint32_t efc_get_status(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:126:25: error: 'Efc' was not declared in this scope +uint32_t efc_get_result(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:126:30: error: 'p_efc' was not declared in this scope +uint32_t efc_get_result(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:127:36: error: 'Efc' was not declared in this scope +uint32_t efc_perform_read_sequence(Efc *p_efc, +^ +.piolibdeps/DueFlashStorage/src/efc.h:127:41: error: 'p_efc' was not declared in this scope +uint32_t efc_perform_read_sequence(Efc *p_efc, +^ +.piolibdeps/DueFlashStorage/src/efc.h:128:12: error: expected primary-expression before 'ul_cmd_st' +uint32_t ul_cmd_st, uint32_t ul_cmd_sp, +^ +.piolibdeps/DueFlashStorage/src/efc.h:128:32: error: expected primary-expression before 'ul_cmd_sp' +uint32_t ul_cmd_st, uint32_t ul_cmd_sp, +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:12: error: expected primary-expression before '*' token +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:13: error: 'p_ul_buf' was not declared in this scope +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:32: error: expected primary-expression before 'ul_size' +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:39: warning: expression list treated as compound expression in initializer [-fpermissive] +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:84:27: error: variable or field 'efc_write_fmr' declared void +extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:84:27: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.cpp:84:32: error: 'p_efc' was not declared in this scope +extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:84:48: error: expected primary-expression before 'ul_fmr' +extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:85:33: warning: 'efc_perform_fcr' initialized and declared 'extern' +extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:85:33: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.cpp:85:38: error: 'p_efc' was not declared in this scope +extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:85:54: error: expected primary-expression before 'ul_fcr' +extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:85:60: warning: expression list treated as compound expression in initializer [-fpermissive] +extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:95:19: error: redefinition of 'uint32_t efc_init' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) +^ +In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: +.piolibdeps/DueFlashStorage/src/efc.h:116:10: note: 'uint32_t efc_init' previously defined here +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:95:19: error: 'Efc' was not declared in this scope +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:95:24: error: 'p_efc' was not declared in this scope +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:95:40: error: expected primary-expression before 'ul_access_mode' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:95:65: error: expected primary-expression before 'ul_fws' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:106:32: error: variable or field 'efc_enable_frdy_interrupt' declared void +void efc_enable_frdy_interrupt(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:106:32: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.cpp:106:37: error: 'p_efc' was not declared in this scope +void efc_enable_frdy_interrupt(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void +void efc_disable_frdy_interrupt(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:118:33: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.cpp:118:38: error: 'p_efc' was not declared in this scope +void efc_disable_frdy_interrupt(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:131:32: error: variable or field 'efc_set_flash_access_mode' declared void +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:131:32: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.cpp:131:37: error: 'p_efc' was not declared in this scope +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:131:53: error: expected primary-expression before 'ul_mode' +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:145:36: error: redefinition of 'uint32_t efc_get_flash_access_mode' +uint32_t efc_get_flash_access_mode(Efc *p_efc) +^ +In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: +.piolibdeps/DueFlashStorage/src/efc.h:120:10: note: 'uint32_t efc_get_flash_access_mode' previously defined here +uint32_t efc_get_flash_access_mode(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:145:36: error: 'Efc' was not declared in this scope +uint32_t efc_get_flash_access_mode(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:145:41: error: 'p_efc' was not declared in this scope +uint32_t efc_get_flash_access_mode(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:156:25: error: variable or field 'efc_set_wait_state' declared void +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:156:25: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.cpp:156:30: error: 'p_efc' was not declared in this scope +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:156:46: error: expected primary-expression before 'ul_fws' +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:170:29: error: redefinition of 'uint32_t efc_get_wait_state' +uint32_t efc_get_wait_state(Efc *p_efc) +^ +In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: +.piolibdeps/DueFlashStorage/src/efc.h:122:10: note: 'uint32_t efc_get_wait_state' previously defined here +uint32_t efc_get_wait_state(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:170:29: error: 'Efc' was not declared in this scope +uint32_t efc_get_wait_state(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:170:34: error: 'p_efc' was not declared in this scope +uint32_t efc_get_wait_state(Efc *p_efc) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:188:30: error: redefinition of 'uint32_t efc_perform_command' +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: +.piolibdeps/DueFlashStorage/src/efc.h:123:10: note: 'uint32_t efc_perform_command' previously defined here +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:188:30: error: 'Efc' was not declared in this scope +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:188:35: error: 'p_efc' was not declared in this scope +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:188:51: error: expected primary-expression before 'ul_command' +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:189:12: error: expected primary-expression before 'ul_argument' +uint32_t ul_argument) +^ +.piolibdeps/DueFlashStorage/src/efc.cpp:337:1: error: expected '}' at end of input +} +^ +*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/efc.cpp.o] Error 1 +lighthub/item.cpp: In member function 'virtual int Item::Ctrl(short int, short int, int*, boolean)': +lighthub/item.cpp:517:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': +lighthub/item.cpp:684:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::VacomSetHeat(int, int8_t, int8_t)': +lighthub/item.cpp:715:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In function 'int modbusSet(int, uint16_t, int, uint16_t)': +lighthub/item.cpp:787:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::checkFM()': +lighthub/item.cpp:878:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::checkModbus()': +lighthub/item.cpp:921:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +In file included from .piolibdeps/DueFlashStorage/src/flash_efc.h:48:0, +from .piolibdeps/DueFlashStorage/src/flash_efc.cpp:46: +.piolibdeps/DueFlashStorage/src/efc.h:116:19: error: 'Efc' was not declared in this scope +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:24: error: 'p_efc' was not declared in this scope +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:40: error: expected primary-expression before 'ul_access_mode' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:65: error: expected primary-expression before 'ul_fws' +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:116:71: warning: expression list treated as compound expression in initializer [-fpermissive] +uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: variable or field 'efc_enable_frdy_interrupt' declared void +void efc_enable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:117:37: error: 'p_efc' was not declared in this scope +void efc_enable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void +void efc_disable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:118:38: error: 'p_efc' was not declared in this scope +void efc_disable_frdy_interrupt(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: variable or field 'efc_set_flash_access_mode' declared void +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); +^ +.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:119:37: error: 'p_efc' was not declared in this scope +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); +^ +.piolibdeps/DueFlashStorage/src/efc.h:119:53: error: expected primary-expression before 'ul_mode' +void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); +^ +.piolibdeps/DueFlashStorage/src/efc.h:120:36: error: 'Efc' was not declared in this scope +uint32_t efc_get_flash_access_mode(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:120:41: error: 'p_efc' was not declared in this scope +uint32_t efc_get_flash_access_mode(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: variable or field 'efc_set_wait_state' declared void +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/efc.h:121:30: error: 'p_efc' was not declared in this scope +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:121:46: error: expected primary-expression before 'ul_fws' +void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); +^ +.piolibdeps/DueFlashStorage/src/efc.h:122:29: error: 'Efc' was not declared in this scope +uint32_t efc_get_wait_state(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:122:34: error: 'p_efc' was not declared in this scope +uint32_t efc_get_wait_state(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:123:30: error: 'Efc' was not declared in this scope +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.h:123:35: error: 'p_efc' was not declared in this scope +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.h:123:51: error: expected primary-expression before 'ul_command' +uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, +^ +.piolibdeps/DueFlashStorage/src/efc.h:124:12: error: expected primary-expression before 'ul_argument' +uint32_t ul_argument); +^ +.piolibdeps/DueFlashStorage/src/efc.h:124:23: warning: expression list treated as compound expression in initializer [-fpermissive] +uint32_t ul_argument); +^ +.piolibdeps/DueFlashStorage/src/efc.h:125:25: error: 'Efc' was not declared in this scope +uint32_t efc_get_status(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:125:30: error: 'p_efc' was not declared in this scope +uint32_t efc_get_status(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:126:25: error: 'Efc' was not declared in this scope +uint32_t efc_get_result(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:126:30: error: 'p_efc' was not declared in this scope +uint32_t efc_get_result(Efc *p_efc); +^ +.piolibdeps/DueFlashStorage/src/efc.h:127:36: error: 'Efc' was not declared in this scope +uint32_t efc_perform_read_sequence(Efc *p_efc, +^ +.piolibdeps/DueFlashStorage/src/efc.h:127:41: error: 'p_efc' was not declared in this scope +uint32_t efc_perform_read_sequence(Efc *p_efc, +^ +.piolibdeps/DueFlashStorage/src/efc.h:128:12: error: expected primary-expression before 'ul_cmd_st' +uint32_t ul_cmd_st, uint32_t ul_cmd_sp, +^ +.piolibdeps/DueFlashStorage/src/efc.h:128:32: error: expected primary-expression before 'ul_cmd_sp' +uint32_t ul_cmd_st, uint32_t ul_cmd_sp, +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:12: error: expected primary-expression before '*' token +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:13: error: 'p_ul_buf' was not declared in this scope +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:32: error: expected primary-expression before 'ul_size' +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/efc.h:129:39: warning: expression list treated as compound expression in initializer [-fpermissive] +uint32_t *p_ul_buf, uint32_t ul_size); +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope +# define IFLASH_PAGE_SIZE IFLASH0_PAGE_SIZE +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:94:35: note: in expansion of macro 'IFLASH_PAGE_SIZE' +static uint32_t gs_ul_page_buffer[IFLASH_PAGE_SIZE / sizeof(uint32_t)]; +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:31: error: variable or field 'translate_address' declared void +static void translate_address(Efc **pp_efc, uint32_t ul_addr, +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:31: error: 'Efc' was not declared in this scope +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:37: error: 'pp_efc' was not declared in this scope +static void translate_address(Efc **pp_efc, uint32_t ul_addr, +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:54: error: expected primary-expression before 'ul_addr' +static void translate_address(Efc **pp_efc, uint32_t ul_addr, +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:12: error: expected primary-expression before '*' token +uint16_t *pus_page, uint16_t *pus_offset) +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:13: error: 'pus_page' was not declared in this scope +uint16_t *pus_page, uint16_t *pus_offset) +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:32: error: expected primary-expression before '*' token +uint16_t *pus_page, uint16_t *pus_offset) +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:33: error: 'pus_offset' was not declared in this scope +uint16_t *pus_page, uint16_t *pus_offset) +^ +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:913:1: error: expected '}' at end of input +} +^ +*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/flash_efc.cpp.o] Error 1 +.piolibdeps/aJson/aJSON.cpp: In member function 'virtual bool aJsonEEPROMStream::available()': +.piolibdeps/aJson/aJSON.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +while (addr+offsetprint('[') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:862:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(',') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:868:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(']') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp: In member function 'int aJsonStream::printObject(aJsonObject*)': +.piolibdeps/aJson/aJSON.cpp:960:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print('{') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:970:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(':') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:981:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print(',') == EOF) +^ +.piolibdeps/aJson/aJSON.cpp:987:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (this->print('}') == EOF) +^ +In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, +from lighthub/item.cpp:29: +lighthub/item.cpp: At top level: +.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'crc16_update' defined but not used [-Wunused-function] +static uint16_t crc16_update(uint16_t crc, uint8_t a) +^ +========================================================================================= [ERROR] Took 1.46 seconds ========================================================================================= + +================================================================================================= [SUMMARY] ================================================================================================= +Environment due [SKIP] +Environment due-5500 [SKIP] +Environment megaatmega2560 [ERROR] +Environment megaatmega2560-5500 [SKIP] +Environment espressif8266 [SKIP] +========================================================================================= [ERROR] Took 1.46 seconds ========================================================================================= +livello@lserver ~/PROG/lighthub $ From 196aab81ec68642155eb006ab68c6612a4e3d8e1 Mon Sep 17 00:00:00 2001 From: livello Date: Wed, 14 Mar 2018 13:48:38 +0300 Subject: [PATCH 11/21] (2) env_default, libdeps_dir does not help --- pio_run_error_log.txt | 711 +++++++++--------------------------------- platformio.ini | 58 +--- 2 files changed, 144 insertions(+), 625 deletions(-) diff --git a/pio_run_error_log.txt b/pio_run_error_log.txt index 91de2e2..70bc953 100644 --- a/pio_run_error_log.txt +++ b/pio_run_error_log.txt @@ -1,10 +1,11 @@ -livello@lserver ~/PROG/lighthub $ rm .piolibdeps/ -R -f && pio run -e megaatmega2560 +livello@lserver ~/PROG/lighthub $ rm -Rf .piolibdeps/ +livello@lserver ~/PROG/lighthub $ pio run -e megaatmega2560 -[Wed Mar 14 02:13:43 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino) +[Wed Mar 14 13:46:03 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- LibraryManager: Installing Arduino-Temperature-Control-Library git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-d4rqwB-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-cmz44U-package»… remote: Counting objects: 337, done. remote: Compressing objects: 100% (6/6), done. remote: Total 337 (delta 1), reused 0 (delta 0), pack-reused 331 @@ -14,7 +15,7 @@ remote: Total 337 (delta 1), reused 0 (delta 0), pack-reused 331 HEAD сейчас на 1306c49 Update OneWire.cpp LibraryManager: Installing DS2482_OneWire git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-_j6w1l-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-sk9FKd-package»… remote: Counting objects: 14, done. remote: Compressing objects: 100% (10/10), done. remote: Total 14 (delta 1), reused 7 (delta 0), pack-reused 0 @@ -22,7 +23,7 @@ remote: Total 14 (delta 1), reused 7 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing DmxSimple git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-9UrkaE-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-6FpiRF-package»… remote: Counting objects: 15, done. remote: Compressing objects: 100% (12/12), done. remote: Total 15 (delta 0), reused 13 (delta 0), pack-reused 0 @@ -30,7 +31,7 @@ remote: Total 15 (delta 0), reused 13 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing httpClient git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-fzHDYg-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-sz4zO7-package»… remote: Counting objects: 13, done. remote: Compressing objects: 100% (11/11), done. remote: Total 13 (delta 0), reused 9 (delta 0), pack-reused 0 @@ -38,7 +39,7 @@ remote: Total 13 (delta 0), reused 9 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing aJson git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-t91cPW-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-vKbebH-package»… remote: Counting objects: 20, done. remote: Compressing objects: 100% (16/16), done. remote: Total 20 (delta 0), reused 13 (delta 0), pack-reused 0 @@ -46,7 +47,7 @@ remote: Total 20 (delta 0), reused 13 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing CmdArduino git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-K87pw4-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-SdLqob-package»… remote: Counting objects: 17, done. remote: Compressing objects: 100% (14/14), done. remote: Total 17 (delta 2), reused 15 (delta 1), pack-reused 0 @@ -54,7 +55,7 @@ remote: Total 17 (delta 2), reused 15 (delta 1), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing ModbusMaster git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-MpOaw_-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-CTfc76-package»… remote: Counting objects: 41, done. remote: Compressing objects: 100% (35/35), done. remote: Total 41 (delta 0), reused 18 (delta 0), pack-reused 0 @@ -62,7 +63,7 @@ remote: Total 41 (delta 0), reused 18 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing DMXSerial git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-8uNNCf-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-SUXywb-package»… remote: Counting objects: 17, done. remote: Compressing objects: 100% (14/14), done. remote: Total 17 (delta 0), reused 9 (delta 0), pack-reused 0 @@ -70,7 +71,7 @@ remote: Total 17 (delta 0), reused 9 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing Ethernet git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-kgiEoN-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-vEEroA-package»… remote: Counting objects: 48, done. remote: Compressing objects: 100% (41/41), done. remote: Total 48 (delta 4), reused 20 (delta 1), pack-reused 0 @@ -78,7 +79,7 @@ remote: Total 48 (delta 4), reused 20 (delta 1), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing SPI git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-HL64L4-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-Kn75yj-package»… remote: Counting objects: 12, done. remote: Compressing objects: 100% (11/11), done. remote: Total 12 (delta 0), reused 6 (delta 0), pack-reused 0 @@ -86,7 +87,7 @@ remote: Total 12 (delta 0), reused 6 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing pubsubclient git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-Sn_BZN-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-JOtNYi-package»… remote: Counting objects: 56, done. remote: Compressing objects: 100% (48/48), done. remote: Total 56 (delta 5), reused 26 (delta 1), pack-reused 0 @@ -94,7 +95,7 @@ remote: Total 56 (delta 5), reused 26 (delta 1), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing Artnet git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-7FI8Ud-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-LExt22-package»… remote: Counting objects: 37, done. remote: Compressing objects: 100% (32/32), done. remote: Total 37 (delta 8), reused 17 (delta 0), pack-reused 0 @@ -132,28 +133,19 @@ Dependency Graph |-- v1.0 #8d59205 |-- v2.6 #f029640 |-- #3d39995 -| |-- v1.2.7 -| | |-- v1.0 #8d59205 | |-- v1.1.2 #238e8fc | | |-- v1.0 #8d59205 +| |-- v1.2.7 +| | |-- v1.0 #8d59205 |-- v3.1.8 | |-- v1.0 -| |-- v3.1 #62f0959 | |-- v1.3.0 #4db73b3 +| |-- v3.1 #62f0959 |-- v1.0 |-- v2.0 -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/FastLED.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/bitswap.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/colorpalettes.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/colorutils.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/hsv2rgb.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/lib8tion.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/noise.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/power_mgt.cpp.o -Compiling .pioenvs/megaatmega2560/libc0c/FastLED_ID126/wiring.cpp.o Compiling .pioenvs/megaatmega2560/src/dmx.cpp.o -Compiling .pioenvs/megaatmega2560/src/esp.cpp.o -Compiling .pioenvs/megaatmega2560/src/inputs.cpp.o +Compiling .pioenvs/megaatmega2560/src/item.cpp.o +Compiling .pioenvs/megaatmega2560/src/lighthub.ino.cpp.o lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] } @@ -166,24 +158,7 @@ lighthub/dmx.cpp: In function 'void onDmxFrame(uint16_t, uint16_t, uint8_t, uint lighthub/dmx.cpp:186:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0 ; i < length && idmxMax) dmxMaxChannel(channel); -^ -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/Dhcp.cpp.o -Archiving .pioenvs/megaatmega2560/lib60c/libDmxSimple.a -In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, -from lighthub/item.cpp:29: -lighthub/item.cpp: At top level: -.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'crc16_update' defined but not used [-Wunused-function] -static uint16_t crc16_update(uint16_t crc, uint8_t a) -^ -Archiving .pioenvs/megaatmega2560/lib704/libDallasTemperature.a -Indexing .pioenvs/megaatmega2560/lib60c/libDmxSimple.a -Indexing .pioenvs/megaatmega2560/lib704/libDallasTemperature.a -Archiving .pioenvs/megaatmega2560/libecc/libModbusMaster.a -Indexing .pioenvs/megaatmega2560/libecc/libModbusMaster.a -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/Dns.cpp.o -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/Ethernet.cpp.o -Archiving .pioenvs/megaatmega2560/lib465/libSPI.a -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/EthernetClient.cpp.o -Indexing .pioenvs/megaatmega2560/lib465/libSPI.a -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/EthernetServer.cpp.o -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/EthernetUdp.cpp.o -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/utility/socket.cpp.o -Compiling .pioenvs/megaatmega2560/libab3/Ethernet/utility/w5100.cpp.o -Compiling .pioenvs/megaatmega2560/liba60/httpClient/HTTPClient.cpp.o -Archiving .pioenvs/megaatmega2560/libf1a/libEEPROM.a -Compiling .pioenvs/megaatmega2560/lib9dd/aJson/aJSON.cpp.o -Indexing .pioenvs/megaatmega2560/libf1a/libEEPROM.a -In file included from .piolibdeps/httpClient/HTTPClient.cpp:41:0: -.piolibdeps/httpClient/HTTPClient.h: In constructor 'HTTPClient::HTTPClient(char*, uint8_t*)': -.piolibdeps/httpClient/HTTPClient.h:186:8: warning: 'HTTPClient::debugCommunication' will be initialized after [-Wreorder] -char debugCommunication; -^ -.piolibdeps/httpClient/HTTPClient.h:180:12: warning: 'uint8_t* HTTPClient::ip' [-Wreorder] -uint8_t* ip; -^ -.piolibdeps/httpClient/HTTPClient.cpp:56:1: warning: when initialized here [-Wreorder] -HTTPClient::HTTPClient(char* host, uint8_t* ip) : -^ -In file included from .piolibdeps/httpClient/HTTPClient.cpp:41:0: -.piolibdeps/httpClient/HTTPClient.h: In constructor 'HTTPClient::HTTPClient(char*, uint8_t*, uint16_t)': -.piolibdeps/httpClient/HTTPClient.h:186:8: warning: 'HTTPClient::debugCommunication' will be initialized after [-Wreorder] -char debugCommunication; -^ -.piolibdeps/httpClient/HTTPClient.h:180:12: warning: 'uint8_t* HTTPClient::ip' [-Wreorder] -uint8_t* ip; -^ -.piolibdeps/httpClient/HTTPClient.cpp:62:1: warning: when initialized here [-Wreorder] -HTTPClient::HTTPClient(char* host, uint8_t* ip, uint16_t port) : -^ -In file included from .piolibdeps/httpClient/HTTPClient.cpp:41:0: -.piolibdeps/httpClient/HTTPClient.h: In constructor 'HTTPClient::HTTPClient(char*, uint16_t)': -.piolibdeps/httpClient/HTTPClient.h:186:8: warning: 'HTTPClient::debugCommunication' will be initialized after [-Wreorder] -char debugCommunication; -^ -.piolibdeps/httpClient/HTTPClient.h:180:12: warning: 'uint8_t* HTTPClient::ip' [-Wreorder] -uint8_t* ip; -^ -.piolibdeps/httpClient/HTTPClient.cpp:68:1: warning: when initialized here [-Wreorder] -HTTPClient::HTTPClient(char* host, uint16_t port) : -^ -.piolibdeps/httpClient/HTTPClient.cpp: In member function 'char HTTPClient::sendUriAndHeaders(FILE*, char*, const char*, char*, http_client_parameter*, http_client_parameter*)': -.piolibdeps/httpClient/HTTPClient.cpp:260:51: warning: array subscript has type 'char' [-Wchar-subscripts] -parameter = ¶meters[parameter_number]; -^ -.piolibdeps/httpClient/HTTPClient.cpp:270:34: warning: array subscript has type 'char' [-Wchar-subscripts] -while (headers[headerNumber].name != NULL) -^ -.piolibdeps/httpClient/HTTPClient.cpp:272:35: warning: array subscript has type 'char' [-Wchar-subscripts] -if (headers[headerNumber].value != NULL) -^ -.piolibdeps/httpClient/HTTPClient.cpp:274:73: warning: array subscript has type 'char' [-Wchar-subscripts] -fprintf_P(stream, PSTR("%s: %s\r\n"), headers[headerNumber].name, -^ -.piolibdeps/httpClient/HTTPClient.cpp:275:39: warning: array subscript has type 'char' [-Wchar-subscripts] -headers[headerNumber].value); -^ -.piolibdeps/httpClient/HTTPClient.cpp: In static member function 'static int HTTPClient::clientWrite(char, FILE*)': -.piolibdeps/httpClient/HTTPClient.cpp:349:38: warning: array subscript has type 'char' [-Wchar-subscripts] -client->write(encoded[i]); -^ -.piolibdeps/httpClient/HTTPClient.cpp:352:41: warning: array subscript has type 'char' [-Wchar-subscripts] -Serial.print(encoded[i]); -^ -.piolibdeps/httpClient/HTTPClient.cpp: In member function 'int HTTPClient::skipHeader(FILE*)': -.piolibdeps/httpClient/HTTPClient.cpp:435:18: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] -lastReturnCode = NULL; -^ -.piolibdeps/httpClient/HTTPClient.cpp:437:30: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] -if (stream == NULL) return NULL; -^ -.piolibdeps/httpClient/HTTPClient.cpp:447:22: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] -if (res!=1) return NULL; -^ -.piolibdeps/httpClient/HTTPClient.cpp:464:18: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] -Compiling .pioenvs/megaatmega2560/lib9dd/aJson/utility/stringbuffer.c.o -return NULL; -^ -Compiling .pioenvs/megaatmega2560/libf1a/CmdArduino/Cmd.cpp.o .piolibdeps/aJson/aJSON.cpp: In member function 'virtual bool aJsonEEPROMStream::available()': .piolibdeps/aJson/aJSON.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (addr+offsetprint(',') == EOF) .piolibdeps/aJson/aJSON.cpp:987:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (this->print('}') == EOF) ^ -Archiving .pioenvs/megaatmega2560/libab3/libEthernet.a -Indexing .pioenvs/megaatmega2560/libab3/libEthernet.a -Compiling .pioenvs/megaatmega2560/lib231/DMXSerial/DMXSerial.cpp.o -.piolibdeps/CmdArduino/Cmd.cpp: In function 'void cmd_parse(char*)': -.piolibdeps/CmdArduino/Cmd.cpp:78:10: warning: unused variable 'buf' [-Wunused-variable] -char buf[50]; +In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, +from lighthub/item.cpp:29: +lighthub/item.cpp: At top level: +.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'crc16_update' defined but not used [-Wunused-function] +static uint16_t crc16_update(uint16_t crc, uint8_t a) ^ -Compiling .pioenvs/megaatmega2560/lib9a2/PubSubClient/PubSubClient.cpp.o -.piolibdeps/DMXSerial/src/DMXSerial.cpp:157:0: warning: "SERIAL_8N1" redefined -#define SERIAL_8N1 ((0< _dmxMaxChannel) channel = _dmxMaxChannel; -^ -.piolibdeps/DMXSerial/src/DMXSerial.cpp: In member function 'void DMXSerialClass::write(int, uint8_t)': -.piolibdeps/DMXSerial/src/DMXSerial.cpp:336:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (channel > _dmxMaxChannel) channel = _dmxMaxChannel; -^ -.piolibdeps/DMXSerial/src/DMXSerial.cpp: In function 'void __vector_37()': -.piolibdeps/DMXSerial/src/DMXSerial.cpp:543:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (_dmxChannel > _dmxMaxChannel) { -^ -Compiling .pioenvs/megaatmega2560/lib255/WiFi/WiFiClient.cpp.o -Archiving .pioenvs/megaatmega2560/lib231/libDMXSerial.a -Archiving .pioenvs/megaatmega2560/libf1a/libCmdArduino.a -Archiving .pioenvs/megaatmega2560/liba60/libhttpClient.a -Indexing .pioenvs/megaatmega2560/lib231/libDMXSerial.a -Indexing .pioenvs/megaatmega2560/libf1a/libCmdArduino.a -Indexing .pioenvs/megaatmega2560/liba60/libhttpClient.a -Compiling .pioenvs/megaatmega2560/lib255/WiFi/WiFiServer.cpp.o -Archiving .pioenvs/megaatmega2560/lib9a2/libPubSubClient.a Archiving .pioenvs/megaatmega2560/lib9dd/libaJson.a -Indexing .pioenvs/megaatmega2560/lib9a2/libPubSubClient.a -Compiling .pioenvs/megaatmega2560/lib255/WiFi/WiFiUdp.cpp.o Indexing .pioenvs/megaatmega2560/lib9dd/libaJson.a -Compiling .pioenvs/megaatmega2560/lib255/WiFi/utility/server_drv.cpp.o -Compiling .pioenvs/megaatmega2560/lib255/WiFi/utility/spi_drv.cpp.o -Compiling .pioenvs/megaatmega2560/lib255/WiFi/utility/wifi_drv.cpp.o -Compiling .pioenvs/megaatmega2560/libc78/Artnet/Artnet.cpp.o -Compiling .pioenvs/megaatmega2560/lib988/SoftwareSerial/SoftwareSerial.cpp.o -Archiving .pioenvs/megaatmega2560/libFrameworkArduinoVariant.a -/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp: In static member function 'static uint8_t WiFiDrv::getEncTypeNetowrks(uint8_t)': -/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp:451:10: warning: converting to non-pointer type 'uint8_t {aka unsigned char}' from NULL [-Wconversion-null] -return NULL; -^ -/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp: In static member function 'static int32_t WiFiDrv::getRSSINetoworks(uint8_t)': -/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/wifi_drv.cpp:476:10: warning: converting to non-pointer type 'int32_t {aka long int}' from NULL [-Wconversion-null] -return NULL; -^ -In file included from /home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/spi_drv.cpp:22:0: -/home/livello/.platformio/packages/framework-arduinoavr/libraries/WiFi/src/utility/spi_drv.h:41:13: warning: 'initialized' defined but not used [-Wunused-variable] -static bool initialized = false; -^ -.piolibdeps/Artnet/Artnet.cpp: In member function 'uint16_t Artnet::read()': -.piolibdeps/Artnet/Artnet.cpp:94:40: warning: embedded '\0' in format [-Wformat-contains-nul] -sprintf((char *)id, "Art-Net\0"); -^ -.piolibdeps/Artnet/Artnet.cpp:107:54: warning: embedded '\0' in format [-Wformat-contains-nul] -sprintf((char *)shortname, "artnet arduino\0"); -^ -.piolibdeps/Artnet/Artnet.cpp:108:64: warning: embedded '\0' in format [-Wformat-contains-nul] -sprintf((char *)longname, "Art-Net -> Arduino Bridge\0"); -^ -.piolibdeps/Artnet/Artnet.cpp:143:109: warning: embedded '\0' in format [-Wformat-contains-nul] -sprintf((char *)ArtPollReply.nodereport, "%i DMX output universes active.\0", ArtPollReply.numbports); -^ -.piolibdeps/Artnet/Artnet.cpp:160:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -Indexing .pioenvs/megaatmega2560/libFrameworkArduinoVariant.a -Compiling .pioenvs/megaatmega2560/FrameworkArduino/CDC.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial.cpp.o -Archiving .pioenvs/megaatmega2560/libc78/libArtnet.a -Archiving .pioenvs/megaatmega2560/lib255/libWiFi.a -Indexing .pioenvs/megaatmega2560/libc78/libArtnet.a -Indexing .pioenvs/megaatmega2560/lib255/libWiFi.a -Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial0.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial1.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial2.cpp.o -Archiving .pioenvs/megaatmega2560/lib988/libSoftwareSerial.a -Indexing .pioenvs/megaatmega2560/lib988/libSoftwareSerial.a -Compiling .pioenvs/megaatmega2560/FrameworkArduino/HardwareSerial3.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/IPAddress.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/PluggableUSB.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/Print.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/Stream.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/Tone.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/USBCore.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/WInterrupts.c.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/WMath.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/WString.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/_wiring_pulse.S.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/abi.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/hooks.c.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/main.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/new.cpp.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring.c.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_analog.c.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_digital.c.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_pulse.c.o -Compiling .pioenvs/megaatmega2560/FrameworkArduino/wiring_shift.c.o -Archiving .pioenvs/megaatmega2560/libFrameworkArduino.a -Indexing .pioenvs/megaatmega2560/libFrameworkArduino.a Linking .pioenvs/megaatmega2560/firmware.elf -Calculating size .pioenvs/megaatmega2560/firmware.elf Building .pioenvs/megaatmega2560/firmware.hex +Calculating size .pioenvs/megaatmega2560/firmware.elf AVR Memory Usage ---------------- Device: atmega2560 @@ -648,21 +358,18 @@ Data: 2559 bytes (31.2% Full) (.data + .bss + .noinit) -======================================================================================= [SUCCESS] Took 25.45 seconds ======================================================================================= +======================================================================================= [SUCCESS] Took 25.43 seconds ======================================================================================= ================================================================================================= [SUMMARY] ================================================================================================= -Environment due [SKIP] -Environment due-5500 [SKIP] -Environment megaatmega2560 [SUCCESS] -Environment megaatmega2560-5500 [SKIP] -Environment espressif8266 [SKIP] -======================================================================================= [SUCCESS] Took 25.45 seconds ======================================================================================= +Environment due [SKIP] +Environment megaatmega2560 [SUCCESS] +======================================================================================= [SUCCESS] Took 25.43 seconds ======================================================================================= livello@lserver ~/PROG/lighthub $ pio run -e due -[Wed Mar 14 02:14:22 2018] Processing due (platform: atmelsam; board: due; framework: arduino) +[Wed Mar 14 13:46:33 2018] Processing due (platform: atmelsam; board: due; framework: arduino) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- LibraryManager: Installing DueFlashStorage git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-IcfSg7-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-T8wBjH-package»… remote: Counting objects: 19, done. remote: Compressing objects: 100% (16/16), done. remote: Total 19 (delta 3), reused 15 (delta 3), pack-reused 0 @@ -670,7 +377,7 @@ remote: Total 19 (delta 3), reused 15 (delta 3), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing DmxDue git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-6V6WxO-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-nscx5F-package»… remote: Counting objects: 7, done. remote: Compressing objects: 100% (5/5), done. remote: Total 7 (delta 0), reused 5 (delta 0), pack-reused 0 @@ -678,7 +385,7 @@ remote: Total 7 (delta 0), reused 5 (delta 0), pack-reused 0 Проверка соединения… готово. LibraryManager: Installing ArduinoHttpClient git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-SAsCAo-package»… +Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-6QUOvA-package»… remote: Counting objects: 45, done. remote: Compressing objects: 100% (41/41), done. remote: Total 45 (delta 9), reused 22 (delta 3), pack-reused 0 @@ -717,69 +424,14 @@ Dependency Graph |-- v3.1.8 | |-- v3.1 #62f0959 | |-- v1.3.0 #4db73b3 -|-- v1.0 |-- v3.1 #62f0959 +|-- v1.0 |-- #007e22e | |-- v1.1.2 #238e8fc | | |-- v1.0 #8d59205 |-- v1.3.0 #4db73b3 -Compiling .pioenvs/due/libc0c/FastLED_ID126/FastLED.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/bitswap.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/colorpalettes.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/colorutils.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/hsv2rgb.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/lib8tion.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/noise.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/power_mgt.cpp.o -Compiling .pioenvs/due/libc0c/FastLED_ID126/wiring.cpp.o -Compiling .pioenvs/due/src/dmx.cpp.o -Compiling .pioenvs/due/src/esp.cpp.o -Compiling .pioenvs/due/src/inputs.cpp.o -Compiling .pioenvs/due/src/item.cpp.o -lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': -lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/dmx.cpp: In function 'void DMXput()': -lighthub/dmx.cpp:111:5: warning: unused variable 't' [-Wunused-variable] -int t; -^ Compiling .pioenvs/due/src/lighthub.ino.cpp.o Compiling .pioenvs/due/src/main.cpp.o -In file included from lighthub/inputs.cpp:23:0: -lighthub/item.h: In member function 'int Item::On()': -lighthub/item.h:85:33: warning: no return statement in function returning non-void [-Wreturn-type] -inline int On (){Ctrl(CMD_ON);}; -^ -lighthub/item.h: In member function 'int Item::Off()': -lighthub/item.h:86:34: warning: no return statement in function returning non-void [-Wreturn-type] -inline int Off(){Ctrl(CMD_OFF);}; -^ -lighthub/item.h: In member function 'int Item::Toggle()': -lighthub/item.h:87:40: warning: no return statement in function returning non-void [-Wreturn-type] -inline int Toggle(){Ctrl(CMD_TOGGLE);}; -^ -Compiling .pioenvs/due/src/owSwitch.cpp.o -In file included from lighthub/item.cpp:21:0: -lighthub/item.h: In member function 'int Item::On()': -lighthub/item.h:85:33: warning: no return statement in function returning non-void [-Wreturn-type] -inline int On (){Ctrl(CMD_ON);}; -^ -lighthub/item.h: In member function 'int Item::Off()': -lighthub/item.h:86:34: warning: no return statement in function returning non-void [-Wreturn-type] -inline int Off(){Ctrl(CMD_OFF);}; -^ -lighthub/item.h: In member function 'int Item::Toggle()': -lighthub/item.h:87:40: warning: no return statement in function returning non-void [-Wreturn-type] -inline int Toggle(){Ctrl(CMD_TOGGLE);}; -^ -In file included from lighthub/item.cpp:26:0: -.piolibdeps/FastLED_ID126/FastLED.h: At global scope: -.piolibdeps/FastLED_ID126/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008 -# pragma message "FastLED version 3.001.008" -^ -Compiling .pioenvs/due/src/owTerm.cpp.o -Compiling .pioenvs/due/src/utils.cpp.o In file included from lighthub/main.cpp:71:0: .piolibdeps/SPI/SPI.h:1028:8: error: 'SPIClass' does not name a type extern SPIClass SPI; @@ -858,135 +510,61 @@ else if (extArray=aJson.getArrayItem(item,I_EXT)) lighthub/main.cpp:1202:1: warning: no return statement in function returning non-void [-Wreturn-type] } //proc ^ -lighthub/owSwitch.cpp: In function 'int cntrl2408(uint8_t*, int, int)': -lighthub/owSwitch.cpp:96:6: warning: variable 'mask' set but not used [-Wunused-but-set-variable] -int mask,devnum; -^ -lighthub/owSwitch.cpp:102:7: warning: unused variable 'r' [-Wunused-variable] -int r,f; -^ -lighthub/owSwitch.cpp:102:9: warning: unused variable 'f' [-Wunused-variable] -int r,f; -^ In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, from lighthub/main.cpp:75: .piolibdeps/ModbusMaster/src/util/crc16.h: At global scope: .piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'uint16_t crc16_update(uint16_t, uint8_t)' defined but not used [-Wunused-function] static uint16_t crc16_update(uint16_t crc, uint8_t a) ^ -lighthub/owTerm.cpp: In function 'int owUpdate()': -lighthub/owTerm.cpp:45:9: warning: unused variable 'sr' [-Wunused-variable] -short sr; +Compiling .pioenvs/due/libe82/DueFlashStorage/efc.cpp.o +Compiling .pioenvs/due/libe82/DueFlashStorage/flash_efc.cpp.o +Compiling .pioenvs/due/lib8c0/Wire/Wire.cpp.o +.piolibdeps/DueFlashStorage/src/flash_efc.cpp: In function 'uint32_t flash_is_locked(uint32_t, uint32_t)': +.piolibdeps/DueFlashStorage/src/flash_efc.cpp:669:11: warning: variable 'ul_error' set but not used [-Wunused-but-set-variable] +uint32_t ul_error; ^ -lighthub/owTerm.cpp:77:1: warning: no return statement in function returning non-void [-Wreturn-type] -} +Compiling .pioenvs/due/lib5a0/DS2482_OneWire/DS2482_OneWire.cpp.o +In file included from /home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.cpp:25:0: +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.h: In constructor 'TwoWire::TwoWire(Twi*, void (*)(), void (*)())': +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.h:96:7: warning: 'TwoWire::twi' will be initialized after [-Wreorder] +Twi *twi; ^ -Compiling .pioenvs/due/libe82/DueFlashStorage/DueFlashStorage.cpp.o -lighthub/item.cpp: In member function 'virtual int Item::Ctrl(short int, short int, int*, boolean)': -lighthub/item.cpp:482:13: warning: unused variable 'tval' [-Wunused-variable] -int tval = 7; // this is 111 in binary and is used as an eraser +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.h:72:10: warning: 'uint8_t TwoWire::rxBufferIndex' [-Wreorder] +uint8_t rxBufferIndex; ^ -lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': -lighthub/item.cpp:668:11: warning: unused variable 'j' [-Wunused-variable] -uint8_t j, result; +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.cpp:95:1: warning: when initialized here [-Wreorder] +TwoWire::TwoWire(Twi *_twi, void(*_beginCb)(void), void(*_endCb)(void)) : ^ -lighthub/item.cpp:668:14: warning: unused variable 'result' [-Wunused-variable] -uint8_t j, result; +In file included from /home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.cpp:25:0: +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.h:108:16: warning: 'TwoWire::status' will be initialized after [-Wreorder] +TwoWireStatus status; ^ -lighthub/item.cpp:669:12: warning: unused variable 'data' [-Wunused-variable] -uint16_t data[1]; +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.h:90:30: warning: 'void (* TwoWire::onBeginCallback)()' [-Wreorder] +void (*onBeginCallback)(void); ^ +/home/livello/.platformio/packages/framework-arduinosam/libraries/__cores__/sam/Wire/src/Wire.cpp:95:1: warning: when initialized here [-Wreorder] +TwoWire::TwoWire(Twi *_twi, void(*_beginCb)(void), void(*_endCb)(void)) : +^ +Compiling .pioenvs/due/libecc/ModbusMaster/ModbusMaster.cpp.o +.piolibdeps/DS2482_OneWire/DS2482_OneWire.cpp: In member function 'uint8_t OneWire::waitOnBusy()': +.piolibdeps/DS2482_OneWire/DS2482_OneWire.cpp:131:10: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized] +uint8_t status; +^ +Compiling .pioenvs/due/lib704/DallasTemperature/DallasTemperature.cpp.o *** [.pioenvs/due/src/main.cpp.o] Error 1 -lighthub/item.cpp: In member function 'int Item::checkModbus()': -lighthub/item.cpp:890:13: warning: unused variable 'mask' [-Wunused-variable] -short mask = getArg(2); +.piolibdeps/ModbusMaster/src/ModbusMaster.cpp: In member function 'uint8_t ModbusMaster::requestFrom(uint16_t, uint16_t)': +.piolibdeps/ModbusMaster/src/ModbusMaster.cpp:94:33: warning: 'read' is used uninitialized in this function [-Wuninitialized] +_u8ResponseBufferLength = read; ^ -lighthub/item.cpp: In member function 'int Item::checkModbus(int)': -lighthub/item.cpp:932:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses] -if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy -^ -lighthub/item.cpp:932:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses] -if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy -^ -lighthub/item.cpp:950:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::Pool()': -lighthub/item.cpp:962:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'virtual int Item::Ctrl(short int, short int, int*, boolean)': -lighthub/item.cpp:517:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': -lighthub/item.cpp:684:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/utils.cpp: In function 'long unsigned int freeRam()': -lighthub/utils.cpp:103:9: warning: unused variable 'ramstart' [-Wunused-variable] -char *ramstart = (char *) 0x20070000; -^ -lighthub/utils.cpp:104:9: warning: unused variable 'ramend' [-Wunused-variable] -char *ramend = (char *) 0x20088000; -^ -lighthub/item.cpp: In member function 'int Item::VacomSetHeat(int, int8_t, int8_t)': -lighthub/item.cpp:715:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In function 'int modbusSet(int, uint16_t, int, uint16_t)': -lighthub/item.cpp:787:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::checkFM()': -lighthub/item.cpp:878:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::checkModbus()': -lighthub/item.cpp:921:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/utils.cpp: In function 'byte HEX2DEC(char)': -lighthub/utils.cpp:59:10: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized] -return v; -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write(uint32_t, byte)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:23:9: warning: unused variable 'data' [-Wunused-variable] -byte *data; -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write(uint32_t, byte*, uint32_t)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:62:29: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses] -if (((uint32_t)FLASH_START+address & 3) != 0) { -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:94:9: warning: unused variable 'data' [-Wunused-variable] -byte *data; -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte*, uint32_t)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:121:29: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses] -if (((uint32_t)FLASH_START+address & 3) != 0) { -^ -lighthub/item.cpp:916:29: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized] -nextItem.checkModbus(data); -^ -In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, -from lighthub/item.cpp:29: -.piolibdeps/ModbusMaster/src/util/crc16.h: At global scope: -.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'uint16_t crc16_update(uint16_t, uint8_t)' defined but not used [-Wunused-function] -static uint16_t crc16_update(uint16_t crc, uint8_t a) -^ -========================================================================================= [ERROR] Took 6.61 seconds ========================================================================================= +========================================================================================= [ERROR] Took 6.55 seconds ========================================================================================= ================================================================================================= [SUMMARY] ================================================================================================= -Environment due [ERROR] -Environment due-5500 [SKIP] -Environment megaatmega2560 [SKIP] -Environment megaatmega2560-5500 [SKIP] -Environment espressif8266 [SKIP] -========================================================================================= [ERROR] Took 6.61 seconds ========================================================================================= +Environment due [ERROR] +Environment megaatmega2560 [SKIP] +========================================================================================= [ERROR] Took 6.55 seconds ========================================================================================= livello@lserver ~/PROG/lighthub $ pio run -e megaatmega2560 -[Wed Mar 14 02:14:38 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino) +[Wed Mar 14 13:46:43 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Verbose mode can be enabled via `-v, --verbose` option PLATFORM: Atmel AVR > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) @@ -1018,19 +596,19 @@ Dependency Graph |-- v1.0 #8d59205 |-- v2.6 #f029640 |-- #3d39995 -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 | |-- v1.2.7 | | |-- v1.0 #8d59205 +| |-- v1.1.2 #238e8fc +| | |-- v1.0 #8d59205 |-- v3.1.8 -| |-- v3.1 #62f0959 -| |-- v1.0 | |-- v1.3.0 #4db73b3 -|-- v1.0.0 #a41b206 -|-- v2.0 -|-- #acde3dc +| |-- v1.0 +| |-- v3.1 #62f0959 |-- v1.0 +|-- v2.0 |-- #bf7ffb2 +|-- #acde3dc +|-- v1.0.0 #a41b206 Compiling .pioenvs/megaatmega2560/src/dmx.cpp.o Compiling .pioenvs/megaatmega2560/src/item.cpp.o Compiling .pioenvs/megaatmega2560/src/lighthub.ino.cpp.o @@ -1360,41 +938,6 @@ retCode = flash_write((uint32_t)FLASH_START+address, data, dataLength, 1); .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ -lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': -lighthub/item.cpp:668:11: warning: unused variable 'j' [-Wunused-variable] -uint8_t j, result; -^ -lighthub/item.cpp:668:14: warning: unused variable 'result' [-Wunused-variable] -uint8_t j, result; -^ -lighthub/item.cpp:669:12: warning: unused variable 'data' [-Wunused-variable] -uint16_t data[1]; -^ -*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/DueFlashStorage.cpp.o] Error 1 -lighthub/item.cpp: In member function 'int Item::checkModbus()': -lighthub/item.cpp:914:93: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) -^ -lighthub/item.cpp:914:121: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) -^ -lighthub/item.cpp:890:13: warning: unused variable 'mask' [-Wunused-variable] -short mask = getArg(2); -^ -lighthub/item.cpp: In member function 'int Item::checkModbus(int)': -lighthub/item.cpp:932:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses] -if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy -^ -lighthub/item.cpp:932:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses] -if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy -^ -lighthub/item.cpp:950:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::Pool()': -lighthub/item.cpp:962:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: .piolibdeps/DueFlashStorage/src/efc.h:116:19: error: 'Efc' was not declared in this scope uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); @@ -1632,31 +1175,8 @@ uint32_t ul_argument) .piolibdeps/DueFlashStorage/src/efc.cpp:337:1: error: expected '}' at end of input } ^ +*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/DueFlashStorage.cpp.o] Error 1 *** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/efc.cpp.o] Error 1 -lighthub/item.cpp: In member function 'virtual int Item::Ctrl(short int, short int, int*, boolean)': -lighthub/item.cpp:517:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': -lighthub/item.cpp:684:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::VacomSetHeat(int, int8_t, int8_t)': -lighthub/item.cpp:715:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In function 'int modbusSet(int, uint16_t, int, uint16_t)': -lighthub/item.cpp:787:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::checkFM()': -lighthub/item.cpp:878:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::checkModbus()': -lighthub/item.cpp:921:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ In file included from .piolibdeps/DueFlashStorage/src/flash_efc.h:48:0, from .piolibdeps/DueFlashStorage/src/flash_efc.cpp:46: .piolibdeps/DueFlashStorage/src/efc.h:116:19: error: 'Efc' was not declared in this scope @@ -1803,6 +1323,64 @@ uint16_t *pus_page, uint16_t *pus_offset) } ^ *** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/flash_efc.cpp.o] Error 1 +lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': +lighthub/item.cpp:668:11: warning: unused variable 'j' [-Wunused-variable] +uint8_t j, result; +^ +lighthub/item.cpp:668:14: warning: unused variable 'result' [-Wunused-variable] +uint8_t j, result; +^ +lighthub/item.cpp:669:12: warning: unused variable 'data' [-Wunused-variable] +uint16_t data[1]; +^ +lighthub/item.cpp: In member function 'int Item::checkModbus()': +lighthub/item.cpp:914:93: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) +^ +lighthub/item.cpp:914:121: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] +if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) +^ +lighthub/item.cpp:890:13: warning: unused variable 'mask' [-Wunused-variable] +short mask = getArg(2); +^ +lighthub/item.cpp: In member function 'int Item::checkModbus(int)': +lighthub/item.cpp:932:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses] +if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy +^ +lighthub/item.cpp:932:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses] +if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy +^ +lighthub/item.cpp:950:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::Pool()': +lighthub/item.cpp:962:3: warning: no return statement in function returning non-void [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'virtual int Item::Ctrl(short int, short int, int*, boolean)': +lighthub/item.cpp:517:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': +lighthub/item.cpp:684:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::VacomSetHeat(int, int8_t, int8_t)': +lighthub/item.cpp:715:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In function 'int modbusSet(int, uint16_t, int, uint16_t)': +lighthub/item.cpp:787:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::checkFM()': +lighthub/item.cpp:878:3: warning: control reaches end of non-void function [-Wreturn-type] +} +^ +lighthub/item.cpp: In member function 'int Item::checkModbus()': +lighthub/item.cpp:921:1: warning: control reaches end of non-void function [-Wreturn-type] +} +^ .piolibdeps/aJson/aJSON.cpp: In member function 'virtual bool aJsonEEPROMStream::available()': .piolibdeps/aJson/aJSON.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (addr+offset Date: Thu, 15 Mar 2018 00:14:52 +0300 Subject: [PATCH 12/21] fix libdeps mess --- platformio.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 5291d2c..255bd36 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,12 +11,13 @@ src_dir = lighthub env_default = megaatmega2560 -; due + due [env:due] platform = atmelsam framework = arduino board = due +lib_ldf_mode = chain+ lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 @@ -27,7 +28,7 @@ lib_deps = https://github.com/anklimov/CmdArduino https://github.com/anklimov/ModbusMaster https://github.com/anklimov/Ethernet - https://github.com/PaulStoffregen/SPI.git +; https://github.com/PaulStoffregen/SPI.git https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git FastLED @@ -37,6 +38,7 @@ lib_deps = platform = atmelavr board = megaatmega2560 framework = arduino +lib_ldf_mode = chain+ lib_deps = https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 https://github.com/anklimov/DS2482_OneWire From eff1ba5de3fcebd6ae47ddcd59ac7a1245e43637 Mon Sep 17 00:00:00 2001 From: livello Date: Thu, 15 Mar 2018 01:46:18 +0300 Subject: [PATCH 13/21] fixed libdeps mess --- platformio.ini | 91 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index 8408de8..b610c19 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,4 +1,4 @@ -; PlatformIO Project Configuration File +; PlatformIO Project Configuration File (for copy and paste) ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags @@ -9,14 +9,40 @@ ; http://docs.platformio.org/page/projectconf.html [platformio] src_dir = lighthub +env_default = + megaatmega2560 + due + +[env:due] +platform = atmelsam +framework = arduino +board = due +lib_ldf_mode = chain+ +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 +; https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet +; https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED + [env:megaatmega2560] platform = atmelavr board = megaatmega2560 framework = arduino +lib_ldf_mode = chain+ lib_deps = -; https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 - https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 +; https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DmxSimple https://github.com/anklimov/httpClient @@ -29,3 +55,62 @@ lib_deps = https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git FastLED + +[env:due-5500] +platform = atmelsam +framework = arduino +board = due +build_flags = -D Wiz5500 +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet2 +; https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED + +[env:megaatmega2560-5500] +platform = atmelavr +board = megaatmega2560 +framework = arduino +lib_ldf_mode = chain+ +build_flags = -D Wiz5500 +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet2 + https://github.com/PaulStoffregen/SPI.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED + +[env:espressif8266] +platform = espressif8266 +framework = arduino +board = nodemcuv2 +lib_ldf_mode = chain+ +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/ESP-Dmx + https://github.com/arduino-libraries/ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED From 5fe20078b1851a67c52ac8b3ac4519d7632bc13d Mon Sep 17 00:00:00 2001 From: livello Date: Thu, 15 Mar 2018 04:01:55 +0300 Subject: [PATCH 14/21] commit and branch into version number --- lighthub/main.cpp | 12 +- pio_run_error_log.txt | 1423 ----------------------------------------- platformio.ini | 7 +- 3 files changed, 16 insertions(+), 1426 deletions(-) delete mode 100644 pio_run_error_log.txt diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 1b7ba8a..3c0410c 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -129,6 +129,14 @@ EthernetClient ethClient; #include "dmx.h" #endif +#define Q(x) #x +#define QUOTE(x) Q(x) + +#ifndef PIO_SRC_REV +#define PIO_SRC_REV_BRANCH v0.97 +#endif + + #include "item.h" #include "inputs.h" @@ -886,7 +894,9 @@ void postTransmission() void setup_main() { cmdInit(115200); - Serial.println(F("\nLazyhome.ru LightHub controller v0.97")); + Serial.print(F("\nLazyhome.ru LightHub controller ")); + Serial.println(F(QUOTE(PIO_SRC_REV))); + cmdAdd("help", _handleHelp); cmdAdd("save", _saveConfig); diff --git a/pio_run_error_log.txt b/pio_run_error_log.txt deleted file mode 100644 index 70bc953..0000000 --- a/pio_run_error_log.txt +++ /dev/null @@ -1,1423 +0,0 @@ -livello@lserver ~/PROG/lighthub $ rm -Rf .piolibdeps/ -livello@lserver ~/PROG/lighthub $ pio run -e megaatmega2560 - -[Wed Mar 14 13:46:03 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -LibraryManager: Installing Arduino-Temperature-Control-Library -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-cmz44U-package»… -remote: Counting objects: 337, done. -remote: Compressing objects: 100% (6/6), done. -remote: Total 337 (delta 1), reused 0 (delta 0), pack-reused 331 -Получение объектов: 100% (337/337), 151.23 KiB | 0 bytes/s, готово. -Определение изменений: 100% (174/174), готово. -Проверка соединения… готово. -HEAD сейчас на 1306c49 Update OneWire.cpp -LibraryManager: Installing DS2482_OneWire -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-sk9FKd-package»… -remote: Counting objects: 14, done. -remote: Compressing objects: 100% (10/10), done. -remote: Total 14 (delta 1), reused 7 (delta 0), pack-reused 0 -Распаковка объектов: 100% (14/14), готово. -Проверка соединения… готово. -LibraryManager: Installing DmxSimple -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-6FpiRF-package»… -remote: Counting objects: 15, done. -remote: Compressing objects: 100% (12/12), done. -remote: Total 15 (delta 0), reused 13 (delta 0), pack-reused 0 -Распаковка объектов: 100% (15/15), готово. -Проверка соединения… готово. -LibraryManager: Installing httpClient -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-sz4zO7-package»… -remote: Counting objects: 13, done. -remote: Compressing objects: 100% (11/11), done. -remote: Total 13 (delta 0), reused 9 (delta 0), pack-reused 0 -Распаковка объектов: 100% (13/13), готово. -Проверка соединения… готово. -LibraryManager: Installing aJson -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-vKbebH-package»… -remote: Counting objects: 20, done. -remote: Compressing objects: 100% (16/16), done. -remote: Total 20 (delta 0), reused 13 (delta 0), pack-reused 0 -Распаковка объектов: 100% (20/20), готово. -Проверка соединения… готово. -LibraryManager: Installing CmdArduino -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-SdLqob-package»… -remote: Counting objects: 17, done. -remote: Compressing objects: 100% (14/14), done. -remote: Total 17 (delta 2), reused 15 (delta 1), pack-reused 0 -Распаковка объектов: 100% (17/17), готово. -Проверка соединения… готово. -LibraryManager: Installing ModbusMaster -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-CTfc76-package»… -remote: Counting objects: 41, done. -remote: Compressing objects: 100% (35/35), done. -remote: Total 41 (delta 0), reused 18 (delta 0), pack-reused 0 -Распаковка объектов: 100% (41/41), готово. -Проверка соединения… готово. -LibraryManager: Installing DMXSerial -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-SUXywb-package»… -remote: Counting objects: 17, done. -remote: Compressing objects: 100% (14/14), done. -remote: Total 17 (delta 0), reused 9 (delta 0), pack-reused 0 -Распаковка объектов: 100% (17/17), готово. -Проверка соединения… готово. -LibraryManager: Installing Ethernet -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-vEEroA-package»… -remote: Counting objects: 48, done. -remote: Compressing objects: 100% (41/41), done. -remote: Total 48 (delta 4), reused 20 (delta 1), pack-reused 0 -Распаковка объектов: 100% (48/48), готово. -Проверка соединения… готово. -LibraryManager: Installing SPI -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-Kn75yj-package»… -remote: Counting objects: 12, done. -remote: Compressing objects: 100% (11/11), done. -remote: Total 12 (delta 0), reused 6 (delta 0), pack-reused 0 -Распаковка объектов: 100% (12/12), готово. -Проверка соединения… готово. -LibraryManager: Installing pubsubclient -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-JOtNYi-package»… -remote: Counting objects: 56, done. -remote: Compressing objects: 100% (48/48), done. -remote: Total 56 (delta 5), reused 26 (delta 1), pack-reused 0 -Распаковка объектов: 100% (56/56), готово. -Проверка соединения… готово. -LibraryManager: Installing Artnet -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-LExt22-package»… -remote: Counting objects: 37, done. -remote: Compressing objects: 100% (32/32), done. -remote: Total 37 (delta 8), reused 17 (delta 0), pack-reused 0 -Распаковка объектов: 100% (37/37), готово. -Проверка соединения… готово. -LibraryManager: Installing id=126 -Downloading [####################################] 100% -Unpacking [####################################] 100% -Verbose mode can be enabled via `-v, --verbose` option -PLATFORM: Atmel AVR > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) -SYSTEM: ATMEGA2560 16MHz 8KB RAM (248KB Flash) -Converting lighthub.ino -Library Dependency Finder -> http://bit.ly/configure-pio-ldf -LDF MODES: FINDER(chain) COMPATIBILITY(light) -Collected 37 compatible libraries -Scanning dependencies... -Dependency Graph -|-- #1306c49 -| |-- #3ef01fc -| | |-- v1.0 -| |-- v2.0.1 #4a429bf -|-- #3ef01fc -| |-- v1.0 -|-- v3.1 #62f0959 -|-- #007e22e -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 -|-- #60e5d57 -| |-- v2.0 -|-- #c94cd3f -|-- v2.0.1 #4a429bf -|-- v1.3.0 #4db73b3 -|-- v1.1.2 #238e8fc -| |-- v1.0 #8d59205 -|-- v1.0 #8d59205 -|-- v2.6 #f029640 -|-- #3d39995 -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 -| |-- v1.2.7 -| | |-- v1.0 #8d59205 -|-- v3.1.8 -| |-- v1.0 -| |-- v1.3.0 #4db73b3 -| |-- v3.1 #62f0959 -|-- v1.0 -|-- v2.0 -Compiling .pioenvs/megaatmega2560/src/dmx.cpp.o -Compiling .pioenvs/megaatmega2560/src/item.cpp.o -Compiling .pioenvs/megaatmega2560/src/lighthub.ino.cpp.o -lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': -lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/dmx.cpp: In function 'void DMXput()': -lighthub/dmx.cpp:111:5: warning: unused variable 't' [-Wunused-variable] -int t; -^ -lighthub/dmx.cpp: In function 'void onDmxFrame(uint16_t, uint16_t, uint8_t, uint8_t*, IPAddress)': -lighthub/dmx.cpp:186:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -for (int i = 0 ; i < length && iprint('[') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:862:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(',') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:868:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(']') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp: In member function 'int aJsonStream::printObject(aJsonObject*)': -.piolibdeps/aJson/aJSON.cpp:960:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print('{') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:970:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(':') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:981:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(',') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:987:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print('}') == EOF) -^ -In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, -from lighthub/item.cpp:29: -lighthub/item.cpp: At top level: -.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'crc16_update' defined but not used [-Wunused-function] -static uint16_t crc16_update(uint16_t crc, uint8_t a) -^ -Archiving .pioenvs/megaatmega2560/lib9dd/libaJson.a -Indexing .pioenvs/megaatmega2560/lib9dd/libaJson.a -Linking .pioenvs/megaatmega2560/firmware.elf -Building .pioenvs/megaatmega2560/firmware.hex -Calculating size .pioenvs/megaatmega2560/firmware.elf -AVR Memory Usage ----------------- -Device: atmega2560 - -Program: 56650 bytes (21.6% Full) -(.text + .data + .bootloader) - -Data: 2559 bytes (31.2% Full) -(.data + .bss + .noinit) - - -======================================================================================= [SUCCESS] Took 25.43 seconds ======================================================================================= - -================================================================================================= [SUMMARY] ================================================================================================= -Environment due [SKIP] -Environment megaatmega2560 [SUCCESS] -======================================================================================= [SUCCESS] Took 25.43 seconds ======================================================================================= -livello@lserver ~/PROG/lighthub $ pio run -e due -[Wed Mar 14 13:46:33 2018] Processing due (platform: atmelsam; board: due; framework: arduino) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -LibraryManager: Installing DueFlashStorage -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-T8wBjH-package»… -remote: Counting objects: 19, done. -remote: Compressing objects: 100% (16/16), done. -remote: Total 19 (delta 3), reused 15 (delta 3), pack-reused 0 -Распаковка объектов: 100% (19/19), готово. -Проверка соединения… готово. -LibraryManager: Installing DmxDue -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-nscx5F-package»… -remote: Counting objects: 7, done. -remote: Compressing objects: 100% (5/5), done. -remote: Total 7 (delta 0), reused 5 (delta 0), pack-reused 0 -Распаковка объектов: 100% (7/7), готово. -Проверка соединения… готово. -LibraryManager: Installing ArduinoHttpClient -git version 2.7.4 -Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-6QUOvA-package»… -remote: Counting objects: 45, done. -remote: Compressing objects: 100% (41/41), done. -remote: Total 45 (delta 9), reused 22 (delta 3), pack-reused 0 -Распаковка объектов: 100% (45/45), готово. -Проверка соединения… готово. -Verbose mode can be enabled via `-v, --verbose` option -PLATFORM: Atmel SAM > Arduino Due (Programming Port) -SYSTEM: AT91SAM3X8E 84MHz 32KB RAM (512KB Flash) -DEBUG: CURRENT(blackmagic) EXTERNAL(blackmagic, jlink) -Converting lighthub.ino -Library Dependency Finder -> http://bit.ly/configure-pio-ldf -LDF MODES: FINDER(chain) COMPATIBILITY(light) -Collected 19 compatible libraries -Scanning dependencies... -Dependency Graph -|-- v1.0.0 #a41b206 -|-- #1306c49 -| |-- #3ef01fc -| | |-- v1.0 -| |-- v2.0.1 #4a429bf -|-- #3ef01fc -| |-- v1.0 -|-- #bf7ffb2 -|-- #acde3dc -|-- #60e5d57 -| |-- v1.0.0 #a41b206 -|-- #c94cd3f -|-- v2.0.1 #4a429bf -|-- v1.1.2 #238e8fc -| |-- v1.0 #8d59205 -|-- v1.0 #8d59205 -|-- v2.6 #f029640 -|-- #3d39995 -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 -|-- v3.1.8 -| |-- v3.1 #62f0959 -| |-- v1.3.0 #4db73b3 -|-- v3.1 #62f0959 -|-- v1.0 -|-- #007e22e -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 -|-- v1.3.0 #4db73b3 -Compiling .pioenvs/due/src/lighthub.ino.cpp.o -Compiling .pioenvs/due/src/main.cpp.o -In file included from lighthub/main.cpp:71:0: -.piolibdeps/SPI/SPI.h:1028:8: error: 'SPIClass' does not name a type -extern SPIClass SPI; -^ -In file included from lighthub/main.cpp:132:0: -lighthub/item.h: In member function 'int Item::On()': -lighthub/item.h:85:33: warning: no return statement in function returning non-void [-Wreturn-type] -inline int On (){Ctrl(CMD_ON);}; -^ -lighthub/item.h: In member function 'int Item::Off()': -lighthub/item.h:86:34: warning: no return statement in function returning non-void [-Wreturn-type] -inline int Off(){Ctrl(CMD_OFF);}; -^ -lighthub/item.h: In member function 'int Item::Toggle()': -lighthub/item.h:87:40: warning: no return statement in function returning non-void [-Wreturn-type] -inline int Toggle(){Ctrl(CMD_TOGGLE);}; -^ -lighthub/main.cpp: In function 'void callback(char*, byte*, unsigned int)': -lighthub/main.cpp:198:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -for (int i=0;i Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) -SYSTEM: ATMEGA2560 16MHz 8KB RAM (248KB Flash) -Converting lighthub.ino -Library Dependency Finder -> http://bit.ly/configure-pio-ldf -LDF MODES: FINDER(chain) COMPATIBILITY(light) -Collected 40 compatible libraries -Scanning dependencies... -Dependency Graph -|-- #1306c49 -| |-- #3ef01fc -| | |-- v1.0 -| |-- v2.0.1 #4a429bf -|-- #3ef01fc -| |-- v1.0 -|-- v3.1 #62f0959 -|-- #007e22e -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 -|-- #60e5d57 -| |-- v2.0 -| |-- v1.0.0 #a41b206 -|-- #c94cd3f -|-- v2.0.1 #4a429bf -|-- v1.3.0 #4db73b3 -|-- v1.1.2 #238e8fc -| |-- v1.0 #8d59205 -|-- v1.0 #8d59205 -|-- v2.6 #f029640 -|-- #3d39995 -| |-- v1.2.7 -| | |-- v1.0 #8d59205 -| |-- v1.1.2 #238e8fc -| | |-- v1.0 #8d59205 -|-- v3.1.8 -| |-- v1.3.0 #4db73b3 -| |-- v1.0 -| |-- v3.1 #62f0959 -|-- v1.0 -|-- v2.0 -|-- #bf7ffb2 -|-- #acde3dc -|-- v1.0.0 #a41b206 -Compiling .pioenvs/megaatmega2560/src/dmx.cpp.o -Compiling .pioenvs/megaatmega2560/src/item.cpp.o -Compiling .pioenvs/megaatmega2560/src/lighthub.ino.cpp.o -lighthub/dmx.cpp: In function 'int itemCtrl2(char*, int, int, int, int)': -lighthub/dmx.cpp:91:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/dmx.cpp: In function 'void DMXput()': -lighthub/dmx.cpp:111:5: warning: unused variable 't' [-Wunused-variable] -int t; -^ -lighthub/dmx.cpp: In function 'void onDmxFrame(uint16_t, uint16_t, uint8_t, uint8_t*, IPAddress)': -lighthub/dmx.cpp:186:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -for (int i = 0 ; i < length && i= (IFLASH1_ADDR + IFLASH1_SIZE)) { -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:57:56: error: 'IFLASH1_SIZE' was not declared in this scope -if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) { -^ -In file included from .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:1:0: -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:62:18: note: in expansion of macro 'FLASH_START' -if (((uint32_t)FLASH_START+address & 3) != 0) { -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:68:36: note: in expansion of macro 'FLASH_START' -retCode = flash_unlock((uint32_t)FLASH_START+address, (uint32_t)FLASH_START+address + dataLength - 1, 0, 0); -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:97:35: note: in expansion of macro 'FLASH_START' -retCode = flash_write((uint32_t)FLASH_START+address, &value, byteLength, 1); -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:94:9: warning: unused variable 'data' [-Wunused-variable] -byte *data; -^ -In file included from .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:1:0: -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte*, uint32_t)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:111:17: note: in expansion of macro 'FLASH_START' -if ((uint32_t)FLASH_START+address < IFLASH1_ADDR) { -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:116:17: note: in expansion of macro 'FLASH_START' -if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) { -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:116:56: error: 'IFLASH1_SIZE' was not declared in this scope -if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) { -^ -In file included from .piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:1:0: -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:121:18: note: in expansion of macro 'FLASH_START' -if (((uint32_t)FLASH_START+address & 3) != 0) { -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope -#define FLASH_START ((byte *)IFLASH1_ADDR) -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:127:35: note: in expansion of macro 'FLASH_START' -retCode = flash_write((uint32_t)FLASH_START+address, data, dataLength, 1); -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'byte DueFlashStorage::read(uint32_t)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp: In member function 'byte* DueFlashStorage::readAddress(uint32_t)': -.piolibdeps/DueFlashStorage/src/DueFlashStorage.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: -.piolibdeps/DueFlashStorage/src/efc.h:116:19: error: 'Efc' was not declared in this scope -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:24: error: 'p_efc' was not declared in this scope -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:40: error: expected primary-expression before 'ul_access_mode' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:65: error: expected primary-expression before 'ul_fws' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:71: warning: expression list treated as compound expression in initializer [-fpermissive] -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: variable or field 'efc_enable_frdy_interrupt' declared void -void efc_enable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:117:37: error: 'p_efc' was not declared in this scope -void efc_enable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void -void efc_disable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:118:38: error: 'p_efc' was not declared in this scope -void efc_disable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: variable or field 'efc_set_flash_access_mode' declared void -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); -^ -.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:119:37: error: 'p_efc' was not declared in this scope -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); -^ -.piolibdeps/DueFlashStorage/src/efc.h:119:53: error: expected primary-expression before 'ul_mode' -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); -^ -.piolibdeps/DueFlashStorage/src/efc.h:120:36: error: 'Efc' was not declared in this scope -uint32_t efc_get_flash_access_mode(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:120:41: error: 'p_efc' was not declared in this scope -uint32_t efc_get_flash_access_mode(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: variable or field 'efc_set_wait_state' declared void -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:121:30: error: 'p_efc' was not declared in this scope -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:121:46: error: expected primary-expression before 'ul_fws' -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:122:29: error: 'Efc' was not declared in this scope -uint32_t efc_get_wait_state(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:122:34: error: 'p_efc' was not declared in this scope -uint32_t efc_get_wait_state(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:123:30: error: 'Efc' was not declared in this scope -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.h:123:35: error: 'p_efc' was not declared in this scope -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.h:123:51: error: expected primary-expression before 'ul_command' -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.h:124:12: error: expected primary-expression before 'ul_argument' -uint32_t ul_argument); -^ -.piolibdeps/DueFlashStorage/src/efc.h:124:23: warning: expression list treated as compound expression in initializer [-fpermissive] -uint32_t ul_argument); -^ -.piolibdeps/DueFlashStorage/src/efc.h:125:25: error: 'Efc' was not declared in this scope -uint32_t efc_get_status(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:125:30: error: 'p_efc' was not declared in this scope -uint32_t efc_get_status(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:126:25: error: 'Efc' was not declared in this scope -uint32_t efc_get_result(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:126:30: error: 'p_efc' was not declared in this scope -uint32_t efc_get_result(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:127:36: error: 'Efc' was not declared in this scope -uint32_t efc_perform_read_sequence(Efc *p_efc, -^ -.piolibdeps/DueFlashStorage/src/efc.h:127:41: error: 'p_efc' was not declared in this scope -uint32_t efc_perform_read_sequence(Efc *p_efc, -^ -.piolibdeps/DueFlashStorage/src/efc.h:128:12: error: expected primary-expression before 'ul_cmd_st' -uint32_t ul_cmd_st, uint32_t ul_cmd_sp, -^ -.piolibdeps/DueFlashStorage/src/efc.h:128:32: error: expected primary-expression before 'ul_cmd_sp' -uint32_t ul_cmd_st, uint32_t ul_cmd_sp, -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:12: error: expected primary-expression before '*' token -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:13: error: 'p_ul_buf' was not declared in this scope -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:32: error: expected primary-expression before 'ul_size' -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:39: warning: expression list treated as compound expression in initializer [-fpermissive] -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:84:27: error: variable or field 'efc_write_fmr' declared void -extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:84:27: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.cpp:84:32: error: 'p_efc' was not declared in this scope -extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:84:48: error: expected primary-expression before 'ul_fmr' -extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:85:33: warning: 'efc_perform_fcr' initialized and declared 'extern' -extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:85:33: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.cpp:85:38: error: 'p_efc' was not declared in this scope -extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:85:54: error: expected primary-expression before 'ul_fcr' -extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:85:60: warning: expression list treated as compound expression in initializer [-fpermissive] -extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:95:19: error: redefinition of 'uint32_t efc_init' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) -^ -In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: -.piolibdeps/DueFlashStorage/src/efc.h:116:10: note: 'uint32_t efc_init' previously defined here -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:95:19: error: 'Efc' was not declared in this scope -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:95:24: error: 'p_efc' was not declared in this scope -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:95:40: error: expected primary-expression before 'ul_access_mode' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:95:65: error: expected primary-expression before 'ul_fws' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:106:32: error: variable or field 'efc_enable_frdy_interrupt' declared void -void efc_enable_frdy_interrupt(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:106:32: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.cpp:106:37: error: 'p_efc' was not declared in this scope -void efc_enable_frdy_interrupt(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void -void efc_disable_frdy_interrupt(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:118:33: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.cpp:118:38: error: 'p_efc' was not declared in this scope -void efc_disable_frdy_interrupt(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:131:32: error: variable or field 'efc_set_flash_access_mode' declared void -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:131:32: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.cpp:131:37: error: 'p_efc' was not declared in this scope -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:131:53: error: expected primary-expression before 'ul_mode' -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:145:36: error: redefinition of 'uint32_t efc_get_flash_access_mode' -uint32_t efc_get_flash_access_mode(Efc *p_efc) -^ -In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: -.piolibdeps/DueFlashStorage/src/efc.h:120:10: note: 'uint32_t efc_get_flash_access_mode' previously defined here -uint32_t efc_get_flash_access_mode(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:145:36: error: 'Efc' was not declared in this scope -uint32_t efc_get_flash_access_mode(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:145:41: error: 'p_efc' was not declared in this scope -uint32_t efc_get_flash_access_mode(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:156:25: error: variable or field 'efc_set_wait_state' declared void -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:156:25: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.cpp:156:30: error: 'p_efc' was not declared in this scope -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:156:46: error: expected primary-expression before 'ul_fws' -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:170:29: error: redefinition of 'uint32_t efc_get_wait_state' -uint32_t efc_get_wait_state(Efc *p_efc) -^ -In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: -.piolibdeps/DueFlashStorage/src/efc.h:122:10: note: 'uint32_t efc_get_wait_state' previously defined here -uint32_t efc_get_wait_state(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:170:29: error: 'Efc' was not declared in this scope -uint32_t efc_get_wait_state(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:170:34: error: 'p_efc' was not declared in this scope -uint32_t efc_get_wait_state(Efc *p_efc) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:188:30: error: redefinition of 'uint32_t efc_perform_command' -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -In file included from .piolibdeps/DueFlashStorage/src/efc.cpp:44:0: -.piolibdeps/DueFlashStorage/src/efc.h:123:10: note: 'uint32_t efc_perform_command' previously defined here -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:188:30: error: 'Efc' was not declared in this scope -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:188:35: error: 'p_efc' was not declared in this scope -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:188:51: error: expected primary-expression before 'ul_command' -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:189:12: error: expected primary-expression before 'ul_argument' -uint32_t ul_argument) -^ -.piolibdeps/DueFlashStorage/src/efc.cpp:337:1: error: expected '}' at end of input -} -^ -*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/DueFlashStorage.cpp.o] Error 1 -*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/efc.cpp.o] Error 1 -In file included from .piolibdeps/DueFlashStorage/src/flash_efc.h:48:0, -from .piolibdeps/DueFlashStorage/src/flash_efc.cpp:46: -.piolibdeps/DueFlashStorage/src/efc.h:116:19: error: 'Efc' was not declared in this scope -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:24: error: 'p_efc' was not declared in this scope -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:40: error: expected primary-expression before 'ul_access_mode' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:65: error: expected primary-expression before 'ul_fws' -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:116:71: warning: expression list treated as compound expression in initializer [-fpermissive] -uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: variable or field 'efc_enable_frdy_interrupt' declared void -void efc_enable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:117:32: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:117:37: error: 'p_efc' was not declared in this scope -void efc_enable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void -void efc_disable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:118:33: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:118:38: error: 'p_efc' was not declared in this scope -void efc_disable_frdy_interrupt(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: variable or field 'efc_set_flash_access_mode' declared void -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); -^ -.piolibdeps/DueFlashStorage/src/efc.h:119:32: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:119:37: error: 'p_efc' was not declared in this scope -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); -^ -.piolibdeps/DueFlashStorage/src/efc.h:119:53: error: expected primary-expression before 'ul_mode' -void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode); -^ -.piolibdeps/DueFlashStorage/src/efc.h:120:36: error: 'Efc' was not declared in this scope -uint32_t efc_get_flash_access_mode(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:120:41: error: 'p_efc' was not declared in this scope -uint32_t efc_get_flash_access_mode(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: variable or field 'efc_set_wait_state' declared void -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:121:25: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/efc.h:121:30: error: 'p_efc' was not declared in this scope -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:121:46: error: expected primary-expression before 'ul_fws' -void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws); -^ -.piolibdeps/DueFlashStorage/src/efc.h:122:29: error: 'Efc' was not declared in this scope -uint32_t efc_get_wait_state(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:122:34: error: 'p_efc' was not declared in this scope -uint32_t efc_get_wait_state(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:123:30: error: 'Efc' was not declared in this scope -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.h:123:35: error: 'p_efc' was not declared in this scope -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.h:123:51: error: expected primary-expression before 'ul_command' -uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, -^ -.piolibdeps/DueFlashStorage/src/efc.h:124:12: error: expected primary-expression before 'ul_argument' -uint32_t ul_argument); -^ -.piolibdeps/DueFlashStorage/src/efc.h:124:23: warning: expression list treated as compound expression in initializer [-fpermissive] -uint32_t ul_argument); -^ -.piolibdeps/DueFlashStorage/src/efc.h:125:25: error: 'Efc' was not declared in this scope -uint32_t efc_get_status(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:125:30: error: 'p_efc' was not declared in this scope -uint32_t efc_get_status(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:126:25: error: 'Efc' was not declared in this scope -uint32_t efc_get_result(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:126:30: error: 'p_efc' was not declared in this scope -uint32_t efc_get_result(Efc *p_efc); -^ -.piolibdeps/DueFlashStorage/src/efc.h:127:36: error: 'Efc' was not declared in this scope -uint32_t efc_perform_read_sequence(Efc *p_efc, -^ -.piolibdeps/DueFlashStorage/src/efc.h:127:41: error: 'p_efc' was not declared in this scope -uint32_t efc_perform_read_sequence(Efc *p_efc, -^ -.piolibdeps/DueFlashStorage/src/efc.h:128:12: error: expected primary-expression before 'ul_cmd_st' -uint32_t ul_cmd_st, uint32_t ul_cmd_sp, -^ -.piolibdeps/DueFlashStorage/src/efc.h:128:32: error: expected primary-expression before 'ul_cmd_sp' -uint32_t ul_cmd_st, uint32_t ul_cmd_sp, -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:12: error: expected primary-expression before '*' token -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:13: error: 'p_ul_buf' was not declared in this scope -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:32: error: expected primary-expression before 'ul_size' -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/efc.h:129:39: warning: expression list treated as compound expression in initializer [-fpermissive] -uint32_t *p_ul_buf, uint32_t ul_size); -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope -# define IFLASH_PAGE_SIZE IFLASH0_PAGE_SIZE -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:94:35: note: in expansion of macro 'IFLASH_PAGE_SIZE' -static uint32_t gs_ul_page_buffer[IFLASH_PAGE_SIZE / sizeof(uint32_t)]; -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:31: error: variable or field 'translate_address' declared void -static void translate_address(Efc **pp_efc, uint32_t ul_addr, -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:31: error: 'Efc' was not declared in this scope -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:37: error: 'pp_efc' was not declared in this scope -static void translate_address(Efc **pp_efc, uint32_t ul_addr, -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:106:54: error: expected primary-expression before 'ul_addr' -static void translate_address(Efc **pp_efc, uint32_t ul_addr, -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:12: error: expected primary-expression before '*' token -uint16_t *pus_page, uint16_t *pus_offset) -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:13: error: 'pus_page' was not declared in this scope -uint16_t *pus_page, uint16_t *pus_offset) -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:32: error: expected primary-expression before '*' token -uint16_t *pus_page, uint16_t *pus_offset) -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:107:33: error: 'pus_offset' was not declared in this scope -uint16_t *pus_page, uint16_t *pus_offset) -^ -.piolibdeps/DueFlashStorage/src/flash_efc.cpp:913:1: error: expected '}' at end of input -} -^ -*** [.pioenvs/megaatmega2560/libe82/DueFlashStorage/flash_efc.cpp.o] Error 1 -lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': -lighthub/item.cpp:668:11: warning: unused variable 'j' [-Wunused-variable] -uint8_t j, result; -^ -lighthub/item.cpp:668:14: warning: unused variable 'result' [-Wunused-variable] -uint8_t j, result; -^ -lighthub/item.cpp:669:12: warning: unused variable 'data' [-Wunused-variable] -uint16_t data[1]; -^ -lighthub/item.cpp: In member function 'int Item::checkModbus()': -lighthub/item.cpp:914:93: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) -^ -lighthub/item.cpp:914:121: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (modbusitem && nextItem.isValid() && nextItem.itemType==CH_MODBUS && nextItem.getArg(0)==addr && nextItem.getArg(1)==reg) -^ -lighthub/item.cpp:890:13: warning: unused variable 'mask' [-Wunused-variable] -short mask = getArg(2); -^ -lighthub/item.cpp: In member function 'int Item::checkModbus(int)': -lighthub/item.cpp:932:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses] -if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy -^ -lighthub/item.cpp:932:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses] -if (getVal()!=d || d && cmd==CMD_OFF || d && cmd==CMD_HALT) //volume changed or turned on manualy -^ -lighthub/item.cpp:950:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::Pool()': -lighthub/item.cpp:962:3: warning: no return statement in function returning non-void [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'virtual int Item::Ctrl(short int, short int, int*, boolean)': -lighthub/item.cpp:517:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::VacomSetFan(int8_t, int8_t)': -lighthub/item.cpp:684:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::VacomSetHeat(int, int8_t, int8_t)': -lighthub/item.cpp:715:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In function 'int modbusSet(int, uint16_t, int, uint16_t)': -lighthub/item.cpp:787:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::checkFM()': -lighthub/item.cpp:878:3: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -lighthub/item.cpp: In member function 'int Item::checkModbus()': -lighthub/item.cpp:921:1: warning: control reaches end of non-void function [-Wreturn-type] -} -^ -.piolibdeps/aJson/aJSON.cpp: In member function 'virtual bool aJsonEEPROMStream::available()': -.piolibdeps/aJson/aJSON.cpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -while (addr+offsetprint('[') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:862:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(',') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:868:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(']') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp: In member function 'int aJsonStream::printObject(aJsonObject*)': -.piolibdeps/aJson/aJSON.cpp:960:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print('{') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:970:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(':') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:981:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print(',') == EOF) -^ -.piolibdeps/aJson/aJSON.cpp:987:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -if (this->print('}') == EOF) -^ -In file included from .piolibdeps/ModbusMaster/src/ModbusMaster.h:58:0, -from lighthub/item.cpp:29: -lighthub/item.cpp: At top level: -.piolibdeps/ModbusMaster/src/util/crc16.h:71:17: warning: 'crc16_update' defined but not used [-Wunused-function] -static uint16_t crc16_update(uint16_t crc, uint8_t a) -^ -========================================================================================= [ERROR] Took 1.45 seconds ========================================================================================= - -================================================================================================= [SUMMARY] ================================================================================================= -Environment due [SKIP] -Environment megaatmega2560 [ERROR] -========================================================================================= [ERROR] Took 1.45 seconds ========================================================================================= -livello@lserver ~/PROG/lighthub $ diff --git a/platformio.ini b/platformio.ini index b610c19..14635e5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ [platformio] src_dir = lighthub env_default = - megaatmega2560 +; megaatmega2560 due [env:due] @@ -18,6 +18,8 @@ platform = atmelsam framework = arduino board = due lib_ldf_mode = chain+ +build_flags = !echo -n "-DPIO_SRC_REV="$(git branch) +;echo "-DPIO_SRC_REV_COMMIT="$( git rev-parse --short HEAD) lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 @@ -28,7 +30,8 @@ lib_deps = https://github.com/anklimov/aJson https://github.com/anklimov/CmdArduino https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet +; https://github.com/anklimov/Ethernet + 872 ; https://github.com/PaulStoffregen/SPI.git https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git From c09eb4d870c37643ca6c99ceaea940a818578a0e Mon Sep 17 00:00:00 2001 From: livello Date: Thu, 15 Mar 2018 04:31:30 +0300 Subject: [PATCH 15/21] commit and branch into version number --- .gitignore | 1 + lighthub/main.cpp | 2 +- platformio.ini | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5dac9f5..2764386 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .piolibdeps .clang_complete .gcc-flags.json +CMakeListsPrivate.txt diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 3c0410c..b53987d 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -133,7 +133,7 @@ EthernetClient ethClient; #define QUOTE(x) Q(x) #ifndef PIO_SRC_REV -#define PIO_SRC_REV_BRANCH v0.97 +#define PIO_SRC_REV v0.97 #endif diff --git a/platformio.ini b/platformio.ini index 14635e5..cf83094 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,8 +18,7 @@ platform = atmelsam framework = arduino board = due lib_ldf_mode = chain+ -build_flags = !echo -n "-DPIO_SRC_REV="$(git branch) -;echo "-DPIO_SRC_REV_COMMIT="$( git rev-parse --short HEAD) +build_flags = !echo -n "-DPIO_SRC_REV="$(git log --oneline -1) lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 From 59102a323d3b689f7207fbedae952359b00fc922 Mon Sep 17 00:00:00 2001 From: livello Date: Thu, 15 Mar 2018 06:28:59 +0300 Subject: [PATCH 16/21] sd_card support, fixed ethernet-shield working with inserted microsd-card . --- lighthub/main.cpp | 4 +- lighthub/sd_card_w5100.cpp | 213 +++++++++++++++++++++++++++++++++++++ lighthub/sd_card_w5100.h | 15 +++ platformio.ini | 4 +- 4 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 lighthub/sd_card_w5100.cpp create mode 100644 lighthub/sd_card_w5100.h diff --git a/lighthub/main.cpp b/lighthub/main.cpp index b53987d..ee8d043 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -145,6 +145,8 @@ EthernetClient ethClient; extern Artnet *artnet; #endif +#include "sd_card_w5100.h" + // Hardcoded definitions //Thermostate histeresys #define GIST 2 @@ -896,7 +898,7 @@ void setup_main() { Serial.print(F("\nLazyhome.ru LightHub controller ")); Serial.println(F(QUOTE(PIO_SRC_REV))); - + sd_card_w5100_setup(); cmdAdd("help", _handleHelp); cmdAdd("save", _saveConfig); diff --git a/lighthub/sd_card_w5100.cpp b/lighthub/sd_card_w5100.cpp new file mode 100644 index 0000000..f75b0be --- /dev/null +++ b/lighthub/sd_card_w5100.cpp @@ -0,0 +1,213 @@ +// +// Created by livello on 14.10.17. +// + +/* + SD card test + +This example shows how use the utility libraries on which the' +SD library is based in order to get info about your SD card. +Very useful for testing a card when you're not sure whether its working or not. + +The circuit: + * SD card attached to SPI bus as follows: +** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila +** MISO - pin 12 on Arduino Uno/Duemilanove/Diecimila +** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila +** CS - depends on your SD card shield or module. + Pin 4 used here for consistency with other Arduino examples + + +created 28 Mar 2011 +by Limor Fried +modified 9 Apr 2012 +by Tom Igoe +*/ + +//template inline Print &operator <<(Print &obj, T arg) { obj.print(arg); return obj; } + + +#include "sd_card_w5100.h" +#include +#include +//#include + +// set up variables using the SD utility library functions: +Sd2Card card; +SdVolume volume; +SdFile sdFile; +File myFile; + + +char *entireFileContents; + +// Arduino Ethernet shield: pin 4 +const int chipSelect = 4; + +void bench() { +/* uint8_t buf[BUF_SIZE]; + long maxLatency,minLatency,totalLatency,temp_DHT22; + + + myFile = SD.open("test.txt", FILE_WRITE); + + // if the file opened okay, write to it: + if (myFile) { + Serial.print("Writing to test.txt..."); + myFile.println("testing 1, 2, 3."); + // close the file: + + } else { + // if the file didn'temp_DHT22 open, print an error: + Serial.println("error opening test.txt"); + } + + + for (uint16_t i = 0; i < (BUF_SIZE - 2); i++) { + buf[i] = 'A' + (i % 26); + } + buf[BUF_SIZE - 2] = '\r'; + buf[BUF_SIZE - 1] = '\n'; + + Serial.println("File size MB: "); + Serial.print(FILE_SIZE_MB); + Serial.println("Buffer size "); + Serial.print(BUF_SIZE); + Serial.println("Starting write test, please wait."); + +// do write test + uint32_t n = FILE_SIZE / sizeof(buf); + Serial.println("write speed and latency"); + Serial.print(" speed,max,min,avg"); + Serial.print(" KB/Sec,usec,usec,usec"); + for (uint8_t nTest = 0; nTest < WRITE_PASS_COUNT; nTest++) { +// myFile.truncate(0); + maxLatency = 0; + minLatency = 9999999; + totalLatency = 0; + temp_DHT22 = millis(); + for (uint32_t i = 0; i < n; i++) { + uint32_t m = micros(); + if (myFile.write(buf, sizeof(buf)) != sizeof(buf)) { + Serial.println("write failed"); + } + m = micros() - m; + if (maxLatency < m) { + maxLatency = m; + } + if (minLatency > m) { + minLatency = m; + } + totalLatency += m; + } + myFile.flush(); + temp_DHT22 = millis() - temp_DHT22; + int s = myFile.size(); + Serial.println(s / temp_DHT22); + Serial.print(','); + Serial.print(maxLatency); + Serial.print(','); + Serial.print(minLatency); + Serial.print(','); + Serial.print(totalLatency / n); + }*/ + myFile.close(); + Serial.println("done."); +} + +char* sdW5100_readEntireFile(const char *filename) { + SdFile requestedFile; + if(requestedFile.open(sdFile,filename)) { + Serial.println("Success open INDEX.HTM:"); + long time_started = millis(); + entireFileContents = new char[requestedFile.fileSize()]; + requestedFile.read(entireFileContents,requestedFile.fileSize()); + Serial.print(millis()-time_started); + Serial.println(" milliseconds takes to read."); + return entireFileContents; + } + else { + Serial.print("Failed sdFile.open "); + Serial.println(filename); + + } + return NULL; + +} +uint32_t sdW5100_getFileSize(const char *filename){ + SdFile requestedFile; + if(requestedFile.open(sdFile,filename)) + return requestedFile.fileSize(); + else + return 0; +} + +void sd_card_w5100_setup() { + Serial.print("\nInitializing SD card..."); + // On the Ethernet Shield, CS is pin 4. It's set as an output by default. + // Note that even if it's not used as the CS pin, the hardware SS pin + // (10 on most Arduino boards, 53 on the Mega) must be left as an output + // or the SD library functions will not work. + pinMode(chipSelect, OUTPUT); // change this to 53 on a mega + SPI.begin(chipSelect); //but it didn'temp_DHT22 workt wiht it and whitout it [/b] // change this to 53 on a mega + + if (!card.init(SPI_FULL_SPEED, chipSelect)) { + Serial.println("initialization failed. Things to check:"); + Serial.println("* is a card is inserted?"); + Serial.println("* Is your wiring correct?"); + Serial.println("* did you change the chipSelect pin to match your shield or module?"); + return; + } else { + Serial.println("Wiring is correct and a card is present."); + } + + // print the type of card + Serial.print("\nCard type: "); + switch (card.type()) { + case SD_CARD_TYPE_SD1: + Serial.println("SD1"); + break; + case SD_CARD_TYPE_SD2: + Serial.println("SD2"); + break; + case SD_CARD_TYPE_SDHC: + Serial.println("SDHC"); + break; + default: + Serial.println("Unknown"); + } + + // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32 + if (!volume.init(card)) { + Serial.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card"); + return; + } + + + // print the type and size of the first FAT-type volume + uint32_t volumesize; + Serial.print("\nVolume type is FAT"); + Serial.println(volume.fatType(), DEC); + Serial.println(); + + volumesize = volume.blocksPerCluster(); // clusters are collections of blocks + volumesize *= volume.clusterCount(); // we'll have a lot of clusters + volumesize *= 512; // SD card blocks are always 512 bytes + Serial.print("Volume size (bytes): "); + Serial.println(volumesize); + Serial.print("Volume size (Kbytes): "); + volumesize /= 1024; + Serial.println(volumesize); + Serial.print("Volume size (Mbytes): "); + volumesize /= 1024; + Serial.println(volumesize); + + + Serial.println("\nFiles found on the card (name, date and size in bytes): "); + sdFile.openRoot(volume); + // list all files in the card with date and size + sdFile.ls(LS_R | LS_DATE | LS_SIZE); + Serial.println(sdW5100_readEntireFile("INDEX.HTM")); +} + + diff --git a/lighthub/sd_card_w5100.h b/lighthub/sd_card_w5100.h new file mode 100644 index 0000000..5263419 --- /dev/null +++ b/lighthub/sd_card_w5100.h @@ -0,0 +1,15 @@ +// +// Created by livello on 14.10.17. +// + +#include + +#ifndef NODEMCU_STOPWATCH_SD_CARD_W5100_H +#define NODEMCU_STOPWATCH_SD_CARD_W5100_H + +#endif //NODEMCU_STOPWATCH_SD_CARD_W5100_H +void sd_card_w5100_setup(); +void cidDmp(); +void bench(); +char* sdW5100_readEntireFile(const char *filename); +uint32_t sdW5100_getFileSize(const char *filename); \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index cf83094..beb3fc8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,7 +18,7 @@ platform = atmelsam framework = arduino board = due lib_ldf_mode = chain+ -build_flags = !echo -n "-DPIO_SRC_REV="$(git log --oneline -1) +build_flags = !echo -n "-DPIO_SRC_REV="$(git rev-parse --short HEAD) lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 @@ -35,6 +35,8 @@ lib_deps = https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git FastLED + 161 + 322 [env:megaatmega2560] From 46ea58a45770ee7945bbf22800e443a05ef0d41f Mon Sep 17 00:00:00 2001 From: livello Date: Thu, 15 Mar 2018 07:03:44 +0300 Subject: [PATCH 17/21] remove spi.begin --- lighthub/sd_card_w5100.cpp | 3 +-- platformio.ini | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lighthub/sd_card_w5100.cpp b/lighthub/sd_card_w5100.cpp index f75b0be..714d1bb 100644 --- a/lighthub/sd_card_w5100.cpp +++ b/lighthub/sd_card_w5100.cpp @@ -148,8 +148,7 @@ void sd_card_w5100_setup() { // Note that even if it's not used as the CS pin, the hardware SS pin // (10 on most Arduino boards, 53 on the Mega) must be left as an output // or the SD library functions will not work. - pinMode(chipSelect, OUTPUT); // change this to 53 on a mega - SPI.begin(chipSelect); //but it didn'temp_DHT22 workt wiht it and whitout it [/b] // change this to 53 on a mega + pinMode(chipSelect, OUTPUT); if (!card.init(SPI_FULL_SPEED, chipSelect)) { Serial.println("initialization failed. Things to check:"); diff --git a/platformio.ini b/platformio.ini index beb3fc8..9e74558 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,8 +10,8 @@ [platformio] src_dir = lighthub env_default = -; megaatmega2560 - due + megaatmega2560 +; due [env:due] platform = atmelsam @@ -59,6 +59,8 @@ lib_deps = https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git FastLED + 161 + 322 [env:due-5500] platform = atmelsam From 4c68bdc595944b62f0601fcb3852a4b217db0d32 Mon Sep 17 00:00:00 2001 From: livello Date: Thu, 15 Mar 2018 07:46:39 +0300 Subject: [PATCH 18/21] DmxDue fix USART0_Handler redefinition --- platformio.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 9e74558..52f00ee 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,7 +24,8 @@ lib_deps = https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 ; https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue +; https://github.com/anklimov/DmxDue + https://github.com/livello/DmxDue#25ee59d https://github.com/arduino-libraries/ArduinoHttpClient https://github.com/anklimov/aJson https://github.com/anklimov/CmdArduino @@ -43,7 +44,7 @@ lib_deps = platform = atmelavr board = megaatmega2560 framework = arduino -lib_ldf_mode = chain+ +;lib_ldf_mode = chain+ lib_deps = https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 ; https://github.com/anklimov/Arduino-Temperature-Control-Library.git From eae88305ea6f97ed635802042be3ca5507a7361b Mon Sep 17 00:00:00 2001 From: livello Date: Fri, 16 Mar 2018 00:40:13 +0300 Subject: [PATCH 19/21] USART0_Handler redefiniton workaround, DMXDue revert to original lib WDT enabled by default --- README.md | 3 +++ lighthub/main.cpp | 13 ++++++++----- platformio.ini | 12 ++++-------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 27ec0aa..761f902 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,6 @@ Need to use compiler directive -D Wiz5500 and https://github.com/anklimov/Ethern First attempt to use platformio toolchain for compiling (work not completed yet) +#Due compilation issue "USART0_Handler redefinition" +Please, open /variants/arduino_due_x/variant.cpp file, then edit USART0_Handler method definition like this +void USART0_Handler(void) __attribute__((weak)); \ No newline at end of file diff --git a/lighthub/main.cpp b/lighthub/main.cpp index ee8d043..993bacb 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -81,14 +81,17 @@ Config webserver #include "HTTPClient.h" #include #include -//#define wdt_en() wdt_enable(WDTO_8S) -//#define wdt_dis() wdt_disable() -//#define wdt_res() wdt_reset() +#define wdt_en() wdt_enable(WDTO_8S) +#define wdt_dis() wdt_disable() +#define wdt_res() wdt_reset() +#else +#include +#endif + +#ifdef WATCH_DOG_TICKER_DISABLE #define wdt_en() wdt_disable() #define wdt_dis() wdt_disable() #define wdt_res() wdt_disable() -#else -#include #endif #if defined(__SAM3X8E__) diff --git a/platformio.ini b/platformio.ini index 52f00ee..6a330ef 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,17 +21,14 @@ lib_ldf_mode = chain+ build_flags = !echo -n "-DPIO_SRC_REV="$(git rev-parse --short HEAD) lib_deps = https://github.com/sebnil/DueFlashStorage - https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 -; https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire -; https://github.com/anklimov/DmxDue - https://github.com/livello/DmxDue#25ee59d + https://github.com/anklimov/DmxDue https://github.com/arduino-libraries/ArduinoHttpClient https://github.com/anklimov/aJson https://github.com/anklimov/CmdArduino https://github.com/anklimov/ModbusMaster -; https://github.com/anklimov/Ethernet - 872 + https://github.com/anklimov/Ethernet ; https://github.com/PaulStoffregen/SPI.git https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git @@ -46,8 +43,7 @@ board = megaatmega2560 framework = arduino ;lib_ldf_mode = chain+ lib_deps = - https://github.com/livello/Arduino-Temperature-Control-Library.git#1306c49 -; https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DmxSimple https://github.com/anklimov/httpClient From f2e8c00483d74f2c4c30d5e1c8ebf6044351f9c5 Mon Sep 17 00:00:00 2001 From: livello Date: Fri, 16 Mar 2018 00:43:13 +0300 Subject: [PATCH 20/21] Readme.md format --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 761f902..716cd62 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ For patched libraries, appropriate GitHub repo URL provided: Portation from AVR Mega 2560 to SAM3X8E (Arduino DUE) done since v 0.96 -#Platforms specific details: +# Platforms specific details: AVR version is basic and have all functions *DMX-out is software (DMXSimple) on pin3 @@ -74,6 +74,6 @@ Need to use compiler directive -D Wiz5500 and https://github.com/anklimov/Ethern First attempt to use platformio toolchain for compiling (work not completed yet) -#Due compilation issue "USART0_Handler redefinition" +# Due compilation issue "USART0_Handler redefinition" Please, open /variants/arduino_due_x/variant.cpp file, then edit USART0_Handler method definition like this void USART0_Handler(void) __attribute__((weak)); \ No newline at end of file From f068255ea6eb0c814bff4f3db39cf5e45e776d9e Mon Sep 17 00:00:00 2001 From: livello Date: Fri, 16 Mar 2018 00:44:35 +0300 Subject: [PATCH 21/21] Readme.md format --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 716cd62..332c980 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,5 @@ First attempt to use platformio toolchain for compiling (work not completed yet) # Due compilation issue "USART0_Handler redefinition" Please, open /variants/arduino_due_x/variant.cpp file, then edit USART0_Handler method definition like this + void USART0_Handler(void) __attribute__((weak)); \ No newline at end of file