Merge pull request #151 from ferrous-systems/packet-explanation

radio-puzzle: add some explanation about `packet`
This commit is contained in:
Lotte Steenbrink 2021-04-21 14:24:58 +02:00 committed by GitHub
commit dbb7ada361
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View file

@ -17,6 +17,7 @@ fn main() -> ! {
// puzzle.hex uses channel 25
radio.set_channel(Channel::_25);
// the IEEE 802.15.4 packet that will carry our data
let mut packet = Packet::new();
// first exchange a single packet with the Dongle

View file

@ -23,6 +23,7 @@ fn main() -> ! {
/* # Build a dictionary */
let mut dict = LinearMap::<u8, u8, consts::U128>::new();
// the IEEE 802.15.4 packet that will carry our data
let mut packet = Packet::new();
for plainletter in 0..=127 {
packet.copy_from_slice(&[plainletter]);

View file

@ -24,6 +24,7 @@ fn main() -> ! {
let mut dict = LinearMap::<u8, u8, consts::U128>::new();
// ^^^^^^^^^^^^ NOTE larger capacity
// the IEEE 802.15.4 packet that will carry our data
let mut packet = Packet::new();
for plainletter in 0..=127 {
// ^^^^^^^ NOTE complete ASCII range