X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/777e27c79ca4f3b41432898238cf114a386142aa..e307431f908eedae321aa86565fd5e213d758216:/m17core/src/reflector/convert.rs diff --git a/m17core/src/reflector/convert.rs b/m17core/src/reflector/convert.rs index ecbb5a5..716e68a 100644 --- a/m17core/src/reflector/convert.rs +++ b/m17core/src/reflector/convert.rs @@ -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. +#[derive(Debug, Clone)] pub struct RfToVoice { lsf: LsfFrame, stream_id: u16, @@ -69,7 +70,9 @@ pub struct RfToVoice { 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) {