Skip to content

cono#3

Open
jew256 wants to merge 352 commits into
CUAir:masterfrom
mavlink:master
Open

cono#3
jew256 wants to merge 352 commits into
CUAir:masterfrom
mavlink:master

Conversation

@jew256
Copy link
Copy Markdown

@jew256 jew256 commented May 21, 2023

No description provided.

@patrickelectric patrickelectric force-pushed the master branch 2 times, most recently from e1b17e0 to fbf0237 Compare July 18, 2024 18:36
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@patrickelectric patrickelectric force-pushed the master branch 3 times, most recently from 2749672 to 2e40341 Compare July 21, 2024 23:37
onur-ozkan and others added 30 commits February 1, 2026 14:50
Use tokio::io::split to separate SerialStream into ReadHalf
and WriteHalf for guarding each with its own mutex.

This allows concurrent reads and writes while keeping recv paths
locked in a reader loop and send locked on the writer.

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

Generated by cargo-workspaces
With #454, MavBool is generated in two different forms regular enums
and bitflags, and previous approach cannot handle both cases (see [1]).

This updates code generation so `as_bool()` matches the generated type:

  - bitflags: `contains(MAV_BOOL_TRUE)`
  - enum: `== MAV_BOOL_TRUE`

Should unblock [2].

[1]: #454 (comment)
[2]: #454 (comment)

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* Update mavlink definitions

* add support for superseded tag in bindgen

* Add feature gates and documentation for marsh and stemstudios dialects

* Apply Clippy suggestions for MavDeprecationType

* fix mav bool not compiling with 'standard' dialect

* fix typo in list of dialects

* Revert "fix mav bool not compiling with 'standard' dialect"

This reverts commit fba0e7b.
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Updates the requirements on [anstyle-parse](https://github.com/rust-cli/anstyle) to permit the latest version.
- [Commits](rust-cli/anstyle@anstyle-parse-v0.2.7...anstyle-parse-v1.0.0)

---
updated-dependencies:
- dependency-name: anstyle-parse
  dependency-version: 1.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updates the requirements on [clap_lex](https://github.com/clap-rs/clap) to permit the latest version.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@clap_lex-v0.7.5...clap_lex-v1.0.0)

---
updated-dependencies:
- dependency-name: clap_lex
  dependency-version: 1.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Increase XML parser BufReader to 1MB to avoid quick-xml buffer boundary bug

* UDP recv() returns errors instead of looping forever, add 100ms read timeout

* Use read_to_string for XML parsing, make UDP read timeout configurable.
* optimize AsyncPeekReader::fetch

Improves AsyncPeekReader::fetch by removing the need of intermediate
stack buffer. Instead of reading into a stack buffer then copying it,
we now read directly into the internal buffer.

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

* move PeekReader::fetch assertion outside the loop

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

* add test coverage for buffer size assertions

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

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* make async direct-serial recv match sync behavior

Async direct-serial recv/recv_raw returned too early on invalid frames.
This updates both methods to match sync direct-serial semantics: keep reading
past invalid data, return when a valid frame is found and only stop on UnexpectedEof.

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

* implement try_recv for async transports

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

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* mavlink: rename and clean-up feature flags

This project has many features and will continue to provide more
in the future, therefore we are standardizing feature naming and
removing redundant and legacy aliases to keep the feature surface
clear and scalable.

**Renamed features**:

- Transport features:
  - `tcp` -> `transport-tcp`
  - `udp` -> `transport-udp`
  - `direct-serial` -> `transport-direct-serial`

- Dialect features
    - `$dialect_name` -> `dialect-$dialect_name` (e.g. `ardupilotmega` -> `dialect-ardupilotmega`)

- Other features:
  - `emit-extensions` -> `mav2-message-extensions`
  - `signing` -> `mav2-message-signing`
  - `tokio-1` -> `tokio`
  - `ts` -> `ts-rs`

**Removed features**:

- `all-dialects`: appears to have been primarily for docs.rs builds and
  docs.rs now uses Cargo `all-features`
- `embedded-hal-02`: drop deprecated compatibility path and users needing
  old embedded-hal support can stay on previous mavlink releases.

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

* fix invalid feature handling for `all-features` flag

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

* fix embedded example

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

* prevent building std and embedded features together

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

* re-export mavlink_core in a better way

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

* export dialects from a dedicated module

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

* bless new module paths

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

* bless CI

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

* fix invalid cfgs

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

* bless clippy

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

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Updates the UDP address parser and formatter to use `udpbcast`
and keeps the transport implementation consistent with that name.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Updates the requirements on [clap](https://github.com/clap-rs/clap) to permit the latest version.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@clap_complete-v4.5.48...clap_complete-v4.5.60)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.60
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* make git optional to support offline and packaged builds

Previously the build script unconditionally required `git` to update submodules.
This breaks offline builds for vendored workspaces and environments without git
installed where the files are already present but `.git` is absent.

The new build flow is as follows:

- Conditionally run `git submodule` only if the `mavlink` directory is a submodule.
- Check the expected dialects existance and fail if they are missing.

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

* make feature handling case-sensitive

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

* remove "Build requirements" from the README

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

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* upgrade rust edition to 2024 and bump msrv

self-explanatory

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

* bless clippy and fmt

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

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
* remove obsolete todos,
add check that payload is not empty

* add panic to MavFrame::ser() on invalid MAV1 message id

* adjust test

* combine asserts, spelling
Updates the requirements on [sha2](https://github.com/RustCrypto/hashes) to permit the latest version.
- [Commits](RustCrypto/hashes@groestl-v0.10.0...sha2-v0.11.0)

---
updated-dependencies:
- dependency-name: sha2
  dependency-version: 0.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* allow unknown bits for forward compatibility

Fixes #484

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

* remove ParseError::InvalidFlag

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

---------

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

* avoid oversized payload parsing buffer allocation when not required

* adjust snapshot tests
* unify common connection functions

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

* move file transport modules

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

* move tcp transport modules

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

* move udp transport modules

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

* move direct serial transport modules

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

* split connection/mod into sync and async

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

* bless cargo fmt

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

---------

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

Generated by cargo-workspaces
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.39.0...v0.40.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

* refactor(bytes_mut): replace unsafe copy with safe copy_from_slice

Use `copy_from_slice` in `BytesMut::put_slice` instead of manually calling
`copy_nonoverlapping`. The existing bounds check already ensures the destination
range is valid, so the safe slice API is equivalent and removes unnecessary unsafe
code.

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

* add parentheses to slice range expressions

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

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
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.