AP_Common: create and use INTERNAL_ERROR macro so we get line numbers

This commit is contained in:
Peter Barker 2020-04-30 10:40:45 +10:00 committed by Peter Barker
parent 119eef9954
commit 8e82ea2540
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ public:
void set(uint16_t bit) {
// ignore an invalid bit number
if (bit >= numbits) {
AP::internalerror().error(AP_InternalError::error_t::bitmask_range);
INTERNAL_ERROR(AP_InternalError::error_t::bitmask_range);
return;
}
uint16_t word = bit/32;
@ -80,7 +80,7 @@ public:
uint8_t ofs = bit & 0x1f;
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
if (bit >= numbits) {
AP::internalerror().error(AP_InternalError::error_t::bitmask_range);
INTERNAL_ERROR(AP_InternalError::error_t::bitmask_range);
return false;
}
#endif