Documentation ¶
Index ¶
- Constants
- func CheckFixturesAreTheSame(fixtures *Fixtures, startConfig *Fixtures) (bool, string)
- func FindChannelNumberByName(fixture *Fixture, channelName string) (int, error)
- func FindColor(myFixtureNumber int, mySequenceNumber int, color string, fixtures *Fixtures) int
- func FindFixtureAddressByGroupAndNumber(sequenceNumber int, fixtureNumber int, fixtures *Fixtures) (int16, error)
- func FindFixtureAddressByName(fixtureName string, fixtures *Fixtures) string
- func FindGobo(myFixtureNumber int, mySequenceNumber int, selectedGobo string, ...) int
- func FindShutter(myFixtureNumber int, mySequenceNumber int, shutterName string, ...) int
- func FixtureReceiver(myFixtureNumber int, fixtureStepChannel chan common.FixtureCommand, ...)
- func GetChannelSettinsByName(fixture *Fixture, channelName string, fixtures *Fixtures) ([]common.Setting, error)
- func IsNumericOnly(str string) bool
- func MapFixtures(chaser bool, hadShutterChase bool, mySequenceNumber int, displayFixture int, ...) (lastColor common.LastColor)
- func MapFixturesColorOnly(sequenceNumber, selectedFixture, selectedColor int, ...)
- func MapFixturesGoboOnly(sequenceNumber, selectedFixture, selectedGobo int, fixtures *Fixtures, ...)
- func MapSwitchFixture(swiTch common.Switch, state common.State, RGBFade int, ...) common.LastColor
- func SaveFixtures(filename string, fixtures *Fixtures) error
- func SaveFixturesWriter(writer fyne.URIWriteCloser, fixtures *Fixtures) error
- func SetChannel(index int16, data byte, dmxController *ft232.DMXController, ...)
- type Action
- type ActionConfig
- type Channel
- type Color
- type Fixture
- type FixtureInfo
- type Fixtures
- type Group
- type Groups
- type Setting
- type State
Constants ¶
const FADE_NORMAL int = 5
const FADE_SHARP int = 10
const FADE_SOFT int = 1
const LARGE_NUMBER_STEPS int = 64
const MEDIUM_NUMBER_STEPS int = 32
const SENSITIVITY_LONG int = 500
const SENSITIVITY_MEDIUM int = 100
const SENSITIVITY_SHORT int = 10
const SIZE_LONG int = 10
const SIZE_MEDIUM int = 3
const SIZE_OFF int = 0
const SIZE_SHORT int = 1
const STROBE_SPEED_FAST int = 255
const STROBE_SPEED_MEDIUM int = 127
const STROBE_SPEED_SLOW int = 0
Variables ¶
This section is empty.
Functions ¶
func CheckFixturesAreTheSame ¶
returns true is they are the same.
func FindChannelNumberByName ¶
func FindColor ¶
FindColor takes the name of a color channel setting like "White" and returns the color number for this type of scanner.
func FindGobo ¶
func FindGobo(myFixtureNumber int, mySequenceNumber int, selectedGobo string, fixtures *Fixtures) int
findGobo takes the name of a gobo channel setting like "Open" and returns the gobo number for this type of scanner.
func FindShutter ¶
func FindShutter(myFixtureNumber int, mySequenceNumber int, shutterName string, fixtures *Fixtures) int
FindShutter takes the name of a gobo channel setting like "Open" and returns the gobo number for this type of scanner.
func FixtureReceiver ¶
func FixtureReceiver( myFixtureNumber int, fixtureStepChannel chan common.FixtureCommand, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight, switchChannels []common.SwitchChannel, soundTriggers []*common.Trigger, soundConfig *sound.SoundConfig, dmxController *ft232.DMXController, fixtures *Fixtures, dmxInterfacePresent bool)
FixtureReceivers are created by the sequence and are used to receive step instructions. Each FixtureReceiver knows which step they belong too and when triggered they start a fade up and fade down events which get sent to the launchpad lamps and the DMX fixtures.
func GetChannelSettinsByName ¶
func IsNumericOnly ¶
func MapFixtures ¶
func MapFixtures(chaser bool, hadShutterChase bool, mySequenceNumber int, displayFixture int, color common.Color, pan int, tilt int, shutter int, rotate int, program int, selectedGobo int, scannerColor int, fixtures *Fixtures, blackout bool, brightness int, master int, music int, strobe bool, strobeSpeed int, dmxController *ft232.DMXController, dmxInterfacePresent bool) (lastColor common.LastColor)
When want to light a DMX fixture we need for find it in our fuxture.yaml configuration file. This function maps the requested fixture into a DMX address.
func MapFixturesColorOnly ¶
func MapFixturesColorOnly(sequenceNumber, selectedFixture, selectedColor int, dmxController *ft232.DMXController, fixtures *Fixtures, dmxInterfacePresent bool)
func MapFixturesGoboOnly ¶
func MapFixturesGoboOnly(sequenceNumber, selectedFixture, selectedGobo int, fixtures *Fixtures, dmxController *ft232.DMXController, dmxInterfacePresent bool)
func MapSwitchFixture ¶
func MapSwitchFixture(swiTch common.Switch, state common.State, RGBFade int, dmxController *ft232.DMXController, fixturesConfig *Fixtures, blackout bool, brightness int, master int, masterChanging bool, lastColor common.LastColor, switchChannels []common.SwitchChannel, SoundTriggers []*common.Trigger, soundConfig *sound.SoundConfig, dmxInterfacePresent bool, eventsForLaunchpad chan common.ALight, guiButtons chan common.ALight, fixtureStepChannel chan common.FixtureCommand) common.LastColor
MapSwitchFixture is repsonsible for playing out the state of a swicth. The switch is idendifed by the sequence and switch number.
func SaveFixtures ¶
SaveFixtures - saves a complete list of fixtures to filename. Returns an error.
func SaveFixturesWriter ¶
func SetChannel ¶
func SetChannel(index int16, data byte, dmxController *ft232.DMXController, dmxInterfacePresent bool)
Types ¶
type Action ¶
type Action struct { Name string `yaml:"name"` Number int Colors []string `yaml:"colors"` Map string `yaml:"map"` Mode string `yaml:"mode"` Fade string `yaml:"fade"` Size string `yaml:"size"` Speed string `yaml:"speed"` Rotate string `yaml:"rotate"` RotateSpeed string `yaml:"rotatespeed"` Program string `yaml:"program"` ProgramSpeed string `yaml:"programspeed"` Strobe string `yaml:"strobe"` Gobo string `yaml:"gobo"` GoboSpeed string `yaml:"gobospeed"` }
type ActionConfig ¶
type ActionConfig struct { Name string Colors []common.Color Map bool Fade int NumberSteps int Size int Speed time.Duration TriggerState bool RotateSpeed int Rotatable bool Clockwise bool AntiClockwise bool AutoRotate bool Program int ProgramOptions []string ProgramSpeed int Music int MusicTrigger bool Strobe bool StrobeSpeed int Gobo int GoboSpeed int AutoGobo bool GoboOptions []string RotateSensitivity int }
type Channel ¶
type Channel struct { Number int16 `yaml:"number"` Name string `yaml:"name"` Value *int16 `yaml:"value,omitempty"` MaxDegrees *int `yaml:"maxdegrees,omitempty"` Offset *int `yaml:"offset,omitempty"` // Offset allows you to position the fixture. Comment string `yaml:"comment,omitempty"` Settings []Setting `yaml:"settings,omitempty"` }
type Fixture ¶
type Fixture struct { ID int `yaml:"id"` Name string `yaml:"name"` Label string `yaml:"label,omitempty"` Number int `yaml:"number"` Description string `yaml:"description"` Type string `yaml:"type"` Group int `yaml:"group"` Address int16 `yaml:"address"` Channels []Channel `yaml:"channels"` States []State `yaml:"states,omitempty"` MultiFixtureDevice bool `yaml:"-"` // Calulated internally. NumberSubFixtures int `yaml:"-"` // Calulated internally. UseFixture string `yaml:"use_fixture,omitempty"` }
func GetFixtureDetailsById ¶
GetFixtureDetailsById - find a fixture in the fixtures config. Returns details of the fixture. Returns an error.
type FixtureInfo ¶
func FindFixtureInfo ¶
func FindFixtureInfo(thisFixture *Fixture) FixtureInfo
type Fixtures ¶
type Fixtures struct {
Fixtures []Fixture `yaml:"fixtures"`
}
func LoadFixtures ¶
LoadFixtures opens the fixtures config file using the filename passed. Returns a pointer to the fixtures config. Returns an error.
func LoadFixturesReader ¶
LoadFixturesReader opens the fixtures config file using the io reader passed. Returns a pointer to the fixtures config. Returns an error.
type Groups ¶
type Groups struct {
Groups []Group `yaml:"groups"`
}
func LoadFixtureGroups ¶
LoadFixtureGroups opens the fixtures group config file using the filename passed. Returns a pointer to the fixtures group config. Returns an error.