]> code.octet-stream.net Git - m17rt/blobdiff - m17core/src/reflector/convert.rs
Make netclient work against mrefd
[m17rt] / m17core / src / reflector / convert.rs
index ecbb5a5c6573bc673add323e8e4abcd8ee3f9e14..716e68ac3beb2fdfafe8887f55a12e710895d8e3 100644 (file)
@@ -62,6 +62,7 @@ impl VoiceToRf {
 ///
 /// For a series of transmissions this object should be re-used so that Stream ID is correctly
 /// changed after each new LSF.
 ///
 /// For a series of transmissions this object should be re-used so that Stream ID is correctly
 /// changed after each new LSF.
+#[derive(Debug, Clone)]
 pub struct RfToVoice {
     lsf: LsfFrame,
     stream_id: u16,
 pub struct RfToVoice {
     lsf: LsfFrame,
     stream_id: u16,
@@ -69,7 +70,9 @@ pub struct RfToVoice {
 
 impl RfToVoice {
     pub fn new(lsf: LsfFrame) -> Self {
 
 impl RfToVoice {
     pub fn new(lsf: LsfFrame) -> Self {
-        Self { lsf, stream_id: 0 }
+        // no_std "random"
+        let stream_id = &lsf as *const LsfFrame as u16;
+        Self { lsf, stream_id }
     }
 
     pub fn process_lsf(&mut self, lsf: LsfFrame) {
     }
 
     pub fn process_lsf(&mut self, lsf: LsfFrame) {