Browse Source

AP_BLHeli: check for rcout serial support

don't build AP_BLHeli on HALs that can't support serial output to ESCs
mission-4.1.18
Andrew Tridgell 7 years ago
parent
commit
fde092a246
  1. 13
      libraries/AP_BLHeli/AP_BLHeli.cpp
  2. 6
      libraries/AP_BLHeli/AP_BLHeli.h

13
libraries/AP_BLHeli/AP_BLHeli.cpp

@ -20,6 +20,9 @@ @@ -20,6 +20,9 @@
*/
#include "AP_BLHeli.h"
#if HAL_SUPPORT_RCOUT_SERIAL
#include <AP_Math/crc.h>
#include <AP_Motors/AP_Motors_Class.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
@ -1114,3 +1117,13 @@ void AP_BLHeli::update(void) @@ -1114,3 +1117,13 @@ void AP_BLHeli::update(void)
}
debug("ESC: mapped %u motors with mask 0x%04x", num_motors, mask);
}
/*
update BLHeli telemetry handling
This is called on push() in SRV_Channels
*/
void AP_BLHeli::update_telemetry(void)
{
}
#endif // HAL_SUPPORT_RCOUT_SERIAL

6
libraries/AP_BLHeli/AP_BLHeli.h

@ -23,6 +23,9 @@ @@ -23,6 +23,9 @@
#include <AP_Common/AP_Common.h>
#include <AP_HAL/AP_HAL.h>
#if HAL_SUPPORT_RCOUT_SERIAL
#include <AP_Param/AP_Param.h>
#include "msp_protocol.h"
#include "blheli_4way_protocol.h"
@ -33,6 +36,7 @@ public: @@ -33,6 +36,7 @@ public:
AP_BLHeli();
void update(void);
void update_telemetry(void);
bool process_input(uint8_t b);
static const struct AP_Param::GroupInfo var_info[];
@ -216,3 +220,5 @@ private: @@ -216,3 +220,5 @@ private:
#ifndef UDID_START
#define UDID_START 0x1FFF7A10
#endif
#endif // HAL_SUPPORT_RCOUT_SERIAL

Loading…
Cancel
Save