revk / ESP32-RevK

My tools for ESP32 projects under ESP-IDF
GNU General Public License v3.0
7 stars 6 forks source link

revk_blink() call #29

Closed Sonic-Amiga closed 9 months ago

Sonic-Amiga commented 9 months ago

I have migrated my 8266 port to the recent RevK lib and found something that looks weird. My board only has one LED and previously it always displayed wi-fi link status: fast blinking (no connection) or slow blinking (OK). Now i see that the LED turns on and off according to AC status being set. I've traced this down to this line in the code:

revk_blink (0, 0, loopback ? "RGB" : !daikin.online ? "M" : dark ? "" : !daikin.power ? "" : daikin.mode == 0 ? "O" : daikin.mode == 7 ? "C" : daikin.heat ? "R" : "B");       // FHCA456D

I see you rewrote the blinker. It now seems not to ignore "colors" argument; and in case of one LED it apparently takes any color as ON and "" as OFF. So, now when the AC is turned off (daikin.power == 0) the LED also goes black.

Is it intentional behavior or some overlook ? I've got used to use the LED as a heartbeat; and having it turned off feels eery.

I've checked your upstream code; the logic is the same there; so with your single-LED new board you're going to observe the same phenomenon.

revk commented 9 months ago

That is a good point, probably better to have a colour there (just blinking in your case), and only be off for the dark mode... maybe yellow...

revk commented 9 months ago

OK changed to yellow.