Use pointers to create partial configuration updates
This commit is contained in:
parent
70ddfe49ed
commit
1dcd03e455
|
@ -14,26 +14,26 @@ type Configuration struct {
|
||||||
|
|
||||||
// RTKSettings -
|
// RTKSettings -
|
||||||
type RTKSettings struct {
|
type RTKSettings struct {
|
||||||
GLONASSARMode string `mapstructure:"glonass ar mode"`
|
GLONASSARMode *string `mapstructure:"glonass ar mode,omitempty"`
|
||||||
UpdateRate string `mapstructure:"update rate"`
|
UpdateRate *string `mapstructure:"update rate,omitempty"`
|
||||||
ElevationMaskAngle string `mapstructure:"elevation mask angle"`
|
ElevationMaskAngle *string `mapstructure:"elevation mask angle,omitempty"`
|
||||||
MaxHorizontalAcceleration string `mapstructure:"max horizontal acceleration"`
|
MaxHorizontalAcceleration *string `mapstructure:"max horizontal acceleration,omitempty"`
|
||||||
SNRMask string `mapstructure:"snr mask"`
|
SNRMask *string `mapstructure:"snr mask,omitempty"`
|
||||||
GPSARMode string `mapstructure:"gps ar mode"`
|
GPSARMode *string `mapstructure:"gps ar mode,omitempty"`
|
||||||
PositionningMode string `mapstructure:"positioning mode"`
|
PositionningMode *string `mapstructure:"positioning mode,omitempty"`
|
||||||
PositioningSystems *PositionningSystems `mapstructure:"positioning systems,omitempty"`
|
PositioningSystems *PositionningSystems `mapstructure:"positioning systems,omitempty"`
|
||||||
MaxVerticalAcceleration string `mapstructure:"max vertical acceleration"`
|
MaxVerticalAcceleration *string `mapstructure:"max vertical acceleration,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PositionningSystems -
|
// PositionningSystems -
|
||||||
type PositionningSystems struct {
|
type PositionningSystems struct {
|
||||||
GLONASS bool `mapstructure:"glonass"`
|
GLONASS *bool `mapstructure:"glonass,omitempty"`
|
||||||
SBAS bool `mapstructure:"sbas"`
|
SBAS *bool `mapstructure:"sbas,omitempty"`
|
||||||
QZS bool `mapstructure:"qzs"`
|
QZS *bool `mapstructure:"qzs,omitempty"`
|
||||||
QZSS bool `mapstructure:"qzss"`
|
QZSS *bool `mapstructure:"qzss,omitempty"`
|
||||||
Compass bool `mapstructure:"compass"`
|
Compass *bool `mapstructure:"compass,omitempty"`
|
||||||
Galileo bool `mapstructure:"galileo"`
|
Galileo *bool `mapstructure:"galileo,omitempty"`
|
||||||
GPS bool `mapstructure:"gps"`
|
GPS *bool `mapstructure:"gps,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CorrectionInput -
|
// CorrectionInput -
|
||||||
|
@ -44,16 +44,16 @@ type CorrectionInput struct {
|
||||||
|
|
||||||
// Input -
|
// Input -
|
||||||
type Input struct {
|
type Input struct {
|
||||||
Path string `mapstructure:"path"`
|
Path *string `mapstructure:"path,omitempty"`
|
||||||
Type string `mapstructure:"type"`
|
Type *string `mapstructure:"type,omitempty"`
|
||||||
Enabled bool `mapstructure:"enabled"`
|
Enabled *bool `mapstructure:"enabled,omitempty"`
|
||||||
Format string `mapstructure:"format"`
|
Format *string `mapstructure:"format,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input2 -
|
// Input2 -
|
||||||
type Input2 struct {
|
type Input2 struct {
|
||||||
Input `mapstructure:",squash"`
|
Input `mapstructure:",squash"`
|
||||||
SendPositionToBase string `mapstructure:"send position to base"`
|
SendPositionToBase *string `mapstructure:"send position to base,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input3 -
|
// Input3 -
|
||||||
|
@ -71,10 +71,10 @@ type PositionOutput struct {
|
||||||
|
|
||||||
// Output -
|
// Output -
|
||||||
type Output struct {
|
type Output struct {
|
||||||
Path string `mapstructure:"path"`
|
Path *string `mapstructure:"path,omitempty"`
|
||||||
Type string `mapstructure:"type"`
|
Type *string `mapstructure:"type,omitempty"`
|
||||||
Enabled bool `mapstructure:"enabled"`
|
Enabled *bool `mapstructure:"enabled,omitempty"`
|
||||||
Format string `mapstructure:"format"`
|
Format *string `mapstructure:"format,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// BaseMode -
|
// BaseMode -
|
||||||
|
@ -86,18 +86,18 @@ type BaseMode struct {
|
||||||
|
|
||||||
// BaseCoordinates -
|
// BaseCoordinates -
|
||||||
type BaseCoordinates struct {
|
type BaseCoordinates struct {
|
||||||
Format string `mapstructure:"format"`
|
Format *string `mapstructure:"format,omitempty"`
|
||||||
AntennaOffset *AntennaOffset `mapstructure:"antenna offset,omitempty"`
|
AntennaOffset *AntennaOffset `mapstructure:"antenna offset,omitempty"`
|
||||||
Accumulation string `mapstructure:"accumulation"`
|
Accumulation *string `mapstructure:"accumulation,omitempty"`
|
||||||
Coordinates []string `mapstructure:"coordinates"`
|
Coordinates *[]string `mapstructure:"coordinates,omitempty"`
|
||||||
Mode string `mapstructure:"mode"`
|
Mode *string `mapstructure:"mode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AntennaOffset -
|
// AntennaOffset -
|
||||||
type AntennaOffset struct {
|
type AntennaOffset struct {
|
||||||
East string `mapstructure:"east"`
|
East *string `mapstructure:"east,omitempty"`
|
||||||
North string `mapstructure:"north"`
|
North *string `mapstructure:"north,omitempty"`
|
||||||
Up string `mapstructure:"up"`
|
Up *string `mapstructure:"up,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RTCM3Messages -
|
// RTCM3Messages -
|
||||||
|
@ -137,28 +137,28 @@ type Logging struct {
|
||||||
Solution *LoggingService `mapstructure:"solution,omitempty"`
|
Solution *LoggingService `mapstructure:"solution,omitempty"`
|
||||||
Raw *LoggingService `mapstructure:"raw,omitempty"`
|
Raw *LoggingService `mapstructure:"raw,omitempty"`
|
||||||
Base *LoggingService `mapstructure:"base,omitempty"`
|
Base *LoggingService `mapstructure:"base,omitempty"`
|
||||||
Overwrite bool `mapstructure:"overwrite"`
|
Overwrite *bool `mapstructure:"overwrite,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoggingService -
|
// LoggingService -
|
||||||
type LoggingService struct {
|
type LoggingService struct {
|
||||||
Started bool `mapstructure:"started"`
|
Started *bool `mapstructure:"started,omitempty"`
|
||||||
Version string `mapstructure:"version"`
|
Version *string `mapstructure:"version,omitempty"`
|
||||||
Format string `mapstructure:"format"`
|
Format *string `mapstructure:"format,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bluetooth -
|
// Bluetooth -
|
||||||
type Bluetooth struct {
|
type Bluetooth struct {
|
||||||
Enabled bool `mapstructure:"enabled"`
|
Enabled *bool `mapstructure:"enabled,omitempty"`
|
||||||
Discoverable bool `mapstructure:"discoverable"`
|
Discoverable *bool `mapstructure:"discoverable,omitempty"`
|
||||||
Pin int `mapstructure:"pin"`
|
Pin *int `mapstructure:"pin,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoRa -
|
// LoRa -
|
||||||
type LoRa struct {
|
type LoRa struct {
|
||||||
AirRate float64 `mapstructure:"air rate"`
|
AirRate *string `mapstructure:"air rate,omitempty"`
|
||||||
Frequency int `mapstructure:"frequency"`
|
Frequency *float64 `mapstructure:"frequency,omitempty"`
|
||||||
OutputPower int `mapstructure:"output power"`
|
OutputPower *string `mapstructure:"output power,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constraints -
|
// Constraints -
|
||||||
|
@ -173,6 +173,6 @@ type LoRaConstraints struct {
|
||||||
|
|
||||||
// LoRaFrequencyRange -
|
// LoRaFrequencyRange -
|
||||||
type LoRaFrequencyRange struct {
|
type LoRaFrequencyRange struct {
|
||||||
Min int `mapstructure:"min"`
|
Min *int `mapstructure:"min,omitempty"`
|
||||||
Max int `mapstructure:"max"`
|
Max *int `mapstructure:"max,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue