-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ROMFS: ignore comments and newlines in startup files, text in mixer files #673
Conversation
for line in f: | ||
|
||
# handle mixer files differently than startup files | ||
if ".mix" in file_path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I name my startup script 'rc.mix.fw'? Can you maybe limit the check to the last 4 characters in file_path?
file_path[-4:]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! Adressed in 94c40b6
20kbytes is not so bad! |
for (root, dirs, files) in os.walk(args.folder): | ||
for file in files: | ||
# only prune text files | ||
if ".zip" in file or ".bin" in file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you should choose files by their location (i.e. folder name) and only treat files you recognize. That way the script does not break when adding other files to the ROMFS in the future.
Flown on fixedwing. |
Flown again on fixedwing and on a hexacopter. Working fine, can be merged. |
ROMFS: ignore comments and newlines in startup files, text in mixer files
NuttX: - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase - PX4/NuttX@6de9126 Changes from PX4-NuttX/nuttx (PX4/NuttX@d5c12b2) in current PX4/master (33f7318) PX4/NuttX@d5c12b2...6de9126 6de9126 (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt e992f27 [PX4: REJECTED] cstdint fix 4b7234d [PX4: REJECTED] add math.h 45626aa [PX4: WIP] Jenkinsfile 0eff3d5 (origin/master) Merged in jutava/nuttx (pull request #673) 8271f72 Merged in raiden00/nuttx_h7 (pull request #672) 0aa30eb include/nuttx/fs/hostfs.h: Update duplicated definitions in HOSTFS that must match NuttX values. 947c10e tools/mkexport.sh: Save the User.map file in the export package if available. 283b73e Fix lots of typos in C comments and Kconfig help text 1783d34 Eliminate some new warnings found in build testing. Apps: - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase - PX4/NuttX-apps@94741ff Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (33f7318) PX4/NuttX-apps@36806ba...94741ff 94741ff (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch db9c56e (origin/master) apps/examples/powerled: Eliminate a warning about an uninitialized variable. e66470d Merged in raiden00/apps (pull request #143) db77b1e apps/examples/tcpblaster: Fix an error in time calculation. 19b8a52 apps/examples/tcpblaster/tcpblaster_server.c: Start time was not being initialized on the server side on the first pass through loop so the first output record had a crazy time. 749eccb Squashed commit of the following: 4d8b8fa apps/netutils/dhcpc: Activates BINDTODEVICE if available, and break up some long lines 0abe341 Merged in raiden00/apps (pull request #142) 3403b1b apps/nshlib/README.txt: Clarify arguments to the mkrd command. abcb66c Remove apps/interpreters/micropthon. There are several reasons for this. (1) the current version 1.3.8 is very old and no one is supporting it. (2) the port only includes the core micropython logic and none of the Python libraries. As such it is useless in any real application. (3) There have recently been compile failures reported. It looks like this is due to changes in newlib based toolchains that now bring in incompatible newlib header files. See issue 104 at https://bitbucket.org/nuttx/nuttx/issues/104/build-micropython-138-error. With no one dedicated to the support of micropython, it can no longer be carried in the NuttX apps/ repository.
NuttX: - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase - PX4/NuttX@96c0d1a Changes from PX4-NuttX/nuttx (PX4/NuttX@d5c12b2) in current PX4/master (9386ab6) PX4/NuttX@d5c12b2...96c0d1a 96c0d1a (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt 92a4ea9 [PX4: REJECTED] cstdint fix 4ae3061 [PX4: REJECTED] add math.h b076567 [PX4: WIP] Jenkinsfile 8432164 (origin/master) arch/arm/src/stm32l4/chip/: Corrects some mistakes in pin definitions for the STM32L4 family. According to datasheet of STM32L496xx, STM32L475xx and STM32L443XX the AF2 of PE14 is TIM1_BKIN2 not TIM2_BKIN. 0eff3d5 Merged in jutava/nuttx (pull request #673) 8271f72 Merged in raiden00/nuttx_h7 (pull request #672) 0aa30eb include/nuttx/fs/hostfs.h: Update duplicated definitions in HOSTFS that must match NuttX values. 947c10e tools/mkexport.sh: Save the User.map file in the export package if available. 283b73e Fix lots of typos in C comments and Kconfig help text Apps: - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase - PX4/NuttX-apps@94741ff Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (9386ab6) PX4/NuttX-apps@36806ba...94741ff 94741ff (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch db9c56e (origin/master) apps/examples/powerled: Eliminate a warning about an uninitialized variable. e66470d Merged in raiden00/apps (pull request #143) db77b1e apps/examples/tcpblaster: Fix an error in time calculation. 19b8a52 apps/examples/tcpblaster/tcpblaster_server.c: Start time was not being initialized on the server side on the first pass through loop so the first output record had a crazy time. 749eccb Squashed commit of the following: 4d8b8fa apps/netutils/dhcpc: Activates BINDTODEVICE if available, and break up some long lines 0abe341 Merged in raiden00/apps (pull request #142) 3403b1b apps/nshlib/README.txt: Clarify arguments to the mkrd command. abcb66c Remove apps/interpreters/micropthon. There are several reasons for this. (1) the current version 1.3.8 is very old and no one is supporting it. (2) the port only includes the core micropython logic and none of the Python libraries. As such it is useless in any real application. (3) There have recently been compile failures reported. It looks like this is due to changes in newlib based toolchains that now bring in incompatible newlib header files. See issue 104 at https://bitbucket.org/nuttx/nuttx/issues/104/build-micropython-138-error. With no one dedicated to the support of micropython, it can no longer be carried in the NuttX apps/ repository.
NuttX: - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase - PX4/NuttX@8076b95 Changes from PX4-NuttX/nuttx (PX4/NuttX@d5c12b2) in current PX4/master (3f0a398) PX4/NuttX@d5c12b2...8076b95 8076b95 (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt 01a921e [PX4: REJECTED] cstdint fix b073ee8 [PX4: REJECTED] add math.h 995a2b4 [PX4: WIP] Jenkinsfile 235d580 (origin/master) drivers/sensors/bh1749nuc.c, bh1790glc.c, and x224.c: From review of commit 0eff3d5, remove dependency on the CXD56_SCU, modify inclusions and some naming for compatibility with other sensor drivers. 8432164 arch/arm/src/stm32l4/chip/: Corrects some mistakes in pin definitions for the STM32L4 family. According to datasheet of STM32L496xx, STM32L475xx and STM32L443XX the AF2 of PE14 is TIM1_BKIN2 not TIM2_BKIN. 0eff3d5 Merged in jutava/nuttx (pull request #673) 8271f72 Merged in raiden00/nuttx_h7 (pull request #672) 0aa30eb include/nuttx/fs/hostfs.h: Update duplicated definitions in HOSTFS that must match NuttX values. 947c10e tools/mkexport.sh: Save the User.map file in the export package if available. Apps: - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase - PX4/NuttX-apps@94741ff Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (3f0a398) PX4/NuttX-apps@36806ba...94741ff 94741ff (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch db9c56e (origin/master) apps/examples/powerled: Eliminate a warning about an uninitialized variable. e66470d Merged in raiden00/apps (pull request #143) db77b1e apps/examples/tcpblaster: Fix an error in time calculation. 19b8a52 apps/examples/tcpblaster/tcpblaster_server.c: Start time was not being initialized on the server side on the first pass through loop so the first output record had a crazy time. 749eccb Squashed commit of the following: 4d8b8fa apps/netutils/dhcpc: Activates BINDTODEVICE if available, and break up some long lines 0abe341 Merged in raiden00/apps (pull request #142) 3403b1b apps/nshlib/README.txt: Clarify arguments to the mkrd command. abcb66c Remove apps/interpreters/micropthon. There are several reasons for this. (1) the current version 1.3.8 is very old and no one is supporting it. (2) the port only includes the core micropython logic and none of the Python libraries. As such it is useless in any real application. (3) There have recently been compile failures reported. It looks like this is due to changes in newlib based toolchains that now bring in incompatible newlib header files. See issue 104 at https://bitbucket.org/nuttx/nuttx/issues/104/build-micropython-138-error. With no one dedicated to the support of micropython, it can no longer be carried in the NuttX apps/ repository.
NuttX: - https://github.com/PX4-NuttX/nuttx/tree/px4-master_auto_rebase - PX4/NuttX@96cef4d Changes from PX4-NuttX/nuttx (PX4/NuttX@d5c12b2) in current PX4/master (8b71bb4) PX4/NuttX@d5c12b2...96cef4d 96cef4d (HEAD, origin/px4-master_auto_rebase) [PX4: WIP] Fix transmission status handling in the serial interrupt d9e74f8 [PX4: REJECTED] cstdint fix d6169e8 [PX4: REJECTED] add math.h 10be4d6 [PX4: WIP] Jenkinsfile b866599 (origin/master) Revert 0eff3d5: This removes the kx224, bh1749nuc and bh1790glc. These are very nicely written drivers, but they are based on some external sequencer logic which is not available to everyone. Hence, these are inapropriate to carry in the NuttX repository. 6368a0d Fix trivial coding standard issue 639d75c Merged in raiden00/nuttx_h7 (pull request #674) 235d580 drivers/sensors/bh1749nuc.c, bh1790glc.c, and x224.c: From review of commit 0eff3d5, remove dependency on the CXD56_SCU, modify inclusions and some naming for compatibility with other sensor drivers. 8432164 arch/arm/src/stm32l4/chip/: Corrects some mistakes in pin definitions for the STM32L4 family. According to datasheet of STM32L496xx, STM32L475xx and STM32L443XX the AF2 of PE14 is TIM1_BKIN2 not TIM2_BKIN. 0eff3d5 Merged in jutava/nuttx (pull request #673) Apps: - https://github.com/PX4-NuttX/apps/tree/px4-master_auto_rebase - PX4/NuttX-apps@94741ff Changes from PX4-NuttX/apps (PX4/NuttX-apps@36806ba) in current PX4/master (8b71bb4) PX4/NuttX-apps@36806ba...94741ff 94741ff (HEAD -> px4-master_auto_rebase, origin/px4-master_auto_rebase) [REJECTED] add-var-expansion-in-nsh-parse.patch db9c56e (origin/master) apps/examples/powerled: Eliminate a warning about an uninitialized variable. e66470d Merged in raiden00/apps (pull request #143) db77b1e apps/examples/tcpblaster: Fix an error in time calculation. 19b8a52 apps/examples/tcpblaster/tcpblaster_server.c: Start time was not being initialized on the server side on the first pass through loop so the first output record had a crazy time. 749eccb Squashed commit of the following: 4d8b8fa apps/netutils/dhcpc: Activates BINDTODEVICE if available, and break up some long lines 0abe341 Merged in raiden00/apps (pull request #142) 3403b1b apps/nshlib/README.txt: Clarify arguments to the mkrd command. abcb66c Remove apps/interpreters/micropthon. There are several reasons for this. (1) the current version 1.3.8 is very old and no one is supporting it. (2) the port only includes the core micropython logic and none of the Python libraries. As such it is useless in any real application. (3) There have recently been compile failures reported. It looks like this is due to changes in newlib based toolchains that now bring in incompatible newlib header files. See issue 104 at https://bitbucket.org/nuttx/nuttx/issues/104/build-micropython-138-error. With no one dedicated to the support of micropython, it can no longer be carried in the NuttX apps/ repository.
- sitl_gazebo in PX4/Firmware (5868463): PX4/PX4-SITL_gazebo-classic@563f087 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@4043287 - Changes: PX4/PX4-SITL_gazebo-classic@563f087...4043287 4043287 2020-12-20 Silvan Fuhrer - tiltrotor: increase wing area to 0.5 per side (#678) f004811 2020-12-20 JaeyoungLim - Update mavsdk version for SITL tests (#673)
- sitl_gazebo in PX4/Firmware (5868463): PX4/PX4-SITL_gazebo-classic@563f087 - sitl_gazebo current upstream: PX4/PX4-SITL_gazebo-classic@4043287 - Changes: PX4/PX4-SITL_gazebo-classic@563f087...4043287 4043287 2020-12-20 Silvan Fuhrer - tiltrotor: increase wing area to 0.5 per side (#678) f004811 2020-12-20 JaeyoungLim - Update mavsdk version for SITL tests (#673)
This adds a Python script that prunes the mixer and startup files.
However, the impact on the px4fmu-v1_default.bin file is not that huge:
1008488 - 986984 = 21504 bytes
Compilation works on Arch Linux using Python 2.7 and 3.3.
This needs a short bench test on FW and MC.