Skip to content

Commit 69b2758

Browse files
committed
fix set_lna_gain setting vga gain
1 parent 561d31e commit 69b2758

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.2.2] - 2021-07-10
8+
### Fixed
9+
- Fixed `set_lna_gain` setting the VGA gain instead of the LNA gain.
10+
711
## [0.2.1] - 2021-07-06
812
### Added
913
- Added tested platforms to the README.
@@ -27,7 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2731
## [0.1.0] - 2021-05-02
2832
- Initial release
2933

30-
[Unreleased]: https://github.com/newAM/hackrfone/compare/v0.2.1...HEAD
34+
[Unreleased]: https://github.com/newAM/hackrfone/compare/v0.2.2...HEAD
35+
[0.2.2]: https://github.com/newAM/hackrfone/compare/v0.2.1...v0.2.2
3136
[0.2.1]: https://github.com/newAM/hackrfone/compare/v0.2.0...v0.2.1
3237
[0.2.0]: https://github.com/newAM/hackrfone/compare/v0.1.0...v0.2.0
3338
[0.1.0]: https://github.com/newAM/hackrfone/releases/tag/v0.1.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hackrfone"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Alex M. <alexmgit@protonmail.com>"]
55
edition = "2018"
66
repository = "https://github.com/newAM/hackrfone"

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! HackRF One API.
22
//!
33
//! To get started take a look at [`HackRfOne::new`].
4-
#![doc(html_root_url = "https://docs.rs/hackrfone/0.2.1")]
4+
#![doc(html_root_url = "https://docs.rs/hackrfone/0.2.2")]
55
#![cfg_attr(docsrs, feature(doc_cfg))]
66
#![deny(missing_docs)]
77

@@ -461,7 +461,7 @@ impl<MODE> HackRfOne<MODE> {
461461
if gain > 40 {
462462
Err(Error::Argument)
463463
} else {
464-
let buf: [u8; 1] = self.read_control(Request::SetVgaGain, gain & !0x07, 0)?;
464+
let buf: [u8; 1] = self.read_control(Request::SetLnaGain, gain & !0x07, 0)?;
465465
if buf[0] == 0 {
466466
Err(Error::Argument)
467467
} else {

0 commit comments

Comments
 (0)