Documentation ¶
Index ¶
Constants ¶
View Source
const ( LightTypeServiceEntrance = iota LightTypeServiceNoManLand LightTypeShortWindow LightTypeLongWindow LightTypeWallStub SideFront = iota SideRight SideBack SideLeft )
Variables ¶
View Source
var ( BuildingMap = LigtsBuildingMap{ Levels: [][]Light{ { {Number: 4, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "A0"}}, {Number: 4, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x24, Pin: "A1"}}, {Number: 4, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "A2"}}, {Side: SideFront, Kind: LightTypeServiceEntrance, Addr: LightAddress{Board: 0x25, Pin: "A3"}}, {Number: 1, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "A3"}}, {Number: 1, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x24, Pin: "A4"}}, {Number: 1, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "A5"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 1, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "A6"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 2, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "A7"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 2, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "B7"}}, {Number: 2, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x24, Pin: "B6"}}, {Number: 2, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "B5"}}, {Side: SideBack, Kind: LightTypeWallStub}, {Number: 3, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "B4"}}, {Number: 3, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x24, Pin: "B3"}}, {Number: 3, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "B2"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 3, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "B1"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 4, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x24, Pin: "B0"}}, {Side: SideLeft, Kind: LightTypeWallStub}, }, { {Number: 8, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "B7"}}, {Number: 8, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x23, Pin: "B6"}}, {Number: 8, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "B5"}}, {Side: SideFront, Kind: LightTypeServiceNoManLand, Addr: LightAddress{Board: 0x25, Pin: "A7"}}, {Number: 5, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "B4"}}, {Number: 5, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x23, Pin: "B3"}}, {Number: 5, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "B2"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 5, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "B0"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 6, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "B1"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 6, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "A7"}}, {Number: 6, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x23, Pin: "A6"}}, {Number: 6, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "A5"}}, {Side: SideBack, Kind: LightTypeWallStub}, {Number: 7, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "A4"}}, {Number: 7, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x23, Pin: "A3"}}, {Number: 7, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "A2"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 7, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "A1"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 8, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x23, Pin: "A0"}}, {Side: SideLeft, Kind: LightTypeWallStub}, }, { {Number: 12, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "A5"}}, {Number: 12, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x22, Pin: "A6"}}, {Number: 12, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "A7"}}, {Side: SideFront, Kind: LightTypeServiceNoManLand, Addr: LightAddress{Board: 0x25, Pin: "A4"}}, {Number: 9, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "B0"}}, {Number: 9, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x25, Pin: "A1"}}, {Number: 9, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "B2"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 9, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "B3"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 10, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "B4"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 10, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "B5"}}, {Number: 10, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x22, Pin: "B6"}}, {Number: 10, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "B7"}}, {Side: SideBack, Kind: LightTypeWallStub}, {Number: 11, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "A0"}}, {Number: 11, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x22, Pin: "A1"}}, {Number: 11, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "A2"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 11, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "A3"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 12, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x22, Pin: "A4"}}, {Side: SideLeft, Kind: LightTypeWallStub}, }, { {Number: 16, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "A5"}}, {Number: 16, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x21, Pin: "A6"}}, {Number: 16, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "A7"}}, {Side: SideFront, Kind: LightTypeServiceNoManLand, Addr: LightAddress{Board: 0x25, Pin: "A5"}}, {Number: 13, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "B0"}}, {Number: 13, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x21, Pin: "B1"}}, {Number: 13, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "B2"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 13, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "B3"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 14, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "B4"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 14, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "B5"}}, {Number: 14, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x21, Pin: "B6"}}, {Number: 14, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "B7"}}, {Side: SideBack, Kind: LightTypeWallStub}, {Number: 15, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "A0"}}, {Number: 15, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x21, Pin: "A1"}}, {Number: 15, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "A2"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 15, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "A3"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 16, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x21, Pin: "A4"}}, {Side: SideLeft, Kind: LightTypeWallStub}, }, { {Number: 20, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "B5"}}, {Number: 20, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x20, Pin: "B6"}}, {Number: 20, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "B7"}}, {Side: SideFront, Kind: LightTypeServiceNoManLand, Addr: LightAddress{Board: 0x25, Pin: "A6"}}, {Number: 17, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "A7"}}, {Number: 17, Side: SideFront, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x20, Pin: "A6"}}, {Number: 17, Side: SideFront, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "A5"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 17, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "A4"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 18, Side: SideRight, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "A3"}}, {Side: SideRight, Kind: LightTypeWallStub}, {Number: 18, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "A2"}}, {Number: 18, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x20, Pin: "A1"}}, {Number: 18, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "A0"}}, {Side: SideBack, Kind: LightTypeWallStub}, {Number: 19, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "B0"}}, {Number: 19, Side: SideBack, Kind: LightTypeLongWindow, Addr: LightAddress{Board: 0x20, Pin: "B1"}}, {Number: 19, Side: SideBack, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "B2"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 19, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "B3"}}, {Side: SideLeft, Kind: LightTypeWallStub}, {Number: 20, Side: SideLeft, Kind: LightTypeShortWindow, Addr: LightAddress{Board: 0x20, Pin: "B4"}}, {Side: SideLeft, Kind: LightTypeWallStub}, }, }, } )
View Source
var ErrNoBoardConnected error = errors.New("ErrNoBoardConnected")
Functions ¶
This section is empty.
Types ¶
type LightAddress ¶
type LigtsBuildingMap ¶
type LigtsBuildingMap struct {
Levels [][]Light
}
type PinState ¶
type PinState struct { Addr LightAddress IsOn bool }
Click to show internal directories.
Click to hide internal directories.