Commit a90e4b0e authored by Pavel Semerad's avatar Pavel Semerad
Browse files

poweron beep setting is common for not-centered poweron also

parent a89d4e1c
......@@ -7,9 +7,9 @@
steering/throttle to PPM signal delay
ADC measuring every 1ms, averaging last 4 samples when used,
globally settable to use last 4/1 values
at poweron, if steering or throttle are not in center dead zone,
beep 3 times
added poweron beep, can be set ON/OFF in global config
at poweron, if steering or throttle are not in center dead zone,
beep 3 times if poweron beep is allowed
inactivity timer compares ADC values with previous ones, so now
it will activate when radio is not center callibrated also
added key function BLS to shutup battery low beeper, by default is
......
......@@ -33,7 +33,7 @@ Global characteristics:
- calibrate menu will be automatically invoked after first power-on with
this firmware, so 6 menu items will start to blink
- when radio is powered on with steering/throttle not in dead center,
it beeps 3 times
it beeps 3 times if poweron beep is allowed
Buttons:
......@@ -231,6 +231,8 @@ Global setup menu:
b key beep OFF/ON
C center/reset beep OFF/ON
P poweron beep OFF/ON
also includes warning when steering/throttle are not
centered at poweron
d long press key delay 100...1000 miliseconds
r + ALL global reset - change to YES to set global configuration
and all models to default values
......
......@@ -805,14 +805,16 @@ void menu_init(void) {
else {
apply_global_config();
reset_inactivity_timer();
// if actual steering/throttle value is not in dead zone, beep 3 times
if (adc_steering_last < (cg.calib_steering_mid - cg.steering_dead_zone) ||
adc_steering_last > (cg.calib_steering_mid + cg.steering_dead_zone) ||
adc_throttle_last < (cg.calib_throttle_mid - cg.throttle_dead_zone) ||
adc_throttle_last > (cg.calib_throttle_mid + cg.throttle_dead_zone))
buzzer_on(30, 30, 3);
// else beep 1 times when allowed
else if (cg.poweron_beep) beep(30);
if (cg.poweron_beep) {
// if actual steering/throttle value is not in dead zone, beep 3 times
if (adc_steering_last < (cg.calib_steering_mid - cg.steering_dead_zone) ||
adc_steering_last > (cg.calib_steering_mid + cg.steering_dead_zone) ||
adc_throttle_last < (cg.calib_throttle_mid - cg.throttle_dead_zone) ||
adc_throttle_last > (cg.calib_throttle_mid + cg.throttle_dead_zone))
buzzer_on(30, 30, 3);
// else beep 1 times
else beep(30);
}
}
// read model config from eeprom
......
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