20 Commits

Author SHA1 Message Date
simplePCBuilding
b6106afd88 Update to the value programming screens with backend integration from previous snapshot
Features:
- finished the update
2022-02-24 14:00:45 +01:00
simplePCBuilding
9677228c98 Update SECURITY.md 2022-02-22 10:47:18 +01:00
simplePCBuilding
4783ac56c4 Update README.md
There was a spelling mistake I didn‘t notice… lol
2022-02-22 10:45:08 +01:00
simplePCBuilding
8d1a1234f9 Update changelog 2022-02-22 10:44:25 +01:00
simplePCBuilding
cbec3a8c36 Update README.md 2022-02-22 10:38:32 +01:00
simplePCBuilding
55270303bf Delete BiogasControllerApp-V2.1 directory 2022-02-21 19:52:29 +01:00
janis
248faec8f0 Finished the update to version 2.2, the Windows-version will be available soon and also the installer for Windows. 2022-02-21 19:51:14 +01:00
simplePCBuilding
e24f501bf5 Update to the backend and new Screen.
Features:
- Added a new settings page
- Laid out some backend stuff to integrate some new features
- prepared backend to include an option to have the previous values also displayed when updating them both screens where you may change configuration of the microcontroller
2022-02-21 18:26:03 +01:00
simplePCBuilding
3c8f814e5f Version Update 2022-02-21 15:50:00 +01:00
simplePCBuilding
6483c0a31a Create changelog 2022-01-27 17:03:33 +00:00
simplePCBuilding
c6fe228f0c Update README.md
Remove unnecessary changelog and put into seperate one
2022-01-27 17:03:03 +00:00
simplePCBuilding
2910bd3e96 Update README.md 2022-01-27 17:02:26 +00:00
simplePCBuilding
8ebb1e3cda Update README.md 2022-01-27 17:01:52 +00:00
simplePCBuilding
0a2a1c08e0 Update README.md 2022-01-27 17:01:04 +00:00
simplePCBuilding
03589a42e6 Update README.md 2022-01-27 17:00:43 +00:00
simplePCBuilding
cb27eb0271 Update README.md 2022-01-27 16:58:53 +00:00
simplePCBuilding
8150d70822 Delete Readme.txt 2022-01-27 16:57:44 +00:00
simplePCBuilding
6565d32130 Create SECURITY.md 2022-01-27 16:56:33 +00:00
simplePCBuilding
ba66ab6348 Update issue templates 2022-01-27 16:24:54 +00:00
simplePCBuilding
6d711f3b3a Update README.md 2022-01-27 16:19:55 +00:00
26 changed files with 651 additions and 257 deletions

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

