2018 ROM installed - revert display workaround
author[NTU] <[email protected]>
Mon, 7 Jan 2019 09:14:14 +0000 (17:14 +0800)
committer[NTU] <[email protected]>
Mon, 7 Jan 2019 09:14:14 +0000 (17:14 +0800)
VendServer/VendServer.py

index 016c6d4..c3cb3cb 100755 (executable)
@@ -140,8 +140,6 @@ class VendServer():
                # If the user has just logged in, show them their balance
                if welcome:
                        balance = self.dispense.getBalance()
                # If the user has just logged in, show them their balance
                if welcome:
                        balance = self.dispense.getBalance()
-                       balance = balance[:-4] + '.' + balance[-4] + balance[-2:]   # Work around display bug
-                       
                        msg = [(self.center('WELCOME'), False, TEXT_SPEED),
                                   (self.center(self.dispense.getUsername()), False, TEXT_SPEED),
                                   (self.center(balance), False, TEXT_SPEED),]
                        msg = [(self.center('WELCOME'), False, TEXT_SPEED),
                                   (self.center(self.dispense.getUsername()), False, TEXT_SPEED),
                                   (self.center(balance), False, TEXT_SPEED),]
@@ -398,7 +396,6 @@ class VendServer():
                                        # Price check mode.
                                        (name,price) = self.dispense.getItemInfo(self.vstatus.cur_selection)
                                        dollarprice = "$%.2f" % ( price / 100.0 )
                                        # Price check mode.
                                        (name,price) = self.dispense.getItemInfo(self.vstatus.cur_selection)
                                        dollarprice = "$%.2f" % ( price / 100.0 )
-                                       dollarprice = dollarprice[:-4] + '.' + dollarprice[-4] + dollarprice[-2:]   # Work around display bug
                                        self.v.display( self.vstatus.cur_selection+' - %s'%dollarprice)
 
                                        self.vstatus.cur_selection = ''
                                        self.v.display( self.vstatus.cur_selection+' - %s'%dollarprice)
 
                                        self.vstatus.cur_selection = ''

UCC git Repository :: git.ucc.asn.au