Skip to content

Commit 6bb24b3

Browse files
authored
Merge pull request #51 from rursprung/prepare-1.0-release
prepare v1.0.0 release
2 parents 41d8276 + 06323a4 commit 6bb24b3

File tree

6 files changed

+173
-104
lines changed

6 files changed

+173
-104
lines changed

.github/workflows/CI.yml

+19-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
rust: [1.63.0, stable]
17-
features: ['', '--all-features']
18-
exclude:
19-
- rust: 1.63.0
20-
features: '--all-features'
16+
rust: [1.81.0, stable]
17+
features: ['']
2118
runs-on: ubuntu-latest
2219
steps:
2320
- uses: actions/checkout@v4
@@ -95,3 +92,20 @@ jobs:
9592
with:
9693
sarif_file: rust-clippy-results.sarif
9794
wait-for-processing: true
95+
96+
# simplify GH settings: have one single build to be required
97+
build-results:
98+
name: Final Results
99+
if: ${{ always() }}
100+
runs-on: ubuntu-latest
101+
needs: [lib, stm32f4-single-motor-example, clippy]
102+
steps:
103+
- name: check for failed builds of the library
104+
if: ${{ needs.lib.result != 'success' }}
105+
run: exit 1
106+
- name: check for failed builds of the example
107+
if: ${{ needs.stm32f4-single-motor-example.result != 'success' }}
108+
run: exit 1
109+
- name: check for failed clippy builds
110+
if: ${{ needs.clippy.result != 'success' }}
111+
run: exit 1

CHANGELOG.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
<!-- next-header -->
88
## [Unreleased] - ReleaseDate
9+
10+
## [1.0.0] - 2024-09-23
911
### Added
12+
1013
* Add a `current_standby()` method to check if the driver is currently in standby mode.
14+
* `MotorError` and `Tb6612fngError` now implement `core::error::Error` (newly stabilised in Rust 1.81)
1115

1216
### Changed
1317

1418
* `Motor::new()` and `Driver::new()` methods now set the outputs upon their
1519
initialisation to the documented defaults.
1620
* `Motor::new()` and `Driver::new()` methods now also return errors if they fail
1721
to set their outputs upon initialisation.
18-
* Breaking: update to `embedded-hal` 1.0
19-
* Renamed error types to their struct names
20-
* Renamed `DriveCommand::Backwards` to `DriveCommand::Backward` to match
22+
* **Breaking**: update to `embedded-hal` 1.0
23+
* **Breaking**: Renamed error types to their struct names
24+
* **Breaking**: Renamed `DriveCommand::Backwards` to `DriveCommand::Backward` to match
2125
`DriveCommand::Forward`
26+
* The MSRV has been updated to 1.81.0 due to `core::error::Error` being implemented
2227

2328
### Removed
2429

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

2937
## [0.2.0] - 2023-11-28
3038

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

3947
<!-- next-url -->
40-
[Unreleased]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v0.2.0...HEAD
48+
[Unreleased]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v1.0.0...HEAD
49+
[1.0.0]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v0.2.0...v1.0.0
4150
[0.2.0]: https://github.com/rust-embedded-community/tb6612fng-rs/compare/v0.1.1...v0.2.0

Cargo.toml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
[package]
22
name = "tb6612fng"
3-
version = "0.2.0"
3+
version = "1.0.0"
44
edition = "2021"
5-
rust-version = "1.63"
5+
rust-version = "1.81"
66

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

1316
[dependencies]
1417
embedded-hal = "1.0"
1518

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

1821
[dev-dependencies]
19-
embedded-hal-mock = "0.11"
22+
embedded-hal-mock = { version = "0.11", default-features = false, features = ["eh1"] }

README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,25 @@ See the documentation for usage examples.
2020
* You plan on using a single motor with the standby feature: use `Motor` and control the standby pin manually
2121
* You plan on using a single motor without the standby feature: use `Motor`
2222

23-
## Optional features
24-
* `defmt`: you can enable the [`defmt`](https://defmt.ferrous-systems.com/) feature to get a `defmt::debug!` call for every speed change.
25-
2623
## Examples
2724
A simple example for the STM32F4 microcontrollers is [available](examples/stm32f4-single-motor-example/README.md).
2825

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

32-
## Roadmap to v1.0.0
33-
This crate is already stable, however it's based on a release candidate version of [`embedded-hal`](https://github.com/rust-embedded/embedded-hal/),
34-
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).
35-
36-
See [the tracking issue](https://github.com/rust-embedded-community/tb6612fng-rs/issues/4) for the roadmap to v1.0.0.
37-
3829
## Minimum Supported Rust Version (MSRV)
39-
This crate is guaranteed to compile on stable Rust 1.62 and up. It *might*
30+
This crate is guaranteed to compile on stable Rust 1.81 and up. It *might*
4031
compile with older versions but that may change in any new patch release.
32+
33+
## License
34+
Licensed under either of
35+
36+
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
37+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
38+
39+
at your option.
40+
41+
## Contribution
42+
Unless you explicitly state otherwise, any contribution intentionally submitted
43+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
44+
dual licensed as above, without any additional terms or conditions.

examples/stm32f4-single-motor-example/Cargo.lock

+26-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)