mirror of
https://github.com/anklimov/lighthub
synced 2026-01-26 08:09:05 +03:00
OTA directive changed to OTA_ENABLE
compiled binaries
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
-DSYSLOG_ENABLE
|
||||
#-DMODBUS_SERIAL_PARAM=SERIAL_8E1
|
||||
-DARTNET_ENABLE
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-DSTATUSLED
|
||||
#-DPID_DISABLE
|
||||
#-DUARTBRIDGE_ENABLE
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#-DCOUNTER_DISABLE
|
||||
-DSYSLOG_ENABLE
|
||||
# - udp errors
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-DARDUINO_OTA_MDNS_DISABLE
|
||||
-DMDNS_ENABLE
|
||||
#- ArduinoMDNS didnt working
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-DWIFI_ENABLE
|
||||
-DMODBUS_DISABLE
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-std=gnu++11
|
||||
-DSYSLOG_ENABLE
|
||||
-DMCP23017
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-DARTNET_ENABLE
|
||||
-DDMX_SMOOTH
|
||||
-DMODBUS_SERIAL_BAUD=9600
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-DSYSLOG_ENABLE
|
||||
-DSTATUSLED
|
||||
-DMCP23017
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
-DHSV_DISABLE
|
||||
-DPWM_DISABLE
|
||||
-DM5STACK
|
||||
-DMULTIVENT_DISABLE
|
||||
-DRELAY_DISABLE
|
||||
-DMOTOR_DISABLE
|
||||
#-DSYSLOG_ENABLE
|
||||
-DUSE_1W_PIN=16
|
||||
#-DPID_DISABLE
|
||||
-DARDUINO_OTA_MDNS_DISABLE
|
||||
-DMDNS_ENABLE
|
||||
#-DMCP23017
|
||||
@@ -21,8 +23,8 @@
|
||||
-DFS_STORAGE
|
||||
-DFS_PREPARE
|
||||
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-DRESTART_LAN_ON_MQTT_ERRORS
|
||||
-D CORS=\"*\"
|
||||
-DCORS=\"*\"
|
||||
-D REDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DOTA_PORT=80
|
||||
@@ -10,10 +10,10 @@
|
||||
-DCSSHDC_DISABLE
|
||||
-DSPILED_DISABLE
|
||||
-DAC_DISABLE
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
|
||||
|
||||
-DRESTART_LAN_ON_MQTT_ERRORS
|
||||
-D CORS=\"*\"
|
||||
-D REDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DCORS=\"*\"
|
||||
-DREDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DOTA_PORT=80
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
|
||||
-DRESTART_LAN_ON_MQTT_ERRORS
|
||||
-D CORS=\"*\"
|
||||
-D REDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DREDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DOTA_PORT=80
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#-DAC_DISABLE
|
||||
-DSYSLOG_ENABLE
|
||||
-DPID_DISABLE
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-DMOTOR_DISABLE
|
||||
-DMULTIVENT_DISABLE
|
||||
#-DWiz5100
|
||||
@@ -24,8 +24,8 @@
|
||||
-DPWM_DISABLE
|
||||
|
||||
-DRESTART_LAN_ON_MQTT_ERRORS
|
||||
-D CORS=\"*\"
|
||||
-D REDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DCORS=\"*\"
|
||||
-DREDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
|
||||
# Example of UARTBRIDGE configuration
|
||||
#-DUARTBRIDGE_ENABLE
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
-DPID_DISABLE
|
||||
#-DWiz5100
|
||||
-DMOTOR_DISABLE
|
||||
-DOTA
|
||||
-DOTA_ENABLE
|
||||
-DARDUINO_OTA_MDNS_DISABLE
|
||||
#-DMDNS_ENABLE
|
||||
-DRESTART_LAN_ON_MQTT_ERRORS
|
||||
-D CORS=\"*\"
|
||||
-D REDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DCORS=\"*\"
|
||||
-DREDIRECTION_URL=\"http://lazyhome.ru/pwa\"
|
||||
-DOTA_PORT=80
|
||||
-DHSV_DISABLE
|
||||
-DMULTIVENT_DISABLE
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
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
11078
compiled/mega2560/firmware.hex
Normal file
11078
compiled/mega2560/firmware.hex
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -3,10 +3,11 @@
|
||||
|
||||
#include <main.h>
|
||||
|
||||
#ifdef OTA
|
||||
#ifdef OTA_ENABLE
|
||||
#include <WiFiOTA.h>
|
||||
#endif
|
||||
|
||||
//#include "content_types.h"
|
||||
|
||||
#if defined(ARDUINO_ARCH_AVR)
|
||||
#include <EEPROM.h>
|
||||
@@ -135,7 +136,7 @@ NRFFlashStorage EEPROM;
|
||||
streamSize = MAX_JSON_CONF_SIZE;
|
||||
startPos = EEPROM_offsetJSON;
|
||||
textMode = true;
|
||||
#ifdef OTA
|
||||
#ifdef OTA_ENABLE
|
||||
contentType = HTTP_TEXT_JSON;
|
||||
#endif
|
||||
openmode = mode;
|
||||
@@ -146,7 +147,7 @@ NRFFlashStorage EEPROM;
|
||||
startPos = SYSCONF_OFFSET;
|
||||
streamSize = SYSCONF_SIZE;
|
||||
textMode =false;
|
||||
#ifdef OTA
|
||||
#ifdef OTA_ENABLE
|
||||
contentType = HTTP_OCTET_STREAM;
|
||||
#endif
|
||||
openmode = mode;
|
||||
|
||||
@@ -88,7 +88,7 @@ EthernetClient ethClient;
|
||||
#endif //NOIP
|
||||
#endif
|
||||
|
||||
#if defined(OTA)
|
||||
#if defined(OTA_ENABLE)
|
||||
#include <ArduinoOTA.h>
|
||||
#endif
|
||||
|
||||
@@ -258,7 +258,7 @@ bool isNotRetainingStatus() {
|
||||
|
||||
uint16_t httpHandler(Client& client, String request, uint8_t method, long contentLength, bool authorized, String& response )
|
||||
{
|
||||
#ifdef OTA
|
||||
#ifdef OTA_ENABLE
|
||||
//String response = "";
|
||||
debugSerial<<method<<F(" ")<<request<<endl;
|
||||
if (method == HTTP_GET && request == (F("/")))
|
||||
@@ -268,7 +268,7 @@ uint16_t httpHandler(Client& client, String request, uint8_t method, long conten
|
||||
client.println(
|
||||
#ifdef REDIRECTION_URL
|
||||
//Redirect to cloud PWA application
|
||||
String(F("Location: " REDIRECTION_URL))
|
||||
String(F("Location: http://")) + F(QUOTE(REDIRECTION_URL))
|
||||
#else
|
||||
String(F("Location: /index.html"))
|
||||
#endif
|
||||
@@ -552,7 +552,7 @@ void printMACAddress() {
|
||||
|
||||
|
||||
|
||||
#ifdef OTA
|
||||
#ifdef OTA_ENABLE
|
||||
const char defaultPassword[] PROGMEM = QUOTE(DEFAULT_OTA_PASSWORD);
|
||||
void setupOTA(void)
|
||||
{ char passwordBuf[16];
|
||||
@@ -2638,7 +2638,7 @@ infoSerial<<F("\nFirmware MAC Address " QUOTE(CUSTOM_FIRMWARE_MAC));
|
||||
infoSerial<<F("\n(-)SPI LED");
|
||||
#endif
|
||||
|
||||
#ifdef OTA
|
||||
#ifdef OTA_ENABLE
|
||||
infoSerial<<F("\n(+)OTA");
|
||||
#else
|
||||
infoSerial<<F("\n(-)OTA");
|
||||
|
||||
Reference in New Issue
Block a user