atc1441 / E-Paper_Pricetags

GNU General Public License v3.0
231 stars 40 forks source link

Getting WakeUp during activation / resync counter #37

Closed xsrf closed 3 years ago

xsrf commented 3 years ago

Hey, it sometimes switches into WakeUp mode during activation of the Chroma29 ESLs. I guess this is because you're switching to sync/idle mode during activation on the activation channel and resync_start_counter may just kick in and mess with the activation, switching to WakeUp. I guess adding a check in mode_idle.h would help

    if (resync_start_counter >= get_rounds_to_resync() && !get_last_to_short()  && !get_trans_mode())

But I'm wondering if it wouldn't be better to put the resync counter into a global scope and make sure it only triggers a resync after it was in sync/idle mode for the required intervals and reset it completely whenever an other mode is active?

atc1441 commented 3 years ago

Yes the counter should be better in main_variables and check for further states before going into wakeup mode

xsrf commented 3 years ago

Actually, checking additional states wouldn't be required if modes other than sync+idle would just reset the counter.