Fix a bug that ZFC active mode isn't set when all magnets demand are 0. #3

Merged
soederqvist_a merged 1 commits from gps-zfc-active-mode-fix into main 2026-11-23 16:59:31 +01:00
1 Commits
Author SHA1 Message Date
soederqvist_a f78f02558a Fix a bug that active mode isn't set when all magnets demand are 0.
set_values[] is a misused variable that is initized to -2.0f.
It is used as a flag in certain parts of the code, and is only updated
if a magnet's demand value is set.

This causes issues when not all magnets have be set during the life
cycle of the frontend. It's supposed to transition ZFC to active mode,
once all magnet's demand values are 0. But if some haven't been set,
they aren't seen as having a 0 value and it's not transitioning ZFC
to active mode.
2026-11-23 13:53:11 +01:00