AP_PiccoloCAN: reimplement with BinarySemaphore

This commit is contained in:
Andrew Tridgell 2023-12-30 08:34:00 +11:00
parent f0aa2a65e4
commit 9c1e145c8f
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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];