From b7165feb4f6fe53c303e415e166a6e0842640e60 Mon Sep 17 00:00:00 2001 From: Brock Tice Date: Sat, 13 Jun 2015 16:28:38 -0600 Subject: [PATCH] Enable dip switch reading for serial command line script. --- read_registers_serial.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/read_registers_serial.py b/read_registers_serial.py index da44b7c..a98306a 100755 --- a/read_registers_serial.py +++ b/read_registers_serial.py @@ -98,7 +98,7 @@ hsTemp = rr.registers[14] #maxVb_daily = rr.registers[65] * v_scale #minTb_daily = rr.registers[71] #maxTb_daily = rr.registers[72] -#dipswitches = bin(rr.registers[48])[::-1][:-2].zfill(8) +dipswitches = bin(rr.registers[25])[::-1][:-2].zfill(8) #led_state = rr.registers print "vBattTerm.value %.2f" % battsV #print "vBattSense.value %.2f" % battsSensedV @@ -116,7 +116,7 @@ print "state: %s" % state[statenum] #print "max Vb daily: %0.2f" % maxVb_daily #print "min Tb daily: %0.2f" % minTb_daily #print "max Tb daily: %0.2f" % maxTb_daily -#print "dipswitches: %s" % dipswitches -#print "dipswitches: 12345678" +print "dipswitches: %s" % dipswitches +print "dipswitches: 12345678" #print "" client.close()