Skip to content

Commit

Permalink
Fix for FC reboot/shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotnbr1 committed Dec 8, 2023
1 parent 400f129 commit f3de61a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/telemetry/action/create_cmd_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ static mavlink_command_long_t create_cmd_reboot(int target_sysid,int target_comp
cmd.target_system=target_sysid;
cmd.target_component=target_compid;
cmd.command=MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN;
cmd.param1=0;
cmd.param2=(reboot ? 1 : 2);
cmd.param1=(reboot ? 1 : 2);
//cmd.param2=(reboot ? 1 : 2);
return cmd;
}

Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/status/StatusCardsColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Row{

hasFooter: true
cardFooter: FooterRebootShutdownWarning{
m_supports_reboot_actions: false
m_supports_reboot_actions: true
m_type: 2
}
}
Expand Down

1 comment on commit f3de61a

@pilotnbr1
Copy link
Contributor

@pilotnbr1 pilotnbr1 commented on f3de61a Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit gets reboot and shutdown working in sitl. With sitl the initial cmd shows a "success" ack in the sitl log and then a second ack of "fail". Not sure why that happens. In the app with sitl you see a toast appear saying that the command has failed and the dialog card remains visible. However the FC succesfully boots and shutsdown. Hopefully by using a real FC in a test this problem just goes away

Please sign in to comment.