Skip to content

Conversation

@jew256
Copy link

@jew256 jew256 commented May 21, 2023

No description provided.

patrickelectric and others added 30 commits November 20, 2023 10:22
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Only 3 bytes are used by message id

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Co-authored-by: : Ihsen Bouallegue <48621967+IhsenBouallegue@users.noreply.github.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
lib. Make embedded module public so that traits can be used externally
By default Rust uses isize to represent enum values.
isize implementation depends on the `target_pointer_width` attribute.

- Mavlink implementation for v2 requires message id with the range 0..16777215 --> u32
- Mavlink implementation requires u32 enum entry values
Splitting the example has the following benefits:
- Faster normal compilation for library use
- Easier to retain compilation incremental files (faster re-compilation times)
- Cleaner library src/ directory
- no_std/std definitions and imports can be removed from the mavlink-dump example
- Executable name changes from mavlink -> mavlink-dump. More precise to locate and guess what it is for

Disadvantage:
- Installation time for the example is increased, but it is something rarely done
* Restructure project to enable custom mavlink bindings generation

Split the project into three crates:

* mavlink-core: core MAVLink types including TCP, UDP and serial connections
* mavlink-bindgen: a library & CLI for generating Rust bindings for MAVLink dialects
* mavlink: generated MAVLink bindings for the MAVLink dialects in the mavlink/mavlink repo

* run GitHub checks

* reformat

* attempt to fix cross compile test

* attempt to install cross

* Downgrade clap to support MSRV 1.65.0

* Downgrade clap_lex to support MSRV 1.65.0

* Another downgrade

* downgrade anstyle

* Simplify support for MSRV 1.65.0

* Hopefully this works

* fix embedded build

* Fix build on MSRV

* Make cli feature not default

* Only build the mavlink package in tests.

The mavlink-bindgen crate does not itself need to run on embedded hardware

* Attempt to support no_std in mavlink again

* Fix for the last GitHub action

* Make the embedded example work in the cargo workspace

* Remove unused import

* Remove accidentally committed binary
This allows the parser to backtrack in case a STX byte in the middle of a message is mistaken for the start-of-frame (checked via CRC)
Add async methods.
Add async example (Embassy executor).
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
github-actions bot and others added 30 commits October 14, 2025 13:38
mavlink@0.16.0
mavlink-bindgen@0.16.0
mavlink-core@0.16.0

Generated by cargo-workspaces
0.15 is not the latest version anymore.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
mavlink@0.16.1
mavlink-bindgen@0.16.1
mavlink-core@0.16.1

Generated by cargo-workspaces
fix doc link to ts-rs and document format-generated-code as default
* Support for MAV_BOOL
change enum entry values to u64, add check if all bitflag enum values fit is message field, add as_bool as special case for MavBool, add support for multi type usage of bitflag enums, add mav_bool test

* improve max_int_value fn, rename special_impl
* refactor bytes module to be panic safe

Makes bytes module to be panic safe, which is part
of the internal implementation (not the public API).

Signed-off-by: Onur Özkan <work@onurozkan.dev>

* use no-std compatible errors in bytes

Signed-off-by: Onur Özkan <work@onurozkan.dev>

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* fix unused import when no message uses char

* remove unused in tests imports, simplify imports in generated code

* fix warning on dialects without target system/component

* adjust snapshot tests

* allow clippy match_single_binding lint to supress warnings for target system/component
Moves version reading out of the loop.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* remove duplicate bounds check

* move error contruction into impl error
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Adds buffered reading to `SerialConnection`. By default, the buffer
size is calculated based on the baud rate and it's also configurable.

This should reduce the read overhead quite significantly, especially
at high baud rates.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Mirrors the connection/direct_serial buffered reading.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
mavlink@0.16.2
mavlink-bindgen@0.16.2
mavlink-core@0.16.2

Generated by cargo-workspaces
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
We shouldn't rely on external crates for lazy initializations anymore (since 1.80)
as it doesn't benefit anything but increasing the compilation time.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
bless clippy

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* add more lints

* address lints
* chore(ci): simplify MSRV check

* fixup

* fixup
Signed-off-by: Onur Özkan <work@onurozkan.dev>
mavlink@0.17.0
mavlink-bindgen@0.17.0
mavlink-core@0.17.0

Generated by cargo-workspaces
Removes i24 reading/writing.

This implementation is buggy and unused. See #448 for more context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.