pub(crate) enum RadioCommand {
Show 35 variants
ReadMemory,
WriteMemory(Vec<u8>),
TuneChannel {
band: Band,
channel: u16,
},
FreqUp(Band),
FreqDown(Band),
TuneFreq {
band: Band,
freq: u32,
},
SetSquelch {
band: Band,
level: SquelchLevel,
},
SetAttenuator {
band: Band,
enabled: bool,
},
SetMode {
band: Band,
mode: Mode,
},
SetLock(bool),
SetDualBand(bool),
SetBluetooth(bool),
SetVox(bool),
SetVoxGain(VoxGain),
SetVoxDelay(VoxDelay),
SetTncBaud(TncBaud),
SetBeaconType(BeaconMode),
SetGpsConfig(bool, bool),
SetFmRadio(bool),
SetCallsignSlot(CallsignSlot),
SetDstarSlot(DstarSlot),
SetStepSize {
band: Band,
step: StepSize,
},
SetScanResumeCat(ScanResumeMethod),
McpWriteByte {
offset: u16,
value: u8,
},
SetPower {
band: Band,
level: PowerLevel,
},
SetUrcall {
callsign: String,
suffix: String,
},
ConnectReflector {
name: String,
module: char,
},
DisconnectReflector,
SetCQ,
EnterDStar {
config: DStarGatewayConfig,
},
ExitDStar,
EnterAprs {
config: Box<AprsClientConfig>,
},
ExitAprs,
SendAprsMessage {
addressee: String,
text: String,
},
BeaconPosition {
lat: f64,
lon: f64,
comment: String,
},
}Expand description
Commands sent from the app to the radio task.
Variants§
ReadMemory
Trigger a full MCP memory read from the radio.
WriteMemory(Vec<u8>)
Trigger a full MCP memory write to the radio.
TuneChannel
Tune the given band to a memory channel number.
FreqUp(Band)
Step frequency up by one increment on the given band.
FreqDown(Band)
Step frequency down by one increment on the given band.
TuneFreq
Tune to a specific frequency on the given band.
SetSquelch
Set the squelch level for the given band (SQ write — verified working).
SetAttenuator
Toggle the attenuator for the given band (RA write — verified working).
SetMode
Set the operating mode for the given band (MD write — may return N in some modes).
SetLock(bool)
Toggle lock on/off (LC write — verified working, value inverted on D75).
SetDualBand(bool)
Toggle dual band on/off (DL write — verified working, value inverted on D75).
SetBluetooth(bool)
Toggle bluetooth on/off (BT write — verified working).
SetVox(bool)
Toggle VOX on/off (VX write — verified working).
SetVoxGain(VoxGain)
Set VOX gain (VG write — verified working).
SetVoxDelay(VoxDelay)
Set VOX delay (VD write — verified working).
SetTncBaud(TncBaud)
Set TNC baud rate (AS write — verified working).
SetBeaconType(BeaconMode)
Set beacon type (PT write — verified working).
SetGpsConfig(bool, bool)
Set GPS config (GP write — verified working).
SetFmRadio(bool)
Set FM radio on/off (FR write — verified working).
SetCallsignSlot(CallsignSlot)
Set D-STAR callsign slot (CS write — verified working).
Not yet wired to adjust_setting (requires polling current slot first).
SetDstarSlot(DstarSlot)
Set D-STAR slot (DS write — verified working).
Not yet wired to adjust_setting (requires polling current slot first).
SetStepSize
Set the step size for the given band (SF write — verified working).
SetScanResumeCat(ScanResumeMethod)
Set the scan resume method (SR write — write-only on D75).
McpWriteByte
Write a single byte to MCP memory via modify_memory_page.
Enters MCP mode, modifies one byte, exits. USB drops and reconnects.
Used for settings where CAT writes are rejected by D75 firmware.
SetPower
Set the transmit power level for the given band.
SetUrcall
Set D-STAR URCALL callsign via CAT (works in normal CAT mode).
ConnectReflector
Connect to a D-STAR reflector via CAT (sets URCALL to link command).
Fields
DisconnectReflector
Disconnect from the current D-STAR reflector via CAT.
SetCQ
Set URCALL to CQCQCQ via CAT.
EnterDStar
Enter D-STAR gateway mode (MMDVM/DStarGateway).
Fields
config: DStarGatewayConfigD-STAR gateway configuration.
ExitDStar
Exit D-STAR gateway mode.
EnterAprs
Enter APRS/KISS mode. The radio task enters KISS mode and starts processing APRS packets instead of CAT polling.
Fields
ExitAprs
Exit APRS/KISS mode. Returns to CAT polling.
SendAprsMessage
Send an APRS message to a station while in APRS mode.
BeaconPosition
Transmit a manual position beacon while in APRS mode.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RadioCommand
impl RefUnwindSafe for RadioCommand
impl Send for RadioCommand
impl Sync for RadioCommand
impl Unpin for RadioCommand
impl UnwindSafe for RadioCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more