mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
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 {
|
struct CriticalSectionLocker {
|
||||||
CriticalSectionLocker()
|
CriticalSectionLocker()
|
||||||
{
|
{
|
||||||
chSysSuspend();
|
chSysLock();
|
||||||
}
|
}
|
||||||
~CriticalSectionLocker()
|
~CriticalSectionLocker()
|
||||||
{
|
{
|
||||||
chSysEnable();
|
chSysUnlock();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,11 +69,11 @@ class ChibiOS::CANIface : public AP_HAL::CANIface
|
|||||||
struct CriticalSectionLocker {
|
struct CriticalSectionLocker {
|
||||||
CriticalSectionLocker()
|
CriticalSectionLocker()
|
||||||
{
|
{
|
||||||
chSysSuspend();
|
chSysLock();
|
||||||
}
|
}
|
||||||
~CriticalSectionLocker()
|
~CriticalSectionLocker()
|
||||||
{
|
{
|
||||||
chSysEnable();
|
chSysUnlock();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user