Commit 853c3a85 authored by Pavel Semerad's avatar Pavel Semerad
Browse files

added key function C3R, channel3 reset

parent 6f4a5df1
......@@ -4,6 +4,7 @@
added DIG mix
added steering speed (Turn, Return)
added inactivity alarm
added function C3R for keys to reset channel3 value to centre
internal changes of trims momentary/opposite_reset
*0.1.0 (2 Jun 2011)
......
......@@ -232,5 +232,6 @@ CHn - switch channel "n" value from one end value to opposite end
selected for this button, then centre 3-pos value will also
be detected and set to servo (but this was not tested yet,
I wouldn't do this modification to my radio).
C3R - channel3 reset value to centre
4WS - switch crab (CRB) no-crab (NOC) for 4 wheel steering
......@@ -399,6 +399,18 @@ static void kf_channel(s16 channel, u8 flags) {
}
}
// reset channel value to 0
static void kf_channel_reset(s16 channel, u8 flags) {
s8 *aval = &menu_channel3_8[channel - 3];
*aval = 0;
if (flags & FF_SHOW) {
lcd_segment(LS_SYM_CHANNEL, LS_ON);
lcd_7seg((u8)channel);
lcd_char_num3(*aval);
}
}
// change 4WS crab/no-crab
static void kf_4ws(s16 unused, u8 flags) {
if (flags & FF_SET) {
......@@ -437,7 +449,8 @@ static const key_functions_s key_functions[] = {
#endif
#endif
#endif
{ 7, "4WS", KF_2STATE, kf_4ws, 0 },
{ 8, "4WS", KF_2STATE, kf_4ws, 0 },
{ 7, "C3R", KF_NONE, kf_channel_reset, 3 },
};
#define KEY_FUNCTIONS_SIZE (sizeof(key_functions) / sizeof(key_functions_s))
......
Supports Markdown
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