comparison service/arduinoNode/devices.py @ 977:03cfee8f9154

obey ActiveLowOutput correctly Ignore-this: d8423b272f210a6fbbd9b35772bf7065 darcs-hash:20150417080352-312f9-b06c230dd59ff36706d8c76a75ef4f29430f9d5f
author drewp <drewp@bigasterisk.com>
date Fri, 17 Apr 2015 01:03:52 -0700
parents f3023410d875
children f81c4d3d774b
comparison
equal deleted inserted replaced
976:6754aa8aab38 977:03cfee8f9154
251 251
252 def sendOutput(self, statements, write, read): 252 def sendOutput(self, statements, write, read):
253 assert len(statements) == 1 253 assert len(statements) == 1
254 assert statements[0][:2] == (self.uri, ROOM['brightness']) 254 assert statements[0][:2] == (self.uri, ROOM['brightness'])
255 value = float(statements[0][2]) 255 value = float(statements[0][2])
256 if (self.uri, RDF.type, ROOM['ActiveLowOutput']): 256 if (self.uri, RDF.type, ROOM['ActiveLowOutput']) in self.graph:
257 value = 1 - value 257 value = 1 - value
258 write(byteFromFloat(value)) 258 write(byteFromFloat(value))
259 259
260 def generateActionCode(self): 260 def generateActionCode(self):
261 return r''' 261 return r'''