I have a little issue here and it's breaking my head... I'm making a little app on Kivy which includes an alarm system. It bases on 4 limits, low, crit low, high and crit high, and should go "beep!" each second low or high limits are broken and "beep beep!" each second when criticals are. The code below was working perfectly until yesterday. The changes I made were: I updated kivy to 1.10.1 and installed the dev version, which I uninstalled later. However I went back to 1.9 and the error keeps on... Here's the code:
class Ingage(DragBehavior,Widget): name=StringProperty() desc=StringProperty() value=NumericProperty() rem=ObjectProperty() pinno=NumericProperty() pinmo=StringProperty() pin=ObjectProperty() ch=NumericProperty() h=NumericProperty() l=NumericProperty() cl=NumericProperty() tone=ObjectProperty() note=StringProperty()
def measure(self): Clock.schedule_interval(self.setbar, 60/60.)
def setbar(self, *args): if self.pin.read()==None: self.value=0 self.note= 'No se lee el elemento' else: self.value = (a*self.pin.read())+self.cl session.query(Apoint).filter_by(AP_tag=self.name).update({'AP_read': self.value}) if self.value >= self.ch and not self.parent.checked: if self.tone: self.tone.play() time.sleep(0.2) self.tone.play() self.parent.rise(self.name,self.value,4,self.desc) if self.value <= self.cl and not self.parent.checked: if self.tone: self.tone.play() time.sleep(0.2) self.tone.play() self.parent.rise(self.name,self.value,2,self.desc) if self.value < self.l and not self.parent.checked: if self.tone: self.tone.play() self.parent.rise(self.name,self.value,1, self.desc) if self.value > self.h and not self.parent.checked: if self.tone: self.tone.play() self.parent.rise(self.name,self.value,3,self.desc)