fix issue #859
This commit is contained in:
parent
7f6cea2e02
commit
2ca6bbde33
@ -85,8 +85,6 @@ void set_sendcycle(uint8_t val[]) {
|
|||||||
void set_sleepcycle(uint8_t val[]) {
|
void set_sleepcycle(uint8_t val[]) {
|
||||||
// swap byte order from msb to lsb, note: this is a platform dependent hack
|
// swap byte order from msb to lsb, note: this is a platform dependent hack
|
||||||
uint16_t t = __builtin_bswap16(*(uint16_t *)(val));
|
uint16_t t = __builtin_bswap16(*(uint16_t *)(val));
|
||||||
if (t == 0)
|
|
||||||
return;
|
|
||||||
cfg.sleepcycle = t;
|
cfg.sleepcycle = t;
|
||||||
ESP_LOGI(TAG, "Remote command: set sleep cycle to %d seconds",
|
ESP_LOGI(TAG, "Remote command: set sleep cycle to %d seconds",
|
||||||
cfg.sleepcycle * 10);
|
cfg.sleepcycle * 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user