Files
brnQuanFW/app/app.c
Juan Antonio 6f1cabc807 Simplify gSchedulePowerSave logic
There was quite convoluted logic there, and what I believe, was a bug.

Rationale:

Both,
- gBatterySaveCountdown_10ms = battery_save_count_10ms;, and
- gSchedulePowerSave = false
are always executed inside FUNCTION_Select().

So the code is equivalent to:

if (any of those OR'd) {
	gBatterySaveCountdown_10ms = battery_save_count_10ms;
	gSchedulePowerSave = false; (but only if we have NOAA disabled)
} else {
	[other stuff from FUNCTION_Select()]
	gBatterySaveCountdown_10ms = battery_save_count_10ms;
	gSchedulePowerSave = false; (regarless of having NOAA or not)
}

So:
- OR is true, have NOAA-> don't clear gSchedulePowerSave
	-> implies we will enter here, again, until the OR is false, but only if we have NOAA.
- OR is False -> clear gSchedulePowerSave.

Moreover, checking with DualTachyon code at
6f8afac886/app/app.c (L747)
gSchedulePowerSave is always set to false if it was true.
2023-12-24 13:34:05 +01:00

44 KiB