olliw42 / fastmavlink Goto Github PK
View Code? Open in Web Editor NEWThe fastMavlink library.
The fastMavlink library.
FYI We're modifying the MAVLink XSD validation file in ArduPilot/pymavlink#920 to allow a bitmask value to be declared using the Python exponentiation operator.
This makes it easier to immediately visualize which bit is set by a flag, because you can use the syntax
<entry value="2**15" name="BIT15" />
rather than
<entry value="32768" name=" BIT15" />
This is transparent to mavgen because the parser evaluates the number before creating the generated headers. However it may affect other the rust parser
We're not updating the XML yet to allow other parsers time to update.
Any concerns, please raise on ArduPilot/pymavlink#920
I haven't gotten around to writing a proposed change for these yet, but ran into at least one function in the official lib which didn't seem to function (pun intended).
mavlink_msg_command_long_encode
located in https://github.com/mavlink/c_library_v2/blob/master/common/mavlink_msg_command_long.h
So this 'fastmavlink' seems to me like its written to be a newer/faster C binding that's got a 'better' api, and is backward compatible with the existing one.... why not just do a PR and integrate it with the existing bindings? . ..... I see no reason we couldn't have two C bindings, we already have two javascript bindings (i did the new one, as it broke api compatibility but fixed many things) .You could call your binding FastC or NextGenC or whatever.
title says it
This happens with arm cortex-m vendor SDK based on FreeRTOS with newlib specs and I don't have a workaround; thanks in advance for any suggestions.
In file included from /home/user/src/camera_app/ext/dialog-sdk/core/system/include/common/da16x_system.h:41,
from /home/user/src/camera_app/src/apps/user_command_server.c:16:
/usr/include/newlib/string.h: At top level:
/usr/include/newlib/string.h:31:9: error: conflicting types for 'memcpy'
31 | void * memcpy (void *__restrict, const void *__restrict, size_t);
| ^~~~~~
In file included from /home/user/src/camera_app/ext/fastmavlink/c_library/uAvionix/../lib/fastmavlink.h:22,
from /home/user/src/camera_app/ext/fastmavlink/c_library/uAvionix/uAvionix.h:40,
from /home/user/src/camera_app/build/sionyx_mavlink_dialect.h:13,
from /home/user/src/camera_app/src/apps/user_command_server.c:11:
/home/user/src/camera_app/ext/fastmavlink/c_library/uAvionix/../lib/fastmavlink_functions.h:453:5: note: previous implicit declaration of 'memcpy' was here
453 | memcpy(msg->payload, &(buf[pos]), msg->len);
| ^~~~~~
In file included from /home/user/src/camera_app/ext/dialog-sdk/core/system/include/common/da16x_system.h:41,
from /home/user/src/camera_app/src/apps/user_command_server.c:16:
/usr/include/newlib/string.h:33:9: error: conflicting types for 'memset'
33 | void * memset (void *, int, size_t);
| ^~~~~~
In file included from /home/user/src/camera_app/ext/fastmavlink/c_library/uAvionix/../lib/fastmavlink.h:22,
from /home/user/src/camera_app/ext/fastmavlink/c_library/uAvionix/uAvionix.h:40,
from /home/user/src/camera_app/build/sionyx_mavlink_dialect.h:13,
from /home/user/src/camera_app/src/apps/user_command_server.c:11:
/home/user/src/camera_app/ext/fastmavlink/c_library/uAvionix/../lib/fastmavlink_functions.h:153:9: note: previous implicit declaration of 'memset' was here
153 | memset(&(msg->payload[msg->len]), 0, msg->payload_max_len - msg->len);
| ^~~~~~
gmake[2]: *** [CMakeFiles/Nightwave.dir/build.make:4012: CMakeFiles/Nightwave.dir/src/apps/user_command_server.c.obj] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/home/user/src/camera_app/build'
gmake[1]: *** [CMakeFiles/Makefile2:114: CMakeFiles/Nightwave.dir/all] Error 2
gmake[1]: Leaving directory '/home/user/src/camera_app/build'
gmake: *** [Makefile:94: all] Error 2
ERROR: InvocationError for command /usr/bin/bash -c 'cmake --build build -j $(nproc)' (exited with code 2)
___________________________________ summary ____________________________________
ERROR: build: commands failed
with
$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/10.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir='/usr/lib/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --mandir=/usr/share/man --enable-languages=c,c++,lto --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --enable-tls --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib --with-gnu-as --with-gnu-ld --with-pkgversion=15:10.3-2021.07-4 --without-included-gettext --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3 --host=x86_64-linux-gnu --with-headers=no --without-newlib --with-multilib-list=rmprofile,aprofile CFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' CXXFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' DFLAGS=-frelease FCFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' FFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' GCJFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' LDFLAGS=-Wl,-z,relro OBJCFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' OBJCXXFLAGS='-g -O2 -ffile-prefix-map=/build/gcc-arm-none-eabi-qMDwcZ/gcc-arm-none-eabi-10.3-2021.07=. -fstack-protector-strong' INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip SED=/bin/sed SHELL=/bin/sh BASH=/bin/bash CONFIG_SHELL=/bin/bash
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210621 (release) (15:10.3-2021.07-4)
some enums may not be ordered properly, in which case the enum end marker seems to be calculated incorrectly
e.g. https://github.com/olliw42/fastmavlink/blob/master/c_library/minimal/minimal.h#L133-L146
Unfortunately, since all the actual code is in header files (very non-standard) instead of C files, the fastmavlink library can't be used in multiple C files in the same executable. This pretty much prevents any kind of modularity with calls into fastmavlink. E.g. if I want to say develop an app with multiple types of mavlink endpoints where each endpoint has its own C file of functionality and each needs some functionality from fastmavlink, I can only include/use fastmavlink in one of them without getting a multiple definition link error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.