Conversation
|
Could you add screenshots here? |
| mount /dev/sda1 /mnt | ||
| mkdir /temp_fpga | ||
| cp /mnt/*.jam /temp_fpga | ||
| umount /mnt |
There was a problem hiding this comment.
No need to a) mount/umount anything b) require USB drive to be connected and c)copy files around
There was a problem hiding this comment.
'The custom update files(.jam and .px4) are present in the connected storage media, which is mounted(Since automounting is absent) and the files are copied to the board(temporary location - temp_fpga and temp_fc_fm directory) for updation, and post that they are removed' - this is the approach that we had taken. Now that you are suggesting that no mounting, unmounting and USB connections are needed, could you please specify where will the custom files be present? If they will reside on the board, could you please specify the path?
There was a problem hiding this comment.
Fpga: /etc/fpga
Bios: /etc/bios
FC: /etc/px4-fw and /etc/ardupilot-fw
If the user wants to flash a custom one, we should give an option for him to choose the file on his computer and upload. The plugin then saves this to a temporary location and proceed with flashing.
Makes sense?
There was a problem hiding this comment.
We are unable to identify any cockpit APIs that help with the uploading mechanism ie transferring of the file to the compute board via a 'browse the file explorer and upload' option. Kindly suggest.
There was a problem hiding this comment.
I don't know. @martinpitt do you have any input or pointer on where to look?
| rm -rf /temp_fc_fm | ||
| exit $ret_code | ||
| fi | ||
| rm -rf /temp_fpga |
| exit $ret_code | ||
| fi | ||
| rm -rf /temp_fpga | ||
| reboot |
There was a problem hiding this comment.
Don't reboot automatically. It's sometimes needed, but not most of the time.
| ret_code=$? | ||
| if [ $ret_code != 0 ]; then | ||
| printf "Error : [%d] when executing command: '$cmnd'" $ret_code | ||
| rm -rf /temp_fc_fm |
| rm -rf /temp_fc_fm | ||
| exit $ret_code | ||
| fi | ||
| rm -rf /temp_fc_fm |




Please find the initial version for #202 fix.
Kindly have a look at it and let us know your opinion.