class Log_Class: def __init__(self, reqObj): self.protocol = reqObj.protocol self.json = reqObj.json self.quantity = reqObj.quantity self.code = reqObj.code self.isLogging = reqObj.isLogging self.pin = reqObj.pin self.log_sensor() def log_sensor(self): if self.protocol == "adc": self.obj = Adc(self.json) #elif self.protocol == "uart": #self.obj = Uart(self.json); #elif self.protocol == "i2c": #self.obj = I2c(self.json); def stop(self): self.obj.stopRead()
class Log_Class: def __init__(self,reqObj): self.protocol = reqObj.protocol self.json = reqObj.json; self.quantity = reqObj.quantity self.code = reqObj.code self.isLogging = reqObj.isLogging self.pin = reqObj.pin self.log_sensor(); def log_sensor(self): if self.protocol == "adc": self.obj = Adc(self.json); #elif self.protocol == "uart": #self.obj = Uart(self.json); #elif self.protocol == "i2c": #self.obj = I2c(self.json); def stop(self): self.obj.stopRead();
def log_sensor(self): if self.protocol == "adc": self.obj = Adc(self.json)
def log_sensor(self): if self.protocol == "adc": self.obj = Adc(self.json);