OpenCollarTeam / OpenCollar

Other
123 stars 128 forks source link

g_iAwayCounter clearing restrictions when nothing has changed #1110

Closed NikkiLacrima closed 1 month ago

NikkiLacrima commented 1 month ago

When leasher is away, realleash keeps spamming the collar with messages every 10 seconds when nothing has changed.

Technically when leasher is away we call ApplyRestrictions() and set g_iAwayCounter to -1. We dont need to call ApplyRestrictions() again until leasher is in range, and g_iAwayCounter set larger than 0.

Change should not be noticalbe to wearer, just test that leasher detection works correctly.