|
|
|
@ -10,6 +10,7 @@ Mode::Mode() :
@@ -10,6 +10,7 @@ Mode::Mode() :
|
|
|
|
|
channel_lateral(rover.channel_lateral), |
|
|
|
|
channel_roll(rover.channel_roll), |
|
|
|
|
channel_pitch(rover.channel_pitch), |
|
|
|
|
channel_walking_height(rover.channel_walking_height), |
|
|
|
|
attitude_control(rover.g2.attitude_control) |
|
|
|
|
{ } |
|
|
|
|
|
|
|
|
@ -189,6 +190,17 @@ void Mode::get_pilot_desired_roll_and_pitch(float &roll_out, float &pitch_out)
@@ -189,6 +190,17 @@ void Mode::get_pilot_desired_roll_and_pitch(float &roll_out, float &pitch_out)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// decode pilot walking_height inputs and return in walking_height_out arguments
|
|
|
|
|
// outputs are in the range -1 to +1
|
|
|
|
|
void Mode::get_pilot_desired_walking_height(float &walking_height_out) |
|
|
|
|
{ |
|
|
|
|
if (channel_walking_height != nullptr) { |
|
|
|
|
walking_height_out = channel_walking_height->norm_input(); |
|
|
|
|
} else { |
|
|
|
|
walking_height_out = 0.0f; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// return heading (in degrees) to target destination (aka waypoint)
|
|
|
|
|
float Mode::wp_bearing() const |
|
|
|
|
{ |
|
|
|
|