Sorry for the extraneous information about the ifdef. The important part was whether adding this extra check would fix the bug in the same way as deleting the original line did.
I can’t find where arg should be equals to 0… steady_state always call with arg <> 0
From what I could assume in the comments, this refers to the very first state in that steady-state (“first frame”) right when you have done 4H. Then it sets the current level to the appropriate turbo (set_level_and_therm_target
).
Your bug would be that it never set the level to turbo because it never executed set_level_and_therm_target
because ! arg
evaluates to false.
Your bug fix was to delete the check, but that means that every instant it will keep trying to set the level to turbo instead of just setting it during the first frame and then maintaining the steady-state.
My potential fix was to add something so that the statement if (! arg) || (! channel_has_args(cfg.channel_mode)
would evaluate to true during the first frame so it can then call set_level_and_therm_target
exactly once.
@SammysHP@feddit.de (if you have a moment) does this seem close to the mark?