mirror of
https://github.com/anklimov/lighthub
synced 2026-09-15 14:44:03 +00:00
STM32 fix&slim, Wifi manager ESP32, compiled binaries updated for all platforms
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#! /bin/bash
|
||||
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||
export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||
#export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||
export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||
export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||
export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||
#export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||
#export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||
export FLAGS="$FLAGS -DCOUNTER_DISABLE"
|
||||
#export FLAGS="$FLAGS -std=gnu++11"
|
||||
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_esp32.sh
|
||||
|
||||
@@ -6,6 +6,7 @@ export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||
export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||
export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||
export FLAGS="$FLAGS -DCOUNTER_DISABLE"
|
||||
export FLAGS="$FLAGS -DNO_HOMIE"
|
||||
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
|
||||
source $CUSTOM_BUILD_FLAGS_FILE
|
||||
fi
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Executable
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Executable
BIN
Binary file not shown.
@@ -3,13 +3,13 @@
|
||||
# first make your own copy of template
|
||||
# cp build_flags_template.sh build_flags_ENVNAME.sh
|
||||
# then edit, change or comment something
|
||||
export FLAGS="$FLAGS -DMY_CONFIG_SERVER=lazyhome.ru"
|
||||
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
|
||||
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
|
||||
#export FLAGS="$FLAGS -DWiz5500"
|
||||
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
|
||||
# export FLAGS="$FLAGS -DMY_CONFIG_SERVER=lazyhome.ru"
|
||||
# export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||
# export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||
# export FLAGS="$FLAGS -DSD_CARD_INSERTED"
|
||||
# export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
|
||||
# export FLAGS="$FLAGS -DWiz5500"
|
||||
# export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
|
||||
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:ff"
|
||||
# export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||
@@ -24,9 +24,10 @@
|
||||
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
|
||||
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
|
||||
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
|
||||
#export FLAGS="$FLAGS -DSYSLOG_ENABLE"
|
||||
#export FLAGS="$FLAGS -DDEVICE_NAME=MYDEVICE"
|
||||
#export FLAGS="$FLAGS -DDHT_COUNTER_DISABLE"
|
||||
#export FLAGS="$FLAGS -DWITH_PRINTEX_LIB"
|
||||
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||
# export FLAGS="$FLAGS -DSYSLOG_ENABLE"
|
||||
# export FLAGS="$FLAGS -DDEVICE_NAME=MYDEVICE"
|
||||
# export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||
# export FLAGS="$FLAGS -DCOUNTER_DISABLE"
|
||||
# export FLAGS="$FLAGS -DWITH_PRINTEX_LIB"
|
||||
# export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||
echo $FLAGS
|
||||
|
||||
+9
-4
@@ -51,7 +51,7 @@ static volatile long counter_value[6];
|
||||
static volatile long counter_value[6];
|
||||
#endif
|
||||
|
||||
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32F1)
|
||||
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32)
|
||||
static short counter_irq_map[54];
|
||||
static long counter_value[54];
|
||||
static int counters_count;
|
||||
@@ -343,12 +343,15 @@ void Input::dht22Poll() {
|
||||
|
||||
void Input::contactPoll() {
|
||||
boolean currentInputState;
|
||||
#if defined(ARDUINO_ARCH_STM32F1)
|
||||
/*
|
||||
#if defined(ARDUINO_ARCH_STM32)
|
||||
WiringPinMode inputPinMode;
|
||||
#endif
|
||||
|
||||
#if defined(__SAM3X8E__)||defined(ARDUINO_ARCH_AVR)||defined(ARDUINO_ARCH_ESP8266)||defined(ARDUINO_ARCH_ESP32)
|
||||
|
||||
#endif
|
||||
*/
|
||||
uint32_t inputPinMode;
|
||||
uint8_t inputOnLevel;
|
||||
if (inType & IN_ACTIVE_HIGH) {
|
||||
@@ -387,12 +390,14 @@ void Input::analogPoll() {
|
||||
short Noize = ANALOG_NOIZE;
|
||||
short simple = 0;
|
||||
|
||||
#if defined(ARDUINO_ARCH_STM32F1)
|
||||
/*
|
||||
#if defined(ARDUINO_ARCH_STM32)
|
||||
WiringPinMode inputPinMode;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__SAM3X8E__)||defined(ARDUINO_ARCH_AVR)||defined(ARDUINO_ARCH_ESP8266)||defined(ARDUINO_ARCH_ESP32)
|
||||
#endif
|
||||
#endif */
|
||||
uint32_t inputPinMode;
|
||||
if (inType & IN_ACTIVE_HIGH) {
|
||||
inputPinMode = INPUT;
|
||||
|
||||
+1
-1
@@ -277,7 +277,7 @@ if (isSet)
|
||||
case -1: //Not known command
|
||||
case -2: //JSON input (not implemented yet
|
||||
break;
|
||||
#if not defined(ARDUINO_ARCH_ESP32) and not defined(ESP8266) and not defined(ARDUINO_ARCH_STM32F1) and not defined(DMX_DISABLE)
|
||||
#if not defined(ARDUINO_ARCH_ESP32) and not defined(ESP8266) and not defined(ARDUINO_ARCH_STM32) and not defined(DMX_DISABLE)
|
||||
case -3: //RGB color in #RRGGBB notation
|
||||
{
|
||||
CRGB rgb;
|
||||
|
||||
+8
-6
@@ -88,6 +88,7 @@ NRFFlashStorage EEPROM;
|
||||
|
||||
#ifdef ARDUINO_ARCH_STM32
|
||||
EthernetClient ethClient;
|
||||
NRFFlashStorage EEPROM;
|
||||
#endif
|
||||
|
||||
#ifdef NRF5
|
||||
@@ -618,7 +619,7 @@ void onInitialStateInitLAN() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
|
||||
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32)
|
||||
#ifdef W5500_CS_PIN
|
||||
Ethernet.w5500_cspin = W5500_CS_PIN;
|
||||
debugSerial<<F("Use W5500 pin: ");
|
||||
@@ -652,7 +653,7 @@ void onInitialStateInitLAN() {
|
||||
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)
|
||||
res = Ethernet.begin(mac, 12000);
|
||||
#endif
|
||||
#if defined(ARDUINO_ARCH_STM32F1)
|
||||
#if defined(ARDUINO_ARCH_STM32)
|
||||
res = Ethernet.begin(mac);
|
||||
#endif
|
||||
wdt_en();
|
||||
@@ -678,9 +679,10 @@ void onInitialStateInitLAN() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ARDUINO_ARCH_STM32F1
|
||||
#ifdef ARDUINO_ARCH_STM32
|
||||
void softRebootFunc() {
|
||||
nvic_sys_reset();
|
||||
//nvic_sys_reset();
|
||||
Serial.println("not implemented");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1162,7 +1164,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
|
||||
return READ_RE_CONFIG;//-11;
|
||||
}
|
||||
#endif
|
||||
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_ESP32)
|
||||
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ESP32)
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
WiFiClient configEthClient;
|
||||
#else
|
||||
@@ -1301,7 +1303,7 @@ void setup_main() {
|
||||
ArtnetSetup();
|
||||
#endif
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP8266) and not defined(WIFI_MANAGER_DISABLE)
|
||||
#if (defined(ARDUINO_ARCH_ESP8266) or defined(ARDUINO_ARCH_ESP32)) and not defined(WIFI_MANAGER_DISABLE)
|
||||
WiFiManager wifiManager;
|
||||
#if defined(ESP_WIFI_AP) and defined(ESP_WIFI_PWD)
|
||||
wifiManager.autoConnect(QUOTE(ESP_WIFI_AP), QUOTE(ESP_WIFI_PWD));
|
||||
|
||||
+2
-1
@@ -48,7 +48,8 @@
|
||||
#ifdef ARDUINO_ARCH_STM32
|
||||
#include "HttpClient.h"
|
||||
#include "UIPEthernet.h"
|
||||
#include <EEPROM.h>
|
||||
#include <NRFFlashStorage.h>
|
||||
//#include <EEPROM.h>
|
||||
#endif
|
||||
|
||||
#if defined(__SAM3X8E__)
|
||||
|
||||
+23
-21
@@ -9,7 +9,7 @@
|
||||
; http://docs.platformio.org/page/projectconf.html
|
||||
[platformio]
|
||||
src_dir = lighthub
|
||||
;env_default = esp8266
|
||||
;env_default = esp32
|
||||
;monitor_speed = 115200
|
||||
; megaatmega2560
|
||||
; megaatmega2560-net
|
||||
@@ -93,24 +93,11 @@ lib_ignore =
|
||||
HTTPClient
|
||||
httpClient
|
||||
EEPROM
|
||||
https://github.com/anklimov/ModbusMaster
|
||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||
https://github.com/anklimov/DS2482_OneWire
|
||||
DS2482_OneWire
|
||||
OneWire
|
||||
DallasTemperature
|
||||
ModbusMaster
|
||||
Artnet
|
||||
https://github.com/anklimov/Artnet.git
|
||||
https://github.com/anklimov/ESP-Dmx
|
||||
HTTPClient
|
||||
FastLED
|
||||
Adafruit Unified Sensor
|
||||
DHT sensor library for ESPx
|
||||
DHT sensor library
|
||||
Wire
|
||||
UIPEthernet
|
||||
ESP_EEPROM
|
||||
EEPROM
|
||||
lib_deps =
|
||||
https://github.com/ebenolson/WIFIMANAGER-ESP32.git
|
||||
https://github.com/zhouhan0126/WebServer-esp32.git
|
||||
@@ -121,6 +108,15 @@ lib_deps =
|
||||
Streaming
|
||||
;ESP_EEPROM
|
||||
https://github.com/anklimov/NRFFlashStorage
|
||||
Adafruit Unified Sensor
|
||||
DHT sensor library for ESPx
|
||||
https://github.com/anklimov/Artnet.git
|
||||
https://github.com/anklimov/ModbusMaster
|
||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||
https://github.com/anklimov/DS2482_OneWire
|
||||
https://github.com/anklimov/ESP-Dmx
|
||||
FastLED
|
||||
|
||||
[env:due]
|
||||
platform = atmelsam
|
||||
framework = arduino
|
||||
@@ -139,6 +135,7 @@ lib_ignore =
|
||||
NRFFlashStorage
|
||||
WebServer
|
||||
UIPEthernet
|
||||
EEPROM
|
||||
lib_deps =
|
||||
https://github.com/sebnil/DueFlashStorage
|
||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||
@@ -216,6 +213,7 @@ lib_ignore =
|
||||
Ethernet
|
||||
NRFFlashStorage
|
||||
UIPEthernet
|
||||
EEPROM
|
||||
lib_deps =
|
||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||
https://github.com/anklimov/DS2482_OneWire
|
||||
@@ -291,6 +289,7 @@ lib_ignore =
|
||||
WebServer
|
||||
UIPEthernet
|
||||
ESP_EEPROM
|
||||
EEPROM
|
||||
lib_deps =
|
||||
https://github.com/sebnil/DueFlashStorage
|
||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||
@@ -373,18 +372,21 @@ lib_ignore =
|
||||
Ethernet2
|
||||
Artnet
|
||||
Ethernet3
|
||||
NRFFlashStorage
|
||||
WebServer
|
||||
ESP_EEPROM
|
||||
|
||||
DHT sensor library
|
||||
DallasTemperature
|
||||
Adafruit Unified Sensor
|
||||
DS2482_OneWire
|
||||
ModbusMaster
|
||||
Syslog
|
||||
Wire
|
||||
EEPROM
|
||||
lib_deps =
|
||||
; DallasTemperature
|
||||
https://github.com/anklimov/aJson
|
||||
https://github.com/anklimov/CmdArduino
|
||||
ArduinoHttpClient
|
||||
https://github.com/knolleary/pubsubclient.git
|
||||
Adafruit Unified Sensor
|
||||
DHT sensor library
|
||||
Streaming
|
||||
UIPEthernet
|
||||
;EEPROM
|
||||
https://github.com/anklimov/NRFFlashStorage
|
||||
|
||||
Reference in New Issue
Block a user