Documentation ¶
Index ¶
- Constants
- func AllFixturesOff(sequences []*common.Sequence, eventsForLaunchpad chan common.ALight, ...)
- func Clear(X int, Y int, this *CurrentState, sequences []*common.Sequence, ...)
- func ClearPatternSelectionButtons(mySequenceNumber int, sequence common.Sequence, ...)
- func FindCurrentColor(X int, Y int, targetSequence common.Sequence) common.Color
- func HandleSelect(sequences []*common.Sequence, this *CurrentState, ...)
- func InitButtons(this *CurrentState, eventsForLaunchpad chan common.ALight, ...)
- func ProcessButtons(X int, Y int, sequences []*common.Sequence, this *CurrentState, ...)
- func SequenceSelect(eventsForLauchpad chan common.ALight, guiButtons chan common.ALight, ...)
- func SetRGBColorPicker(selectedColor common.Color, targetSequence common.Sequence) []common.Color
- func ShowFunctionButtons(this *CurrentState, eventsForLauchpad chan common.ALight, ...)
- func ShowGoboSelectionButtons(sequence common.Sequence, this *CurrentState, ...)
- func ShowPatternSelectionButtons(this *CurrentState, master int, targetSequence common.Sequence, ...)
- func ShowRGBColorPicker(targetSequence common.Sequence, displaySequence int, ...)
- func ShowScannerColorSelectionButtons(sequence common.Sequence, this *CurrentState, ...) error
- func ShowSelectFixtureButtons(targetSequence common.Sequence, displaySequence int, this *CurrentState, ...) int
- func StartStrobe(this *CurrentState, eventsForLaunchpad chan common.ALight, ...)
- func StopStrobe(this *CurrentState, eventsForLaunchpad chan common.ALight, ...)
- func UpdateFade(this *CurrentState, guiButttons chan common.ALight)
- func UpdateShift(this *CurrentState, guiButttons chan common.ALight)
- func UpdateSize(this *CurrentState, guiButttons chan common.ALight)
- func UpdateSpeed(this *CurrentState, guiButtons chan common.ALight)
- type CurrentState
Constants ¶
const ( NORMAL int = iota // Normal RGB or Scanner Rotation display. NORMAL_STATIC // Normal RGB in edit all static fixtures. FUNCTION // Show the RGB or Scanner functions. CHASER_DISPLAY // Show the scanner shutter display. CHASER_DISPLAY_STATIC // Shutter chaser in edit all fixtures mode. CHASER_FUNCTION // Show the scammer shutter chaser functions. STATUS // Show the fixture status states. )
Select modes.
const NUMBER_SWITCHES int = 8
Variables ¶
This section is empty.
Functions ¶
func AllFixturesOff ¶
func ClearPatternSelectionButtons ¶
func ClearPatternSelectionButtons(mySequenceNumber int, sequence common.Sequence, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight)
For the given sequence clear the available this.Patterns on the relevant buttons.
func FindCurrentColor ¶
func HandleSelect ¶
func HandleSelect(sequences []*common.Sequence, this *CurrentState, eventsForLaunchpad chan common.ALight, commandChannels []chan common.Command, guiButtons chan common.ALight)
HandleSelect - Runs when you press a select button to select a sequence.
func InitButtons ¶
func InitButtons(this *CurrentState, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight)
func ProcessButtons ¶
func ProcessButtons(X int, Y int, sequences []*common.Sequence, this *CurrentState, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight, dmxController *ft232.DMXController, fixturesConfig *fixture.Fixtures, commandChannels []chan common.Command, replyChannels []chan common.Sequence, updateChannels []chan common.Sequence)
func SequenceSelect ¶
func SequenceSelect(eventsForLauchpad chan common.ALight, guiButtons chan common.ALight, this *CurrentState)
func SetRGBColorPicker ¶
func ShowFunctionButtons ¶
func ShowFunctionButtons(this *CurrentState, eventsForLauchpad chan common.ALight, guiButtons chan common.ALight)
func ShowGoboSelectionButtons ¶
func ShowGoboSelectionButtons(sequence common.Sequence, this *CurrentState, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight)
ShowGoboSelectionButtons puts up a set of red buttons used to select a fixture.
func ShowPatternSelectionButtons ¶
func ShowPatternSelectionButtons(this *CurrentState, master int, targetSequence common.Sequence, displaySequence int, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight)
For the given sequence show the available patterns on the relevant buttons. mySequenceDisplayNumber is the sequence whos buttons you want the pattern selection to show on. master is the master brightness for the same buttons. this.TargetSequence - is the squence you are updating the pattern, this could be different in the case of scanner shutter chaser sequence which doesn't have it's own buttons.
func ShowRGBColorPicker ¶
func ShowRGBColorPicker(targetSequence common.Sequence, displaySequence int, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight, commandChannels []chan common.Command)
For the given sequence show the available sequence colors on the relevant buttons. With the new color picker there can be 24 colors displayed. ShowRGBColorPicker operates on the sequence.RGBAvailableColors which is an array of type []common.StaticColorButton the targetSequence .CurrentColors selects which colors are selected. Returns the RGBAvailableColors []common.StaticColorButton
func ShowScannerColorSelectionButtons ¶
func ShowScannerColorSelectionButtons(sequence common.Sequence, this *CurrentState, eventsForLaunchpad chan common.ALight, fixtures *fixture.Fixtures, guiButtons chan common.ALight) error
For the given sequence show the available scanner selection colors on the relevant buttons.
func ShowSelectFixtureButtons ¶
func ShowSelectFixtureButtons(targetSequence common.Sequence, displaySequence int, this *CurrentState, eventsForLaunchpad chan common.ALight, action string, guiButtons chan common.ALight) int
For the given sequence show the available scanner selection colors on the relevant buttons.
func StartStrobe ¶
func StopStrobe ¶
func UpdateFade ¶
func UpdateFade(this *CurrentState, guiButttons chan common.ALight)
func UpdateShift ¶
func UpdateShift(this *CurrentState, guiButttons chan common.ALight)
func UpdateSize ¶
func UpdateSize(this *CurrentState, guiButttons chan common.ALight)
func UpdateSpeed ¶
func UpdateSpeed(this *CurrentState, guiButtons chan common.ALight)
Types ¶
type CurrentState ¶
type CurrentState struct { MyWindow fyne.Window // Pointer to main window. GUI bool // Flag to indicate use of GUI. Crash1 bool // Flags to detect launchpad crash. Crash2 bool // Flags to detect launchpad crash. SelectedSequence int // The currently selected sequence. TargetSequence int // The current target sequence. DisplaySequence int // The current display sequence. SequenceType []string // The type, indexed by sequence. SelectedStaticFixtureNumber int // Temporary storage for the selected fixture number, used by color picker. SelectAllStaticFixtures bool // Flag that indicate that all static fixtures have been selected. StaticFlashing []bool // Static buttons are flashing, indexed by sequence. SavedSequenceColors map[int][]common.Color // Local storage for sequence colors. SelectedType string // The currently selected sequenece type. LastSelectedSequence int // Store fof the last selected squence. Speed map[int]int // Local copy of sequence speed. Indexed by sequence. RGBShift map[int]int // Current rgb fixture shift. Indexed by sequence. ScannerShift map[int]int // Current scanner shift for all fixtures. Indexed by sequence RGBSize map[int]int // current RGB sequence this.Size[this.SelectedSequence]. Indexed by sequence ScannerSize map[int]int // current scanner size for all fixtures. Indexed by sequence ScannerColor int // current scanner color. RGBFade map[int]int // Indexed by sequence. ScannerFade map[int]int // Indexed by sequence. ScannerCoordinates map[int]int // Number of coordinates for scanner patterns is selected from 4 choices. ScannerCoordinates 0=12, 1=16,2=24,3=32,4=64, Indexed by sequence. Running map[int]bool // Which sequence is running. Indexed by sequence. True if running. Strobe map[int]bool // We are in strobe mode. True if strobing StrobeSpeed map[int]int // Strobe speed. value is speed 0-255, indexed by sequence number. SavePreset bool // Save a preset flag. Config bool // Flag to indicate we are in fixture config mode. Blackout bool // Blackout all fixtures. Flood bool // Flood all fixtures. SelectedMode []int // What mode each sequence is in : normal mode, function mode, status selection mode. LastMode []int // Last mode sequence was in : normal mode, function mode, status selection mode. Functions map[int][]common.Function // Map indexed by sequence of functions FunctionLabels [8]string // Storage for the function key labels for this sequence. SelectButtonPressed []bool // Which sequence has its Select button pressed. SwitchPositions [NUMBER_SWITCHES][NUMBER_SWITCHES]int // Sorage for switch positions. EditScannerColorsMode bool // This flag is true when the sequence is in select scanner colors editing mode. EditGoboSelectionMode bool // This flag is true when the sequence is in sequence gobo selection mode. Static []bool // This flag is true when the sequence is in edit static colors mode. ShowRGBColorPicker bool // This flag is true when the sequence is in when we are showing the color picker. ShowStaticColorPicker bool // This flag is true when the sequence is showing the static color picker mode. EditWhichStaticSequence int // Which static sequence is currently being edited. EditPatternMode bool // This flag is true when the sequence is in pattern editing mode. EditFixtureSelectionMode bool // This flag is true when the sequence is in select fixture mode. MasterBrightness int // Affects all DMX fixtures and launchpad lamps. LastStaticColorButtonX int // Which Static Color button did we change last. LastStaticColorButtonY int // Which Static Color button did we change last. SoundGain float32 // Fine gain -0.09 -> 0.09 FixtureState [][]common.FixtureState // Which fixture is enabled: bool and inverted: bool on which sequence. [sequeneNumber],[fixtureNumber] SelectedFixture int // Which fixture is selected when changing scanner color or gobo. FollowingAction string // String to find next function, used in selecting a fixture. OffsetPan int // Offset for Pan. OffsetTilt int // Offset for Tilt. Pad *pad.Pad // Pointer to the Novation Launchpad object. PresetsStore map[string]presets.Preset // Storage for the Presets. LastPreset *string // Last preset used. SoundTriggers []*common.Trigger // Pointer to the Sound Triggers. SoundConfig *sound.SoundConfig // Pointer to the sound config struct. SequenceChannels common.Channels // Channles used to communicate with the sequence. RGBPatterns map[int]common.Pattern // Available RGB Patterns. ScannerPattern int // The selected scanner pattern Number. Used as the index for above. Pattern int // The selected RGB pattern Number. Used as the index for above. StaticButtons []common.StaticColorButton // Storage for the color of the static buttons. SelectedGobo int // The selected GOBO. ButtonTimer *time.Time // Button Timer ClearPressed map[int]bool // Storage clear pressed in static color selection. Indexed by sequence. SwitchChannels []common.SwitchChannel // Used for communicating with mini-sequencers on switches. LaunchPadConnected bool // Flag to indicate presence of Novation Launchpad. DmxInterfacePresent bool // Flag to indicate precence of DMX interface card DmxInterfacePresentConfig *usbdmx.ControllerConfig // DMX Interface card config. LaunchpadName string // Storage for launchpad config. ScannerChaser map[int]bool // Chaser is running. DisplayChaserShortCut bool // Flag to indicate we've taken a shortcut to the chaser display SwitchSequenceNumber int // Switch sequence number, setup at start. ChaserSequenceNumber int // Chaser sequence number, setup at start. ScannerSequenceNumber int // Scanner sequence number, setup at start. }