Commit 674b1aad authored by Sven Greiner's avatar Sven Greiner

Fix #9: Stealth beacon mode

parent 9840b642
......@@ -29,8 +29,9 @@ This firmware is compatible with the driver commonly found in Convoy flashlights
1. Mode memory on or off
1. Freeze on high
1. Start on high
1. Stealth beacon mode
The default is: no strobe, ramping UI, no mode memory, do not freeze on high, start on low
The default is: no strobe, ramping UI, no mode memory, do not freeze on high, start on low, no stealth beacon
### Ramping UI
......
......@@ -101,6 +101,7 @@ typedef union {
unsigned freeze_on_high : 1;
unsigned start_high : 1;
unsigned strobe : 1;
unsigned stealth_beacon : 1;
};
} Options;
......@@ -540,8 +541,10 @@ int main(void) {
case kBeacon:
set_pwm(TURBO_PWM);
blink(2, 3);
set_pwm(BEACON_PWM);
enable_output();
if (!options.stealth_beacon) {
set_pwm(BEACON_PWM);
enable_output();
}
delay_s();
delay_s();
break;
......@@ -570,6 +573,7 @@ int main(void) {
toggle_option(options.raw ^ 0b00000010, flashes++); // Mode memory
toggle_option(options.raw ^ 0b00000100, flashes++); // Freeze on high
toggle_option(options.raw ^ 0b00001000, flashes++); // Start with high
toggle_option(options.raw ^ 0b00100000, flashes++); // Stealth beacon
break;
}
......
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