3drobotics / solo-cli

Solo command line utilities.
20 stars 36 forks source link

enabled solo-cli to flash pixhawk firmware from local drive #28

Closed ethliup closed 8 years ago

LorenzMeier commented 8 years ago

Awesome! @liamstask can we get this in the fast track in terms of review and interaction? Thanks!

tcr3dr commented 8 years ago

Hi @liupeidong88,

Can you change this to just be:

solo flash pixhawk <filename>

Since it's not an optional argument, we can just require the path/version/etc. as part of the arguments.

Otherwise, LGTM and I'll merge when the changes are made. Thanks!

liamstask commented 8 years ago

thanks for the PR @liupeidong88! i think it would be better to update the pixhawk without rebooting the system, which should be possible. i created #30 with a quick sketch of the shell commands that should be required.

any chance you could update this PR (or submit a new one) to use that approach?

ethliup commented 8 years ago

@liamstask and @tcr3dr, I modified the command line and used loadPixhawk.py to flash pixhawk as requested. Please check them! If there is anything wrong, let me know.

tcr3dr commented 8 years ago

lgtm

liamstask commented 8 years ago

@liupeidong88, @tcr3dr - does this work? concerned that there's no management of the system runlevel before updating.

tcr3dr commented 8 years ago

@liamstask I'm unsure. Are you saying that the runlevel changes are not implemented from your branch? @liupeidong88

liamstask commented 8 years ago

i don't have a branch relevant to this PR, just saying that i do not see where in this PR that the runlevel is modified, to account for the firmware update.

ethliup commented 8 years ago

@tcr3dr @liamstask I have fixed the run level management, sorry for it. Could you possible help test it again? It is evening in my place, or I can test it tomorrow.

Previously, I reboot it after uploading the firmware. Sometimes the flash procedure would be stuck at "waiting for boot loader." from px4_uploader.py. However, it works fine after I manually reboot it. I am unsure whether it is caused by the run-level management.

ethliup commented 8 years ago

@tcr3dr @liamstask I tested it again. I found it would be stable if we could manually reboot it after uploading the firmware file with solo flash... I tried it several times with 2 firmware file, one is from 3-dr and another is our own, it never failed if I manually reboot it after uploading.