Skip to content

Commit

Permalink
Update git update function
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Oct 23, 2019
1 parent f4300f5 commit cb46165
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Drone/copter_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,13 @@ def _command_reset_z(*args, **kwargs):

@messaging.message_callback("update_repo")
def _command_update_repo(*args, **kwargs):
os.system("git reset --hard origin/master")
os.system("mv /home/pi/clever-show/Drone/client_config.ini /home/pi/clever-show/Drone/client_config_tmp.ini")
os.system("git reset --hard HEAD")
os.system("git checkout master")
os.system("git fetch")
os.system("git pull")
os.system("chown -R pi:pi ~/CleverSwarm")
os.system("git pull --rebase")
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_fcu")
def _command_reboot(*args, **kwargs):
Expand Down

0 comments on commit cb46165

Please sign in to comment.