application: monitor, make increment overflow safe

This commit is contained in:
King Kévin 2021-05-05 14:54:13 +02:00
parent 9c340c6a41
commit 6bb7e001aa
1 changed files with 1 additions and 1 deletions

View File

@ -496,7 +496,7 @@ static void command_monitor(void* argument)
const bool pin = (port & channel_pins[i]); // get the pin level on which the channel is
if (pin != channels_level[i]) { // data on this channel changed
channel_changed = true; // remember one channel changed
channels_changed[i]++; // remember how many times this channel changed
channels_changed[i] = addu8_safe(channels_changed[i], 1); // remember how many times this channel changed
channels_level[i] = pin; // save new level
}
}