Browse Source

AP_IOMCU: support RSSI from receiver

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
63c199a600
  1. 5
      libraries/AP_IOMCU/AP_IOMCU.h
  2. 1
      libraries/AP_IOMCU/iofirmware/iofirmware.cpp
  3. 1
      libraries/AP_IOMCU/iofirmware/ioprotocol.h

5
libraries/AP_IOMCU/AP_IOMCU.h

@ -71,6 +71,11 @@ public: @@ -71,6 +71,11 @@ public:
// get the name of the RC protocol
const char *get_rc_protocol(void);
// get receiver RSSI
int16_t get_RSSI(void) const {
return rc_input.rssi;
}
/*
get servo rail voltage
*/

1
libraries/AP_IOMCU/iofirmware/iofirmware.cpp

@ -306,6 +306,7 @@ void AP_IOMCU_FW::rcin_update() @@ -306,6 +306,7 @@ void AP_IOMCU_FW::rcin_update()
}
rc_last_input_ms = last_ms;
rc_input.rc_protocol = (uint16_t)AP::RC().protocol_detected();
rc_input.rssi = AP::RC().get_RSSI();
} else if (last_ms - rc_last_input_ms > 200U) {
rc_input.flags_rc_ok = false;
}

1
libraries/AP_IOMCU/iofirmware/ioprotocol.h

@ -123,6 +123,7 @@ struct page_rc_input { @@ -123,6 +123,7 @@ struct page_rc_input {
uint8_t flags_rc_ok:1;
uint8_t rc_protocol;
uint16_t pwm[IOMCU_MAX_CHANNELS];
int16_t rssi;
};
/*

Loading…
Cancel
Save