This commit is contained in:
John Goerzen 2020-09-21 05:30:06 -05:00
parent 87549ba45b
commit 302ee0e38d
4 changed files with 6 additions and 12 deletions

View File

@ -25,7 +25,7 @@ use std::io;
use std::thread;
use std::time::Duration;
const INTERVAL: u64 = 5;
const INTERVAL: u64 = 5; // FIXME: this should be configurable
pub fn genpings(dest: u64, sender: crossbeam_channel::Sender<XBTX>) -> io::Result<()> {
let mut counter: u64 = 1;

View File

@ -179,7 +179,7 @@ fn writerthread(
match packet.serialize() {
Ok(datatowrite) => {
trace!(
"TX ID {} to {:?} data {}",
"TX ID {:X} to {:?} data {}",
packet.frame_id,
&dest,
hex::encode(&datatowrite)

View File

@ -198,12 +198,12 @@ impl PacketStream {
let mut payload = BytesMut::new();
payload.put_u8(chunks_remaining);
payload.put_slice(chunk);
let frame_id = self.get_and_incr_framecounter();
let frame_id = self.get_and_incr_framecounter(); // FIXME: make this configurable whether we get back TX reports.
let packet = XBTXRequest {
frame_id,
dest_addr: dest.clone(),
broadcast_radius: 0,
transmit_options: 0,
transmit_options: 0x01, // FIXME: make this configurable whether or not to request ACKs (0x01 disables; 0x00 default)
payload: Bytes::from(payload),
};

View File

@ -83,14 +83,8 @@ pub fn rxxbpacket(ser: &mut XBSerReader) -> Option<RXPacket> {
let tx_retry_count = inner.get_u8();
let delivery_status = inner.get_u8();
let discovery_status = inner.get_u8();
let txstatus = ExtTxStatus {
frame_id,
dest_addr_16,
tx_retry_count,
delivery_status,
discovery_status,
};
trace!("TX STATUS: {:?}", txstatus);
trace!("TX STATUS: frame_id: {:X}, dest_addr_16: {:X}, tx_retry_count: {:X}, delivery_status: {:X}, discovery_status: {:X}",
frame_id, dest_addr_16, tx_retry_count, delivery_status, discovery_status);
None
}
0x90 => {