Commit Graph

20 Commits

Author SHA1 Message Date
Julian Oes 177d14c8ea px_romfs_pruner.py: remove deprecation warning
The open flag `U` causes a deprecation warning starting with Python 3.4.
The option to open all kinds of newlines as `\n` has been replaced with
the argument `newline=None`. However, this argument is not available for
Python 2 unless we use `io.open` instead of `open`.
2018-11-20 15:16:54 +01:00
Beat Küng 873e036e85 px_romfs_pruner: reduce multiple consecutive spaces into a single space for mixers (#9457)
Reduces FLASH usage by about 3kb.

Plus add a missing cmake dependency.
2018-05-14 14:05:29 -04:00
ksschwabe 500a1c808d ROMFS list files explicitly instead of using GLOB_RECURSE (#9107)
* Lists ROMFS files explicity instead of using GLOB_RECURSE

Previously, when ROMFS files that were not airframes were touched, the ROMFS
would not be rebuilt. The ROMFS files are now specified explicityl in a
CMakeLists.txt file that is located in the root ROMFS directory.

Now when one of the ROMFS files is touched the whole ROMFS is rebuilt.

When new files are added to the ROMFS, they need to be explicity added to
the CMakeLists in the ROMFS root directory.

* ROMFS: adds individual CMakeLists files in each subdirectory

Also moves the temporary ROMFS build directory to ${PX4_BINARY_DIR}/ROMFS/genromfs
so that the cmake_install.cmake files and the CMakeFiles directories (generated whenever
are not add_subdirectory() is called) are not generated in the temporary ROMFS directory
from which the ROMFS binary is created.

* cmake ROMFS generate add px4_add_romfs_files function

* ROMFS CMakeLists: adds explanatory comment to px4_add_romfs_files function

* ROMFS CMakeLists: updates copyright headers
2018-03-26 11:19:00 -04:00
Lorenz Meier 417eda82ef ROMFS pruner: Kick out excluded files 2016-12-21 08:37:45 +01:00
Bart Slinger a7c8d77453 Generic helicopter mixer
fix code style
2016-12-10 14:45:49 +01:00
Lorenz Meier 37edb43b60 ROMFS: Strip README files 2016-07-01 18:03:38 +02:00
Julian Oes 49930d64ad romfs_pruner: delete hidden files, remove tabs
If a text editor creates hidden save files, those will get copied into
the ROMFS. This is now fixed by deleting hidden files.

Also, the there was some available potential by removing the leading
whitespace.
2016-06-07 22:10:56 +02:00
Daniel Agar 0b54bb99f9 NuttX quiet build
cmake combine NuttX copy and export

-NuttX wasn't recopying if it fails to compile
2016-04-17 16:02:28 -04:00
Julian Oes 4b55c5276e px_romfs_pruner.py: fix indenting 2016-01-24 15:46:29 +01:00
Julian Oes 443592136b px_romfs_pruner.py: PEP8ify and whitespace
- Changed from 8 spaces indent back to 4 which I find appropriate for
  Python.
- Fixed linelength to 80 chars.
2016-01-24 15:46:29 +01:00
Julian Oes 6e26d1b8dc px_romfs_pruner.py: ignore files starting with . 2016-01-24 15:46:29 +01:00
tumbili 9b5b2a4ccc use correct Unix line ending character
Conflicts:
	Tools/px_romfs_pruner.py
2015-11-03 17:00:13 +01:00
skyworks_zyx f297cf96f7 Ignore .DS_Store in the ROMFS pruner. 2015-10-27 19:23:02 +08:00
Thomas Gubler 2bbb1ad35f python3 fixes 2015-10-10 11:03:04 +02:00
Matthias Grob 5191731f22 make romfs pruner script windows compatible
When we open the file handle to write back the lines in binary mode, we don't change the line endings but instead leave them as they were before. This is impotant for Windows users as Python on Windows otherwise adds CRLF endings to the parameter files and they can't be correctly parsed by NuttX any more.
2015-10-01 09:59:30 +02:00
James Harrison 6ec338c23f Fix px_romfs_pruner.py to skip .data files
The .data extension was missing but used in some places; this would cause the pruner to fail with a UnicodeDecodeError.
2014-10-14 22:18:51 +01:00
Thomas Gubler d5e463352d romfs pruner: fix filename check 2014-05-02 17:34:50 +02:00
Thomas Gubler 047dfc7714 romfs pruner: do not try to prune .swp files 2014-05-02 14:26:22 +02:00
Julian Oes 94c40b6fa4 ROMFS: only identify *.mix as mixer files 2014-02-17 09:06:35 +01:00
Julian Oes a61a89f339 ROMFS: ignore comments and newlines in startup files, text in mixer files 2014-02-17 00:25:30 +01:00