Skip to content

Commit

Permalink
AP_HAL_ChibiOS: add cork()/push() check
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Nov 13, 2024
1 parent 90daff6 commit 89bc8ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/AP_HAL_ChibiOS/RCOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 89bc8ce

Please sign in to comment.