mirror of https://github.com/ArduPilot/ardupilot
HAL_QURT: remove ESC order mapping
this is not consistent between ModalAI vehicles, so best done with SERVOn_FUNCTION parameters
This commit is contained in:
parent
8260648a66
commit
a7363d4c14
|
@ -117,7 +117,7 @@ void RCOutput::send_receive(void)
|
|||
int16_t data[5] {};
|
||||
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
data[esc_map[i]] = pwm_to_esc(period[i]);
|
||||
data[i] = pwm_to_esc(period[i]);
|
||||
}
|
||||
|
||||
need_write = false;
|
||||
|
@ -140,7 +140,7 @@ void RCOutput::send_receive(void)
|
|||
*/
|
||||
void RCOutput::handle_esc_feedback(const struct esc_response_v2 &pkt)
|
||||
{
|
||||
const uint8_t idx = esc_map_rev[pkt.id_state>>4];
|
||||
const uint8_t idx = pkt.id_state>>4;
|
||||
if (idx >= ARRAY_SIZE(period)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -56,10 +56,6 @@ private:
|
|||
void handle_esc_feedback(const struct esc_response_v2 &pkt);
|
||||
void handle_power_status(const struct esc_power_status &pkt);
|
||||
|
||||
// order is RL, FL, FR, RR, map to X frame
|
||||
const uint8_t esc_map[4] {2, 0, 1, 3};
|
||||
const uint8_t esc_map_rev[4] {1, 2, 0, 3};
|
||||
|
||||
int fd = -1;
|
||||
uint16_t enable_mask;
|
||||
static const uint8_t channel_count = 4;
|
||||
|
|
Loading…
Reference in New Issue