mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 19:59:50 +03:00
input handle improved, +stm env -2due envs
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
-DARTNET_ENABLE
|
|
||||||
-DDMX_SMOOTH
|
|
||||||
-DSTATUSLED
|
|
||||||
-DSYSLOG_ENABLE
|
|
||||||
-DWiz5100
|
|
||||||
#-DPID_DISABLE
|
|
||||||
-DARDUINO_OTA_MDNS_DISABLE
|
|
||||||
-DMDNS_ENABLE
|
|
||||||
-DTIMER_INT
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-DWiz5500
|
|
||||||
-DARTNET_ENABLE
|
|
||||||
-DDMX_SMOOTH
|
|
||||||
-DSTATUSLED
|
|
||||||
-DSYSLOG_ENABLE
|
|
||||||
#-DPID_DISABLE
|
|
||||||
-DARDUINO_OTA_MDNS_DISABLE
|
|
||||||
-DMDNS_ENABLE
|
|
||||||
-DTIMER_INT
|
|
||||||
12
build-flags/build_flags_stm32
Normal file
12
build-flags/build_flags_stm32
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
-DDMX_DISABLE
|
||||||
|
-DMODBUS_DISABLE
|
||||||
|
-DMBUS_DISABLE
|
||||||
|
-DOWIRE_DISABLE
|
||||||
|
-DDHT_DISABLE
|
||||||
|
-DCOUNTER_DISABLE
|
||||||
|
-DNO_HOMIE
|
||||||
|
-DCSSHDC_DISABLE
|
||||||
|
-DSPILED_DISABLE
|
||||||
|
-DAC_DISABLE
|
||||||
|
-DPID_DISABLE
|
||||||
|
-DdebugSerialPort=SerialUSB
|
||||||
@@ -9,3 +9,4 @@
|
|||||||
-DSPILED_DISABLE
|
-DSPILED_DISABLE
|
||||||
-DAC_DISABLE
|
-DAC_DISABLE
|
||||||
-DPID_DISABLE
|
-DPID_DISABLE
|
||||||
|
-DUIPETHERNET
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
mode com3:1200,n,8,1
|
|
||||||
pause
|
|
||||||
..\tools\win\tool-bossac\bossac.exe -i --port=com3 -U false -e -w -v -b firmware.bin -R
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export PORT=cu.usbmodem1451
|
|
||||||
echo . | stty -f /dev/$PORT speed 1200
|
|
||||||
../tools/mac/tool-bossac/bossac -U false -p $PORT -i -e -w -v -b firmware.bin -R
|
|
||||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
mode com3:1200,n,8,1
|
|
||||||
pause
|
|
||||||
..\tools\win\tool-bossac\bossac.exe -i --port=com3 -U false -e -w -v -b firmware.bin -R
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export PORT=cu.usbmodem14201
|
|
||||||
echo . | stty -f /dev/$PORT speed 1200
|
|
||||||
../tools/mac/tool-bossac/bossac -U false -p $PORT -i -e -w -v -b firmware.bin -R
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
..\tools\win\arduinoOTA.exe -address 192.168.88.21 -port 65280 -username arduino -password password -sketch firmware.bin -b -upload /sketch
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../tools/mac/arduinoOTA -address 192.168.88.21 -port 65280 -username arduino -password password -sketch firmware.bin -b -upload /sketch
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -288,10 +288,16 @@ void DMXOUT_propagate()
|
|||||||
if (!step) step=1;
|
if (!step) step=1;
|
||||||
|
|
||||||
if (delta<0)
|
if (delta<0)
|
||||||
{DmxWrite2(i,currLevel+step);debugSerial<<"<";}
|
{
|
||||||
|
DmxWrite2(i,currLevel+step);
|
||||||
|
//debugSerial<<"<";
|
||||||
|
}
|
||||||
|
|
||||||
if (delta>0)
|
if (delta>0)
|
||||||
{DmxWrite2(i,currLevel-step);debugSerial<<">";}
|
{
|
||||||
|
DmxWrite2(i,currLevel-step);
|
||||||
|
//debugSerial<<">";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkTimestamp=now;
|
checkTimestamp=now;
|
||||||
|
|||||||
@@ -655,7 +655,7 @@ static volatile uint8_t contactPollBusy = 0;
|
|||||||
|
|
||||||
void Input::contactPoll(short cause) {
|
void Input::contactPoll(short cause) {
|
||||||
boolean currentInputState;
|
boolean currentInputState;
|
||||||
if (!store || contactPollBusy) return;
|
if (!store /*|| contactPollBusy*/) return;
|
||||||
contactPollBusy++;
|
contactPollBusy++;
|
||||||
|
|
||||||
changeState(IS_REQSTATE,cause); //Check for postponed states transitions
|
changeState(IS_REQSTATE,cause); //Check for postponed states transitions
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ e-mail anklimov@gmail.com
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SAME_STATE_ATTEMPTS 3
|
#define SAME_STATE_ATTEMPTS 2
|
||||||
#define ANALOG_STATE_ATTEMPTS 6
|
#define ANALOG_STATE_ATTEMPTS 6
|
||||||
#define ANALOG_NOIZE 1
|
#define ANALOG_NOIZE 1
|
||||||
|
|
||||||
|
|||||||
@@ -1605,13 +1605,17 @@ void postTransmission() {
|
|||||||
|
|
||||||
volatile unsigned long timerCount=0;
|
volatile unsigned long timerCount=0;
|
||||||
volatile int16_t timerNumber=-1;
|
volatile int16_t timerNumber=-1;
|
||||||
|
volatile int8_t timerHandlerBusy=0;
|
||||||
|
|
||||||
void TimerHandler(void)
|
void TimerHandler(void)
|
||||||
{ interrupts();
|
{
|
||||||
|
timerHandlerBusy++;
|
||||||
|
interrupts();
|
||||||
timerCount=micros();
|
timerCount=micros();
|
||||||
if (configLoaded) inputLoop(CHECK_INTERRUPT);
|
if (configLoaded && !timerHandlerBusy) inputLoop(CHECK_INTERRUPT);
|
||||||
|
DMXOUT_propagate();
|
||||||
timerCount=micros()-timerCount;
|
timerCount=micros()-timerCount;
|
||||||
|
timerHandlerBusy--;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__SAM3X8E__) && defined (TIMER_INT)
|
#if defined(__SAM3X8E__) && defined (TIMER_INT)
|
||||||
@@ -2017,8 +2021,9 @@ void owIdle(void) {
|
|||||||
if (artnet && (lanStatus>=HAVE_IP_ADDRESS)) artnet->read();
|
if (artnet && (lanStatus>=HAVE_IP_ADDRESS)) artnet->read();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wdt_res();
|
wdt_res();
|
||||||
return;
|
inputLoop(CHECK_INTERRUPT);
|
||||||
|
return; //?????
|
||||||
|
|
||||||
#ifdef _dmxin
|
#ifdef _dmxin
|
||||||
yield();
|
yield();
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ extern Streamlog errorSerial;
|
|||||||
#ifdef Wiz5500
|
#ifdef Wiz5500
|
||||||
#include <Ethernet2.h>
|
#include <Ethernet2.h>
|
||||||
#else
|
#else
|
||||||
#ifdef ARDUINO_ARCH_STM32
|
#ifdef UIPETHERNET
|
||||||
#include "UIPEthernet.h"
|
#include "UIPEthernet.h"
|
||||||
#else
|
#else
|
||||||
#include <Ethernet.h>
|
#include <Ethernet.h>
|
||||||
|
|||||||
184
platformio.ini
184
platformio.ini
@@ -31,13 +31,8 @@ default_envs =
|
|||||||
; LightHub controller HW revision 2.1 and above (Wiznet 5500 CS on pin 53)
|
; LightHub controller HW revision 2.1 and above (Wiznet 5500 CS on pin 53)
|
||||||
; lighthub21
|
; lighthub21
|
||||||
|
|
||||||
; Arduino DUE + Ethernet shield Wiznet 5100
|
; Generic DUE (working with Wiznet 5X00 network)
|
||||||
; due-5100
|
|
||||||
|
|
||||||
; Generic DUE
|
|
||||||
; due
|
; due
|
||||||
; Arduino DUE + Ethernet shield Wiznet 5500
|
|
||||||
; due-5500
|
|
||||||
|
|
||||||
; ESP 8266
|
; ESP 8266
|
||||||
; esp8266-wifi
|
; esp8266-wifi
|
||||||
@@ -54,6 +49,9 @@ default_envs =
|
|||||||
; STM32 board + ENC28j60 network
|
; STM32 board + ENC28j60 network
|
||||||
; stm32-enc2860
|
; stm32-enc2860
|
||||||
|
|
||||||
|
; STM32 board (olmexino) with WIZNET 5X00 network
|
||||||
|
; stm32
|
||||||
|
|
||||||
; NRF52 board + Wiznet 5x00 network
|
; NRF52 board + Wiznet 5x00 network
|
||||||
; nrf52840
|
; nrf52840
|
||||||
|
|
||||||
@@ -244,59 +242,7 @@ lib_deps =
|
|||||||
|
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
[env:due-5100]
|
|
||||||
platform = atmelsam
|
|
||||||
framework = arduino
|
|
||||||
board = due
|
|
||||||
monitor_baud = 115200
|
|
||||||
build_flags = !python get_build_flags.py due-5100
|
|
||||||
lib_ignore =
|
|
||||||
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
|
||||||
DHT sensor library for ESPx
|
|
||||||
ESP_EEPROM
|
|
||||||
DMXSerial
|
|
||||||
DmxSimple
|
|
||||||
httpClient
|
|
||||||
ESPDMX
|
|
||||||
ESP-Dmx
|
|
||||||
WifiManager
|
|
||||||
Ethernet3
|
|
||||||
NRFFlashStorage
|
|
||||||
WebServer
|
|
||||||
UIPEthernet
|
|
||||||
EEPROM
|
|
||||||
M5Stack
|
|
||||||
;ArduinoOTA
|
|
||||||
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
|
|
||||||
ArduinoHttpClient
|
|
||||||
https://github.com/anklimov/aJson
|
|
||||||
https://github.com/anklimov/CmdArduino
|
|
||||||
https://github.com/anklimov/ModbusMaster
|
|
||||||
https://github.com/anklimov/Ethernet5100
|
|
||||||
https://github.com/knolleary/pubsubclient.git
|
|
||||||
https://github.com/anklimov/Artnet.git
|
|
||||||
FastLED@3.3.2
|
|
||||||
SD
|
|
||||||
SdFat
|
|
||||||
Adafruit Unified Sensor
|
|
||||||
DHT sensor library
|
|
||||||
https://github.com/arcao/Syslog.git
|
|
||||||
Streaming
|
|
||||||
ClosedCube HDC1080
|
|
||||||
SparkFun CCS811 Arduino Library@~1.0.7
|
|
||||||
Adafruit NeoPixel
|
|
||||||
https://github.com/anklimov/ArduinoOTA
|
|
||||||
Adafruit MCP23017 Arduino Library
|
|
||||||
Adafruit BusIO
|
|
||||||
br3ttb/PID@^1.2.1
|
|
||||||
ArduinoMDNS
|
|
||||||
https://github.com/khoih-prog/TimerInterrupt_Generic.git
|
|
||||||
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:due]
|
[env:due]
|
||||||
;Experimental target with universal Ethernet Library
|
;Experimental target with universal Ethernet Library
|
||||||
@@ -425,8 +371,8 @@ board_build.f_cpu = 16000000L
|
|||||||
;build_unflags = -flto - not working without LTO!
|
;build_unflags = -flto - not working without LTO!
|
||||||
|
|
||||||
;upload_protocol = arduino
|
;upload_protocol = arduino
|
||||||
upload_command = arduinoOTA -address 192.168.11.213 -port 65280 -username arduino -password password -b -upload /sketch -sketch $BUILD_DIR/${PROGNAME}.bin;sleep 5
|
;upload_command = arduinoOTA -address 192.168.11.213 -port 65280 -username arduino -password password -b -upload /sketch -sketch $BUILD_DIR/${PROGNAME}.bin;sleep 5
|
||||||
upload_protocol = custom
|
;upload_protocol = custom
|
||||||
|
|
||||||
board_upload.speed = ${env:fuses_bootloader.board_bootloader.speed}
|
board_upload.speed = ${env:fuses_bootloader.board_bootloader.speed}
|
||||||
framework = arduino
|
framework = arduino
|
||||||
@@ -646,60 +592,6 @@ lib_deps =
|
|||||||
|
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
[env:due-5500]
|
|
||||||
platform = atmelsam
|
|
||||||
framework = arduino
|
|
||||||
board = due
|
|
||||||
build_flags = !python get_build_flags.py due-5500
|
|
||||||
lib_ignore =
|
|
||||||
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
|
||||||
DHT sensor library for ESPx
|
|
||||||
ESPDMX
|
|
||||||
ESP-Dmx
|
|
||||||
DMXSerial
|
|
||||||
WifiManager
|
|
||||||
DmxSimple
|
|
||||||
httpClient
|
|
||||||
Ethernet
|
|
||||||
Ethernet3
|
|
||||||
Ethernet5100
|
|
||||||
NRFFlashStorage
|
|
||||||
WebServer
|
|
||||||
UIPEthernet
|
|
||||||
ESP_EEPROM
|
|
||||||
EEPROM
|
|
||||||
M5Stack
|
|
||||||
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
|
|
||||||
ArduinoHttpClient
|
|
||||||
https://github.com/anklimov/aJson
|
|
||||||
https://github.com/anklimov/CmdArduino
|
|
||||||
https://github.com/anklimov/ModbusMaster
|
|
||||||
https://github.com/anklimov/Ethernet2
|
|
||||||
https://github.com/knolleary/pubsubclient.git
|
|
||||||
https://github.com/anklimov/Artnet.git
|
|
||||||
FastLED@3.3.2
|
|
||||||
SD
|
|
||||||
SdFat
|
|
||||||
Adafruit Unified Sensor
|
|
||||||
DHT sensor library
|
|
||||||
https://github.com/arcao/Syslog.git
|
|
||||||
Streaming
|
|
||||||
https://github.com/livello/PrintEx#is-select-redecl
|
|
||||||
ClosedCube HDC1080
|
|
||||||
SparkFun CCS811 Arduino Library@~1.0.7
|
|
||||||
Adafruit NeoPixel
|
|
||||||
https://github.com/anklimov/ArduinoOTA
|
|
||||||
Adafruit MCP23017 Arduino Library
|
|
||||||
Adafruit BusIO
|
|
||||||
br3ttb/PID@^1.2.1
|
|
||||||
ArduinoMDNS
|
|
||||||
https://github.com/khoih-prog/TimerInterrupt_Generic.git
|
|
||||||
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
[env:lighthub21]
|
[env:lighthub21]
|
||||||
platform = atmelsam
|
platform = atmelsam
|
||||||
@@ -707,9 +599,9 @@ framework = arduino
|
|||||||
board = due
|
board = due
|
||||||
monitor_baud = 115200
|
monitor_baud = 115200
|
||||||
build_flags = !python get_build_flags.py lighthub21
|
build_flags = !python get_build_flags.py lighthub21
|
||||||
;upload_command = arduinoOTA -address 192.168.11.172 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
upload_command = arduinoOTA -address 192.168.11.172 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
;upload_command = arduinoOTA -address 192.168.88.45 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE;sleep 6
|
;upload_command = arduinoOTA -address 192.168.88.45 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE;sleep 6
|
||||||
;upload_protocol = custom
|
upload_protocol = custom
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
||||||
DHT sensor library for ESPx
|
DHT sensor library for ESPx
|
||||||
@@ -868,6 +760,66 @@ lib_deps =
|
|||||||
|
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
|
|
||||||
|
[env:stm32]
|
||||||
|
platform = ststm32
|
||||||
|
board = olimexino
|
||||||
|
board_build.mcu = stm32f103rbt6
|
||||||
|
board_build.f_cpu = 72000000L
|
||||||
|
framework = arduino
|
||||||
|
monitor_baud = 115200
|
||||||
|
upload_protocol = dfu
|
||||||
|
;debug_tool = cmsis-dap
|
||||||
|
build_flags = !python get_build_flags.py stm32
|
||||||
|
lib_ignore =
|
||||||
|
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
||||||
|
DHT sensor library for ESPx
|
||||||
|
DmxDue
|
||||||
|
DueFlashStorage
|
||||||
|
ESPDMX
|
||||||
|
ESP-Dmx
|
||||||
|
WifiManager
|
||||||
|
FastLED
|
||||||
|
UIPEthernet
|
||||||
|
DMXSerial
|
||||||
|
DmxSimple
|
||||||
|
httpClient
|
||||||
|
SD
|
||||||
|
PrintEx
|
||||||
|
Ethernet2
|
||||||
|
Artnet
|
||||||
|
Ethernet3
|
||||||
|
WebServer
|
||||||
|
ESP_EEPROM
|
||||||
|
DHT sensor library
|
||||||
|
DallasTemperature
|
||||||
|
Adafruit Unified Sensor
|
||||||
|
DS2482_OneWire
|
||||||
|
ModbusMaster
|
||||||
|
Syslog
|
||||||
|
EEPROM
|
||||||
|
ClosedCube HDC1080
|
||||||
|
SparkFun CCS811 Arduino Library
|
||||||
|
M5Stack
|
||||||
|
ArduinoOTA
|
||||||
|
lib_deps =
|
||||||
|
https://github.com/anklimov/aJson
|
||||||
|
https://github.com/anklimov/CmdArduino
|
||||||
|
ArduinoHttpClient
|
||||||
|
https://github.com/knolleary/pubsubclient.git
|
||||||
|
Streaming
|
||||||
|
Ethernet
|
||||||
|
https://github.com/anklimov/NRFFlashStorage
|
||||||
|
Adafruit NeoPixel
|
||||||
|
Adafruit MCP23017 Arduino Library
|
||||||
|
Adafruit BusIO
|
||||||
|
SPI
|
||||||
|
br3ttb/PID@^1.2.1
|
||||||
|
ArduinoMDNS
|
||||||
|
https://github.com/khoih-prog/TimerInterrupt_Generic.git
|
||||||
|
|
||||||
|
monitor_speed = 115200
|
||||||
|
|
||||||
; Run the following command to upload with this environment
|
; Run the following command to upload with this environment
|
||||||
; pio run -e Upload_ISP -t upload
|
; pio run -e Upload_ISP -t upload
|
||||||
[env:Upload_ISP]
|
[env:Upload_ISP]
|
||||||
|
|||||||
Reference in New Issue
Block a user