AP_HAL_ChibiOS: fix CAN manager initialization

This commit is contained in:
Francisco Ferreira 2018-07-22 06:05:18 +01:00
parent 458b7ea0b8
commit e1bf89f32d
No known key found for this signature in database
GPG Key ID: F63C20A6773E787E
2 changed files with 1 additions and 6 deletions

View File

@ -43,11 +43,7 @@ uavcan::MonotonicTime clock::getMonotonic()
bool CANManager::begin(uint32_t bitrate, uint8_t can_number)
{
if (can_helper.init(bitrate, CanIface::OperatingMode::NormalMode, can_number) == 0) {
bitrate_ = bitrate;
initialized_ = true;
}
return initialized_;
return (can_helper.init(bitrate, CanIface::OperatingMode::NormalMode, can_number) == 0);
}
bool CANManager::is_initialized()

View File

@ -74,7 +74,6 @@ public:
private:
AP_UAVCAN *p_uavcan;
bool initialized_;
uint32_t bitrate_;
uavcan_stm32::CanInitHelper<CAN_STM32_RX_QUEUE_SIZE> can_helper;
};