mirror of
https://github.com/janishutz/BiogasControllerApp.git
synced 2025-11-25 22:04:24 +00:00
Fixed an error that could cause the app to crash if cloned from the repository.
This commit is contained in:
@@ -85,12 +85,12 @@ class SwitchMode:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def enable_fastmode(self):
|
||||
com.connect(19200,"")
|
||||
def enable_fastmode(self, special_port):
|
||||
com.connect(19200, special_port)
|
||||
com.send("FM")
|
||||
com.quitcom()
|
||||
|
||||
def disable_fastmode(self):
|
||||
com.connect(19200, "")
|
||||
def disable_fastmode(self, special_port):
|
||||
com.connect(19200, special_port)
|
||||
com.send("NM")
|
||||
com.quitcom()
|
||||
|
||||
@@ -7,7 +7,7 @@ class ComportService:
|
||||
self.__import = []
|
||||
self.__working = []
|
||||
|
||||
def get_comport(self, special_port=""):
|
||||
def get_comport(self, special_port):
|
||||
self.__comport = [comport.device for comport in serial.tools.list_ports.comports()]
|
||||
self.__pos = 0
|
||||
if special_port != "":
|
||||
|
||||
@@ -47,7 +47,7 @@ class Com:
|
||||
return 0
|
||||
|
||||
def decode_int(self, value):
|
||||
self.i = int(value, base = 16)
|
||||
self.i = int(value, base=16)
|
||||
return self.i
|
||||
|
||||
def decode_float(self, value):
|
||||
|
||||
Reference in New Issue
Block a user