Fix switch bank callback and temperature/humidity data
This commit is contained in:
10
boatdata.py
10
boatdata.py
@@ -1,4 +1,4 @@
|
||||
'''
|
||||
"""
|
||||
!!! Dies ist noch im Ideen-Stadium
|
||||
WIP TBD
|
||||
|
||||
@@ -75,7 +75,7 @@ xdrRoll
|
||||
xdrPitch
|
||||
xdrYaw
|
||||
|
||||
'''
|
||||
"""
|
||||
|
||||
import datetime
|
||||
import time
|
||||
@@ -379,7 +379,11 @@ class SwitchBank():
|
||||
def setCallback(self, index, cb_function):
|
||||
if index < 1 or index > 28:
|
||||
raise IndexError("Switch index out of range")
|
||||
self.callback[index] = cb_function
|
||||
self.callback[index-1] = cb_function
|
||||
|
||||
def __str__(self):
|
||||
out = f"Switch bank instance #{self.instance}"
|
||||
return out
|
||||
|
||||
class Tank():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user