mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 08:41:37 +08:00
STM32: Driver multiplexing, fixed ChibiOS Event
This commit is contained in:
@@ -14,13 +14,13 @@ namespace uavcan_stm32
|
||||
bool Event::wait(uavcan::MonotonicDuration duration)
|
||||
{
|
||||
msg_t ret = msg_t();
|
||||
if (duration.isZero())
|
||||
if (!duration.isPositive())
|
||||
{
|
||||
sem_.waitTimeout(TIME_IMMEDIATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
sem_.waitTimeout(US2ST(duration.toUSec()));
|
||||
sem_.waitTimeout(MS2ST(duration.toMSec()));
|
||||
}
|
||||
return ret == RDY_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user