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
f09f9c90
Commit
f09f9c90
authored
May 13, 2012
by
Pavel Semerad
Browse files
add extra brake channel for throttle brake side
parent
cd2d15df
Changes
7
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
f09f9c90
*0.6.1 ()
repaired ABS to use cycle length same as before PPM frame length changes
added extra brake channel for throttle brake side
*0.6.0 (28 Apr 2012)
increased model memories by using FLASH also
...
...
MANUAL.txt
View file @
f09f9c90
...
...
@@ -34,7 +34,7 @@ Flashing firmware
Global characteristics:
=======================
- 6
7
model memories, first 8 in EEPROM, rest in FLASH
- 6
5
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
...
...
@@ -133,11 +133,12 @@ Standard menu:
> select channel and press ENTER
> select value in range -100..100 and press enter
- mixes 4WS, DIG, throttle brake cut-off (for boats with forward-only
throttle), Multi-Position (to set arbitrary up to 8 positions)
throttle), Multi-Position (to set arbitrary up to 8 positions),
brake channel (to send brake side of throttle to extra channel)
> choose menu EPOINT and press ENTER-long
> menu EPOINT will blink
> select one of mixes 4WS (4), DIG (d), brake cut-off (b),
multi-position (P)
multi-position (P)
, brake channel (8)
for mixes 4WS, DIG:
> press ENTER and choose channel for this mix or OFF
- for dual-ESC steering (boat, tank, ...) select DIG channel 1 and
...
...
@@ -157,7 +158,9 @@ Standard menu:
> press ENTER and set channel value for second position or END
> ... up to eight position
for brake cut-off:
> set OFF or CUT
> press ENTER and choose OFF or CUT
for brake channel:
> press ENTER and choose channel fro brake or OFF
- Key mapping specific for each model:
> choose menu REV and press ENTER-long
> menu REV will blink
...
...
calc.c
View file @
f09f9c90
...
...
@@ -376,7 +376,6 @@ static void calc_loop(void) {
cg
.
calib_throttle_mid
<<
ADC_OVS_SHIFT
,
cg
.
calib_throttle_bck
<<
ADC_OVS_SHIFT
,
cg
.
throttle_dead_zone
<<
ADC_OVS_SHIFT
);
if
(
cm
.
brake_off
&&
val
>
0
)
val
=
0
;
// throttle brake cut off
val
=
expo
(
val
,
(
u8
)(
val
<
0
?
cm
.
expo_forward
:
cm
.
expo_back
));
if
(
cm
.
abs_type
)
{
// apply selected ABS
...
...
@@ -403,6 +402,16 @@ static void calc_loop(void) {
}
}
val
=
dualrate
(
val
,
(
u8
)(
val
<
0
?
cm
.
dr_forward
:
cm
.
dr_back
));
// brake to extra channel
if
(
cm
.
channel_brake
)
{
val2
=
val
;
if
(
val2
<
0
)
val2
=
0
;
// eliminate forward
val2
=
val2
*
2
-
PPM
(
500
);
// to whole servo range
channel_params
(
cm
.
channel_brake
,
channel_speed
(
val2
,
cm
.
channel_brake
));
}
// throttle brake cut off
if
(
cm
.
brake_off
&&
val
>
0
)
val
=
0
;
// set to servo
if
(
!
cm
.
channel_DIG
)
{
if
(
cm
.
brake_off
)
val
=
val
*
2
+
PPM
(
500
);
channel_params
(
2
,
channel_speed
(
val
,
2
));
...
...
config.c
View file @
f09f9c90
...
...
@@ -143,6 +143,7 @@ void config_model_set_default(void) {
cm
.
channel_4WS
=
0
;
cm
.
channel_DIG
=
0
;
cm
.
channel_brake
=
0
;
cm
.
channel_MP0
=
0
;
memset
(
cm
.
multi_position0
,
(
u8
)
MULTI_POSITION_END
,
sizeof
(
cm
.
multi_position0
));
...
...
@@ -165,6 +166,7 @@ void config_model_set_default(void) {
cm
.
unused
=
0
;
cm
.
unused2
=
0
;
cm
.
unused3
=
0
;
memset
(
cm
.
reserve
,
0
,
sizeof
(
cm
.
reserve
));
}
...
...
config.h
View file @
f09f9c90
...
...
@@ -180,7 +180,10 @@ typedef struct {
u8
abs_type
:
2
;
u8
unused
:
1
;
u16
unused2
;
u8
channel_brake
:
4
;
// channel for brake side of throttle
u8
unused2
:
4
;
u8
unused3
;
config_key_mapping_s
key_mapping
;
...
...
menu_common.c
View file @
f09f9c90
...
...
@@ -63,6 +63,8 @@ void apply_model_config(void) {
menu_channels_mixed
|=
(
u8
)(
1
<<
(
u8
)(
cm
.
channel_4WS
-
1
));
if
(
cm
.
channel_DIG
)
menu_channels_mixed
|=
(
u8
)(
1
<<
(
u8
)(
cm
.
channel_DIG
-
1
));
if
(
cm
.
channel_brake
)
menu_channels_mixed
|=
(
u8
)(
1
<<
(
u8
)(
cm
.
channel_brake
-
1
));
// set autorepeat
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
menu_mix.c
View file @
f09f9c90
...
...
@@ -240,6 +240,25 @@ static void mix_brake_off(u8 action) {
}
static
void
mix_brake_channel
(
u8
action
)
{
u8
val
=
cm
.
channel_brake
;
if
(
action
==
MLA_CHG
)
{
// channel number/off
if
(
!
val
)
val
=
2
;
val
=
(
u8
)
menu_change_val
(
val
,
2
,
channels
,
1
,
1
);
if
(
val
==
2
)
val
=
0
;
cm
.
channel_brake
=
val
;
}
// show value
lcd_7seg
(
8
);
lcd_segment
(
LS_SYM_CHANNEL
,
LS_ON
);
// channel number/OFF
if
(
!
val
)
lcd_chars
(
"OFF"
);
else
lcd_char_num3
(
val
);
}
...
...
@@ -252,6 +271,7 @@ static const menu_list_t mix_funcs[] = {
mix_MultiPosition
,
mix_MultiPosition
,
mix_brake_off
,
mix_brake_channel
,
};
...
...
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