10
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,117 +0,0 @@
----------------------------------------------------------
BiogasControllerApp V2.1
----------------------------------------------------------
Thank you for downloading the new Version of the BiogsaControllerApp! You are greeted with
lots of new features, including a new and redesigned Graphical User Interface (later "GUI")
and an automatic assignment of the comport on Windows.
----------------------------------------------------------------------------
*FEATURE LIST*
- Easily read out the data the Microcontroller used in ENATECH sends
- Easily change the coefficients for the temperature sonds
- Easily change the temperature that is set for the controller to heat to
- Easy to navigate menus and submenus for better organisation
- (Almost) Bugfree
- Highly detailed error resolving instructions directly inside of the app
- Easy to run: No extra Software required (e.g. Python or similar)
- Easy to install and uninstall as it has an installer and uninstaller
#######################################################################################################
_________
CHANGELOG
_________
DEVELOPMENT VERSIONS
.......................
dev-V2rev1:
- new GUI
- complete rework of the backend
- functioning value reading module
dev-V2rev2:
- functioning Read-Data Screen
- automatic assignment of the serial port
dev-V2rev3:
- functioning Change-Temperature screen
- functioning Change-All-Data screen
dev-V2rev4:
- some Error-Infos were added
V2-Rc1:
- Bugfixes
V2-Rc2:
- Bugfixes
dev-V2.1rev1:
- fixed a bug, where it was possible that the app crashed if an error in
the communication module occured
dev-V2.1rev2:
- Optimised port assignment so that it now can handle multiple comports
dev-V2.1rev3:
- added way more detailed Error information and Error-resolving hints
dev-v2.1rev4:
- fixed a bug, where it was possible that the app crashed if one unplugged
the cable whilst in any other screen than the homescreen or credits screen
V2.1-Rc1:
- small Bugfixes
FULL RELEASES
......................
V2:
- NEW GUI
- NEW Backend
- AUTOMATIC assignment of COMPORTS
V2.1
- DETAILED Error-Info
- DETAILED Error-Resolving-Tips
- MORE RELIABLE Comport handling
- BUGFIXES
******************************************************************************************************
THIS APP IS FREE TO USE FOR ALL STUDENTS AT THE
KANTONSSCHULE WOHLEN
******************************************************************************************************
DEVELOPMENT:
- Microcontroller Software: Dr. A. Cornaz
- BiogasControllerApp V1.0.0: S. Reichmuth
- BiogasControllerApp V2.x: J. Hutz
==================================
=== COPYRIGHT 2022 J. Hutz ======
==================================

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -5,6 +5,7 @@ RootScreen:
ProgramTemp:
Program:
Credits:
Modify:
<QuitPU>:
title: "BiogasControllerApp"
@@ -214,18 +215,18 @@ RootScreen:
on_release:
root.exitapp()
Label:
text: "You are currently running Version 2.1.0 - If you encounter a bug, please report it!"
text: "You are currently running Version 2.2.0 - If you encounter a bug, please report it!"
font_size: 13
pos_hint: {"y": -0.45, "x":0.05}
Button:
text: "credits"
text: "Settings"
font_size: 13
size_hint: 0.07, 0.06
pos_hint: {"x":0.01, "y":0.01}
background_color: (50, 0, 0, 0.2)
on_release:
app.root.current = "Credits"
root.manager.transition.direction = "left"
app.root.current = "Settings"
root.manager.transition.direction = "down"
<ReadoutScreen>:
on_pre_enter: self.reset_screen = root.resscreen()
@@ -249,25 +250,25 @@ RootScreen:
size_hint: 0.8, 0.3
pos_hint: {"x":0.1, "y":0.4}
Label:
text: "SONDE 1: "
text: "SENSOR 1: "
font_size: 20
Label:
id: sonde1
text: ""
Label:
text: "SONDE 2: "
text: "SENSOR 2: "
font_size: 20
Label:
id: sonde2
text: ""
Label:
text: "SONDE 3: "
text: "SENSOR 3: "
font_size: 20
Label:
id: sonde3
text: ""
Label:
text: "SONDE 4: "
text: "SENSOR 4: "
font_size: 20
Label:
id: sonde4
@@ -395,6 +396,7 @@ RootScreen:
text: ""
<ProgramTemp>:
on_pre_enter: self.check_config = root.read_config()
name: "PT"
canvas.before:
Color:
@@ -415,37 +417,44 @@ RootScreen:
pos_hint: {"x": 0.1, "y":0.3}
cols:2
Label:
text: "Temperatur Sonde 1: "
text: "Temperature Sensor 1: "
TextInput:
id: temp_s1
multiline: False
input_filter: "float"
Label:
text: "Temperatur Sonde 2: "
text: "Temperature Sensor 2: "
TextInput:
id: temp_s2
multiline: False
input_filter: "float"
Label:
text: "Temperatur Sonde 3: "
text: "Temperature Sensor 3: "
TextInput:
id: temp_s3
multiline: False
input_filter: "float"
Label:
text: "Temperatur Sonde 4: "
text: "Temperature Sensor 4: "
TextInput:
id: temp_s4
multiline: False
input_filter: "float"
Button:
text: "Back"
size_hint: 0.2, 0.1
size_hint: 0.1, 0.1
pos_hint: {"x":0.1, "y":0.1}
background_color: (255, 0, 0, 0.6)
on_release:
app.root.current = "Readout"
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:
text: "Save"
size_hint: 0.2, 0.1
@@ -456,6 +465,7 @@ RootScreen:
<Program>:
name: "PR"
on_pre_enter: self.check_config = root.read_config()
canvas.before:
Color:
rgba: (50,50,50,0.2)
@@ -474,109 +484,116 @@ RootScreen:
pos_hint: {"x":0.1, "y":0.2}
cols: 4
Label:
text: "Sonde 1, a:"
text: "Sensor 1, a:"
TextInput:
id: s1_a
multiline: False
input_filter: "float"
Label:
text: "Sonde 1, b:"
text: "Sensor 1, b:"
TextInput:
id: s1_b
multiline: False
input_filter: "float"
Label:
text: "Sonde 1, c:"
text: "Sensor 1, c:"
TextInput:
id: s1_c
multiline: False
input_filter: "float"
Label:
text: "Sonde 1, Temp:"
text: "Sensor 1, Temp:"
TextInput:
id: s1_t
multiline: False
input_filter: "float"
Label:
text: "Sonde 2, a:"
text: "Sensor 2, a:"
TextInput:
id: s2_a
multiline: False
input_filter: "float"
Label:
text: "Sonde 2, b:"
text: "Sensor 2, b:"
TextInput:
id: s2_b
multiline: False
input_filter: "float"
Label:
text: "Sonde 2, c:"
text: "Sensor 2, c:"
TextInput:
id: s2_c
multiline: False
input_filter: "float"
Label:
text: "Sonde 2, Temp:"
text: "Sensor 2, Temp:"
TextInput:
id: s2_t
multiline: False
input_filter: "float"
Label:
text: "Sonde 3, a:"
text: "Sensor 3, a:"
TextInput:
id: s3_a
multiline: False
input_filter: "float"
Label:
text: "Sonde 3, b:"
text: "Sensor 3, b:"
TextInput:
id: s3_b
multiline: False
input_filter: "float"
Label:
text: "Sonde 3, c:"
text: "Sensor 3, c:"
TextInput:
id: s3_c
multiline: False
input_filter: "float"
Label:
text: "Sonde 3, Temp:"
text: "Sensor 3, Temp:"
TextInput:
id: s3_t
multiline: False
input_filter: "float"
Label:
text: "Sonde 4, a:"
text: "Sensor 4, a:"
TextInput:
id: s4_a
multiline: False
input_filter: "float"
Label:
text: "Sonde 4, b:"
text: "Sensor 4, b:"
TextInput:
id: s4_b
multiline: False
input_filter: "float"
Label:
text: "Sonde 4, c:"
text: "Sensor 4, c:"
TextInput:
id: s4_c
multiline: False
input_filter: "float"
Label:
text: "Sonde 4, Temp:"
text: "Sensor 4, Temp:"
TextInput:
id: s4_t
multiline: False
input_filter: "float"
Button:
text: "Back"
size_hint: 0.2, 0.1
size_hint: 0.1, 0.1
pos_hint: {"x":0.1, "y":0.1}
background_color: (255, 0, 0, 0.6)
on_release:
app.root.current = "Readout"
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:
text: "Save"
size_hint: 0.2, 0.1
@@ -585,6 +602,7 @@ RootScreen:
on_release:
root.send_data()
<Credits>:
name: "Credits"
canvas.before:
@@ -599,7 +617,7 @@ RootScreen:
size_hint: 0.4, 0.2
pos_hint: {"x":0.3, "y":0.1}
on_release:
app.root.current = "Home"
app.root.current = "Settings"
root.manager.transition.direction = "right"
GridLayout:
cols:1
@@ -609,3 +627,47 @@ RootScreen:
text: "This is a rework of the BiogasControllerApp V1, that was originally programmed by S. Reichmuth."
Label:
text: "Written by: Janis Hutz\nDesigned by: Janis Hutz\nDesign language: Kivy"
<Modify>:
on_pre_enter: self.config = root.read_config()
name: "Settings"
canvas.before:
Color:
rgba: (50,50,50,0.2)
Rectangle:
size: self.size
pos: self.pos
GridLayout:
cols: 1
Label:
text: "Settings"
font_size: 40
color: (0, 113, 0, 1)
bold: True
FloatLayout:
GridLayout:
pos_hint: {"x":0.05, "y":0.05}
size_hint: 0.9, 0.9
cols: 4
Button:
text: "Back"
background_color: (255,0,0,0.6)
on_release:
app.root.current = "Home"
root.manager.transition.direction = "up"
Button:
text: "Report a\nBug"
background_color: (255,0,0,0.6)
on_release:
root.issue_reporting()
ToggleButton:
id: prsel
text: "Easy\nreprogramming" if self.state == "normal" else "Advanced\nreprogramming"
on_release: root.change_programming()
background_color: (255,0,0,0.6) if self.state == "normal" else (0,0,255,0.6)
Button:
text: "Credits"
background_color: (255,0,0,0.6)
on_release:
app.root.current = "Credits"
root.manager.transition.direction = "left"

