Some improvements.
This commit is contained in:
@@ -8,6 +8,24 @@
|
||||
#include "NotificationLEDs.h"
|
||||
|
||||
|
||||
template<
|
||||
uint8_t _tpin,
|
||||
uint8_t _trgbwId,
|
||||
uint8_t _tdimmerId,
|
||||
uint8_t _tpowerSwitchId,
|
||||
uint8_t _tcommandId,
|
||||
uint16_t _tpixelCount,
|
||||
unsigned long _msgSendInterval
|
||||
> void NotificationLEDs<_tpin, _trgbwId, _tdimmerId, _tpowerSwitchId, _tcommandId, _tpixelCount, _msgSendInterval>
|
||||
::analogClock_setup() noexcept {
|
||||
_eeprom_NotificationLEDs_StatusTable statusTable;
|
||||
statusTable.data = loadState(EEPROM_POS_STATUSTABLE);
|
||||
if (statusTable.status.hourOffset == 1) {
|
||||
sceneData.analogClock.hourOffset = (int8_t)loadState(EEPROM_POS_HOUROFFSET);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<
|
||||
uint8_t _tpin,
|
||||
uint8_t _trgbwId,
|
||||
@@ -22,6 +40,11 @@ template<
|
||||
if (token && token[0] != ' ') {
|
||||
auto offset = atoi(token);
|
||||
sceneData.analogClock.hourOffset = offset;
|
||||
_eeprom_NotificationLEDs_StatusTable statusTable;
|
||||
statusTable.data = loadState(EEPROM_POS_STATUSTABLE);
|
||||
statusTable.status.hourOffset = 1;
|
||||
saveState(EEPROM_POS_HOUROFFSET, offset);
|
||||
saveState(EEPROM_POS_STATUSTABLE, statusTable.data);
|
||||
}
|
||||
token = strtok(NULL, _configDelims);
|
||||
if (token && token[0] != ' ') {
|
||||
|
||||
Reference in New Issue
Block a user