Skip to content

Instantly share code, notes, and snippets.

@agrif
Created November 22, 2024 18:34
Show Gist options
  • Save agrif/bf4c627cf3084cb2d6957a20bf844bb8 to your computer and use it in GitHub Desktop.
Save agrif/bf4c627cf3084cb2d6957a20bf844bb8 to your computer and use it in GitHub Desktop.
let msg = aprs::Packet::Message {
destination: "AD8IZ-7".parse().unwrap(),
text: "Hello, world!".into(),
number: None,
};
let packet = ax25::Packet {
destination: "APZADZ".parse().unwrap(),
source: "AD8IZ-10".parse().unwrap(),
path: (&["WIDE1-1".parse().unwrap(), "WIDE2-1".parse().unwrap()] as &[_])
.try_into()
.unwrap(),
control: ax25::Control::u_ui(false, ax25::Protocol::None),
information: msg,
};
let frame = kiss::Message::Data(kiss::Port::P0, packet);
let data = enc.encode(&frame).expect("encoding failed");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment