Commit 90bc2d53 authored by Sven Greiner's avatar Sven Greiner

Fix #13: Blip on ramp ends

Looks and feels great, but requires 20 bytes of flash!
parent 0b3916f7
......@@ -471,16 +471,16 @@ int main(void) {
output += ramping_up ? 1 : -1;
set_level(output);
if (output == RAMP_SIZE - 1) {
if (options.freeze_on_high) {
state = kFrozen;
break;
}
delay_s();
} else {
delay_10ms(RAMP_TIME*100/RAMP_SIZE);
if (output == RAMP_SIZE - 1 && options.freeze_on_high) {
state = kFrozen;
break;
} else if (output == RAMP_SIZE - 1 || output == 0) {
blink(2, FLICKER_TIME);
enable_output();
delay_10ms(50);
}
delay_10ms(RAMP_TIME*100/RAMP_SIZE);
break;
case kFrozen:
......
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