diff --git a/libraries/AP_PiccoloCAN/AP_PiccoloCAN.cpp b/libraries/AP_PiccoloCAN/AP_PiccoloCAN.cpp index 1cd68ac08a..ef07781772 100644 --- a/libraries/AP_PiccoloCAN/AP_PiccoloCAN.cpp +++ b/libraries/AP_PiccoloCAN/AP_PiccoloCAN.cpp @@ -140,7 +140,7 @@ bool AP_PiccoloCAN::add_interface(AP_HAL::CANIface* can_iface) { return false; } - if (!_can_iface->set_event_handle(&_event_handle)) { + if (!_can_iface->set_event_handle(&sem_handle)) { debug_can(AP_CANManager::LOG_ERROR, "PiccoloCAN: Cannot add event handle\n\r"); return false; } diff --git a/libraries/AP_PiccoloCAN/AP_PiccoloCAN.h b/libraries/AP_PiccoloCAN/AP_PiccoloCAN.h index 906cb772d0..770f05dcf5 100644 --- a/libraries/AP_PiccoloCAN/AP_PiccoloCAN.h +++ b/libraries/AP_PiccoloCAN/AP_PiccoloCAN.h @@ -114,7 +114,7 @@ private: char _thread_name[16]; uint8_t _driver_index; AP_HAL::CANIface* _can_iface; - HAL_EventHandle _event_handle; + HAL_BinarySemaphore sem_handle; AP_PiccoloCAN_Servo _servos[PICCOLO_CAN_MAX_NUM_SERVO]; AP_PiccoloCAN_ESC _escs[PICCOLO_CAN_MAX_NUM_ESC];