elevio

package
v0.0.0-...-71b31c1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MD_Up   MotorDirection = 1
	MD_Down                = -1
	MD_Stop                = 0
)
View Source
const (
	BT_HallUp   ButtonType = 0
	BT_HallDown            = 1
	BT_Cab                 = 2
)

Variables

This section is empty.

Functions

func GetFloor

func GetFloor() int

func Init

func Init(addr string, numFloors int)

func PollButtons

func PollButtons(receiver chan<- ButtonEvent)

func PollFloorSensor

func PollFloorSensor(receiver chan<- int)

func PollObstructionSwitch

func PollObstructionSwitch(receiver chan<- bool)

func PollStopButton

func PollStopButton(receiver chan<- bool)

func SetButtonLamp

func SetButtonLamp(button ButtonType, floor int, value bool)

func SetDoorOpenLamp

func SetDoorOpenLamp(value bool)

func SetFloorIndicator

func SetFloorIndicator(floor int)

func SetMotorDirection

func SetMotorDirection(dir MotorDirection)

func SetStopLamp

func SetStopLamp(value bool)

Types

type ButtonEvent

type ButtonEvent struct {
	Floor  int
	Button ButtonType
}

type ButtonType

type ButtonType int

type MotorDirection

type MotorDirection int

Jump to

Keyboard shortcuts

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