temoto / vender

Open source vending machine controller firmware
Creative Commons Zero v1.0 Universal
64 stars 20 forks source link

cup timeout #16

Closed AlexTransit closed 3 years ago

AlexTransit commented 3 years ago

api.go:39: debug: tele.Error: github.com/temoto/vender/hardware/mdb/device.go:246: evend.cup.dispense/wait-done/poll-loop timeout persist.go:93: debug: persist inventory storage.write duration=36.891841ms

evend.cup.dispense/wait-done/poll-loop timeout execute menu code=44 price=3000(raw) name='теплый шоколад со сливками и орешками': evend.cup.dispense/wait-done/poll-loop timeout evend.cup tx request=e203 state=Error: CRITICAL code error state=invalid broken mode


Apr 15 18:55:53 vm20 vender[7304]: persist.go:93: debug: persist inventory storage.write duration=25.039037ms Apr 15 18:55:53 vm20 vender[7304]: ui-front.go:321: debug: ui-front selected=menu code=23 price=2700(raw) name='кофе двойной со сливками и сахаром' end err=evend.cup.dispense/wait-done/poll-loop Apr 15 18:55:53 vm20 vender[7304]: api.go:39: debug: tele.Error: github.com/temoto/vender/hardware/mdb/device.go:246: evend.cup.dispense/wait-done/poll-loop timeout Apr 15 18:55:53 vm20 vender[7304]: github.com/temoto/vender/internal/ui/ui-front.go:329: execute menu code=23 price=2700(raw) name='кофе двойной со сливками и сахаром' Apr 15 18:55:54 vm20 vender[7304]: engine.go:223: debug: engine.ExecList tag=on_menu_error list=[ money.abort ] Apr 15 18:55:54 vm20 vender[7304]: api.go:148: debug: money-abort cash=27 Apr 15 18:55:57 vm20 vender[7304]: api.go:189: debug: money.payout coin total dispensed=27 Apr 15 18:55:57 vm20 vender[7304]: ui-front.go:335: on_menu_error success Apr 15 18:55:57 vm20 vender[7304]: state-machine.go:208: debug: ui exit FrontAccept -> Broken Apr 15 18:55:57 vm20 vender[7304]: state-machine.go:86: debug: ui enter Broken Apr 15 18:55:57 vm20 vender[7304]: state-machine.go:114: state=broken Apr 15 18:55:57 vm20 vender[7304]: engine.go:223: debug: engine.ExecList tag=on_broken list=[ evend.cup.light_off evend.valve.set_temp_hot(0) ] Apr 15 18:55:57 vm20 vender[7304]: api.go:39: debug: tele.Error: CRITICAL code error state=invalid Apr 15 18:55:57 vm20 vender[7304]: github.com/temoto/vender/hardware/mdb/device.go:363: evend.cup tx request=e203 state=Error Apr 15 18:55:57 vm20 vender[7304]: state-machine.go:119: error: CRITICAL code error state=invalid Apr 15 18:55:57 vm20 vender[7304]: github.com/temoto/vender/hardware/mdb/device.go:363: evend.cup tx request=e203 state=Error Apr 15 18:55:57 vm20 vender[7304]: github.com/temoto/vender/hardware/mdb/device.go:145: evend.cup TxMaybe request=e203 state=Error Apr 15 18:55:57 vm20 vender[7304]: github.com/temoto/vender/internal/ui/state-machine.go:119: on_broken Apr 15 18:55:57 vm20 vender[7304]: state-machine.go:251: debug: execute script (StateBroken)

evend.cup.dispense/wait-done/poll-loop timeout execute menu code=23 price=2700(raw) name='кофе двойной со сливками и сахаром': evend.cup.dispense/wait-done/poll-loop timeout evend.cup tx request=e203 state=Error: CRITICAL code error state=invalid

AlexTransit commented 3 years ago

неправильно отрабатывает timeout (отвал по ошибке через 6.059095)

в конфиге cup { assert_busy_delay_ms = 30 dispense_timeout_sec = 10 ensure_timeout_sec = 70 }


May 11 17:20:22.575170 vm21 vender[522]: Display.L1=спасибо May 11 17:20:22.575170 vm21 vender[522]: Display.L2=готовлю May 11 17:20:28.634265 vm21 vender[522]: api.go:195: debug: money.payout coin total dispensed=73 May 11 17:20:34.218113 vm21 vender[522]: api.go:39: debug: tele.Error: github.com/temoto/vender/hardware/mdb/device.go:247: evend.cup.dispense/wait-done/poll-loop timeout May 11 17:20:34.231406 vm21 vender[522]: persist.go:93: debug: persist inventory storage.write duration=6.386331ms May 11 17:20:34.232403 vm21 vender[522]: ui-front.go:337: debug: ui-front selected=menu code=23 price=2700(raw) name='кофе двойной со сливками и сахаром' end err=evend.cup.dispense/wait-done/poll-loop timeout May 11 17:20:34.242911 vm21 vender[522]: Display.L1= May 11 17:20:34.244101 vm21 vender[522]: Display.L2=ОШИБКА

AlexTransit commented 3 years ago

fix