mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
Copter: move sending of RPM message up
This commit is contained in:
parent
fb5532356a
commit
85d9dd6f64
@ -707,7 +707,6 @@ private:
|
||||
|
||||
// GCS_Mavlink.cpp
|
||||
void gcs_send_heartbeat(void);
|
||||
void send_rpm(mavlink_channel_t chan);
|
||||
|
||||
// heli.cpp
|
||||
void heli_init();
|
||||
|
@ -142,21 +142,6 @@ int16_t GCS_MAVLINK_Copter::vfr_hud_throttle() const
|
||||
return (int16_t)(copter.motors->get_throttle() * 100);
|
||||
}
|
||||
|
||||
/*
|
||||
send RPM packet
|
||||
*/
|
||||
void NOINLINE Copter::send_rpm(mavlink_channel_t chan)
|
||||
{
|
||||
#if RPM_ENABLED == ENABLED
|
||||
if (rpm_sensor.enabled(0) || rpm_sensor.enabled(1)) {
|
||||
mavlink_msg_rpm_send(
|
||||
chan,
|
||||
rpm_sensor.get_rpm(0),
|
||||
rpm_sensor.get_rpm(1));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
send PID tuning message
|
||||
*/
|
||||
@ -247,13 +232,6 @@ bool GCS_MAVLINK_Copter::try_send_message(enum ap_message id)
|
||||
|
||||
switch(id) {
|
||||
|
||||
case MSG_RPM:
|
||||
#if RPM_ENABLED == ENABLED
|
||||
CHECK_PAYLOAD_SIZE(RPM);
|
||||
copter.send_rpm(chan);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case MSG_TERRAIN:
|
||||
#if AP_TERRAIN_AVAILABLE && AC_TERRAIN
|
||||
CHECK_PAYLOAD_SIZE(TERRAIN_REQUEST);
|
||||
|
Loading…
Reference in New Issue
Block a user