mirror of
https://github.com/janishutz/BiogasControllerApp.git
synced 2025-11-25 13:54:24 +00:00
Update to the value programming screens with backend integration from previous snapshot
Features: - finished the update
This commit is contained in:
@@ -396,6 +396,7 @@ RootScreen:
|
|||||||
text: ""
|
text: ""
|
||||||
|
|
||||||
<ProgramTemp>:
|
<ProgramTemp>:
|
||||||
|
on_pre_enter: self.check_config = root.read_config()
|
||||||
name: "PT"
|
name: "PT"
|
||||||
canvas.before:
|
canvas.before:
|
||||||
Color:
|
Color:
|
||||||
@@ -441,12 +442,19 @@ RootScreen:
|
|||||||
input_filter: "float"
|
input_filter: "float"
|
||||||
Button:
|
Button:
|
||||||
text: "Back"
|
text: "Back"
|
||||||
size_hint: 0.2, 0.1
|
size_hint: 0.1, 0.1
|
||||||
pos_hint: {"x":0.1, "y":0.1}
|
pos_hint: {"x":0.1, "y":0.1}
|
||||||
background_color: (255, 0, 0, 0.6)
|
background_color: (255, 0, 0, 0.6)
|
||||||
on_release:
|
on_release:
|
||||||
app.root.current = "Readout"
|
app.root.current = "Readout"
|
||||||
root.manager.transition.direction = "up"
|
root.manager.transition.direction = "up"
|
||||||
|
ToggleButton:
|
||||||
|
id: prsel
|
||||||
|
size_hint: 0.2, 0.1
|
||||||
|
pos_hint: {"x":0.35, "y": 0.1}
|
||||||
|
text: "Easy\nreprogramming" if self.state == "normal" else "Advanced\nreprogramming"
|
||||||
|
on_release: root.change_mode()
|
||||||
|
background_color: (255,0,0,0.6) if self.state == "normal" else (0,0,255,0.6)
|
||||||
Button:
|
Button:
|
||||||
text: "Save"
|
text: "Save"
|
||||||
size_hint: 0.2, 0.1
|
size_hint: 0.2, 0.1
|
||||||
@@ -457,6 +465,7 @@ RootScreen:
|
|||||||
|
|
||||||
<Program>:
|
<Program>:
|
||||||
name: "PR"
|
name: "PR"
|
||||||
|
on_pre_enter: self.check_config = root.read_config()
|
||||||
canvas.before:
|
canvas.before:
|
||||||
Color:
|
Color:
|
||||||
rgba: (50,50,50,0.2)
|
rgba: (50,50,50,0.2)
|
||||||
@@ -572,12 +581,19 @@ RootScreen:
|
|||||||
input_filter: "float"
|
input_filter: "float"
|
||||||
Button:
|
Button:
|
||||||
text: "Back"
|
text: "Back"
|
||||||
size_hint: 0.2, 0.1
|
size_hint: 0.1, 0.1
|
||||||
pos_hint: {"x":0.1, "y":0.1}
|
pos_hint: {"x":0.1, "y":0.1}
|
||||||
background_color: (255, 0, 0, 0.6)
|
background_color: (255, 0, 0, 0.6)
|
||||||
on_release:
|
on_release:
|
||||||
app.root.current = "Readout"
|
app.root.current = "Readout"
|
||||||
root.manager.transition.direction = "up"
|
root.manager.transition.direction = "up"
|
||||||
|
ToggleButton:
|
||||||
|
id: prsel
|
||||||
|
size_hint: 0.2, 0.1
|
||||||
|
pos_hint: {"x":0.35, "y": 0.1}
|
||||||
|
text: "Easy\nreprogramming" if self.state == "normal" else "Advanced\nreprogramming"
|
||||||
|
on_release: root.change_mode()
|
||||||
|
background_color: (255,0,0,0.6) if self.state == "normal" else (0,0,255,0.6)
|
||||||
Button:
|
Button:
|
||||||
text: "Save"
|
text: "Save"
|
||||||
size_hint: 0.2, 0.1
|
size_hint: 0.2, 0.1
|
||||||
@@ -586,6 +602,7 @@ RootScreen:
|
|||||||
on_release:
|
on_release:
|
||||||
root.send_data()
|
root.send_data()
|
||||||
|
|
||||||
|
|
||||||
<Credits>:
|
<Credits>:
|
||||||
name: "Credits"
|
name: "Credits"
|
||||||
canvas.before:
|
canvas.before:
|
||||||
@@ -646,7 +663,7 @@ RootScreen:
|
|||||||
ToggleButton:
|
ToggleButton:
|
||||||
id: prsel
|
id: prsel
|
||||||
text: "Easy\nreprogramming" if self.state == "normal" else "Advanced\nreprogramming"
|
text: "Easy\nreprogramming" if self.state == "normal" else "Advanced\nreprogramming"
|
||||||
on_text: root.change_programming()
|
on_release: root.change_programming()
|
||||||
background_color: (255,0,0,0.6) if self.state == "normal" else (0,0,255,0.6)
|
background_color: (255,0,0,0.6) if self.state == "normal" else (0,0,255,0.6)
|
||||||
Button:
|
Button:
|
||||||
text: "Credits"
|
text: "Credits"
|
||||||
|
|||||||
@@ -319,10 +319,23 @@ class Program(Screen):
|
|||||||
self.__extracted = self.__export.pop(0)
|
self.__extracted = self.__export.pop(0)
|
||||||
if self.__extracted == "1":
|
if self.__extracted == "1":
|
||||||
self.ids.prsel.state = "normal"
|
self.ids.prsel.state = "normal"
|
||||||
self.ids.temp_s1.text = ""
|
self.ids.s1_a.text = ""
|
||||||
self.ids.temp_s2.text = ""
|
self.ids.s1_b.text = ""
|
||||||
self.ids.temp_s3.text = ""
|
self.ids.s1_c.text = ""
|
||||||
self.ids.temp_s4.text = ""
|
self.ids.s1_t.text = ""
|
||||||
|
self.ids.s2_a.text = ""
|
||||||
|
self.ids.s2_b.text = ""
|
||||||
|
self.ids.s2_c.text = ""
|
||||||
|
self.ids.s2_t.text = ""
|
||||||
|
self.ids.s3_a.text = ""
|
||||||
|
self.ids.s3_b.text = ""
|
||||||
|
self.ids.s3_c.text = ""
|
||||||
|
self.ids.s3_t.text = ""
|
||||||
|
self.ids.s4_a.text = ""
|
||||||
|
self.ids.s4_b.text = ""
|
||||||
|
self.ids.s4_c.text = ""
|
||||||
|
self.ids.s4_t.text = ""
|
||||||
|
self.__mode = 1
|
||||||
else:
|
else:
|
||||||
self.ids.prsel.state = "down"
|
self.ids.prsel.state = "down"
|
||||||
self.read_data()
|
self.read_data()
|
||||||
@@ -330,15 +343,25 @@ class Program(Screen):
|
|||||||
|
|
||||||
def change_mode(self):
|
def change_mode(self):
|
||||||
if self.__mode == "1":
|
if self.__mode == "1":
|
||||||
self.ids.prsel.state = "down"
|
|
||||||
self.read_data()
|
self.read_data()
|
||||||
self.__mode = 2
|
self.__mode = 2
|
||||||
else:
|
else:
|
||||||
self.ids.prsel.state = "normal"
|
self.ids.s1_a.text = ""
|
||||||
self.ids.temp_s1.text = ""
|
self.ids.s1_b.text = ""
|
||||||
self.ids.temp_s2.text = ""
|
self.ids.s1_c.text = ""
|
||||||
self.ids.temp_s3.text = ""
|
self.ids.s1_t.text = ""
|
||||||
self.ids.temp_s4.text = ""
|
self.ids.s2_a.text = ""
|
||||||
|
self.ids.s2_b.text = ""
|
||||||
|
self.ids.s2_c.text = ""
|
||||||
|
self.ids.s2_t.text = ""
|
||||||
|
self.ids.s3_a.text = ""
|
||||||
|
self.ids.s3_b.text = ""
|
||||||
|
self.ids.s3_c.text = ""
|
||||||
|
self.ids.s3_t.text = ""
|
||||||
|
self.ids.s4_a.text = ""
|
||||||
|
self.ids.s4_b.text = ""
|
||||||
|
self.ids.s4_c.text = ""
|
||||||
|
self.ids.s4_t.text = ""
|
||||||
self.__mode = 1
|
self.__mode = 1
|
||||||
|
|
||||||
def read_data(self):
|
def read_data(self):
|
||||||
@@ -405,14 +428,10 @@ class Program(Screen):
|
|||||||
self.ids.s4_t.text = self.__temp
|
self.ids.s4_t.text = self.__temp
|
||||||
self.__pos += 1
|
self.__pos += 1
|
||||||
else:
|
else:
|
||||||
self.open_comfail_pu()
|
self.open_confail_pu()
|
||||||
com.quitcom()
|
com.quitcom()
|
||||||
else:
|
else:
|
||||||
self.open_comfail_pu()
|
self.open_confail_pu()
|
||||||
|
|
||||||
def open_comfail_pu(self):
|
|
||||||
self.cfpu = ConnectionFail()
|
|
||||||
self.cfpu.open()
|
|
||||||
|
|
||||||
def create_com(self):
|
def create_com(self):
|
||||||
self.coms = bin.lib.communication.Communication()
|
self.coms = bin.lib.communication.Communication()
|
||||||
@@ -495,6 +514,7 @@ class ProgramTemp(Screen):
|
|||||||
self.ids.temp_s2.text = ""
|
self.ids.temp_s2.text = ""
|
||||||
self.ids.temp_s3.text = ""
|
self.ids.temp_s3.text = ""
|
||||||
self.ids.temp_s4.text = ""
|
self.ids.temp_s4.text = ""
|
||||||
|
self.__mode = 1
|
||||||
else:
|
else:
|
||||||
self.ids.prsel.state = "down"
|
self.ids.prsel.state = "down"
|
||||||
self.read_data()
|
self.read_data()
|
||||||
@@ -502,11 +522,9 @@ class ProgramTemp(Screen):
|
|||||||
|
|
||||||
def change_mode(self):
|
def change_mode(self):
|
||||||
if self.__mode == "1":
|
if self.__mode == "1":
|
||||||
self.ids.prsel.state = "down"
|
|
||||||
self.read_data()
|
self.read_data()
|
||||||
self.__mode = 2
|
self.__mode = 2
|
||||||
else:
|
else:
|
||||||
self.ids.prsel.state = "normal"
|
|
||||||
self.ids.temp_s1.text = ""
|
self.ids.temp_s1.text = ""
|
||||||
self.ids.temp_s2.text = ""
|
self.ids.temp_s2.text = ""
|
||||||
self.ids.temp_s3.text = ""
|
self.ids.temp_s3.text = ""
|
||||||
@@ -562,14 +580,10 @@ class ProgramTemp(Screen):
|
|||||||
self.ids.temp_s4.text = self.__output
|
self.ids.temp_s4.text = self.__output
|
||||||
self.__pos += 1
|
self.__pos += 1
|
||||||
else:
|
else:
|
||||||
self.open_comfail_pu()
|
self.open_confail_pu()
|
||||||
com.quitcom()
|
com.quitcom()
|
||||||
else:
|
else:
|
||||||
self.open_comfail_pu()
|
self.open_confail_pu()
|
||||||
|
|
||||||
def open_comfail_pu(self):
|
|
||||||
self.cfpu = ConnectionFail()
|
|
||||||
self.cfpu.open()
|
|
||||||
|
|
||||||
def create_com(self):
|
def create_com(self):
|
||||||
self.coms = bin.lib.communication.Communication()
|
self.coms = bin.lib.communication.Communication()
|
||||||
|
|||||||
Reference in New Issue
Block a user