Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Add complete SW update options #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

diksha-gupta
Copy link

Please find the initial version for #202 fix.

  1. We are still working on this in improving the UI LOOK AND FEEL
  2. The standard style format file available in /systemd/system.css is not exposed to the outside files. Hence we have re-used the same style formats (per /systemd/system.css) in update.html file.
  3. We are also considering the logic of updating the custom .px4/.jam files with the ones available in the local desktop via JS FILE EXPLORE option.
    Kindly have a look at it and let us know your opinion.

@lucasdemarchi
Copy link
Contributor

Could you add screenshots here?

@diksha-gupta
Copy link
Author

diksha-gupta commented Jul 28, 2017

Please find the below screenshots for your reference.

1_sw_update
2_sys_update
3_fpga_update
4_fc_update

mount /dev/sda1 /mnt
mkdir /temp_fpga
cp /mnt/*.jam /temp_fpga
umount /mnt
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to a) mount/umount anything b) require USB drive to be connected and c)copy files around

Copy link
Author

Choose a reason for hiding this comment

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

'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?

Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover?

exit $ret_code
fi
rm -rf /temp_fpga
reboot
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover?

rm -rf /temp_fc_fm
exit $ret_code
fi
rm -rf /temp_fc_fm
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

@lucasdemarchi lucasdemarchi changed the title #202 Fix - Initial Version Add complete SW update options Aug 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants