AP_Periph: update notify state decode to use current dsdlc code

This commit is contained in:
bugobliterator 2021-09-30 11:51:34 +05:30 committed by Andrew Tridgell
parent 6b44bc3e4c
commit f74550bce5

View File

@ -783,9 +783,7 @@ static void handle_act_command(CanardInstance* ins, CanardRxTransfer* transfer)
static void handle_notify_state(CanardInstance* ins, CanardRxTransfer* transfer)
{
ardupilot_indication_NotifyState msg;
uint8_t arraybuf[ARDUPILOT_INDICATION_NOTIFYSTATE_MAX_SIZE];
uint8_t *arraybuf_ptr = arraybuf;
if (ardupilot_indication_NotifyState_decode(transfer, transfer->payload_len, &msg, &arraybuf_ptr) < 0) {
if (ardupilot_indication_NotifyState_decode(transfer, &msg)) {
return;
}
if (msg.aux_data.len == 2 && msg.aux_data_type == ARDUPILOT_INDICATION_NOTIFYSTATE_VEHICLE_YAW_EARTH_CENTIDEGREES) {