Add firmware information

This commit is contained in:
2026-02-18 13:20:05 +01:00
parent 042d89354a
commit a2f5d00c6d
2 changed files with 36 additions and 25 deletions

View File

@@ -1,24 +1,29 @@
package radio
import "math"
import (
"math"
"time"
)
// Info descriptor.
type Info struct {
Name string `yaml:"name" json:"name"` // Name of the device
Device string `yaml:"device" json:"device"` // Device type
Manufacturer string `yaml:"manufacturer" json:"manufacturer"` // Device manufacturer
Antenna string `yaml:"antenna" json:"antenna"` // Antenna type
Modulation string `yaml:"modulation" json:"modulation"` // Modulation (constant from protocol)
Position *Position `yaml:"position" json:"position"` // Position
Frequency float64 `yaml:"frequency" json:"frequency"` // Frequency (in MHz)
RXFrequency float64 `yaml:"rx_frequency" json:"rx_frequency,omitempty"` // Used with split VFOs
TXFrequency float64 `yaml:"tx_frequency" json:"tx_frequency,omitempty"` // Used with split VFOs
Bandwidth float64 `yaml:"bandwidth" json:"bandwidth"` // Bandwidth (in kHz)
Power float64 `yaml:"power" json:"power"` // Power (in dBm)
Gain float64 `yaml:"gain" json:"gain"` // Gain (in dBm)
LoRaSF uint8 `yaml:"lora_sf" json:"lora_sf,omitempty"` // LoRa spreading factor
LoRaCR uint8 `yaml:"lora_cr" json:"lora_cr,omitempty"` // LoRa coding rate
Extra map[string]any `yaml:"extra" json:"extra"` // Extra metadata
Name string `yaml:"name" json:"name"` // Name of the device
Device string `yaml:"device" json:"device"` // Device type
Manufacturer string `yaml:"manufacturer" json:"manufacturer"` // Device manufacturer
FirmwareDate time.Time `yaml:"firmware_date" json:"firmware_date,omitempty"` // Firmware date
FirmwareVersion string `yaml:"firmware_version" json:"firmware_version"` // Firmware version
Antenna string `yaml:"antenna" json:"antenna"` // Antenna type
Modulation string `yaml:"modulation" json:"modulation"` // Modulation (constant from protocol)
Position *Position `yaml:"position" json:"position"` // Position
Frequency float64 `yaml:"frequency" json:"frequency"` // Frequency (in MHz)
RXFrequency float64 `yaml:"rx_frequency" json:"rx_frequency,omitempty"` // Used with split VFOs
TXFrequency float64 `yaml:"tx_frequency" json:"tx_frequency,omitempty"` // Used with split VFOs
Bandwidth float64 `yaml:"bandwidth" json:"bandwidth"` // Bandwidth (in kHz)
Power float64 `yaml:"power" json:"power"` // Power (in dBm)
Gain float64 `yaml:"gain" json:"gain"` // Gain (in dBm)
LoRaSF uint8 `yaml:"lora_sf" json:"lora_sf,omitempty"` // LoRa spreading factor
LoRaCR uint8 `yaml:"lora_cr" json:"lora_cr,omitempty"` // LoRa coding rate
Extra map[string]any `yaml:"extra" json:"extra"` // Extra metadata
}
type Position struct {