How to save a constant updating value

Perhaps, if you know the bike is moving fast enough to make turn detection difficult, you could simply cancel the indicators after a set time on the basis that at high speed you rarely need to signal for longer than a few seconds.

And that's exactly what manufacturers that supply self cancelling turn signals do. The turn signals on my trike quit blinking after I make a turn, and it doesn't lean at all.

How long the turn signals blink is really a matter of distance. Sitting at a light, the lights will blink forever. Start moving, after the turn, and they shut off quickly. The distance is determined based on the speed when the signal is activated. Starting blinking at a slow speed, the blinking stops quickly. Start blinking at 70 mph, they blink for a lot longer.