Documentation ¶
Index ¶
- Constants
- Variables
- func Cook(ctx context.Context) error
- func FillMenu(ctx context.Context)
- func Init(ctx context.Context) error
- func ScaleTuneRate(value, max, center uint8) float32
- func VisualHash(input, salt []byte) string
- type Menu
- type MenuItem
- type State
- type UI
- func (ui *UI) Init(ctx context.Context) error
- func (ui *UI) LockDecrementWait()
- func (ui *UI) LockEnd()
- func (ui *UI) LockFunc(pri tele_api.Priority, fun func()) bool
- func (ui *UI) LockWait(pri tele_api.Priority) bool
- func (ui *UI) Loop(ctx context.Context)
- func (ui *UI) ScheduleSync(ctx context.Context, priority tele_api.Priority, fun types.TaskFunc) error
- func (ui *UI) State() State
- func (ui *UI) XXX_testSetState(new State)
Constants ¶
View Source
const ( DefaultCream = 4 MaxCream = 6 DefaultSugar = 4 MaxSugar = 8 )
View Source
const (
MsgError = "error"
)
Variables ¶
View Source
var ScaleAlpha = []byte{
0x94,
0x95,
0x96,
0x97,
}
Functions ¶
func ScaleTuneRate ¶
func VisualHash ¶
Types ¶
type State ¶
type State uint32
const ( StateDefault State = iota StateBoot // t=onstart +onstartOk=FrontHello +onstartError+retry=Boot +retryMax=Broken StateBroken // t=tele/input +inputService=ServiceBegin StateLocked // t=tele StateFrontBegin // t=checkVariables +=FrontHello StateFrontSelect // t=input/money/timeout +inputService=ServiceBegin +input=... +money=... +inputAccept=FrontAccept +timeout=FrontTimeout StateFrontTune // t=input/money/timeout +inputTune=FrontTune ->FrontSelect StateFrontAccept // t=engine.Exec(Item) +OK=FrontEnd +err=Broken StateFrontTimeout // t=saveMoney ->FrontEnd StateFrontEnd // ->FrontBegin StateServiceBegin // t=input/timeout ->ServiceAuth StateServiceAuth // +inputAccept+OK=ServiceMenu StateServiceMenu StateServiceInventory StateServiceTest StateServiceReboot StateServiceNetwork StateServiceMoneyLoad StateServiceReport StateServiceEnd // +askReport=ServiceReport ->FrontBegin StateStop StateFrontLock )
type UI ¶
type UI struct { FrontMaxPrice currency.Amount // FrontResult UIMenuResult Service uiService XXX_testHook func(State) // contains filtered or unexported fields }
func (*UI) LockDecrementWait ¶
func (ui *UI) LockDecrementWait()
func (*UI) ScheduleSync ¶
func (*UI) XXX_testSetState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.