fixture

package
v0.0.0-...-315edef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FADE_NORMAL int = 5
View Source
const FADE_SHARP int = 10
View Source
const FADE_SOFT int = 1
View Source
const LARGE_NUMBER_STEPS int = 64
View Source
const MEDIUM_NUMBER_STEPS int = 32
View Source
const SENSITIVITY_LONG int = 500
View Source
const SENSITIVITY_MEDIUM int = 100
View Source
const SENSITIVITY_SHORT int = 10
View Source
const SIZE_LONG int = 10
View Source
const SIZE_MEDIUM int = 3
View Source
const SIZE_OFF int = 0
View Source
const SIZE_SHORT int = 1
View Source
const STROBE_SPEED_FAST int = 255
View Source
const STROBE_SPEED_MEDIUM int = 127
View Source
const STROBE_SPEED_SLOW int = 0

Variables

This section is empty.

Functions

func CheckFixturesAreTheSame

func CheckFixturesAreTheSame(fixtures *Fixtures, startConfig *Fixtures) (bool, string)

returns true is they are the same.

func FindChannelNumberByName

func FindChannelNumberByName(fixture *Fixture, channelName string) (int, error)

func FindColor

func FindColor(myFixtureNumber int, mySequenceNumber int, color string, fixtures *Fixtures) int

FindColor takes the name of a color channel setting like "White" and returns the color number for this type of scanner.

func FindFixtureAddressByGroupAndNumber

func FindFixtureAddressByGroupAndNumber(sequenceNumber int, fixtureNumber int, fixtures *Fixtures) (int16, error)

func FindFixtureAddressByName

func FindFixtureAddressByName(fixtureName string, fixtures *Fixtures) string

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 GetChannelSettinsByName(fixture *Fixture, channelName string, fixtures *Fixtures) ([]common.Setting, error)

func IsNumericOnly

func IsNumericOnly(str string) bool

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

func SaveFixtures(filename string, fixtures *Fixtures) error

SaveFixtures - saves a complete list of fixtures to filename. Returns an error.

func SaveFixturesWriter

func SaveFixturesWriter(writer fyne.URIWriteCloser, fixtures *Fixtures) error

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 Color

type Color struct {
	R int `yaml:"red"`
	G int `yaml:"green"`
	B int `yaml:"blue"`
	W int `yaml:"white"`
}

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

func GetFixtureDetailsById(id int, fixtures *Fixtures) (Fixture, error)

GetFixtureDetailsById - find a fixture in the fixtures config. Returns details of the fixture. Returns an error.

func GetFixtureDetailsByLabel

func GetFixtureDetailsByLabel(label string, fixtures *Fixtures) (Fixture, error)

GetFixtureDetailsByLabel - find a fixture in the fixtures config. Returns details of the fixture. Returns an error.

type FixtureInfo

type FixtureInfo struct {
	HasRotate     bool
	HasGobo       bool
	HasColorWheel bool
	HasProgram    bool
}

func FindFixtureInfo

func FindFixtureInfo(thisFixture *Fixture) FixtureInfo

type Fixtures

type Fixtures struct {
	Fixtures []Fixture `yaml:"fixtures"`
}

func LoadFixtures

func LoadFixtures(filename string) (fixtures *Fixtures, err error)

LoadFixtures opens the fixtures config file using the filename passed. Returns a pointer to the fixtures config. Returns an error.

func LoadFixturesReader

func LoadFixturesReader(reader fyne.URIReadCloser) (fixtures *Fixtures, err error)

LoadFixturesReader opens the fixtures config file using the io reader passed. Returns a pointer to the fixtures config. Returns an error.

type Group

type Group struct {
	Name   string `yaml:"name"`
	Number string `yaml:"number"`
}

type Groups

type Groups struct {
	Groups []Group `yaml:"groups"`
}

func LoadFixtureGroups

func LoadFixtureGroups(filename string) (groups *Groups, err error)

LoadFixtureGroups opens the fixtures group config file using the filename passed. Returns a pointer to the fixtures group config. Returns an error.

type Setting

type Setting struct {
	Name          string `yaml:"name"`
	Label         string `yaml:"labe,omitempty"`
	Number        int    `yaml:"number"`
	Channel       string `yaml:"channel,omitempty"`
	Value         string `yaml:"value"`
	SelectedValue string `yaml:"selectedvalue"`
}

type State

type State struct {
	Name        string    `yaml:"name"`
	Number      int16     `yaml:"number"`
	Label       string    `yaml:"label"`
	ButtonColor string    `yaml:"buttoncolor"`
	Master      int       `yaml:"master"`
	Actions     []Action  `yaml:"actions,omitempty"`
	Settings    []Setting `yaml:"settings,omitempty"`
	Flash       bool      `yaml:"flash"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL