Skip to content

Commit

Permalink
ArduPlane: 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 ba5bbcd commit 86c765d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArduPlane/GCS_Plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class GCS_Plane : public GCS
// return GCS link at offset ofs
GCS_MAVLINK_Plane *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_Plane *)_chan[ofs];
}
const GCS_MAVLINK_Plane *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_Plane *)_chan[ofs];
Expand Down

0 comments on commit 86c765d

Please sign in to comment.