aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 9073975..134ee11 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -39,13 +39,15 @@ fn create_pts_pair() -> std::io::Result<File> {
}
fn main() {
- println!("Creating PTY pair");
+ eprintln!("Creating PTY pair");
let master_file = match create_pts_pair() {
Ok(fd) => fd,
Err(e) => panic!("create_pts_pair failed: {}", e)
};
+ eprintln!("PTS master: {:?}", master_file);
+
let slavename;
unsafe {
slavename = libc::ptsname(master_file.as_raw_fd());
@@ -56,7 +58,7 @@ fn main() {
}
unsafe {
let slice = CStr::from_ptr(slavename);
- println!("PTS slave: {:?}", slice);
+ eprintln!("PTS slave: {:?}", slice);
}
match RF95::new(Bandwidth::Bw250, CodingRate::Cr8, SpreadingFactor::Sf10) {
@@ -67,7 +69,7 @@ fn main() {
println!("Device version: {:02x}", ver);
}
else {
- println!("Cannot read device version");
+ eprintln!("Cannot read device version");
}
},
Err(e) => panic!("Cannot create lora radio object, {}", e)