mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 12:14:10 -04:00
ArduCopter: create and use INTERNAL_ERROR macro so we get line numbers
This commit is contained in:
parent
19f298e04c
commit
ba5bbcdea7
@ -12,14 +12,14 @@ public:
|
|||||||
// return GCS link at offset ofs
|
// return GCS link at offset ofs
|
||||||
GCS_MAVLINK_Copter *chan(const uint8_t ofs) override {
|
GCS_MAVLINK_Copter *chan(const uint8_t ofs) override {
|
||||||
if (ofs > _num_gcs) {
|
if (ofs > _num_gcs) {
|
||||||
AP::internalerror().error(AP_InternalError::error_t::gcs_offset);
|
INTERNAL_ERROR(AP_InternalError::error_t::gcs_offset);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return (GCS_MAVLINK_Copter *)_chan[ofs];
|
return (GCS_MAVLINK_Copter *)_chan[ofs];
|
||||||
}
|
}
|
||||||
const GCS_MAVLINK_Copter *chan(const uint8_t ofs) const override {
|
const GCS_MAVLINK_Copter *chan(const uint8_t ofs) const override {
|
||||||
if (ofs > _num_gcs) {
|
if (ofs > _num_gcs) {
|
||||||
AP::internalerror().error(AP_InternalError::error_t::gcs_offset);
|
INTERNAL_ERROR(AP_InternalError::error_t::gcs_offset);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return (GCS_MAVLINK_Copter *)_chan[ofs];
|
return (GCS_MAVLINK_Copter *)_chan[ofs];
|
||||||
|
Loading…
Reference in New Issue
Block a user