mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-29 11:40:28 +08:00
chore(commander): reword user-facing "arming" messages to "motor arming"
This commit is contained in:
1 parent
9e34d7bba1
commit
159d3f0ce8
9 files changed
+32
-32
No files matched your search
@@ -509,7 +509,7 @@
|
||||
},
|
||||
"9": {
|
||||
"name": "disarm",
|
||||
"description": "disarm"
|
||||
"description": "motor disarm"
|
||||
},
|
||||
"10": {
|
||||
"name": "terminate",
|
||||
|
||||
@@ -140,7 +140,7 @@ static uint8_t _auth_method_arm_req_check()
|
||||
case ARM_AUTH_WAITING_AUTH:
|
||||
case ARM_AUTH_WAITING_AUTH_WITH_ACK:
|
||||
state = ARM_AUTH_IDLE;
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: No response");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: No response");
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -177,7 +177,7 @@ static uint8_t _auth_method_two_arm_check()
|
||||
auth_timeout = now + _param_com_arm_auth_timout;
|
||||
state = ARM_AUTH_WAITING_AUTH;
|
||||
|
||||
mavlink_log_info(mavlink_log_pub, "Arm auth: Requesting authorization...");
|
||||
mavlink_log_info(mavlink_log_pub, "Motor arm auth: Requesting authorization...");
|
||||
|
||||
return vehicle_command_ack_s::VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED;
|
||||
}
|
||||
@@ -238,14 +238,14 @@ void arm_auth_update(hrt_abstime now, bool param_update)
|
||||
|
||||
case vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED:
|
||||
mavlink_log_info(mavlink_log_pub,
|
||||
"Arm auth: Authorized for the next %" PRId32 " seconds",
|
||||
"Motor arm auth: Authorized for the next %" PRId32 " seconds",
|
||||
command_ack.result_param2);
|
||||
state = ARM_AUTH_MISSION_APPROVED;
|
||||
auth_timeout = command_ack.timestamp + (command_ack.result_param2 * 1000000);
|
||||
return;
|
||||
|
||||
case vehicle_command_ack_s::VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED:
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: Temporarily rejected");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: Temporarily rejected");
|
||||
state = ARM_AUTH_IDLE;
|
||||
return;
|
||||
|
||||
@@ -257,25 +257,25 @@ void arm_auth_update(hrt_abstime now, bool param_update)
|
||||
break;
|
||||
|
||||
case vehicle_command_ack_s::ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT:
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: Denied, waypoint %" PRId32 " have a invalid value",
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: Denied, waypoint %" PRId32 " have a invalid value",
|
||||
command_ack.result_param2);
|
||||
break;
|
||||
|
||||
case vehicle_command_ack_s::ARM_AUTH_DENIED_REASON_TIMEOUT:
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: Denied by timeout in authorizer");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: Denied by timeout in authorizer");
|
||||
break;
|
||||
|
||||
case vehicle_command_ack_s::ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE:
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: Denied because airspace is in use");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: Denied because airspace is in use");
|
||||
break;
|
||||
|
||||
case vehicle_command_ack_s::ARM_AUTH_DENIED_REASON_BAD_WEATHER:
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: Denied because of bad weather");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: Denied because of bad weather");
|
||||
break;
|
||||
|
||||
case vehicle_command_ack_s::ARM_AUTH_DENIED_REASON_GENERIC:
|
||||
default:
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: Denied");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: Denied");
|
||||
}
|
||||
|
||||
state = ARM_AUTH_IDLE;
|
||||
@@ -284,7 +284,7 @@ void arm_auth_update(hrt_abstime now, bool param_update)
|
||||
}
|
||||
|
||||
if (now > auth_timeout) {
|
||||
mavlink_log_critical(mavlink_log_pub, "Arm auth: No response");
|
||||
mavlink_log_critical(mavlink_log_pub, "Motor arm auth: No response");
|
||||
state = ARM_AUTH_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,9 +675,9 @@ transition_result_t Commander::arm(arm_disarm_reason_t calling_reason, bool run_
|
||||
|| _vehicle_status.rc_calibration_in_progress
|
||||
|| _actuator_armed.in_esc_calibration_mode) {
|
||||
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Arming denied: calibrating\t");
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Motor arming denied: calibrating\t");
|
||||
events::send(events::ID("commander_arm_denied_calibrating"), {events::Log::Critical, events::LogInternal::Info},
|
||||
"Arming denied: calibrating");
|
||||
"Motor arming denied: calibrating");
|
||||
tune_negative(true);
|
||||
return TRANSITION_DENIED;
|
||||
}
|
||||
@@ -709,9 +709,9 @@ transition_result_t Commander::arm(arm_disarm_reason_t calling_reason, bool run_
|
||||
}
|
||||
|
||||
if (!throttle_safe) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Arming denied: throttle not in safe position\t");
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Motor arming denied: throttle not in safe position\t");
|
||||
events::send(events::ID("commander_arm_denied_throttle_unsafe"), {events::Log::Critical, events::LogInternal::Info},
|
||||
"Arming denied: throttle not in safe position");
|
||||
"Motor arming denied: throttle not in safe position");
|
||||
tune_negative(true);
|
||||
return TRANSITION_DENIED;
|
||||
}
|
||||
@@ -722,12 +722,12 @@ transition_result_t Commander::arm(arm_disarm_reason_t calling_reason, bool run_
|
||||
|
||||
if (!_health_and_arming_checks.canArm(_vehicle_status.nav_state)) {
|
||||
tune_negative(true);
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Arming denied: Resolve system health failures first\t");
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Motor arming denied: Resolve system health failures first\t");
|
||||
/* EVENT
|
||||
* @type append_health_and_arming_messages
|
||||
*/
|
||||
events::send<uint32_t>(events::ID("commander_arm_denied_resolve_failures"), {events::Log::Critical, events::LogInternal::Info},
|
||||
"Arming denied: Resolve system health failures first", get_px4_custom_mode(_vehicle_status.nav_state).data);
|
||||
"Motor arming denied: Resolve system health failures first", get_px4_custom_mode(_vehicle_status.nav_state).data);
|
||||
return TRANSITION_DENIED;
|
||||
}
|
||||
}
|
||||
@@ -745,9 +745,9 @@ transition_result_t Commander::arm(arm_disarm_reason_t calling_reason, bool run_
|
||||
_vehicle_status.arming_state = vehicle_status_s::ARMING_STATE_ARMED;
|
||||
_vehicle_status.latest_arming_reason = (uint8_t)calling_reason;
|
||||
|
||||
mavlink_log_info(&_mavlink_log_pub, "Armed by %s\t", arm_disarm_reason_str(calling_reason));
|
||||
mavlink_log_info(&_mavlink_log_pub, "Motors armed by %s\t", arm_disarm_reason_str(calling_reason));
|
||||
events::send<events::px4::enums::arm_disarm_reason_t>(events::ID("commander_armed_by"), events::Log::Info,
|
||||
"Armed by {1}", calling_reason);
|
||||
"Motors armed by {1}", calling_reason);
|
||||
|
||||
_status_changed = true;
|
||||
|
||||
@@ -772,10 +772,10 @@ transition_result_t Commander::disarm(arm_disarm_reason_t calling_reason, bool f
|
||||
|
||||
if (!landed && !(mc_manual_thrust_mode && commanded_by_rc)) {
|
||||
if (calling_reason != arm_disarm_reason_t::stick_gesture) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Disarming denied: not landed\t");
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Motor disarming denied: not landed\t");
|
||||
events::send(events::ID("commander_disarm_denied_not_landed"),
|
||||
{events::Log::Critical, events::LogInternal::Info},
|
||||
"Disarming denied: not landed");
|
||||
"Motor disarming denied: not landed");
|
||||
}
|
||||
|
||||
return TRANSITION_DENIED;
|
||||
@@ -793,9 +793,9 @@ transition_result_t Commander::disarm(arm_disarm_reason_t calling_reason, bool f
|
||||
|
||||
_user_mode_intention.onDisarm();
|
||||
|
||||
mavlink_log_info(&_mavlink_log_pub, "Disarmed by %s\t", arm_disarm_reason_str(calling_reason));
|
||||
mavlink_log_info(&_mavlink_log_pub, "Motors disarmed by %s\t", arm_disarm_reason_str(calling_reason));
|
||||
events::send<events::px4::enums::arm_disarm_reason_t>(events::ID("commander_disarmed_by"), events::Log::Info,
|
||||
"Disarmed by {1}", calling_reason);
|
||||
"Motors disarmed by {1}", calling_reason);
|
||||
|
||||
if (_param_com_force_safety.get()) {
|
||||
_safety.activateSafety();
|
||||
|
||||
@@ -43,7 +43,7 @@ void ModeChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
*/
|
||||
reporter.armingCheckFailure((NavModes)reporter.failsafeFlags().mode_req_prevent_arming, health_component_t::system,
|
||||
events::ID("check_modes_cannot_takeoff"),
|
||||
events::Log::Info, "Mode not suitable for arming");
|
||||
events::Log::Info, "Mode not suitable for motor arming");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ void SystemChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
/* EVENT
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system, events::ID("check_system_arm_auth_failed"),
|
||||
events::Log::Error, "Arm authorization denied");
|
||||
events::Log::Error, "Motor arm authorization denied");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ void MulticopterThrowLaunch::update(const bool armed)
|
||||
}
|
||||
|
||||
if (!armed && _throw_launch_state != ThrowLaunchState::IDLE) {
|
||||
events::send(events::ID("mc_throw_launch_not_ready"), events::Log::Critical, "Disarmed, don't throw");
|
||||
events::send(events::ID("mc_throw_launch_not_ready"), events::Log::Critical, "Motors disarmed, don't throw");
|
||||
_throw_launch_state = ThrowLaunchState::IDLE;
|
||||
}
|
||||
|
||||
|
||||
@@ -376,12 +376,12 @@ void ManualControl::updateParams()
|
||||
_param_man_arm_gesture.commit();
|
||||
|
||||
orb_advert_t mavlink_log_pub = nullptr;
|
||||
mavlink_log_critical(&mavlink_log_pub, "Arm stick gesture disabled if arm switch in use\t")
|
||||
mavlink_log_critical(&mavlink_log_pub, "Motor arm stick gesture disabled if motor arm switch in use\t")
|
||||
/* EVENT
|
||||
* @description <param>MAN_ARM_GESTURE</param> is now set to disable arm/disarm stick gesture.
|
||||
*/
|
||||
events::send(events::ID("stick_gesture_disabled_by_arm_switch"), {events::Log::Info, events::LogInternal::Disabled},
|
||||
"Arm stick gesture disabled if arm switch in use");
|
||||
"Motor arm stick gesture disabled if motor arm switch in use");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,12 +398,12 @@ void ManualControl::updateParams()
|
||||
param_set(param_mc_airmode, &airmode);
|
||||
|
||||
orb_advert_t mavlink_log_pub = nullptr;
|
||||
mavlink_log_critical(&mavlink_log_pub, "Yaw Airmode requires disabling the stick arm gesture\t")
|
||||
mavlink_log_critical(&mavlink_log_pub, "Yaw Airmode requires disabling the motor arm stick gesture\t")
|
||||
/* EVENT
|
||||
* @description <param>MC_AIRMODE</param> is now set to roll/pitch airmode.
|
||||
*/
|
||||
events::send(events::ID("commander_airmode_requires_no_arm_gesture"), {events::Log::Error, events::LogInternal::Disabled},
|
||||
"Yaw Airmode requires disabling the stick arm gesture");
|
||||
"Yaw Airmode requires disabling the motor arm stick gesture");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ Mavlink::handle_message(const mavlink_message_t *msg)
|
||||
|
||||
if (vehicle_status_sub.copy(&vehicle_status)
|
||||
&& vehicle_status.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
|
||||
send_statustext_critical("MAVLink signing: rejected while armed");
|
||||
send_statustext_critical("MAVLink signing: rejected while motors armed");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ void ConflictNotifier::notify_action_on_ground(const NotifyLandedActCause cause)
|
||||
break;
|
||||
|
||||
case NotifyLandedActCause::kConflictAndDisarmed:
|
||||
blocked_action = "arm";
|
||||
blocked_action = "arm motors";
|
||||
log_level = events::Log::Warning;
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user