Removed warnings, when MY_OTA_FIRMWARE_FEATURE is enabled
This commit is contained in:
@@ -773,7 +773,7 @@ boolean MySensor::process() {
|
|||||||
debug(PSTR("fw checksum ok\n"));
|
debug(PSTR("fw checksum ok\n"));
|
||||||
// All seems ok, write size and signature to flash (DualOptiboot will pick this up and flash it)
|
// All seems ok, write size and signature to flash (DualOptiboot will pick this up and flash it)
|
||||||
uint16_t fwsize = FIRMWARE_BLOCK_SIZE * fc.blocks;
|
uint16_t fwsize = FIRMWARE_BLOCK_SIZE * fc.blocks;
|
||||||
uint8_t OTAbuffer[10] = {'F','L','X','I','M','G',':',(fwsize >> 8),fwsize,':'};
|
uint8_t OTAbuffer[10] = {'F','L','X','I','M','G',':',(uint8_t)(fwsize >> 8),(uint8_t)(fwsize & 0xff),':'};
|
||||||
flash.writeBytes(0, OTAbuffer, 10);
|
flash.writeBytes(0, OTAbuffer, 10);
|
||||||
// Write the new firmware config to eeprom
|
// Write the new firmware config to eeprom
|
||||||
hw_writeConfigBlock((void*)&fc, (void*)EEPROM_FIRMWARE_TYPE_ADDRESS, sizeof(NodeFirmwareConfig));
|
hw_writeConfigBlock((void*)&fc, (void*)EEPROM_FIRMWARE_TYPE_ADDRESS, sizeof(NodeFirmwareConfig));
|
||||||
|
|||||||
@@ -334,14 +334,6 @@ class MySensor
|
|||||||
protected:
|
protected:
|
||||||
NodeConfig nc; // Essential settings for node to work
|
NodeConfig nc; // Essential settings for node to work
|
||||||
ControllerConfig cc; // Configuration coming from controller
|
ControllerConfig cc; // Configuration coming from controller
|
||||||
#ifdef MY_OTA_FIRMWARE_FEATURE
|
|
||||||
NodeFirmwareConfig fc;
|
|
||||||
bool fwUpdateOngoing;
|
|
||||||
unsigned long fwLastRequestTime;
|
|
||||||
uint16_t fwBlock;
|
|
||||||
uint8_t fwRetry;
|
|
||||||
SPIFlash flash;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool repeaterMode;
|
bool repeaterMode;
|
||||||
bool autoFindParent;
|
bool autoFindParent;
|
||||||
@@ -369,6 +361,14 @@ class MySensor
|
|||||||
uint16_t doSign[16]; // Bitfield indicating which sensors require signed communication
|
uint16_t doSign[16]; // Bitfield indicating which sensors require signed communication
|
||||||
MyMessage msgSign; // Buffer for message to sign.
|
MyMessage msgSign; // Buffer for message to sign.
|
||||||
MySigning& signer;
|
MySigning& signer;
|
||||||
|
#endif
|
||||||
|
#ifdef MY_OTA_FIRMWARE_FEATURE
|
||||||
|
NodeFirmwareConfig fc;
|
||||||
|
bool fwUpdateOngoing;
|
||||||
|
unsigned long fwLastRequestTime;
|
||||||
|
uint16_t fwBlock;
|
||||||
|
uint8_t fwRetry;
|
||||||
|
SPIFlash flash;
|
||||||
#endif
|
#endif
|
||||||
MyHw& hw;
|
MyHw& hw;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user