Fix compilation errors and project dependencies for Arduino Mega

This commit is contained in:
Mykhailo Khulap
2018-10-17 12:13:07 +03:00
parent d89dfd2364
commit 766cd060b8
3 changed files with 237 additions and 235 deletions

View File

@@ -20,6 +20,7 @@ e-mail anklimov@gmail.com
#include "inputs.h" #include "inputs.h"
#include "item.h" #include "item.h"
#include "utils.h"
#include <PubSubClient.h> #include <PubSubClient.h>
#ifndef DHT_DISABLE #ifndef DHT_DISABLE

View File

@@ -477,8 +477,8 @@ void onInitialStateInitLAN() {
#if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1) #if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
#ifdef W5500_CS_PIN #ifdef W5500_CS_PIN
Ethernet.w5500_cspin = W5500_CS_PIN; Ethernet.w5500_cspin = W5500_CS_PIN;
debugSerial<<F("Use W5500 pin: ")); debugSerial<<"Use W5500 pin: ";
debugSerial<<Ethernet.w5500_cspin); debugSerial<<(Ethernet.w5500_cspin);
#endif #endif
IPAddress ip, dns, gw, mask; IPAddress ip, dns, gw, mask;
int res = 1; int res = 1;
@@ -553,8 +553,8 @@ void softRebootFunc(){
void resetHard() { void resetHard() {
#ifdef RESET_PIN #ifdef RESET_PIN
debugSerial<<F("Reset Arduino with digital pin ")); debugSerial<<"Reset Arduino with digital pin ";
debugSerial<<QUOTE(RESET_PIN)); debugSerial<<QUOTE(RESET_PIN);
delay(500); delay(500);
pinMode(RESET_PIN, OUTPUT); pinMode(RESET_PIN, OUTPUT);
digitalWrite(RESET_PIN,LOW); digitalWrite(RESET_PIN,LOW);
@@ -1182,7 +1182,7 @@ void printFirmwareVersionAndBuildOptions() {
#endif #endif
#ifdef RESET_PIN #ifdef RESET_PIN
debugSerial<<F("\n(+)HARDRESET on pin=")<<F(QUOTE(RESET_PIN); debugSerial<<"\n(+)HARDRESET on pin="<<QUOTE(RESET_PIN);
#else #else
debugSerial<<F("\n(-)HARDRESET, using soft"); debugSerial<<F("\n(-)HARDRESET, using soft");
#endif #endif

View File

@@ -1,230 +1,231 @@
; PlatformIO Project Configuration File (for copy and paste) ; PlatformIO Project Configuration File (for copy and paste)
; ;
; Build options: build flags, source filter ; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags ; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages ; Library options: dependencies, extra library storages
; Advanced options: extra scripting ; Advanced options: extra scripting
; ;
; Please visit documentation for the other options and examples ; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html ; http://docs.platformio.org/page/projectconf.html
[platformio] [platformio]
src_dir = lighthub src_dir = lighthub
env_default = env_default =
; megaatmega2560 megaatmega2560
megaatmega2560-net ; megaatmega2560-net
; due ; due
; esp8266 ; esp8266
; esp32 ; esp32
; megaatmega2560-5500 ; megaatmega2560-5500
; due-5500 ; due-5500
; controllino ; controllino
; stm32 ; stm32
;build_dir = !sh pioenvs.sh ${platformio.env_default} ;build_dir = !sh pioenvs.sh ${platformio.env_default}
;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default} ;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default}
[env:esp32] [env:esp32]
platform = espressif32 platform = espressif32
framework = arduino framework = arduino
board = pico32 board = pico32
lib_ldf_mode = chain+ lib_ldf_mode = chain+
build_flags = !sh build_flags_esp32.sh build_flags = !sh build_flags_esp32.sh
lib_deps = lib_deps =
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/DS2482_OneWire
ESP8266HTTPClient ESP8266HTTPClient
Ethernet3 Ethernet3
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git https://github.com/anklimov/Artnet.git
FastLED FastLED
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library for ESPx DHT sensor library for ESPx
DHT sensor library DHT sensor library
Streaming Streaming
https://github.com/Chris--A/PrintEx.git https://github.com/Chris--A/PrintEx.git
[env:stm32] [env:stm32]
platform = ststm32 platform = ststm32
framework = arduino framework = arduino
board = nucleo_f103rb board = nucleo_f103rb
upload_protocol = stlink upload_protocol = stlink
debug_tool = stlink debug_tool = stlink
extra_scripts = pre:!pre_stm32.sh extra_scripts = pre:!pre_stm32.sh
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
build_flags = !sh build_flags_stm32.sh build_flags = !sh build_flags_stm32.sh
lib_deps = lib_deps =
DallasTemperature DallasTemperature
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino https://github.com/anklimov/CmdArduino
ArduinoHttpClient ArduinoHttpClient
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/ModbusMaster
; https://github.com/Serasidis/Ethernet_STM.git ; https://github.com/Serasidis/Ethernet_STM.git
; https://github.com/livello/Ethernet_STM.git ; https://github.com/livello/Ethernet_STM.git
https://github.com/knolleary/pubsubclient.git https://github.com/knolleary/pubsubclient.git
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library DHT sensor library
; https://github.com/anklimov/DMXSerial ; https://github.com/anklimov/DMXSerial
; Syslog ; Syslog
; https://github.com/No3x/Syslog.git ; https://github.com/No3x/Syslog.git
https://github.com/arcao/Syslog.git https://github.com/arcao/Syslog.git
; UIPEthernet ; UIPEthernet
[env:due] [env:due]
platform = atmelsam platform = atmelsam
framework = arduino framework = arduino
board = due board = due
lib_ldf_mode = chain+ lib_ldf_mode = chain+
build_flags = !sh build_flags_due.sh build_flags = !sh build_flags_due.sh
lib_deps = lib_deps =
https://github.com/sebnil/DueFlashStorage https://github.com/sebnil/DueFlashStorage
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/DS2482_OneWire
https://github.com/anklimov/DmxDue https://github.com/anklimov/DmxDue
https://github.com/anklimov/ArduinoHttpClient https://github.com/anklimov/ArduinoHttpClient
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet https://github.com/anklimov/Ethernet
https://github.com/knolleary/pubsubclient.git https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git https://github.com/anklimov/Artnet.git
FastLED FastLED
SD SD
SdFat SdFat
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library DHT sensor library
https://github.com/arcao/Syslog.git https://github.com/arcao/Syslog.git
[env:megaatmega2560] [env:megaatmega2560]
platform = atmelavr platform = atmelavr
board = megaatmega2560 board = megaatmega2560
;upload_port = net:192.168.88.31:23 ;upload_port = net:192.168.88.31:23
framework = arduino framework = arduino
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
build_flags = !sh build_flags_mega2560.sh build_flags = !sh build_flags_mega2560.sh
lib_deps = lib_deps =
https://github.com/anklimov/DmxSimple https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet https://github.com/anklimov/Ethernet2
https://github.com/PaulStoffregen/SPI.git https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git https://github.com/anklimov/Artnet.git
FastLED FastLED
EEPROM EEPROM
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library DHT sensor library
https://github.com/arcao/Syslog.git https://github.com/arcao/Syslog.git
Streaming Streaming
https://github.com/Chris--A/PrintEx.git
[env:esp8266]
platform = espressif8266 [env:esp8266]
framework = arduino platform = espressif8266
board = nodemcuv2 framework = arduino
lib_ldf_mode = chain+ board = nodemcuv2
build_flags = !sh build_flags_esp8266.sh lib_ldf_mode = chain+
lib_deps = build_flags = !sh build_flags_esp8266.sh
https://github.com/anklimov/Arduino-Temperature-Control-Library.git lib_deps =
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/ESP-Dmx https://github.com/anklimov/DS2482_OneWire
ESP8266HTTPClient https://github.com/anklimov/ESP-Dmx
https://github.com/anklimov/aJson ESP8266HTTPClient
https://github.com/anklimov/CmdArduino https://github.com/anklimov/aJson
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/CmdArduino
https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Artnet.git https://github.com/knolleary/pubsubclient.git
FastLED https://github.com/anklimov/Artnet.git
Adafruit Unified Sensor FastLED
DHT sensor library for ESPx Adafruit Unified Sensor
DHT sensor library DHT sensor library for ESPx
WifiManager DHT sensor library
https://github.com/arcao/Syslog.git WifiManager
https://github.com/livello/PrintEx.git#is-select-redecl https://github.com/arcao/Syslog.git
Streaming https://github.com/livello/PrintEx.git#is-select-redecl
Streaming
[env:megaatmega2560-net]
platform = atmelavr [env:megaatmega2560-net]
board = megaatmega2560 platform = atmelavr
framework = arduino board = megaatmega2560
upload_port = net:192.168.88.2:23000 framework = arduino
build_flags = !sh build_flags_mega2560-net.sh upload_port = net:192.168.88.2:23000
;lib_ldf_mode = chain+ build_flags = !sh build_flags_mega2560-net.sh
lib_deps = ;lib_ldf_mode = chain+
https://github.com/anklimov/Arduino-Temperature-Control-Library.git lib_deps =
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DmxSimple https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/httpClient https://github.com/anklimov/DmxSimple
https://github.com/anklimov/aJson https://github.com/anklimov/httpClient
https://github.com/anklimov/CmdArduino https://github.com/anklimov/aJson
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/CmdArduino
https://github.com/anklimov/DMXSerial https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet https://github.com/anklimov/DMXSerial
https://github.com/PaulStoffregen/SPI.git https://github.com/anklimov/Ethernet
https://github.com/knolleary/pubsubclient.git https://github.com/PaulStoffregen/SPI.git
https://github.com/anklimov/Artnet.git https://github.com/knolleary/pubsubclient.git
FastLED https://github.com/anklimov/Artnet.git
Adafruit Unified Sensor FastLED
DHT sensor library Adafruit Unified Sensor
https://github.com/arcao/Syslog.git DHT sensor library
Streaming https://github.com/arcao/Syslog.git
Streaming
[env:due-5500]
platform = atmelsam [env:due-5500]
framework = arduino platform = atmelsam
board = due framework = arduino
;lib_ldf_mode = chain+ board = due
build_flags = -D Wiz5500 -D ARTNET_ENABLE ;lib_ldf_mode = chain+
build_flags = !sh build_flags_due-5500.sh build_flags = -D Wiz5500 -D ARTNET_ENABLE
lib_deps = build_flags = !sh build_flags_due-5500.sh
https://github.com/sebnil/DueFlashStorage lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DmxDue https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/ArduinoHttpClient https://github.com/anklimov/DmxDue
https://github.com/anklimov/aJson https://github.com/anklimov/ArduinoHttpClient
https://github.com/anklimov/CmdArduino https://github.com/anklimov/aJson
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/CmdArduino
https://github.com/anklimov/Ethernet2 https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Ethernet2
https://github.com/anklimov/Artnet.git https://github.com/knolleary/pubsubclient.git
FastLED https://github.com/anklimov/Artnet.git
SD FastLED
SdFat SD
Adafruit Unified Sensor SdFat
DHT sensor library Adafruit Unified Sensor
https://github.com/arcao/Syslog.git DHT sensor library
Streaming https://github.com/arcao/Syslog.git
; PrintEx Streaming
https://github.com/livello/PrintEx.git#is-select-redecl ; PrintEx
https://github.com/livello/PrintEx.git#is-select-redecl
[env:controllino]
platform = atmelavr [env:controllino]
board = megaatmega2560 platform = atmelavr
framework = arduino board = megaatmega2560
;lib_ldf_mode = chain+ framework = arduino
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short) ;lib_ldf_mode = chain+
build_flags = -D CONTROLLINO -D CUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07 build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
lib_deps = build_flags = -D CONTROLLINO -D CUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07
https://github.com/anklimov/Arduino-Temperature-Control-Library.git lib_deps =
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DmxSimple https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/httpClient https://github.com/anklimov/DmxSimple
https://github.com/anklimov/aJson https://github.com/anklimov/httpClient
https://github.com/anklimov/CmdArduino https://github.com/anklimov/aJson
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/CmdArduino
https://github.com/anklimov/DMXSerial https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet https://github.com/anklimov/DMXSerial
https://github.com/PaulStoffregen/SPI.git https://github.com/anklimov/Ethernet
https://github.com/knolleary/pubsubclient.git https://github.com/PaulStoffregen/SPI.git
https://github.com/anklimov/Artnet.git https://github.com/knolleary/pubsubclient.git
FastLED https://github.com/anklimov/Artnet.git
EEPROM FastLED
Adafruit Unified Sensor EEPROM
DHT sensor library Adafruit Unified Sensor
DHT sensor library