mode

package
v0.0.0-...-22545d3 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func HandleInput

func HandleInput(e simple_button.EventPayload)

func HandleLocationEvent

func HandleLocationEvent(e interface{})

Types

type AreaMode

type AreaMode struct {
	// contains filtered or unexported fields
}

func (*AreaMode) Activate

func (a *AreaMode) Activate()

func (*AreaMode) HandleInput

func (a *AreaMode) HandleInput(e simple_button.EventPayload)

func (*AreaMode) HandleLocationEvent

func (a *AreaMode) HandleLocationEvent(e interface{})

func (*AreaMode) RegisterType

func (a *AreaMode) RegisterType(color uint32)

type AreaType

type AreaType struct {
	Id    int
	Color uint32
}

type LocationData

type LocationData struct {
	Data interface{}
	Mode Mode
	Type int
}

type Mode

type Mode uint8
const (
	UNASSIGNED Mode = iota
	AREA
	POI
)

func Init

func Init() (Mode, chan LocationData, chan gpio.OutputPayload)

func Use

func Use(m Mode) Mode

type ModeHandler

type ModeHandler interface {
	HandleLocationEvent(e interface{})
	HandleInput(e simple_button.EventPayload)
	Activate()
}

func NewAreaMode

func NewAreaMode() ModeHandler

func NewPoiMode

func NewPoiMode() ModeHandler

type PoiMode

type PoiMode struct {
	// contains filtered or unexported fields
}

func (*PoiMode) Activate

func (a *PoiMode) Activate()

func (*PoiMode) HandleInput

func (p *PoiMode) HandleInput(e simple_button.EventPayload)

func (*PoiMode) HandleLocationEvent

func (p *PoiMode) HandleLocationEvent(e interface{})

Jump to

Keyboard shortcuts

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