Commit 0da659a
Ensure settings.json is always written and update UI to use it (#24)
Updated `src/downloadthread.cpp` to always write `settings.json` if `useSettings` is enabled, ensuring the file exists even if no specific settings are provided.
Updated `src/configure.qml` to read and write `settings.json` for loading/saving configuration on the drive.
Added logic to remove legacy .txt files (camera1.txt, air.txt, etc.) when writing the new JSON format to avoid conflicts.
Analyze config files created on flashed device (#23)
* Analyze config files created on flashed device
Identified .txt files created on the target device during the flashing/configuration process.
The primary logic is in `src/downloadthread.cpp`.
Files identified: `config.txt`, `openhd/camera1.txt`, `openhd/air.txt`, `openhd/ground.txt`, `openhd/debug.txt`, and `openhd/{sbcValue}.txt`.
* Refactor OpenHD config generation to use a single JSON file
Replaced the creation of multiple .txt configuration files (camera1.txt, air.txt, ground.txt, debug.txt, {sbc}.txt) with a single `openhd/settings.json` file.
The JSON file contains keys: "camera", "sbc", "role", and "debug".
Preserved logic for `config.txt` modification and `QOpenHD.conf` copying.
---------1 parent 77df823 commit 0da659a
2 files changed
Lines changed: 195 additions & 244 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
811 | | - | |
812 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
813 | 821 | | |
814 | | - | |
| 822 | + | |
815 | 823 | | |
816 | 824 | | |
817 | 825 | | |
818 | 826 | | |
819 | 827 | | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
833 | 832 | | |
834 | 833 | | |
835 | | - | |
| 834 | + | |
836 | 835 | | |
837 | 836 | | |
838 | 837 | | |
839 | 838 | | |
840 | 839 | | |
841 | 840 | | |
842 | 841 | | |
843 | | - | |
844 | | - | |
845 | | - | |
| 842 | + | |
| 843 | + | |
846 | 844 | | |
847 | 845 | | |
848 | 846 | | |
| |||
870 | 868 | | |
871 | 869 | | |
872 | 870 | | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
878 | 876 | | |
879 | 877 | | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
| 878 | + | |
| 879 | + | |
890 | 880 | | |
891 | 881 | | |
892 | 882 | | |
893 | | - | |
894 | | - | |
895 | | - | |
| 883 | + | |
896 | 884 | | |
897 | 885 | | |
898 | 886 | | |
899 | 887 | | |
900 | | - | |
901 | | - | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
902 | 897 | | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
903 | 909 | | |
904 | 910 | | |
905 | 911 | | |
| |||
0 commit comments