Documentation ¶
Index ¶
- Constants
- Variables
- func Cook(ctx context.Context) error
- func FillMenu(ctx context.Context)
- func ScaleTuneRate(value, max, center uint8) float32
- func VisualHash(input, salt []byte) string
- type Menu
- type MenuItem
- type State
- type UI
- func (self *UI) Init(ctx context.Context) error
- func (self *UI) LockDecrementWait()
- func (self *UI) LockEnd()
- func (self *UI) LockFunc(pri tele_api.Priority, fun func()) bool
- func (self *UI) LockWait(pri tele_api.Priority) bool
- func (self *UI) Loop(ctx context.Context)
- func (self *UI) ScheduleSync(ctx context.Context, priority tele_api.Priority, fun types.TaskFunc) error
- func (self *UI) State() State
- func (self *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 (self *UI) LockDecrementWait()
func (*UI) ScheduleSync ¶
func (*UI) XXX_testSetState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.