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
b06ad82b
Commit
b06ad82b
authored
May 15, 2012
by
Pavel Semerad
Browse files
add buttons LOCK until ENTER-long to global menu
parent
3833b620
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
b06ad82b
...
...
@@ -3,6 +3,7 @@
added extra brake channel for throttle brake side
repaired steering/throttle/channel speed to not beeing dependent
on ppm frame length
added buttons LOCK until ENTER-long to global menu
*0.6.0 (28 Apr 2012)
increased model memories by using FLASH also
...
...
MANUAL.txt
View file @
b06ad82b
...
...
@@ -34,7 +34,7 @@ Flashing firmware
Global characteristics:
=======================
- 6
5
model memories, first 8 in EEPROM, rest in FLASH
- 6
3
model memories, first 8 in EEPROM, rest in FLASH
> numbers 10-19 will show with Right-Arrow
> numbers 20-29 will show with Left-Arrow
> numbers 30-39 will show with Left+Right-Arrows
...
...
@@ -360,6 +360,7 @@ Global setup menu:
r global or all models reset
all configs (global+model) G_N/G_Y (No/Yes)
all models M_N/M_Y (No/Yes
o lock keys till ENTER-long No/Yes
...
...
menu_global.c
View file @
b06ad82b
...
...
@@ -379,6 +379,24 @@ static void gs_config_reset(u8 action) {
}
// lock keys till ENTER-long
static
void
gs_lock
(
u8
action
)
{
// change value
if
(
action
==
MLA_CHG
)
menu_tmp_flag
^=
1
;
// select next value, do lock when flag is set
else
if
(
action
==
MLA_NEXT
&&
menu_tmp_flag
)
{
menu_set
=
255
;
// flag to exit menu
return
;
}
// show value
lcd_7seg
(
L7_O
);
lcd_chars
(
menu_tmp_flag
?
"YES"
:
"NO "
);
}
...
...
@@ -396,11 +414,13 @@ static const menu_list_t gs_config[] = {
gs_long_press_delay
,
gs_hardware
,
gs_config_reset
,
gs_lock
,
};
#define GS_CONFIG_SIZE (sizeof(gs_config) / sizeof(u8 *))
void
menu_global_setup
(
void
)
{
menu_tmp_flag
=
0
;
// cleanup screen and disable possible low bat warning
buzzer_off
();
key_beep
();
...
...
@@ -422,5 +442,16 @@ void menu_global_setup(void) {
config_global_save
();
apply_global_config
();
btnra
();
// if LOCK was selected, wait for ENTER-long to continue
if
(
menu_set
==
255
)
{
lcd_chars
(
"LCK"
);
lcd_chars_blink
(
LB_SPC
);
do
{
btnra
();
menu_stop
();
}
while
(
!
btnl
(
BTN_ENTER
));
buzzer_on
(
60
,
0
,
1
);
}
}
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