Documentation
¶
Index ¶
- Variables
- func AtoVFO(a string) (client.VFO, error)
- func Project(r ValueRange, value int) uint8
- func RangeTick(r ValueRange) float64
- func Translate(r ValueRange, value uint8) int
- func TrimToRange(r ValueRange, value int) int
- type CWController
- type CWSpeedControl
- type CWSpeedController
- type ControlFactory
- type ControlType
- type Encoder
- type FilterBandButton
- type FilterWidthControl
- type InfiniteRange
- type LED
- type MOXButton
- type MOXEnabler
- type Mapping
- func (m Mapping) BoolOption(name string, defaultValue bool) bool
- func (m Mapping) IntOption(name string, defaultValue int) (int, error)
- func (m Mapping) MidiKey() MidiKey
- func (m Mapping) RequiredIntOption(name string) (int, bool, error)
- func (m Mapping) ValueControlOptions(defaultStepSize int) (controlType ControlType, stepSize int, reverseDirection bool, dynamicMode bool, ...)
- type MappingType
- type MidiKey
- type ModeButton
- type ModeController
- type MuteButton
- type Muter
- type Poti
- type RITControl
- type RITController
- type RITEnableButton
- type RITEnabler
- type RXBalanceControl
- type RXBalanceController
- type RXChannelEnableButton
- type RXChannelEnabler
- type RXFilterBandController
- type RXMixController
- type RXMixer
- type RXMixer2
- type RXVolumeControl
- type RXVolumeController
- type SendCWButton
- type SetRXBalanceButton
- type SetRXMixerButton
- type SetRXVolumeButton
- type SplitEnableButton
- type SplitEnabler
- type StaticRange
- type StopCWButton
- type SyncVFOFrequencyButton
- type TuneButton
- type TuneEnabler
- type VFOEncoder
- type VFOFrequencyController
- type VFOFrequencyProvider
- type ValueControl
- type ValueRange
- type VolumeControl
- type VolumeController
- type XITControl
- type XITController
- type XITEnableButton
- type XITEnabler
Constants ¶
This section is empty.
Variables ¶
View Source
var Factories = make(map[MappingType]ControlFactory)
Functions ¶
func Project ¶ added in v0.4.0
func Project(r ValueRange, value int) uint8
func RangeTick ¶ added in v0.4.0
func RangeTick(r ValueRange) float64
func Translate ¶ added in v0.4.0
func Translate(r ValueRange, value uint8) int
func TrimToRange ¶ added in v0.4.0
func TrimToRange(r ValueRange, value int) int
Types ¶
type CWController ¶ added in v0.4.0
type CWSpeedControl ¶ added in v0.4.0
type CWSpeedControl struct {
ValueControl
}
func NewCWSpeedControl ¶ added in v0.4.0
func NewCWSpeedControl(key MidiKey, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, controller CWController) *CWSpeedControl
func (*CWSpeedControl) SetCWMacrosSpeed ¶ added in v0.4.0
func (s *CWSpeedControl) SetCWMacrosSpeed(wpm int)
type CWSpeedController ¶ added in v0.4.0
type ControlFactory ¶ added in v0.4.0
type ControlType ¶ added in v0.4.0
type ControlType int
const ( UnknownControl ControlType = iota ButtonControl PotiControl EncoderControl )
type Encoder ¶ added in v0.4.0
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶ added in v0.4.0
func (*Encoder) SetActiveValue ¶ added in v0.4.0
type FilterBandButton ¶
type FilterBandButton struct {
// contains filtered or unexported fields
}
func NewFilterBandButton ¶
func NewFilterBandButton(key MidiKey, trx int, bottomFrequency int, topFrequency int, mode client.Mode, led LED, controller RXFilterBandController) *FilterBandButton
func (*FilterBandButton) Pressed ¶
func (b *FilterBandButton) Pressed()
func (*FilterBandButton) SetMode ¶ added in v0.5.0
func (b *FilterBandButton) SetMode(trx int, mode client.Mode)
func (*FilterBandButton) SetRXFilterBand ¶
func (b *FilterBandButton) SetRXFilterBand(trx int, min, max int)
type FilterWidthControl ¶ added in v0.4.0
type FilterWidthControl struct { ValueControl // contains filtered or unexported fields }
func NewFilterWidthControl ¶ added in v0.4.0
func NewFilterWidthControl(key MidiKey, trx int, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, controller RXFilterBandController) *FilterWidthControl
func (*FilterWidthControl) Infinite ¶ added in v0.4.0
func (s *FilterWidthControl) Infinite() bool
func (*FilterWidthControl) Max ¶ added in v0.4.0
func (s *FilterWidthControl) Max() int
func (*FilterWidthControl) Min ¶ added in v0.4.0
func (s *FilterWidthControl) Min() int
func (*FilterWidthControl) SetMode ¶ added in v0.4.0
func (s *FilterWidthControl) SetMode(trx int, mode client.Mode)
func (*FilterWidthControl) SetRXFilterBand ¶ added in v0.4.0
func (s *FilterWidthControl) SetRXFilterBand(trx int, min, max int)
type InfiniteRange ¶ added in v0.4.0
type InfiniteRange struct{}
func (InfiniteRange) Infinite ¶ added in v0.4.0
func (r InfiniteRange) Infinite() bool
func (InfiniteRange) Max ¶ added in v0.4.0
func (r InfiniteRange) Max() int
func (InfiniteRange) Min ¶ added in v0.4.0
func (r InfiniteRange) Min() int
type MOXButton ¶ added in v0.4.0
type MOXButton struct {
// contains filtered or unexported fields
}
func NewMOXButton ¶ added in v0.4.0
func NewMOXButton(key MidiKey, trx int, led LED, enabler MOXEnabler) *MOXButton
type MOXEnabler ¶ added in v0.4.0
type MOXEnabler interface {
SetTX(int, bool, client.SignalSource) error
}
type Mapping ¶
type Mapping struct { Type MappingType `json:"type"` Channel byte `json:"channel"` Key int8 `json:"key"` TRX int `json:"trx"` VFO string `json:"vfo"` Options map[string]string `json:"options"` }
func (Mapping) BoolOption ¶ added in v0.5.0
func (Mapping) RequiredIntOption ¶ added in v0.5.0
func (Mapping) ValueControlOptions ¶ added in v0.4.0
type MappingType ¶
type MappingType string
const ( SendCWMapping MappingType = "send_cw" StopCWMapping MappingType = "stop_cw" CWSpeedMapping MappingType = "cw_speed" )
const ( FilterMapping MappingType = "filter" FilterWidthMapping MappingType = "filter_width" )
const ( MuteMapping MappingType = "mute" VolumeMapping MappingType = "volume" )
const ( EnableRITMapping MappingType = "enable_rit" RITMapping MappingType = "rit" EnableXITMapping MappingType = "enable_xit" XITMapping MappingType = "xit" )
const ( MixerMapping MappingType = "rx_mixer" SetMixerMapping MappingType = "set_rx_mixer" )
const ( EnableRXMapping MappingType = "enable_rx" RXVolumeMapping MappingType = "rx_volume" SetRXVolumeMapping MappingType = "set_rx_volume" RXBalanceMapping MappingType = "rx_balance" SetRXBalanceMapping MappingType = "set_rx_balance" )
const ( EnableSplitMapping MappingType = "enable_split" SyncVFOFrequencyMapping MappingType = "sync_vfo_frequency" )
const ( MOXMapping MappingType = "mox" TuneMapping MappingType = "tune" )
const ModeMapping MappingType = "mode"
const VFOMapping MappingType = "vfo"
type ModeButton ¶
type ModeButton struct {
// contains filtered or unexported fields
}
func NewModeButton ¶
func NewModeButton(key MidiKey, trx int, mode client.Mode, led LED, controller ModeController) *ModeButton
func (*ModeButton) Pressed ¶
func (b *ModeButton) Pressed()
type MuteButton ¶
type MuteButton struct {
// contains filtered or unexported fields
}
func NewMuteButton ¶
func NewMuteButton(key MidiKey, led LED, muter Muter) *MuteButton
func (*MuteButton) Pressed ¶
func (b *MuteButton) Pressed()
func (*MuteButton) SetMute ¶
func (b *MuteButton) SetMute(muted bool)
type Poti ¶ added in v0.4.0
type Poti struct {
// contains filtered or unexported fields
}
func NewPoti ¶ added in v0.4.0
func NewPoti(key MidiKey, set func(int), valueRange ValueRange, led LED) *Poti
func (*Poti) SetActiveValue ¶ added in v0.4.0
type RITControl ¶ added in v0.4.0
type RITControl struct { ValueControl // contains filtered or unexported fields }
func NewRITControl ¶ added in v0.4.0
func NewRITControl(key MidiKey, trx int, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, frequencyRange int, controller RITController) *RITControl
func (*RITControl) SetRITOffset ¶ added in v0.4.0
func (s *RITControl) SetRITOffset(trx int, offset int)
type RITController ¶
type RITEnableButton ¶
type RITEnableButton struct {
// contains filtered or unexported fields
}
func NewRITEnableButton ¶
func NewRITEnableButton(key MidiKey, trx int, led LED, reset bool, ritEnabler RITEnabler) *RITEnableButton
func (*RITEnableButton) Pressed ¶
func (b *RITEnableButton) Pressed()
func (*RITEnableButton) SetRITEnable ¶
func (b *RITEnableButton) SetRITEnable(trx int, enabled bool)
type RITEnabler ¶
type RXBalanceControl ¶ added in v0.4.0
type RXBalanceControl struct { ValueControl // contains filtered or unexported fields }
func NewRXBalanceControl ¶ added in v0.4.0
func NewRXBalanceControl(key MidiKey, trx int, vfo client.VFO, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, controller RXBalanceController) *RXBalanceControl
func (*RXBalanceControl) SetRXBalance ¶ added in v0.4.0
func (s *RXBalanceControl) SetRXBalance(trx int, vfo client.VFO, balance int)
type RXBalanceController ¶
type RXChannelEnableButton ¶
type RXChannelEnableButton struct {
// contains filtered or unexported fields
}
func NewRXChannelEnableButton ¶
func NewRXChannelEnableButton(key MidiKey, trx int, vfo client.VFO, led LED, rxChannelEnabler RXChannelEnabler) *RXChannelEnableButton
func (*RXChannelEnableButton) Pressed ¶
func (b *RXChannelEnableButton) Pressed()
func (*RXChannelEnableButton) SetRXChannelEnable ¶
func (b *RXChannelEnableButton) SetRXChannelEnable(trx int, vfo client.VFO, enabled bool)
type RXChannelEnabler ¶
type RXFilterBandController ¶
type RXMixController ¶
type RXMixer ¶
type RXMixer struct {
// contains filtered or unexported fields
}
func NewRXMixer ¶
func NewRXMixer(trx int, controller RXMixController) *RXMixer
type RXMixer2 ¶ added in v0.5.1
type RXMixer2 struct { ValueControl // contains filtered or unexported fields }
experimental
func NewRXMixer2 ¶ added in v0.5.1
func NewRXMixer2(key MidiKey, trx int, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, controller RXMixController) *RXMixer2
func (*RXMixer2) SetRXBalance ¶ added in v0.5.1
type RXVolumeControl ¶ added in v0.4.0
type RXVolumeControl struct { ValueControl // contains filtered or unexported fields }
func NewRXVolumeControl ¶ added in v0.4.0
func NewRXVolumeControl(key MidiKey, trx int, vfo client.VFO, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, controller RXVolumeController) *RXVolumeControl
func (*RXVolumeControl) SetRXVolume ¶ added in v0.4.0
func (s *RXVolumeControl) SetRXVolume(trx int, vfo client.VFO, volume int)
type RXVolumeController ¶
type SendCWButton ¶ added in v0.4.0
type SendCWButton struct {
// contains filtered or unexported fields
}
func NewSendCWButton ¶ added in v0.4.0
func NewSendCWButton(key MidiKey, trx int, led LED, text string, controller CWController) *SendCWButton
func (*SendCWButton) Pressed ¶ added in v0.4.0
func (b *SendCWButton) Pressed()
type SetRXBalanceButton ¶ added in v0.5.0
type SetRXBalanceButton struct {
// contains filtered or unexported fields
}
func NewSetRXBalanceButton ¶ added in v0.5.0
func NewSetRXBalanceButton(key MidiKey, trx int, vfo client.VFO, led LED, value int, controller RXBalanceController) *SetRXBalanceButton
func (*SetRXBalanceButton) Pressed ¶ added in v0.5.0
func (b *SetRXBalanceButton) Pressed()
func (*SetRXBalanceButton) SetRXBalance ¶ added in v0.5.0
func (b *SetRXBalanceButton) SetRXBalance(trx int, vfo client.VFO, balance int)
type SetRXMixerButton ¶ added in v0.5.0
type SetRXMixerButton struct {
// contains filtered or unexported fields
}
func NewSetRXMixerButton ¶ added in v0.5.0
func NewSetRXMixerButton(key MidiKey, trx int, led LED, volumeA, volumeB, balanceA, balanceB int, controller RXMixController) *SetRXMixerButton
func (*SetRXMixerButton) Pressed ¶ added in v0.5.0
func (b *SetRXMixerButton) Pressed()
func (*SetRXMixerButton) SetRXBalance ¶ added in v0.5.0
func (b *SetRXMixerButton) SetRXBalance(trx int, vfo client.VFO, balance int)
func (*SetRXMixerButton) SetRXVolume ¶ added in v0.5.0
func (b *SetRXMixerButton) SetRXVolume(trx int, vfo client.VFO, volume int)
type SetRXVolumeButton ¶ added in v0.5.0
type SetRXVolumeButton struct {
// contains filtered or unexported fields
}
func NewSetRXVolumeButton ¶ added in v0.5.0
func NewSetRXVolumeButton(key MidiKey, trx int, vfo client.VFO, led LED, value int, controller RXVolumeController) *SetRXVolumeButton
func (*SetRXVolumeButton) Pressed ¶ added in v0.5.0
func (b *SetRXVolumeButton) Pressed()
func (*SetRXVolumeButton) SetRXVolume ¶ added in v0.5.0
func (b *SetRXVolumeButton) SetRXVolume(trx int, vfo client.VFO, volume int)
type SplitEnableButton ¶
type SplitEnableButton struct {
// contains filtered or unexported fields
}
func NewSplitEnableButton ¶
func NewSplitEnableButton(key MidiKey, trx int, led LED, splitEnabler SplitEnabler) *SplitEnableButton
func (*SplitEnableButton) Pressed ¶
func (b *SplitEnableButton) Pressed()
func (*SplitEnableButton) SetSplitEnable ¶
func (b *SplitEnableButton) SetSplitEnable(trx int, enabled bool)
type SplitEnabler ¶
type StaticRange ¶ added in v0.4.0
type StaticRange struct {
// contains filtered or unexported fields
}
func (StaticRange) Infinite ¶ added in v0.4.0
func (r StaticRange) Infinite() bool
func (StaticRange) Max ¶ added in v0.4.0
func (r StaticRange) Max() int
func (StaticRange) Min ¶ added in v0.4.0
func (r StaticRange) Min() int
type StopCWButton ¶ added in v0.4.0
type StopCWButton struct {
// contains filtered or unexported fields
}
func NewStopCWButton ¶ added in v0.4.0
func NewStopCWButton(key MidiKey, trx int, led LED, controller CWController) *StopCWButton
func (*StopCWButton) Pressed ¶ added in v0.4.0
func (b *StopCWButton) Pressed()
type SyncVFOFrequencyButton ¶
type SyncVFOFrequencyButton struct {
// contains filtered or unexported fields
}
func NewSyncVFOFrequencyButton ¶
func NewSyncVFOFrequencyButton(srcTrx int, srcVFO client.VFO, dstTrx int, dstVFO client.VFO, offset int, controller VFOFrequencyController, provider VFOFrequencyProvider) *SyncVFOFrequencyButton
func (*SyncVFOFrequencyButton) Pressed ¶
func (b *SyncVFOFrequencyButton) Pressed()
type TuneButton ¶ added in v0.4.0
type TuneButton struct {
// contains filtered or unexported fields
}
func NewTuneButton ¶ added in v0.4.0
func NewTuneButton(key MidiKey, trx int, led LED, enabler TuneEnabler) *TuneButton
func (*TuneButton) Pressed ¶ added in v0.4.0
func (b *TuneButton) Pressed()
func (*TuneButton) SetTune ¶ added in v0.4.0
func (b *TuneButton) SetTune(trx int, ptt bool)
type TuneEnabler ¶ added in v0.4.0
type VFOEncoder ¶ added in v0.4.0
type VFOEncoder struct { *Encoder // contains filtered or unexported fields }
func NewVFOEncoder ¶ added in v0.4.0
func NewVFOEncoder(trx int, vfo client.VFO, stepSize int, reverseDirection bool, dynamicMode bool, controller VFOFrequencyController) *VFOEncoder
func (*VFOEncoder) SetVFOFrequency ¶ added in v0.4.0
func (e *VFOEncoder) SetVFOFrequency(trx int, vfo client.VFO, frequency int)
type VFOFrequencyController ¶
type VFOFrequencyProvider ¶
type ValueControl ¶ added in v0.4.0
func NewValueControl ¶ added in v0.4.0
func NewValueControl(key MidiKey, controlType ControlType, set func(int), valueRange ValueRange, led LED, stepSize int, reverseDirection bool, dynamicMode bool) ValueControl
type ValueRange ¶ added in v0.4.0
type VolumeControl ¶ added in v0.4.0
type VolumeControl struct {
ValueControl
}
func NewVolumeControl ¶ added in v0.4.0
func NewVolumeControl(key MidiKey, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, controller VolumeController) *VolumeControl
func (*VolumeControl) SetVolume ¶ added in v0.4.0
func (s *VolumeControl) SetVolume(volume int)
type VolumeController ¶
type XITControl ¶ added in v0.4.0
type XITControl struct { ValueControl // contains filtered or unexported fields }
func NewXITControl ¶ added in v0.4.0
func NewXITControl(key MidiKey, trx int, controlType ControlType, led LED, stepSize int, reverseDirection bool, dynamicMode bool, frequencyRange int, controller XITController) *XITControl
func (*XITControl) SetXITOffset ¶ added in v0.4.0
func (s *XITControl) SetXITOffset(trx int, offset int)
type XITController ¶
type XITEnableButton ¶
type XITEnableButton struct {
// contains filtered or unexported fields
}
func NewXITEnableButton ¶
func NewXITEnableButton(key MidiKey, trx int, led LED, reset bool, xitEnabler XITEnabler) *XITEnableButton
func (*XITEnableButton) Pressed ¶
func (b *XITEnableButton) Pressed()
func (*XITEnableButton) SetXITEnable ¶
func (b *XITEnableButton) SetXITEnable(trx int, enabled bool)
Click to show internal directories.
Click to hide internal directories.