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 13:09
Only 3 bytes are used by message id

Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Co-authored-by: : Ihsen Bouallegue <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
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 <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
github-actions bot and others added 30 commits October 14, 2025 19:02
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 <[email protected]>

* use no-std compatible errors in bytes

Signed-off-by: Onur Özkan <[email protected]>

---------

Signed-off-by: Onur Özkan <[email protected]>
* 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 <[email protected]>
* remove duplicate bounds check

* move error contruction into impl error
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 <[email protected]>
Mirrors the connection/direct_serial buffered reading.

Signed-off-by: Onur Özkan <[email protected]>
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] <[email protected]>
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 <[email protected]>
Signed-off-by: Onur Özkan <[email protected]>
bless clippy

Signed-off-by: Onur Özkan <[email protected]>
* add more lints

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

* fixup

* fixup
Signed-off-by: Onur Özkan <[email protected]>
Removes i24 reading/writing.

This implementation is buggy and unused. See #448 for more context.
Updates the requirements on [quick-xml](https://github.com/tafia/quick-xml) to permit the latest version.
- [Release notes](https://github.com/tafia/quick-xml/releases)
- [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md)
- [Commits](tafia/quick-xml@v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: quick-xml
  dependency-version: 0.39.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* add doc for enum params used for MAV_CMD
Adds parsing for params into the MavProfile data structure.
Add a table of paramters to all MAV_CMD variants including description, valid values and unit.
Change xml parser to use expand_empty_elements=true, this removed a lot of duplicate code and prevents a some of potential bugs.

* fix detection if any param has a value range

* fix emit_params

* remove order dependency from MavParam::format_valid_values, change type of MavParam::description to indicate it is optional

* add snap test for enum with entry params

* fix test

* fix clippy warnings

* adjustments for readability

* remove trailing space in param number range, extract number range formating in seperate function

* add unit test for param range formating and param row formating
replaced_by is not always provided, so it's better to store
it as None rather than an empty String.

This applies the following changes without any behavioral change:

- Switch replaced_by to Option<String> in MavDeprecation.
- Parse missing/blank replaced_by as None.
- Update deprecated attribute formatting to handle Option.

Signed-off-by: Onur Özkan <[email protected]>
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.