mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-10 01:05:42 +00:00
feature: show pev status on display
This commit is contained in:
parent
f0e39833b1
commit
8493daeb56
1 changed files with 7 additions and 5 deletions
|
@ -28,8 +28,8 @@ class pyPlcWorker():
|
|||
self.callbackShowStatus = callbackShowStatus
|
||||
self.oldAvlnStatus = 0
|
||||
self.isSimulationMode = isSimulationMode
|
||||
self.hp = pyPlcHomeplug.pyPlcHomeplug(self.workerAddToTrace, self.callbackShowStatus, self.mode, self.addressManager, self.callbackReadyForTcp, self.isSimulationMode)
|
||||
self.hardwareInterface = hardwareInterface.hardwareInterface(self.workerAddToTrace, self.callbackShowStatus)
|
||||
self.hp = pyPlcHomeplug.pyPlcHomeplug(self.workerAddToTrace, self.showStatus, self.mode, self.addressManager, self.callbackReadyForTcp, self.isSimulationMode)
|
||||
self.hardwareInterface = hardwareInterface.hardwareInterface(self.workerAddToTrace, self.showStatus)
|
||||
self.hp.printToUdp("pyPlcWorker init")
|
||||
# Find out the version number, using git.
|
||||
# see https://stackoverflow.com/questions/14989858/get-the-current-git-hash-in-a-python-script
|
||||
|
@ -39,9 +39,9 @@ class pyPlcWorker():
|
|||
strLabel = "(unknown version. 'git describe --tags' failed.)"
|
||||
self.workerAddToTrace("[pyPlcWorker] Software version " + strLabel)
|
||||
if (self.mode == C_EVSE_MODE):
|
||||
self.evse = fsmEvse.fsmEvse(self.addressManager, self.workerAddToTrace, self.hardwareInterface, self.callbackShowStatus)
|
||||
self.evse = fsmEvse.fsmEvse(self.addressManager, self.workerAddToTrace, self.hardwareInterface, self.showStatus)
|
||||
if (self.mode == C_PEV_MODE):
|
||||
self.pev = fsmPev.fsmPev(self.addressManager, self.workerAddToTrace, self.hardwareInterface, self.callbackShowStatus)
|
||||
self.pev = fsmPev.fsmPev(self.addressManager, self.workerAddToTrace, self.hardwareInterface, self.showStatus)
|
||||
def __del__(self):
|
||||
if (self.mode == C_PEV_MODE):
|
||||
print("worker: deleting pev")
|
||||
|
@ -56,6 +56,8 @@ class pyPlcWorker():
|
|||
|
||||
def showStatus(self, s, selection = ""):
|
||||
self.callbackShowStatus(s, selection)
|
||||
if (selection == "pevState"):
|
||||
self.hardwareInterface.showOnDisplay(s, "", "")
|
||||
|
||||
def callbackReadyForTcp(self, status):
|
||||
if (status==1):
|
||||
|
|
Loading…
Reference in a new issue