Giter Club home page Giter Club logo

fastmavlink's People

Contributors

olliw42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fastmavlink's Issues

FYI XML to support exponentiation

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

Why not merge this C binding with the other bindings in the pymavlink repo?

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.

LIBC support: compile error with newlib headers

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) 

Code is all in header files

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.