mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_Hott_Telem: add and use AP_RPM_ENABLED
This commit is contained in:
parent
e596f7ce83
commit
bcf03eb01d
@ -148,11 +148,13 @@ void AP_Hott_Telem::send_EAM(void)
|
|||||||
msg.climbrate = uint16_t(30000.5 + vel.z * -100);
|
msg.climbrate = uint16_t(30000.5 + vel.z * -100);
|
||||||
msg.climbrate3s = 120 + vel.z * -3;
|
msg.climbrate3s = 120 + vel.z * -3;
|
||||||
|
|
||||||
|
#if AP_RPM_ENABLED
|
||||||
const AP_RPM *rpm = AP::rpm();
|
const AP_RPM *rpm = AP::rpm();
|
||||||
float rpm_value;
|
float rpm_value;
|
||||||
if (rpm && rpm->get_rpm(0, rpm_value)) {
|
if (rpm && rpm->get_rpm(0, rpm_value)) {
|
||||||
msg.rpm = rpm_value * 0.1;
|
msg.rpm = rpm_value * 0.1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
AP_Stats *stats = AP::stats();
|
AP_Stats *stats = AP::stats();
|
||||||
if (stats) {
|
if (stats) {
|
||||||
|
Loading…
Reference in New Issue
Block a user