fix set_sleepcycle

This commit is contained in:
cyberman54 committed 2022-02-28 12:50:57 +01:00
1 parent d35a5c6708
commit 1bcec45f92
1 file changed
+1 -4
+1 -4
View File
@@ -84,10 +84,7 @@ void set_sendcycle(uint8_t val[]) {
void set_sleepcycle(uint8_t val[]) {
// swap byte order from msb to lsb, note: this is a platform dependent hack
uint16_t t = __builtin_bswap16(*(uint16_t *)(val));
if (t == 0)
return;
cfg.sleepcycle = t;
cfg.sleepcycle = __builtin_bswap16(*(uint16_t *)(val));
ESP_LOGI(TAG, "Remote command: set sleep cycle to %d seconds",
cfg.sleepcycle * 10);
}