Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Semerád Pavel
gt3b
Commits
f14afd7a
Commit
f14afd7a
authored
Apr 11, 2012
by
Pavel Semerad
Browse files
at poweron and steering/throttle not in center, do not show calibrate screen, but beep 3 times
parent
9c201b39
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
f14afd7a
...
...
@@ -4,9 +4,8 @@
PPM length shortened to "NUM_CHANNELS x 2ms + 5ms" to send new data
to receiver as soon as possible
ADC measuring every 1ms, averaging last 4 samples when used
after poweron, if steering or throttle are not in center dead zone,
show calibration screen, because recalibration will be probably
needed
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
inactivity timer compares ADC values with previous ones, so now
it will activate when radio is not center callibrated also
...
...
menu.c
View file @
f14afd7a
...
...
@@ -800,19 +800,24 @@ void menu_init(void) {
menu_key_mapping_prepare
();
// read global config from eeprom, if calibrate values was set to defaults,
// or if actual steering/throttle value is not in dead zone,
// call calibrate
if
(
config_global_read
()
||
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
))
{
menu_calibrate
(
1
);
btnra
();
if
(
config_global_read
())
{
menu_calibrate
(
1
);
btnra
();
reset_inactivity_timer
();
}
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
);
}
else
if
(
cg
.
poweron_beep
)
beep
(
30
);
apply_global_config
();
reset_inactivity_timer
();
// read model config from eeprom, but not awake CALC yet
menu_load_model
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment