Mercurial > code > home > repos > homeauto
changeset 90:80efeab5c02f
fix broken request paths
Ignore-this: dbfef5f7358cf2b89dc58dd3c377041c
author | drewp@bigasterisk.com |
---|---|
date | Fri, 16 Aug 2013 22:54:53 -0700 |
parents | 1c1fcb71e10a |
children | e9d9fb003494 |
files | service/starArduino/starArduino.py |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/service/starArduino/starArduino.py Fri Aug 02 08:06:05 2013 -0700 +++ b/service/starArduino/starArduino.py Fri Aug 16 22:54:53 2013 -0700 @@ -6,7 +6,6 @@ import sys,json from twisted.internet import reactor, task -from twisted.internet.task import LoopingCall import cyclone.web, restkit sys.path.append("/my/proj/pixel/shiftweb") @@ -49,16 +48,16 @@ class Barcode(PrettyErrorHandler, cyclone.web.RequestHandler): def get(self): self.set_header("Content-Type", "text/plain") - ser = self.settings.arduino.ser - ser.write("\x60\x02") - self.write(str(ser.readJson())) + ard = self.settings.arduino + ard.ser.write("\x60\x02") + self.write(str(ard.readJson())) class BarcodeBeep(PrettyErrorHandler, cyclone.web.RequestHandler): def put(self): self.set_header("Content-Type", "text/plain") - ser = self.settings.arduino.ser - ser.write("\x60\x03") - self.write(str(ser.readJson())) + ard = self.settings.arduino + ard.ser.write("\x60\x03") + self.write(str(ard.readJson())) def barcodeWatch(arduino, postBarcode): arduino.ser.write("\xff\xfb")