mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: use chSysLock for CAN critical section
this avoids an assert in some code paths that combine with hrt functions
This commit is contained in:
parent
a52c71f380
commit
c2011570f7
|
@ -73,11 +73,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface
|
|||
struct CriticalSectionLocker {
|
||||
CriticalSectionLocker()
|
||||
{
|
||||
chSysSuspend();
|
||||
chSysLock();
|
||||
}
|
||||
~CriticalSectionLocker()
|
||||
{
|
||||
chSysEnable();
|
||||
chSysUnlock();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -69,11 +69,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface
|
|||
struct CriticalSectionLocker {
|
||||
CriticalSectionLocker()
|
||||
{
|
||||
chSysSuspend();
|
||||
chSysLock();
|
||||
}
|
||||
~CriticalSectionLocker()
|
||||
{
|
||||
chSysEnable();
|
||||
chSysUnlock();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue