Commit Graph

53 Commits

Author SHA1 Message Date
Beat Küng 8a2b310b83 topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds
about 1.2KB.
2021-10-20 08:10:05 +02:00
Beat Küng 4c73ac3805 uorb: use single byte for internal types in o_fields metadata
Reduces flash usage by ~9KB.
2021-10-20 08:10:05 +02:00
TSC21 0b23679f98 msg: templates: update empy contexts, required fields and license header years 2021-08-12 08:44:53 +02:00
Daniel Agar cf26f24387
msg: add quaternion euler angle pretty print 2020-09-28 10:13:43 -04:00
Daniel Agar c5cbc7725d msg: timestamp_sample print elapsed from timestamp 2020-05-11 12:58:52 -04:00
Daniel Agar 9585055e9e
uORB: add bitset for faster orb_exists check and remove uORB::Subscription lazy subscribe hack/optimization
- add PX4 bitset and atomic_bitset with testing
 - add uORB::Subscription constructor to take ORB_ID enum
 - move orb test messages into msg/
2020-03-11 09:06:33 -04:00
TSC21 2e9a4d89ee msg: remove gencpp and genmsh submodules; remove gencpp imports 2020-01-13 21:48:35 +00:00
Beat Küng 3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Julian Oes d3da4a92e0 msg: don't implement print_message for fmu-v2
This saves about 3.4k of flash for fmu-v2.
2019-10-18 11:54:24 +02:00
Daniel Agar 32a89a1834 rename empy templates (*.template) to proper file extension (.em) 2019-06-10 10:42:00 -07:00
Daniel Agar c0b464e9e2 replace <cinttypes> with <inttypes.h>
- <cinttypes> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
TSC21 1cc3d95ff7 msg: templates: add 'ids' to the Context documentation 2018-09-24 19:28:40 +02:00
Daniel Agar af6098b9ea uORB print_message add device_id pretty print 2018-09-02 21:13:10 +02:00
TSC21 a1ac34d3e7 reformat how the passed time is printed 2018-08-09 13:40:48 +02:00
TSC21 8a8cc26b13 uorb templates: remove redundant timestamp field 2018-08-09 13:40:48 +02:00
TSC21 e932030d88 add timestamp field to uORB msgs; sync timestamp whenever possible 2018-08-09 13:40:48 +02:00
Beat Küng f1dc8f8f48 listener: use PX4_INFO_RAW instead of printf
Ensures that clients will get the output of the listener.
2018-08-08 21:09:39 +02:00
Daniel Agar a6883c3a0d uORB generated header use full name in C define 2018-06-11 22:53:38 +02:00
Beat Küng 0038a5e755 uorb: fix constness for _uorb_topics_list
_uorb_topics_list was marked as 'const char *' array, which means the data
of the array was not actually const and thus landed in the data section
(so in RAM instead of FLASH).
The size of the array is 436 bytes.
2018-03-29 10:06:21 -04:00
Daniel Agar 416feea9e4 uORB print_message cleanup
- indent field print with tabs instead of spaces
 - print a newline before printing a nested field
 - cmake add generator dependencies
2018-03-28 09:15:41 -04:00
Daniel Agar a98c7cf5c8 generate uorb topic helper rename px4_printf to print_field 2018-03-28 09:15:41 -04:00
Daniel Agar 0a0044fc29 uORB print message add timestamp elapsed 2018-03-28 09:15:41 -04:00
Daniel Agar 3db17a04fc uORB generate message print functions 2018-03-28 09:15:41 -04:00
Daniel Agar 651df03f76 RTPS and micro-CDR build system cleanup (#8084) 2017-10-11 13:05:44 -04:00
Daniel Agar 48f1e3ed1c uORB generation move to msg/ 2017-09-29 10:13:51 -04:00
Beat Küng 77785c01ef micrortps_client.cpp.template: avoid 0-init & check result of orb_copy 2017-08-08 21:47:17 +02:00
Beat Küng 55f65b4aff Tools/message_id.py: rename to uorb_rtps_message_ids.py for clarity 2017-08-08 21:47:17 +02:00
José Roberto de Souza 1a3315e397 msg: Fix build in python3
We can afford a slower performance in this parsers with python2 to
keep compability with python3.
http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html#xrange
2017-08-05 11:04:44 +02:00
Vicente Monge c5e2745a19 Fixes for manual bridge generation
Fix for some forgot .cxx extensions
Fix for 'print' python 2 3 compatibility
Fix for topic ID type change
2017-08-01 22:32:43 +02:00
Mark Charlebois d24503242e Extracted non-template code from template
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2017-08-01 22:32:43 +02:00
Mark Charlebois fc3d49240e Added missing "%"
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2017-08-01 22:32:43 +02:00
Daniel Agar 1e3fa64eff microRTPS_client printf PRIu64 2017-08-01 22:32:43 +02:00
Daniel Agar 30f8e5751d Makefile simplify colorecho for CI 2017-08-01 22:32:43 +02:00
Mark Charlebois fd86ab7f69 Fixed clock_gettime to be portable to OSX
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2017-08-01 22:32:43 +02:00
Daniel Agar 5b1e3b3257 microRTPS readability braces 2017-08-01 22:32:43 +02:00
Daniel Agar e6633da832 microRTPS_client printf format fix 2017-08-01 22:32:43 +02:00
Vicente Monge c85039e413 Fixing rebase conflicts 2017-08-01 22:32:43 +02:00
Daniel Agar b4e2360070 uORB generation use constexpr (#7348) 2017-06-03 18:02:42 -04:00
Daniel Agar 3721fb9d52 cmake cleanup nuttx dependency handling (#7007)
- closes #6501
 - closes #6820
 - closes #6881
2017-04-17 20:57:35 -04:00
Beat Küng 89a7e0cf87 uorb topics generator: add multi-topics to the list of all topics
topic names with '# TOPICS <name>' were previously not in orb_get_topics().
This means the logger could not find them.

Affects for example actuator_controls_0.
2016-09-19 13:03:40 +02:00
Beat Küng 623fe7ca2c logger + uorb msg template: rm msg name from o_fields to save space
Instead we use o_name to get the topic name. Now the topic names are not
upper case anymore in the log format. This makes it more consistent, eg.
if used as a nested topic
2016-05-22 13:31:35 +02:00
Beat Küng 5cf8081a98 uorb template: add timestamp to the format string
We explicitly include the timestamp. This makes it possible to change it's
type later on.
This breaks the current ULog logging format.
2016-05-22 13:31:35 +02:00
Beat Küng 093eece29b orb message templates: move common code into px_generate_uorb_topic_helper.py
This also greatly speeds up the generators.
2016-05-14 11:27:07 +02:00
Beat Küng 797d0f24d6 reformat orb message templates 2016-05-14 11:27:07 +02:00
Beat Küng eabc43d78c orb structs: add padding bytes to align the structs where necessary
This is required for the logger, we just manually add the padding bytes
what would otherwise be done by the compiler. Additionally we reorder
the fields by type, so that padding is only necessary for nested types.
2016-05-14 11:27:07 +02:00
Daniel Agar 69c1ce1714 WIP logger serialization 2016-05-14 11:27:07 +02:00
Daniel Agar 9a0e962cbf uorb autogeneration 2016-05-14 11:27:07 +02:00
Daniel Agar eb29b33620 use gcc attributes to align and pack 2016-05-14 11:27:07 +02:00
Daniel Agar 76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
Lorenz Meier 20dff14eae Extend generator templates to allow nested topics 2015-05-27 15:21:31 -07:00