Commit aa05164e authored by Sven Greiner's avatar Sven Greiner

Remove moonlight mode (again)

It doesn't make lot of sense as it is not much lower than the normal
low, but requires 14 bytes of flash. It also conflicted with the strobe
mode. A similar mode can be achieved by setting "start on low".
parent 90bc2d53
......@@ -14,7 +14,6 @@ This firmware is compatible with the driver commonly found in Convoy flashlights
- Start at high: after the flashlight was off, start with the highest output (and go from high to low)
- Beacon mode: low background light with regular flashes
- Tactical strobe: if enabled, always start with fast strobe mode
- Moonlight mode: if enabled, always start with moonlight mode
- Runtime configuration: options can be toggled via configuration menu
......@@ -26,7 +25,6 @@ This firmware is compatible with the driver commonly found in Convoy flashlights
1. Shortly tap the switch 10+ times, the light will turn off
1. The light starts counting via flashes, each group followed by a short burst of flashes. Turn off the light during the burst to toggle the option. Options are:
1. Start with strobe
1. Start with moonlight
1. Ramping or fixed levels
1. Mode memory on or off
1. Freeze on high
......@@ -34,7 +32,7 @@ This firmware is compatible with the driver commonly found in Convoy flashlights
1. Stealth beacon mode
1. Slow beacon mode
The default is: no strobe, no moonlight, ramping UI, no mode memory, do not freeze on high, start on low, no stealth beacon, no slow beacon
The default is: no strobe, ramping UI, no mode memory, do not freeze on high, start on low, no stealth beacon, no slow beacon
### Ramping UI
......@@ -86,15 +84,6 @@ If users want a strobe mode, they usually want it for defence purposes. Thus it
If strobe is enabled in the preferences, the flashlight always starts in a fast strobe mode. Then a single press of the power switch enters normal flashlight mode.
### Moonlight mode
It is the same as with the strobe mode: If users want a moonlight mode, they usually want it as the first mode.
If moonlight is enabled in the preferences, the flashlight always starts with a moonlight level. Then a single press of the power switch enters normal flashlight mode.
It should be obvious that strobe and moonlight modes are mutually exclusive. The strobe mode takes precedence if both options are enabled.
### Low voltage protection
If the voltage is below 3.2 V the flashlight will flicker for half a second every 15 seconds. If the voltage is below 2.7 V the light will turn off and flash regularly to notify the operator that the light is still turned on but the battery is empty.
......
......@@ -97,13 +97,13 @@ typedef union {
uint8_t raw;
struct {
unsigned strobe : 1;
unsigned moonlight : 1;
unsigned fixed_mode : 1;
unsigned mode_memory : 1;
unsigned freeze_on_high : 1;
unsigned start_high : 1;
unsigned stealth_beacon : 1;
unsigned slow_beacon : 1;
unsigned unused : 1;
};
} Options;
......@@ -376,7 +376,7 @@ int main(void) {
if (coldboot) { // Initialize state after the flashlight was switched off for some time
#ifdef OVERTURE
state = (options.strobe || options.moonlight) ? kOverture : kDefault;
state = options.strobe ? kOverture : kDefault;
#else
state = kDefault;
#endif // ifdef OVERTURE
......@@ -533,14 +533,9 @@ int main(void) {
#ifdef OVERTURE
case kOverture:
if (options.strobe) {
set_pwm(TURBO_PWM);
blink(4,2);
blink(4,3);
} else { // Only possibility if we have entered this state
set_pwm(1);
enable_output();
}
set_pwm(TURBO_PWM);
blink(4,2);
blink(4,3);
break;
#endif // ifdef OVERTURE
......
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