mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_ChibiOS: add cork()/push() check
This commit is contained in:
parent
4b0fa15278
commit
277386e6e2
|
@ -1329,6 +1329,9 @@ bool RCOutput::get_output_mode_banner(char banner_msg[], uint8_t banner_msg_len)
|
|||
*/
|
||||
void RCOutput::cork(void)
|
||||
{
|
||||
if (corked) {
|
||||
INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control);
|
||||
}
|
||||
corked = true;
|
||||
#if HAL_WITH_IO_MCU
|
||||
if (iomcu_enabled) {
|
||||
|
@ -1342,6 +1345,9 @@ void RCOutput::cork(void)
|
|||
*/
|
||||
void RCOutput::push(void)
|
||||
{
|
||||
if (!corked) {
|
||||
INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control);
|
||||
}
|
||||
corked = false;
|
||||
push_local();
|
||||
#if HAL_WITH_IO_MCU
|
||||
|
|
Loading…
Reference in New Issue