Skip to content

Commit

Permalink
[IMP] posbox: print the homepage url on the status ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdsn committed Mar 21, 2014
1 parent 88e9f7e commit 6aa0187
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions addons/hw_escpos/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,15 @@ def print_status(self,eprint):
if len(ips) == 0:
eprint.text('ERROR: Could not connect to LAN\n\nPlease check that the PosBox is correc-\ntly connected with a network cable,\n that the LAN is setup with DHCP, and\nthat network addresses are available')
elif len(ips) == 1:
eprint.text('IP Address\n'+ips[0]+'\n')
eprint.text('IP Address:\n'+ips[0]+'\n')
else:
eprint.text('IP Addresses\n')
eprint.text('IP Addresses:\n')
for ip in ips:
eprint.text(ip+'\n')

if len(ips) >= 1:
eprint.text('\nHomepage:\nhttp://'+ips[0]+':8069\n')

eprint.text('\n\n')
eprint.cut()

Expand Down Expand Up @@ -283,6 +286,8 @@ def print_taxes():

driver = EscposDriver()

driver.push_task('printstatus')

hw_proxy.drivers['escpos'] = driver

class EscposProxy(hw_proxy.Proxy):
Expand Down

0 comments on commit 6aa0187

Please sign in to comment.