mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Rover: report left and right wheel control PID
This commit is contained in:
parent
e0fa829665
commit
5aa1286344
@ -227,6 +227,36 @@ void Rover::send_pid_tuning(mavlink_channel_t chan)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// left wheel rate control pid
|
||||||
|
if (g.gcs_pid_mask & 8) {
|
||||||
|
pid_info = &g2.wheel_rate_control.get_pid(0).get_pid_info();
|
||||||
|
mavlink_msg_pid_tuning_send(chan, 7,
|
||||||
|
pid_info->desired,
|
||||||
|
pid_info->actual,
|
||||||
|
pid_info->FF,
|
||||||
|
pid_info->P,
|
||||||
|
pid_info->I,
|
||||||
|
pid_info->D);
|
||||||
|
if (!HAVE_PAYLOAD_SPACE(chan, PID_TUNING)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// right wheel rate control pid
|
||||||
|
if (g.gcs_pid_mask & 16) {
|
||||||
|
pid_info = &g2.wheel_rate_control.get_pid(1).get_pid_info();
|
||||||
|
mavlink_msg_pid_tuning_send(chan, 8,
|
||||||
|
pid_info->desired,
|
||||||
|
pid_info->actual,
|
||||||
|
pid_info->FF,
|
||||||
|
pid_info->P,
|
||||||
|
pid_info->I,
|
||||||
|
pid_info->D);
|
||||||
|
if (!HAVE_PAYLOAD_SPACE(chan, PID_TUNING)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rover::send_fence_status(mavlink_channel_t chan)
|
void Rover::send_fence_status(mavlink_channel_t chan)
|
||||||
|
@ -64,8 +64,8 @@ const AP_Param::Info Rover::var_info[] = {
|
|||||||
// @DisplayName: GCS PID tuning mask
|
// @DisplayName: GCS PID tuning mask
|
||||||
// @Description: bitmask of PIDs to send MAVLink PID_TUNING messages for
|
// @Description: bitmask of PIDs to send MAVLink PID_TUNING messages for
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
// @Values: 0:None,1:Steering,2:Throttle,4:Pitch
|
// @Values: 0:None,1:Steering,2:Throttle,4:Pitch,8:Left Wheel,16:Right Wheel
|
||||||
// @Bitmask: 0:Steering,1:Throttle,2:Pitch
|
// @Bitmask: 0:Steering,1:Throttle,2:Pitch,3:Left Wheel,4:Right Wheel
|
||||||
GSCALAR(gcs_pid_mask, "GCS_PID_MASK", 0),
|
GSCALAR(gcs_pid_mask, "GCS_PID_MASK", 0),
|
||||||
|
|
||||||
// @Param: MAG_ENABLE
|
// @Param: MAG_ENABLE
|
||||||
|
Loading…
Reference in New Issue
Block a user