Commit db85fe4f authored by Sven Greiner's avatar Sven Greiner

Optimize condition

This saves 8 byte.
parent 4f5becbd
......@@ -490,12 +490,11 @@ int main(void) {
output += ramping_up ? 1 : -1;
set_level(output);
if (options.freeze_on_high && output == RAMP_SIZE) {
state = kFrozen;
break;
}
if (output == RAMP_SIZE) {
if (options.freeze_on_high) {
state = kFrozen;
break;
}
delay_s();
} else {
delay_10ms(RAMP_TIME*100/RAMP_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment