Client: Add reboot_all command

This commit is contained in:
Arthur Golubtsov
2019-10-23 13:49:49 +01:00
parent 29a9fe5ceb
commit 90af9bb417
2 changed files with 11 additions and 6 deletions

View File

@@ -22,11 +22,11 @@ y_ratio = 1.0
z_ratio = 1.0
[COPTERS]
frame_id = map
takeoff_height = 2.0
takeoff_time = 8.0
frame_id = floor
takeoff_height = 1.0
takeoff_time = 5.0
safe_takeoff = False
reach_first_point_time = 8.0
reach_first_point_time = 5.0
land_time = 3.0
x0_common = 0
y0_common = 0
@@ -36,7 +36,7 @@ z0_common = 0
parent = aruco_map
x = 0.0
y = 0.0
z = 6.5
z = 3.55
roll = 180
pitch = 0
yaw = -90
@@ -44,7 +44,7 @@ yaw = -90
[PRIVATE]
id = /hostname
restart_dhcpcd = True
use_leds = True
use_leds = False
led_pin = 21
x0 = 0
y0 = 0

View File

@@ -384,6 +384,11 @@ def _command_update_repo(*args, **kwargs):
os.system("mv /home/pi/clever-show/Drone/client_config_tmp.ini /home/pi/clever-show/Drone/client_config.ini")
os.system("chown -R pi:pi /home/pi/clever-show")
@messaging.message_callback("reboot_all")
def _command_reboot_all(*args, **kwargs):
reboot_fcu()
execute_command("reboot")
@messaging.message_callback("reboot_fcu")
def _command_reboot(*args, **kwargs):
reboot_fcu()