Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
UCC Snack Machine Server Code
Commits
50ed02d2
Commit
50ed02d2
authored
Feb 20, 2017
by
John Hodge
Browse files
VendServer - Set username state on MIFARE auth, clear MIFARE id on logout
parent
6838aa50
Changes
1
Hide whitespace changes
Inline
Side-by-side
VendServer/VendServer.py
View file @
50ed02d2
...
...
@@ -370,7 +370,7 @@ class VendServer():
self
.
vstatus
.
cur_pin
=
''
self
.
vstatus
.
cur_user
=
''
self
.
vstatus
.
cur_selection
=
''
_last_card_id
=
-
1
self
.
_last_card_id
=
-
1
self
.
vstatus
.
mk
.
set_messages
([(
self
.
center
(
'BYE!'
),
False
,
1.5
)])
self
.
reset_idler
(
2
)
return
...
...
@@ -405,6 +405,7 @@ class VendServer():
Triggered when the user has entered the id of something they would like to purchase.
"""
def
make_selection
(
self
):
logging
.
debug
(
'Dispense item "%s"'
%
(
self
.
vstatus
.
cur_selection
,))
# should use sudo here
if
self
.
vstatus
.
cur_selection
==
'55'
:
self
.
vstatus
.
mk
.
set_message
(
'OPENSESAME'
)
...
...
@@ -803,6 +804,8 @@ class VendServer():
self
.
reset_idler
(
2
)
return
else
:
self
.
vstatus
.
cur_user
=
'----'
self
.
vstatus
.
username
=
self
.
dispense
.
getUsername
()
self
.
vstatus
.
cur_selection
=
''
self
.
vstatus
.
change_state
(
STATE_GET_SELECTION
)
self
.
scroll_options
(
self
.
vstatus
.
username
,
self
.
vstatus
.
mk
,
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment