ArduCopter: SYSID_MYGCS and enforce move up to GCS, change to MAV_MYGCS_ENFRCE

This commit is contained in:
Peter Barker
2025-04-07 10:58:41 +10:00
committed by Peter Barker
parent 91523f6765
commit 9ff84dfa5f
5 changed files with 4 additions and 31 deletions
-9
View File
@@ -313,15 +313,6 @@ void GCS_MAVLINK_Copter::send_winch_status() const
}
#endif
uint8_t GCS_MAVLINK_Copter::sysid_my_gcs() const
{
return copter.g.sysid_my_gcs;
}
bool GCS_MAVLINK_Copter::sysid_enforce() const
{
return copter.g2.sysid_enforce;
}
uint32_t GCS_MAVLINK_Copter::telem_delay() const
{
return (uint32_t)(copter.g.telem_delay);
-3
View File
@@ -21,9 +21,6 @@ protected:
MAV_RESULT handle_flight_termination(const mavlink_command_int_t &packet) override;
uint8_t sysid_my_gcs() const override;
bool sysid_enforce() const override;
bool params_ready() const override;
void send_banner() override;
+2 -13
View File
@@ -39,13 +39,7 @@ const AP_Param::Info Copter::var_info[] = {
// SYSID_THISMAV was here
// @Param: SYSID_MYGCS
// @DisplayName: My ground station number
// @Description: Allows restricting radio overrides to only come from my ground station
// @Range: 1 255
// @Increment: 1
// @User: Advanced
GSCALAR(sysid_my_gcs, "SYSID_MYGCS", 255),
// SYSID_MYGCS was here
// @Param: PILOT_THR_FILT
// @DisplayName: Throttle filter cutoff
@@ -771,12 +765,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
AP_GROUPINFO("ACRO_THR_MID", 10, ParametersG2, acro_thr_mid, ACRO_THR_MID_DEFAULT),
#endif
// @Param: SYSID_ENFORCE
// @DisplayName: GCS sysid enforcement
// @Description: This controls whether packets from other than the expected GCS system ID will be accepted
// @Values: 0:NotEnforced,1:Enforced
// @User: Advanced
AP_GROUPINFO("SYSID_ENFORCE", 11, ParametersG2, sysid_enforce, 0),
// 11 was SYSID_ENFORCE
// 12 was AP_Stats
+1 -5
View File
@@ -208,7 +208,7 @@ public:
k_param_gcs0_unused = 110, // unused in ArduPilot-4.7
k_param_gcs1_unused, // unused in ArduPilot-4.7
k_param_sysid_this_mav_old,
k_param_sysid_my_gcs,
k_param_sysid_my_gcs_old,
k_param_serial1_baud_old, // deprecated
k_param_telem_delay,
k_param_gcs2_unused, // unused in ArduPilot-4.7
@@ -391,7 +391,6 @@ public:
// Telemetry control
//
AP_Int16 sysid_my_gcs;
AP_Int8 telem_delay;
AP_Float throttle_filt;
@@ -533,9 +532,6 @@ public:
AP_Proximity proximity;
#endif
// whether to enforce acceptance of packets only from sysid_my_gcs
AP_Int8 sysid_enforce;
#if AP_COPTER_ADVANCED_FAILSAFE_ENABLED
// advanced failsafe library
AP_AdvancedFailsafe_Copter afs;
+1 -1
View File
@@ -136,7 +136,7 @@ void Copter::failsafe_gcs_check()
}
// calc time since last gcs update
// note: this only looks at the heartbeat from the device id set by g.sysid_my_gcs
// note: this only looks at the heartbeat from the device id set by sysid_mygcs
const uint32_t last_gcs_update_ms = millis() - gcs_last_seen_ms;
const uint32_t gcs_timeout_ms = uint32_t(constrain_float(g2.fs_gcs_timeout * 1000.0f, 0.0f, UINT32_MAX));