mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
1
compiled/DUE_16u2_reflash/reflash16u2DUE.sh
Normal file
1
compiled/DUE_16u2_reflash/reflash16u2DUE.sh
Normal file
@@ -0,0 +1 @@
|
||||
../tools/mac/tool-avrdude/avrdude -C ../tools/mac/tool-avrdude/avrdude.conf -c arduino -P /dev/cu.usbmodem1411 -b 19200 -p m16u2 -vvv -U flash:w:16u2.hex:i
|
||||
Binary file not shown.
3
compiled/due-5100/upload.sh
Executable file
3
compiled/due-5100/upload.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
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.
3
compiled/due-5500/upload.sh
Executable file
3
compiled/due-5500/upload.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
export PORT=cu.usbmodem1411
|
||||
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.
3
compiled/lighthub21/upload.sh
Executable file
3
compiled/lighthub21/upload.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -109,8 +109,8 @@
|
||||
:1006C0002C584F46462C544F47474C4500656E7595
|
||||
:1006D0006D00666C6F617400322E312E300024681C
|
||||
:1006E0006F6D696500757074696D652C66726565FE
|
||||
:1006F0006865617000373038663531655F3230319A
|
||||
:10070000392D30362D3031004C6967687448756278
|
||||
:1006F0006865617000323066613432375F323031A4
|
||||
:10070000392D30362D3131004C6967687448756277
|
||||
:100710002000246E616D650072656164790020744B
|
||||
:10072000727920616761696E20696E20352073657A
|
||||
:10073000636F6E6473006661696C65642C2072631C
|
||||
@@ -192,8 +192,8 @@
|
||||
:100BF000617A79686F6D652E7275000A436F6E6653
|
||||
:100C00006967207365727665723A000A282B295746
|
||||
:100C100041544348444F47003230313130334C0067
|
||||
:100C200020432B2B2076657273696F6E3A00373044
|
||||
:100C300038663531655F323031392D30362D3031FF
|
||||
:100C200020432B2B2076657273696F6E3A00323049
|
||||
:100C300066613432375F323031392D30362D313103
|
||||
:100C4000000A4C617A79686F6D652E7275204C6967
|
||||
:100C500067687448756220636F6E74726F6C6C6540
|
||||
:100C6000722000000020002300260029002C002F05
|
||||
@@ -2551,7 +2551,7 @@
|
||||
:109F60000F910895CF93DF93CDB7DEB72C970FB63F
|
||||
:109F7000F894DEBF0FBECDBF1C821B821E821D82E5
|
||||
:109F80008FEF9FEF98878F838CE693E09A83898386
|
||||
:109F900086E490E09A8789871C861B8663E770E1D8
|
||||
:109F900088E490E09A8789871C861B8663E770E1D6
|
||||
:109FA0008DEB97E00E947B5B609113067091140625
|
||||
:109FB000CE0101960E946F346FEFCE0101960E9490
|
||||
:109FC000523363E670E18DEB97E00E947B5B2C9649
|
||||
@@ -2669,9 +2669,9 @@
|
||||
:10A6C000BF90AF909F908F907F900895CF93DF932E
|
||||
:10A6D000CDB7DEB72C970FB6F894DEBF0FBECDBF57
|
||||
:10A6E00063E370E18DEB97E00E947B5B8DEB97E07D
|
||||
:10A6F0000E94455C86E490E00E9448778B37A1F584
|
||||
:10A6F0000E94455C88E490E00E9448778B37A1F582
|
||||
:10A700001C821B821E821D828FEF9FEF98878F8392
|
||||
:10A710008CE693E09A83898386E490E09A87898720
|
||||
:10A710008CE693E09A83898388E490E09A8789871E
|
||||
:10A720001C861B860E943D60CE0101960E94442A31
|
||||
:10A730009093140680931306892B19F466E170E157
|
||||
:10A7400015C06FE070E18DEB97E00E947B5B8DEBB5
|
||||
|
||||
@@ -1 +1 @@
|
||||
../tools/mac/tool-avrdude/avrdude -C ../tools/mac/tool-avrdude/avrdude.conf -v -V -P /dev/cu.usbmodem1411 -patmega2560 -cwiring -b115200 -D -Uflash:w:firmware.hex:i
|
||||
../tools/mac/tool-avrdude/avrdude -C ../tools/mac/tool-avrdude/avrdude.conf -P /dev/cu.wchusbserial1450 -v -V -patmega2560 -cwiring -b115200 -D -Uflash:w:firmware.hex:i
|
||||
|
||||
@@ -1033,15 +1033,42 @@ int mqttConfigResp(char *as) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(__SAM3X8E__)
|
||||
|
||||
#define saveBufLen 16000
|
||||
void cmdFunctionSave(int arg_cnt, char **args)
|
||||
{
|
||||
char* outBuf = (char*) malloc(saveBufLen); /* XXX: Dynamic size. */
|
||||
if (outBuf == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
debugSerial<<F("Saving config to EEPROM..");
|
||||
aJsonStringStream stringStream(NULL, outBuf, saveBufLen);
|
||||
aJson.print(root, &stringStream);
|
||||
int len = strlen(outBuf);
|
||||
outBuf[len++]= EOF;
|
||||
EEPROM.write(EEPROM_offset,(byte*) outBuf,len);
|
||||
|
||||
free (outBuf);
|
||||
debugSerial<<F("Saved to EEPROM");
|
||||
}
|
||||
|
||||
#else
|
||||
void cmdFunctionSave(int arg_cnt, char **args)
|
||||
{
|
||||
aJsonEEPROMStream jsonEEPROMStream = aJsonEEPROMStream(EEPROM_offset);
|
||||
debugSerial<<F("Saving config to EEPROM..");
|
||||
|
||||
aJson.print(root, &jsonEEPROMStream);
|
||||
jsonEEPROMStream.putEOF();
|
||||
|
||||
|
||||
debugSerial<<F("Saved to EEPROM");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void cmdFunctionIp(int arg_cnt, char **args)
|
||||
{
|
||||
IPAddress ip0(0, 0, 0, 0);
|
||||
|
||||
@@ -44,11 +44,11 @@ CCS811ready = true;
|
||||
|
||||
//returnCode = ccs811.setDriveMode(1);
|
||||
//printDriverError(returnCode);
|
||||
|
||||
/*
|
||||
delay(2000);Poll();
|
||||
delay(2000);Poll();
|
||||
delay(2000);Poll();
|
||||
delay(2000);
|
||||
delay(2000); */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#define OFFSET_MASK OFFSET_GW+4
|
||||
#define OFFSET_CONFIGSERVER OFFSET_MASK+4
|
||||
#define OFFSET_MQTT_PWD OFFSET_CONFIGSERVER+32
|
||||
#define EEPROM_offset OFFSET_MQTT_PWD+16
|
||||
#define EEPROM_offset_NotAlligned OFFSET_MQTT_PWD+16
|
||||
#define EEPROM_offset EEPROM_offset_NotAlligned + (4 -(EEPROM_offset_NotAlligned & 3))
|
||||
|
||||
#ifndef INTERVAL_CHECK_INPUT
|
||||
#define INTERVAL_CHECK_INPUT 50
|
||||
@@ -51,7 +52,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef MODBUS_DIMMER_PARAM
|
||||
#define MODBUS_DIMMER_PARAM SERIAL_8E1
|
||||
#define MODBUS_DIMMER_PARAM SERIAL_8N1
|
||||
#endif
|
||||
|
||||
#define dimPar MODBUS_DIMMER_PARAM
|
||||
|
||||
Reference in New Issue
Block a user