summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-04-03 19:31:15 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-04-03 19:31:15 +0100
commit39e6030a357789637eed2e69a8b791d63911e18b (patch)
tree2bb22752804f9277cdca79aa829a14eccc23e4f8 /src/main.rs
parentef9fc91c613fc038a5f160e595176fdf7b51efe0 (diff)
downloadcanopied-39e6030a357789637eed2e69a8b791d63911e18b.tar.bz2
We can transmit packets now
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 0548678..36307e6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -26,9 +26,10 @@ fn main() {
None => {}
Some((id, data)) => {
info!("Received from {:03x} data {:?}", id, data);
+ mytp.send_packet(0x123, &data);
}
}
- while let Some(packet) = mytp.get_outgoing() {
+ while let Some(packet) = mytp.get_txqueue() {
info!(" Sending CAN frame: {:X}", packet);
waiter.send(packet).map_err(|_| ())?;
waiter.flush().map_err(|_| ())?;