#!/usr/bin/python
-# vim:ts=4
+# vim: ts=4 sts=4 sw=4 noexpandtab
USE_MIFARE = 1
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
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')
if len(self.vstatus.cur_pin) == PIN_LENGTH:
self.dispense.authUserIdPin(self.vstatus.cur_user, self.vstatus.cur_pin)
if self.dispense.getUsername():
+ self.vstatus.username = self.dispense.getUsername()
self.v.beep(0, False)
self.vstatus.cur_selection = ''
self.vstatus.change_state(STATE_GET_SELECTION)
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)