change example FSK settings to more sensible values, set Variable packet type as default for FSK and MSK
This commit is contained in:
@@ -37,8 +37,8 @@ async fn main(_spawner: Spawner) {
|
|||||||
fsk.configure(&FskConfig {
|
fsk.configure(&FskConfig {
|
||||||
frequency: 868_100_000,
|
frequency: 868_100_000,
|
||||||
bitrate: Bitrate::Custom(600),
|
bitrate: Bitrate::Custom(600),
|
||||||
fdev: FreqDev::Hz(32_000),
|
fdev: FreqDev::Hz(380),
|
||||||
bandwidth: Bandwidth::Bw78_2kHz, // >= 2 * (32000 + 600/2) = 64.6 kHz
|
bandwidth: Bandwidth::Bw4_8kHz, // >= 2 * (380 + 600/2) = 1.36kHz
|
||||||
pa: PaSelection::HighPower,
|
pa: PaSelection::HighPower,
|
||||||
power_dbm: 22,
|
power_dbm: 22,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
fsk.configure(&FskConfig {
|
fsk.configure(&FskConfig {
|
||||||
frequency: 868_100_000,
|
frequency: 868_100_000,
|
||||||
bitrate: Bitrate::Custom(600),
|
bitrate: Bitrate::Custom(600),
|
||||||
fdev: FreqDev::Hz(32_000),
|
fdev: FreqDev::Hz(380),
|
||||||
pa: PaSelection::HighPower,
|
pa: PaSelection::HighPower,
|
||||||
power_dbm: 22,
|
power_dbm: 22,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ impl Default for FskConfig {
|
|||||||
// default values taken from RF0461 reference manual
|
// default values taken from RF0461 reference manual
|
||||||
sync_word: [0x97, 0x23, 0x52, 0x25, 0x56, 0x53, 0x65, 0x64],
|
sync_word: [0x97, 0x23, 0x52, 0x25, 0x56, 0x53, 0x65, 0x64],
|
||||||
addr_comp: AddrComp::Off,
|
addr_comp: AddrComp::Off,
|
||||||
packet_type: PacketLengthType::Fixed,
|
packet_type: PacketLengthType::Variable,
|
||||||
crc: CrcType::Crc2Byte,
|
crc: CrcType::Crc2Byte,
|
||||||
whitening: true,
|
whitening: true,
|
||||||
rx_gain: RxGain::Boosted,
|
rx_gain: RxGain::Boosted,
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ impl Default for MskConfig {
|
|||||||
// default values taken from RF0461 reference manual
|
// default values taken from RF0461 reference manual
|
||||||
sync_word: [0x97, 0x23, 0x52, 0x25, 0x56, 0x53, 0x65, 0x64],
|
sync_word: [0x97, 0x23, 0x52, 0x25, 0x56, 0x53, 0x65, 0x64],
|
||||||
addr_comp: AddrComp::Off,
|
addr_comp: AddrComp::Off,
|
||||||
packet_type: PacketLengthType::Fixed,
|
packet_type: PacketLengthType::Variable,
|
||||||
crc: CrcType::Crc2Byte,
|
crc: CrcType::Crc2Byte,
|
||||||
whitening: true,
|
whitening: true,
|
||||||
rx_gain: RxGain::Boosted,
|
rx_gain: RxGain::Boosted,
|
||||||
|
|||||||
Reference in New Issue
Block a user