Skip to content

Commit

Permalink
ArduCopter: create and use INTERNAL_ERROR macro so we get line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Apr 30, 2020
1 parent 19f298e commit ba5bbcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArduCopter/GCS_Copter.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class GCS_Copter : public GCS
// return GCS link at offset ofs
GCS_MAVLINK_Copter *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_Copter *)_chan[ofs];
}
const GCS_MAVLINK_Copter *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_Copter *)_chan[ofs];
Expand Down

0 comments on commit ba5bbcd

Please sign in to comment.