View File

@@ -0,0 +1,122 @@
"""@package docstring
This is a simplification of the csv module"""
import csv
class CsvRead:
"""This is a class that reads csv files and depending on the module selected does do different things with it"""
def __init__(self):
self.__imp = ""
self.__raw = ""
self.__raw_list = ""
def importing(self, path):
"""Returns a list of the imported csv-file, requires path, either direct system path or relative path"""
self.__imp = open(path)
self.__raw = csv.reader(self.__imp, delimiter=',')
self.__raw_list = list(self.__raw)
self.__imp.close()
return self.__raw_list
class CsvWrite:
"""This is a class that modifies csv files"""
def __init__(self):
self.__impl = []
self.__strpop = []
self.__removed = []
self.__removing = 0
self.__change = 0
self.__appending = 0
self.__imp = []
self.__raw = []
def rem_str(self, path, row):
"""Opens the csv-file in write mode which is specified as an argument either as direct or relative path"""
self.__imp = open(path)
self.__raw = csv.reader(self.__imp, delimiter=',')
self.__impl = list(self.__raw)
self.__removed = self.__impl.pop(row + 1)
with open(path, "w") as removedata:
self.__removing = csv.writer(removedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__removing.writerow(self.__impl.pop(0))
while len(self.__impl) > 0:
with open(path, "a") as removedata:
self.__removing = csv.writer(removedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__removing.writerow(self.__impl.pop(0))
self.__imp.close()
removedata.close()
def chg_str(self, path, row, pos, new_value):
"""Opens the csv-file in write mode to change a value, e.g. if a recipes is changed."""
self.__imp = open(path)
self.__raw = csv.reader(self.__imp, delimiter=',')
self.__impl = list(self.__raw)
self.__strpop = self.__impl.pop(row)
self.__strpop.pop(pos)
self.__strpop.insert(pos, new_value)
self.__impl.insert(row, self.__strpop)
with open(path, "w") as changedata:
self.__change = csv.writer(changedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__change.writerow(self.__impl.pop(0))
while len(self.__impl) > 0:
with open(path, "a") as changedata:
self.__removing = csv.writer(changedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__removing.writerow(self.__impl.pop(0))
self.__imp.close()
changedata.close()
def chg_str_rem(self, path, row, pos):
"""Opens the csv-file in write mode to change a value, e.g. if a recipes is changed."""
self.__imp = open(path)
self.__raw = csv.reader(self.__imp, delimiter=',')
self.__impl = list(self.__raw)
self.__strpop = self.__impl.pop(row)
self.__strpop.pop(pos)
self.__strpop.pop(pos)
self.__impl.insert(row, self.__strpop)
with open(path, "w") as changedata:
self.__change = csv.writer(changedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__change.writerow(self.__impl.pop(0))
while len(self.__impl) > 0:
with open(path, "a") as changedata:
self.__removing = csv.writer(changedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__removing.writerow(self.__impl.pop(0))
self.__imp.close()
changedata.close()
def chg_str_add(self, path, row, new_value1, new_value2):
"""Opens the csv-file in write mode to change a value, e.g. if a recipes is changed."""
self.__imp = open(path)
self.__raw = csv.reader(self.__imp, delimiter=',')
self.__impl = list(self.__raw)
self.__strpop = self.__impl.pop(row)
self.__strpop.append(new_value1)
self.__strpop.append(new_value2)
self.__impl.insert(row, self.__strpop)
with open(path, "w") as changedata:
self.__change = csv.writer(changedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__change.writerow(self.__impl.pop(0))
while len(self.__impl) > 0:
with open(path, "a") as changedata:
self.__removing = csv.writer(changedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__removing.writerow(self.__impl.pop(0))
self.__imp.close()
changedata.close()
def app_str(self, path, value):
"""Opens the csv-file in append mode and writes given input. CsvWrite.app_str(path, value).
Path can be specified both as direct or relative. value is a list. Will return an error if type of value is
not a list."""
with open(path, "a") as appenddata:
self.__appending = csv.writer(appenddata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__appending.writerow(value)
appenddata.close()
def write_str(self, path, value):
with open(path, "w") as writedata:
self.__change = csv.writer(writedata, delimiter=',', quoting=csv.QUOTE_MINIMAL)
self.__change.writerow(value)
writedata.close()

View File

@@ -5,12 +5,13 @@ print("""
BIOGASCONTROLLERAPP
----------
Version 2.1
Version 2.2
Copyright 2022 J.Hutz""")
import time
import threading
import platform
import os
import webbrowser
os.environ["KIVY_NO_CONSOLELOG"] = "1"
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.uix.popup import Popup
@@ -20,10 +21,10 @@ from kivy.clock import mainthread
import bin.lib.lib
import bin.lib.communication
import bin.lib.comport_search
import bin.lib.csv_parsers
cvr = bin.lib.csv_parsers.CsvRead()
cvw = bin.lib.csv_parsers.CsvWrite()
com = bin.lib.lib.Com()
##################################################################
@@ -310,6 +311,128 @@ class ReadoutScreen(Screen):
class Program(Screen):
def read_config(self):
self.config_imp = []
self.__export = []
self.config_imp = cvr.importing("./config/config.csv")
self.__export = self.config_imp.pop(0)
self.__extracted = self.__export.pop(0)
if self.__extracted == "1":
self.ids.prsel.state = "normal"
self.ids.s1_a.text = ""
self.ids.s1_b.text = ""
self.ids.s1_c.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:
self.ids.prsel.state = "down"
self.read_data()
self.__mode = 2
def change_mode(self):
if self.__mode == "1":
self.read_data()
self.__mode = 2
else:
self.ids.s1_a.text = ""
self.ids.s1_b.text = ""
self.ids.s1_c.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
def read_data(self):
try:
com.connect(19200, "")
self.go = 1
except:
self.go = 0
if self.go == 1:
com.send("RD")
self.__pos = 1
self.__beginning = time.time()
self.go = 1
while True:
if time.time() - self.__beginning < 5:
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "\n":
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "R":
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "D":
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "\n":
self.go = 1
break
else:
pass
else:
pass
else:
pass
else:
pass
else:
self.go = 0
break
if self.go == 1:
for i in range(4):
self.__x = com.receive(28)
self.__a = str(com.decode_float(self.__x[0:6]))
self.__b += str(com.decode_float(self.__x[7:13]))
self.__c += str(com.decode_float(self.__x[14:20]))
self.__temp += str(com.decode_float(self.__x[21:27]))
if self.__pos == 1:
self.ids.s1_a.text = self.__a
self.ids.s1_b.text = self.__b
self.ids.s1_c.text = self.__c
self.ids.s1_t.text = self.__temp
elif self.__pos == 2:
self.ids.s2_a.text = self.__a
self.ids.s2_b.text = self.__b
self.ids.s2_c.text = self.__c
self.ids.s2_t.text = self.__temp
elif self.__pos == 3:
self.ids.s3_a.text = self.__a
self.ids.s3_b.text = self.__b
self.ids.s3_c.text = self.__c
self.ids.s3_t.text = self.__temp
elif self.__pos == 4:
self.ids.s4_a.text = self.__a
self.ids.s4_b.text = self.__b
self.ids.s4_c.text = self.__c
self.ids.s4_t.text = self.__temp
self.__pos += 1
else:
self.open_confail_pu()
com.quitcom()
else:
self.open_confail_pu()
def create_com(self):
self.coms = bin.lib.communication.Communication()
@@ -339,24 +462,27 @@ class Program(Screen):
self.__transmit.append(self.ids.s4_b.text)
self.__transmit.append(self.ids.s4_c.text)
self.__transmit.append(self.ids.s4_t.text)
self.coms.change_all(self.__transmit,"")
self.ids.s1_a.text = ""
self.ids.s1_b.text = ""
self.ids.s1_c.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.openconfpu()
try:
self.coms.change_all(self.__transmit, "")
self.ids.s1_a.text = ""
self.ids.s1_b.text = ""
self.ids.s1_c.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.openconfpu()
except:
self.open_confail_pu()
else:
self.openerrorpu()
else:
@@ -376,6 +502,89 @@ class Program(Screen):
class ProgramTemp(Screen):
def read_config(self):
self.config_imp = []
self.__export = []
self.config_imp = cvr.importing("./config/config.csv")
self.__export = self.config_imp.pop(0)
self.__extracted = self.__export.pop(0)
if self.__extracted == "1":
self.ids.prsel.state = "normal"
self.ids.temp_s1.text = ""
self.ids.temp_s2.text = ""
self.ids.temp_s3.text = ""
self.ids.temp_s4.text = ""
self.__mode = 1
else:
self.ids.prsel.state = "down"
self.read_data()
self.__mode = 2
def change_mode(self):
if self.__mode == "1":
self.read_data()
self.__mode = 2
else:
self.ids.temp_s1.text = ""
self.ids.temp_s2.text = ""
self.ids.temp_s3.text = ""
self.ids.temp_s4.text = ""
self.__mode = 1
def read_data(self):
try:
com.connect(19200, "")
self.go = 1
except:
self.go = 0
if self.go == 1:
com.send("RD")
self.__pos = 1
self.__beginning = time.time()
self.go = 1
while True:
if time.time() - self.__beginning < 5:
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "\n":
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "R":
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "D":
self.__data_recieve = com.decode_ascii(com.receive(1))
if self.__data_recieve == "\n":
self.go = 1
break
else:
pass
else:
pass
else:
pass
else:
pass
else:
self.go = 0
break
if self.go == 1:
for i in range(4):
self.__x = com.receive(28)
self.__output = str(com.decode_float(self.__x[21:27]))
if self.__pos == 1:
self.ids.temp_s1.text = self.__output
elif self.__pos == 2:
self.ids.temp_s2.text = self.__output
elif self.__pos == 3:
self.ids.temp_s3.text = self.__output
elif self.__pos == 4:
self.ids.temp_s4.text = self.__output
self.__pos += 1
else:
self.open_confail_pu()
com.quitcom()
else:
self.open_confail_pu()
def create_com(self):
self.coms = bin.lib.communication.Communication()
@@ -485,6 +694,32 @@ class Credits(Screen):
pass
class Modify(Screen):
def read_config(self):
self.config_imp = []
self.__export = []
self.config_imp = cvr.importing("./config/config.csv")
self.__export = self.config_imp.pop(0)
self.__extracted = self.__export.pop(0)
if self.__extracted == "1":
self.ids.prsel.state = "normal"
else:
self.ids.prsel.state = "down"
def issue_reporting(self):
webbrowser.open("https://github.com/simplePCBuilding/BiogasControllerApp/issues", new=2)
def change_programming(self):
self.csv_import = []
self.csv_import = cvr.importing("./config/config.csv")
self.csv_import.pop(0)
if self.ids.prsel.text == "Easy\nreprogramming":
self.csv_import.insert(0, 1)
else:
self.csv_import.insert(0, 2)
cvw.write_str("./config/config.csv", self.csv_import)
########################################################
# Screenmanager
########################################################

View File

@@ -0,0 +1 @@
1
1 1

104
README.md
View File

@@ -1,106 +1,34 @@
----------------------------------------------------------
BiogasControllerApp V2.1
----------------------------------------------------------
**BiogasControllerApp V2.2**
Thank you for downloading the new Version of the BiogsaControllerApp! You are greeted with
lots of new features, including a new and redesigned Graphical User Interface (later "GUI")
and an automatic assignment of the comport on Windows.
----------------------------------------------------------------------------
Thank you for downloading the new Version of the BiogasControllerApp! You are greeted with
lots of new features, including a new and redesigned Graphical User Interface (later "GUI")
and an automatic assignment of the comport on Windows.
*FEATURE LIST*
- Easily read out the data the Microcontroller used in ENATECH sends
- Easily change the coefficients for the temperature sonds
- Easily change the temperature that is set for the controller to heat to
- Easy to navigate menus and submenus for better organisation
- (Almost) Bugfree
- Highly detailed error resolving instructions directly inside of the app
- Easy to run: No extra Software required (e.g. Python or similar)
- Easy to install and uninstall as it has an installer and uninstaller
#######################################################################################################
_________
CHANGELOG
_________
DEVELOPMENT VERSIONS
.......................
dev-V2rev1:
- new GUI
- complete rework of the backend
- functioning value reading module
dev-V2rev2:
- functioning Read-Data Screen
- automatic assignment of the serial port
dev-V2rev3:
- functioning Change-Temperature screen
- functioning Change-All-Data screen
dev-V2rev4:
- some Error-Infos were added
V2-Rc1:
- Bugfixes
V2-Rc2:
- Bugfixes
dev-V2.1rev1:
- fixed a bug, where it was possible that the app crashed if an error in
the communication module occured
dev-V2.1rev2:
- Optimised port assignment so that it now can handle multiple comports
dev-V2.1rev3:
- added way more detailed Error information and Error-resolving hints
dev-v2.1rev4:
- fixed a bug, where it was possible that the app crashed if one unplugged
the cable whilst in any other screen than the homescreen or credits screen
V2.1-Rc1:
- small Bugfixes
- Easily read out the data the Microcontroller used in ENATECH sends
- Easily change the coefficients for the temperature sonds
- Easily change the temperature that is set for the controller to heat to
- Easy to navigate menus and submenus for better organisation
- (Almost) Bugfree
- The app is still maintained and as such known issues will be resolved
- Highly detailed error resolving instructions directly inside of the app
- Easy to run: No extra Software required (e.g. Python or similar)
- Easy to install and uninstall as it has an installer and uninstaller
FULL RELEASES
......................
V2:
- NEW GUI
- NEW Backend
- AUTOMATIC assignment of COMPORTS
V2.1
- DETAILED Error-Info
- DETAILED Error-Resolving-Tips
- MORE RELIABLE Comport handling
- BUGFIXES
***THIS APP IS FREE TO USE FOR EVERYONE THAT HAS USE FOR IT***
******************************************************************************************************
THIS APP IS FREE TO USE FOR ALL STUDENTS AT THE
KANTONSSCHULE WOHLEN
******************************************************************************************************
DEVELOPMENT:
DEVELOPMENT:
- BiogasControllerApp V2.x: simplePCBuilding

15
SECURITY.md Normal file
View File

@@ -0,0 +1,15 @@
# Security Policy
## Supported Versions
Currently only the newest versions get security updates as security updates are also part of a release.
| Version | Supported |
| ------- | ------------------ |
| 2.2.0 | 🟡 |
| 2.1.0 | ✅ |
| 1.0.0 | ❎ |
## Reporting a Vulnerability
If you find any potential security issues, please let us know through the issues tab. You can expect an update to arrive in not under a week of opening the issue.

80
changelog Normal file
View File

@@ -0,0 +1,80 @@
***CHANGELOG***
DEVELOPMENT VERSIONS
dev-V2rev1:
- new GUI
- complete rework of the backend
- functioning value reading module
dev-V2rev2:
- functioning Read-Data Screen
- automatic assignment of the serial port
dev-V2rev3:
- functioning Change-Temperature screen
- functioning Change-All-Data screen
dev-V2rev4:
- some Error-Infos were added
V2-Rc1:
- Bugfixes
V2-Rc2:
- Bugfixes
dev-V2.1rev1:
- fixed a bug, where it was possible that the app crashed if an error in the communication module occured
dev-V2.1rev2:
- Optimised port assignment so that it now can handle multiple comports
dev-V2.1rev3:
- added way more detailed Error information and Error-resolving hints
dev-v2.1rev4:
- fixed a bug, where it was possible that the app crashed if one unplugged the cable whilst in any other screen than the homescreen or credits screen
V2.1-Rc1:
- small Bugfixes
dev-V2.2rev1:
- fixed a bug, where the app would crash if an error occured during transmitting of the values changed in the program screen
dev-V2.2rev2:
- added a new settings-screen that allows changing a setting, reporting bugs and also the credits screen has been moved into that screen.
dev-V2.2rev3:
- added support for only changing one value in the program screen at one point
dev-V2.2rev4:
- added backend support for momentarily disable the feature newly added in the previous dev-version
dev-V2.2rev5: (upcoming)
- add buttons for the feature of dev-V2.2rev4
V2.2-Rc1: (upcoming)
- fix possibly occuring bug, testing version
FULL RELEASES
V2:
- NEW GUI
- NEW Backend
- AUTOMATIC assignment of COMPORTS
V2.1
- DETAILED Error-Info
- DETAILED Error-Resolving-Tips
- MORE RELIABLE Comport handling
- BUGFIXES
V2.2 (Upcoming)
- ALLOWS for easier configuration changing
- ADDS a Settings screen
- ADDS easier bug-reporting
- BUGFIXES