diff --git a/libraries/AP_HAL_QURT/RCOutput.cpp b/libraries/AP_HAL_QURT/RCOutput.cpp index 9ccaef98a5..6b9124fcfa 100644 --- a/libraries/AP_HAL_QURT/RCOutput.cpp +++ b/libraries/AP_HAL_QURT/RCOutput.cpp @@ -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; } diff --git a/libraries/AP_HAL_QURT/RCOutput.h b/libraries/AP_HAL_QURT/RCOutput.h index 2333c39655..3e4075a306 100644 --- a/libraries/AP_HAL_QURT/RCOutput.h +++ b/libraries/AP_HAL_QURT/RCOutput.h @@ -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;