pus modules now no_std compatible

This commit is contained in:
2022-09-11 20:51:14 +02:00
parent b4d2415033
commit 08e3242f84
11 changed files with 620 additions and 271 deletions

View File

@ -18,7 +18,9 @@ fn main() {
"Packing and sending PUS ping command TC[17,1] with request ID {}",
tc_req_id
);
let size = pus_tc.write_to(&mut buf).expect("Creating PUS TC failed");
let size = pus_tc
.write_to_bytes(&mut buf)
.expect("Creating PUS TC failed");
client
.send_to(&buf[0..size], &addr)
.expect(&*format!("Sending to {:?} failed", addr));

View File

@ -39,7 +39,7 @@ fn main() {
let (tm_funnel_tx, tm_funnel_rx) = mpsc::channel();
let (tm_server_tx, tm_server_rx) = mpsc::channel();
let sender = MpscVerifSender::new(tm_store.clone(), tm_funnel_tx.clone());
let verif_cfg = VerificationReporterCfg::new(PUS_APID, 1, 2, 8);
let verif_cfg = VerificationReporterCfg::new(PUS_APID, 1, 2, 8).unwrap();
let reporter_with_sender_0 = Arc::new(Mutex::new(VerificationReporterWithSender::new(
verif_cfg,
Box::new(sender),

View File

@ -24,7 +24,7 @@ impl TmStore {
let mut pg = self.pool.write().expect("Error locking TM store");
let (addr, buf) = pg.free_element(pus_tm.len_packed()).expect("Store error");
pus_tm
.write_to(buf)
.write_to_bytes(buf)
.expect("Writing PUS TM to store failed");
addr
}