Documentation ¶
Index ¶
- Constants
- Variables
- func SetLogger(newlogger logger.Logger)
- type ButtonState
- type Device
- func (d *Device) AddCallback(filter event2.Filter, cb EventCallBack)
- func (d *Device) Close()
- func (d *Device) EnableDebugLogger()
- func (d *Device) Name() string
- func (d *Device) SetBrightness(btn button.Button, val uint8) error
- func (d *Device) SetDial(val int8) error
- func (d *Device) SetPadColor(btn button.Button, col color.Color) error
- func (d *Device) SetPadColorAll(col color.Color) error
- func (d *Device) SetPadColorMany(btns []button.Button, col color.Color) error
- func (d *Device) SetPadColors(mapp button.ColorMap) error
- func (d *Device) State() State
- func (d *Device) String() string
- func (d *Device) Subscribe(channel chan<- event.Event)
- type EventCallBack
- type InState
- type LEDIntensity
- type OutState
- type PadState
- type RangeState
- type Segments
- type State
Constants ¶
View Source
const F1ProductName = "Traktor Kontrol F1"
View Source
const Off = 0
View Source
const On = 64
Variables ¶
View Source
var NumberSegmentMapping = map[int8]Segments{ 0: {Off, On, On, On, On, On, On}, 1: {Off, On, On, Off, Off, Off, Off}, 2: {On, Off, On, On, Off, On, On}, 3: {On, On, On, On, Off, Off, On}, 4: {On, On, On, Off, On, Off, Off}, 5: {On, On, Off, On, On, Off, On}, 6: {On, On, Off, On, On, On, On}, 7: {Off, On, On, On, Off, Off, Off}, 8: {On, On, On, On, On, On, On}, 9: {On, On, On, On, On, Off, Off}, }
Functions ¶
Types ¶
type ButtonState ¶
type ButtonState struct { LEDIntensity button2.PushState }
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) AddCallback ¶
func (d *Device) AddCallback(filter event2.Filter, cb EventCallBack)
func (*Device) EnableDebugLogger ¶
func (d *Device) EnableDebugLogger()
func (*Device) SetPadColorMany ¶
type EventCallBack ¶
type InState ¶
type InState struct { Version byte PressedButtons map[button2.Button]button2.PushState Dial uint8 Filters [4]uint16 Volumes [4]uint16 }
func NewInState ¶
func NewInState() *InState
type LEDIntensity ¶
type LEDIntensity uint8
func (LEDIntensity) Value ¶
func (l LEDIntensity) Value() uint8
type OutState ¶
type OutState struct { SevenSegment int8 // [-99,99] sign means dot is turned on Functions map[button2.Button]LEDIntensity Pads [16]color.Color Mute [4]LEDIntensity }
func NewOutState ¶
func NewOutState() OutState
type RangeState ¶
type RangeState uint16
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) Functions ¶
func (s *State) Functions() (states [16]ButtonState)
func (*State) Knobs ¶
func (s *State) Knobs() (states [4]RangeState)
func (*State) Volumes ¶
func (s *State) Volumes() (states [4]RangeState)
Click to show internal directories.
Click to hide internal directories.