ManualControlSelector: add parentheses in condition for clarity

This commit is contained in:
Matthias Grob 2023-05-10 19:00:50 +02:00
parent b19b0d0163
commit 877f37d79e
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ void ManualControlSelector::updateWithNewInputSample(uint64_t now, const manual_
// First check if the chosen input got invalid, so it can get replaced
updateValidityOfChosenInput(now);
const bool update_existing_input = _setpoint.valid && input.data_source == _setpoint.data_source;
const bool update_existing_input = _setpoint.valid && (input.data_source == _setpoint.data_source);
const bool start_using_new_input = !_setpoint.valid;
// Switch to new input if it's valid and we don't already have a valid one