[fix](trx-core): expose rig min tuning step and align UI tuning

Add min_freq_step_hz to RigCapabilities, set backend values, and make HTTP frontend parse suffix-less frequency input using the selected unit while snapping set/jog frequencies to rig step granularity.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-13 00:17:16 +01:00
parent a7719bd7a9
commit 81890b15a8
11 changed files with 87 additions and 12 deletions
@@ -542,6 +542,7 @@ mod tests {
model: "Mock".to_string(),
revision: "1.0".to_string(),
capabilities: RigCapabilities {
min_freq_step_hz: 1,
supported_bands: vec![],
supported_modes: vec![],
num_vfos: 2,
@@ -595,6 +596,7 @@ mod tests {
model: "Mock".to_string(),
revision: "1.0".to_string(),
capabilities: RigCapabilities {
min_freq_step_hz: 1,
supported_bands: vec![],
supported_modes: vec![],
num_vfos: 2,
@@ -439,6 +439,7 @@ mod tests {
model: "Mock".to_string(),
revision: "1.0".to_string(),
capabilities: RigCapabilities {
min_freq_step_hz: 1,
supported_bands: vec![],
supported_modes: vec![],
num_vfos: 2,
+6
View File
@@ -39,6 +39,8 @@ pub struct RigInfo {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RigCapabilities {
#[serde(default = "default_min_freq_step_hz")]
pub min_freq_step_hz: u64,
pub supported_bands: Vec<Band>,
pub supported_modes: Vec<RigMode>,
pub num_vfos: usize,
@@ -51,6 +53,10 @@ pub struct RigCapabilities {
pub split: bool,
}
fn default_min_freq_step_hz() -> u64 {
1
}
/// Common interface for rig backends.
pub trait Rig {
fn info(&self) -> &RigInfo;