Rover: replace get_output_norm*100 for throttle with get_output_scaled
No functional change
This commit is contained in:
parent
79f7cc5779
commit
d060fd2826
@ -162,7 +162,7 @@ void Rover::send_servo_out(mavlink_channel_t chan)
|
||||
0, // port 0
|
||||
10000 * channel_steer->norm_output(),
|
||||
0,
|
||||
10000 * SRV_Channels::get_output_norm(SRV_Channel::k_throttle),
|
||||
100 * SRV_Channels::get_output_scaled(SRV_Channel::k_throttle),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@ -179,7 +179,7 @@ void Rover::send_vfr_hud(mavlink_channel_t chan)
|
||||
gps.ground_speed(),
|
||||
ahrs.groundspeed(),
|
||||
(ahrs.yaw_sensor / 100) % 360,
|
||||
static_cast<uint16_t>(100 * fabsf(SRV_Channels::get_output_norm(SRV_Channel::k_throttle))),
|
||||
SRV_Channels::get_output_scaled(SRV_Channel::k_throttle),
|
||||
current_loc.alt / 100.0f,
|
||||
0);
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ void Rover::Log_Write_Nav_Tuning()
|
||||
wp_distance : wp_distance,
|
||||
target_bearing_cd : static_cast<uint16_t>(fabsf(nav_controller->target_bearing_cd())),
|
||||
nav_bearing_cd : static_cast<uint16_t>(fabsf(nav_controller->nav_bearing_cd())),
|
||||
throttle : static_cast<int8_t>(100 * SRV_Channels::get_output_norm(SRV_Channel::k_throttle)),
|
||||
throttle : int8_t(SRV_Channels::get_output_scaled(SRV_Channel::k_throttle)),
|
||||
xtrack_error : nav_controller->crosstrack_error()
|
||||
};
|
||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
@ -336,7 +336,7 @@ void Rover::Log_Write_Sonar()
|
||||
turn_angle : static_cast<int8_t>(obstacle.turn_angle),
|
||||
turn_time : turn_time,
|
||||
ground_speed : static_cast<uint16_t>(fabsf(ground_speed * 100)),
|
||||
throttle : static_cast<int8_t>(100 * SRV_Channels::get_output_norm(SRV_Channel::k_throttle))
|
||||
throttle : int8_t(SRV_Channels::get_output_scaled(SRV_Channel::k_throttle))
|
||||
};
|
||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ void Rover::crash_check()
|
||||
|
||||
if ((ahrs.groundspeed() >= CRASH_CHECK_VEL_MIN) || // Check velocity
|
||||
(fabsf(ahrs.get_gyro().z) >= CRASH_CHECK_VEL_MIN) || // Check turn speed
|
||||
((100 * fabsf(SRV_Channels::get_output_norm(SRV_Channel::k_throttle))) < CRASH_CHECK_THROTTLE_MIN)) {
|
||||
(fabsf(SRV_Channels::get_output_scaled(SRV_Channel::k_throttle)) < CRASH_CHECK_THROTTLE_MIN)) {
|
||||
crash_counter = 0;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user