Skip to content

prepare v1.0.0 release #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
24 changes: 19 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [1.63.0, stable]
features: ['', '--all-features']
exclude:
- rust: 1.63.0
features: '--all-features'
rust: [1.81.0, stable]
features: ['']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -95,3 +92,20 @@ jobs:
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true

# simplify GH settings: have one single build to be required
build-results:
name: Final Results
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [lib, stm32f4-single-motor-example, clippy]
steps:
- name: check for failed builds of the library
if: ${{ needs.lib.result != 'success' }}
run: exit 1
- name: check for failed builds of the example
if: ${{ needs.stm32f4-single-motor-example.result != 'success' }}
run: exit 1
- name: check for failed clippy builds
if: ${{ needs.clippy.result != 'success' }}
run: exit 1
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate

## [1.0.0] - 2024-09-23
### Added

* Add a `current_standby()` method to check if the driver is currently in standby mode.
* `MotorError` and `Tb6612fngError` now implement `core::error::Error` (newly stabilised in Rust 1.81)

### Changed

* `Motor::new()` and `Driver::new()` methods now set the outputs upon their
initialisation to the documented defaults.
* `Motor::new()` and `Driver::new()` methods now also return errors if they fail
to set their outputs upon initialisation.
* Breaking: update to `embedded-hal` 1.0
* Renamed error types to their struct names
* Renamed `DriveCommand::Backwards` to `DriveCommand::Backward` to match
* **Breaking**: update to `embedded-hal` 1.0
* **Breaking**: Renamed error types to their struct names
* **Breaking**: Renamed `DriveCommand::Backwards` to `DriveCommand::Backward` to match
`DriveCommand::Forward`
* The MSRV has been updated to 1.81.0 due to `core::error::Error` being implemented

### Removed

* Removed the `drive_forward`, `drive_backward`, `stop` and `brake`
functions as they are duplicates to the `drive` function with the
different enum variants and make the API surface larger
* Removed the `defmt` feature: it was only used for debugging and since the `enum`s & `struct`s implement `Debug`
consuming code can use `defmt::Debug2Format` when needed. The single `defmt::debug!` statement in `Motor::drive` was
not very helpful anyway if two motors were connected

## [0.2.0] - 2023-11-28

Expand All @@ -37,5 +45,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
If your HAL does not yet implement this, then please use the previous release of the library.

<!-- next-url -->
[Unreleased]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v0.2.0...v1.0.0
[0.2.0]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v0.1.1...v0.2.0
9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
[package]
name = "tb6612fng"
version = "0.2.0"
version = "1.0.0"
edition = "2021"
rust-version = "1.63"
rust-version = "1.81"

description = "A `no_std` driver for the TB6612FNG motor driver."
repository = "https://github.com/rust-embedded-community/tb6612fng-rs"
categories = ["embedded", "hardware-support", "no-std", "no-std::no-alloc"]
keywords = ["tb6612fng", "driver", "motor", "controller", "embedded-hal-driver"]
license = "MIT OR Apache-2.0"
authors = ["Ralph Ursprung <[email protected]>", "ripytide <[email protected]>"]

[features]

[dependencies]
embedded-hal = "1.0"

defmt = { version = "0.3", optional = true }

[dev-dependencies]
embedded-hal-mock = "0.11"
embedded-hal-mock = { version = "0.11", default-features = false, features = ["eh1"] }
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,25 @@ See the documentation for usage examples.
* You plan on using a single motor with the standby feature: use `Motor` and control the standby pin manually
* You plan on using a single motor without the standby feature: use `Motor`

## Optional features
* `defmt`: you can enable the [`defmt`](https://defmt.ferrous-systems.com/) feature to get a `defmt::debug!` call for every speed change.

## Examples
A simple example for the STM32F4 microcontrollers is [available](examples/stm32f4-single-motor-example/README.md).

## Changelog
For the changelog please see the dedicated [CHANGELOG.md](CHANGELOG.md).

## Roadmap to v1.0.0
This crate is already stable, however it's based on a release candidate version of [`embedded-hal`](https://github.com/rust-embedded/embedded-hal/),
making the API unstable (the change from 1.0.0-rc.1 to 1.0.0 of e-h will be breaking from a dependency management point of view).

See [the tracking issue](https://github.com/rust-embedded-community/tb6612fng-rs/issues/4) for the roadmap to v1.0.0.

## Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on stable Rust 1.62 and up. It *might*
This crate is guaranteed to compile on stable Rust 1.81 and up. It *might*
compile with older versions but that may change in any new patch release.

## License
Licensed under either of

* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)

at your option.

## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
52 changes: 26 additions & 26 deletions examples/stm32f4-single-motor-example/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading