drained: handle missed "changing" events#4188
drained: handle missed "changing" events#4188bobrippling wants to merge 1 commit intoespruino:masterfrom
Conversation
|
Does this mean something is broken in the event handling somewhere? I mean, why would we be missing to set the interval in the 'charging'-listener? |
|
We also discussed some weird event listener behavior on #4141. Could this be something similar? |
|
Good memory! I would initially say no, and that drained just starts too late but that can't be the case - drained is running when I plug my watch in to charge 🤔 It could well be something with the firmware, like #4141. I'll see if I can get more details |
|
@bobrippling I'm thinking of opening an issue re event handling on espruino/Espruino. Have you managed to understand the problem any more? |
|
I'm afraid not - still at square one! |
|
There is one specific case i found with version 0.08 of drained where if it's started while the watch is charging, it will not deactivate when crossing the threshold until a new charging event happens by reconnecting the charger. |
Sometimes my watch will change (with
drainedactive) past the threshold and not deactivatedrained. On debugging, the interval isn't set, so we set it unconditionally to ensure we have a charge "watcher".