Skip to content

Commit a955b13

Browse files
committed
Fix github action definitions
1 parent 515addd commit a955b13

File tree

8 files changed

+390
-377
lines changed

8 files changed

+390
-377
lines changed

.github/workflows/run-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
uses: actions-rs/cargo@v1
1818
with:
1919
command: clippy
20+
args: --features defmt
2021
format:
2122
runs-on: ubuntu-latest
2223
steps:
@@ -67,4 +68,4 @@ jobs:
6768
- name: Test
6869
run: |
6970
set -ex
70-
cargo test
71+
cargo test --features defmt

src/config.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
// Copyright 2020-2021 Erik Henriksson
88

9-
109
use crate::register::*;
1110

1211
use radio::ReceiveInfo;
@@ -143,7 +142,7 @@ impl Default for Config {
143142
channel: Channel::default(),
144143
power: 13,
145144
xtal_freq: 32_000_000u32,
146-
freq_step: 61.03515625,
145+
freq_step: 61.035156,
147146
timeout_ticks: 2048,
148147
rssi_threshold: 200, // -100 dBm
149148
auto_rx_restart: AutoRxRestart::On,
@@ -167,24 +166,18 @@ pub enum PayloadMode {
167166
}
168167

169168
/// Received packet information
170-
#[derive(Clone, PartialEq, Debug)]
169+
#[derive(Clone, PartialEq, Debug, Default)]
171170
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
172171
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
173172
pub struct PacketInfo {
174-
/// Received Signal Strength Indication
175-
pub rssi: i16,
176-
/// Signal to Noise Ratio
177-
pub snr: Option<i16>,
178-
}
179-
180-
impl Default for PacketInfo {
181-
fn default() -> Self {
182-
Self { rssi: 0, snr: None }
183-
}
173+
/// Received Signal Strength Indication
174+
pub rssi: i16,
175+
/// Signal to Noise Ratio
176+
pub snr: Option<i16>,
184177
}
185178

186179
impl ReceiveInfo for PacketInfo {
187180
fn rssi(&self) -> i16 {
188181
self.rssi
189182
}
190-
}
183+
}

0 commit comments

Comments
 (0)