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

This commit is contained in:
Peter Barker 2020-04-30 10:40:47 +10:00 committed by Peter Barker
parent 2c16810493
commit 610d43556c
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ public:
// return GCS link at offset ofs
GCS_MAVLINK_Rover *chan(const uint8_t ofs) override {
if (ofs > _num_gcs) {
AP::internalerror().error(AP_InternalError::error_t::gcs_offset);
INTERNAL_ERROR(AP_InternalError::error_t::gcs_offset);
return nullptr;
}
return (GCS_MAVLINK_Rover*)_chan[ofs];
@ -20,7 +20,7 @@ public:
// return GCS link at offset ofs
const GCS_MAVLINK_Rover *chan(const uint8_t ofs) const override {
if (ofs > _num_gcs) {
AP::internalerror().error(AP_InternalError::error_t::gcs_offset);
INTERNAL_ERROR(AP_InternalError::error_t::gcs_offset);
return nullptr;
}
return (GCS_MAVLINK_Rover*)_chan[ofs];