mirror of https://github.com/ArduPilot/ardupilot
Sub: add method to get throttle channel control_in, while applying
deadzone to center like angle type channels
This commit is contained in:
parent
7e7e53f517
commit
0b0cda02cc
|
@ -128,6 +128,11 @@ void Sub::set_throttle_takeoff()
|
||||||
pos_control.init_takeoff();
|
pos_control.init_takeoff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int16_t Sub::get_throttle_control_dz()
|
||||||
|
{
|
||||||
|
return (channel_throttle->pwm_to_angle() + 1000)/2;
|
||||||
|
}
|
||||||
|
|
||||||
// get_pilot_desired_throttle - transform pilot's throttle input to make cruise throttle mid stick
|
// get_pilot_desired_throttle - transform pilot's throttle input to make cruise throttle mid stick
|
||||||
// used only for manual throttle modes
|
// used only for manual throttle modes
|
||||||
// returns throttle output 0 to 1000
|
// returns throttle output 0 to 1000
|
||||||
|
|
|
@ -1056,6 +1056,7 @@ private:
|
||||||
void auto_terrain_recover_run(void);
|
void auto_terrain_recover_run(void);
|
||||||
|
|
||||||
void translate_wpnav_rp(float &lateral_out, float &forward_out);
|
void translate_wpnav_rp(float &lateral_out, float &forward_out);
|
||||||
|
int16_t get_throttle_control_dz();
|
||||||
|
|
||||||
bool surface_init(bool ignore_flags);
|
bool surface_init(bool ignore_flags);
|
||||||
void surface_run();
|
void surface_run();
|
||||||
|
|
Loading…
Reference in New Issue