- improved test

- added firmware update


git-svn-id: http://moon:8086/svn/projects/HendiControl@181 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
2019-03-30 16:01:22 +00:00
parent c3dd8f0786
commit a11e20345c
2 changed files with 389 additions and 389 deletions
+5 -2
View File
@@ -56,6 +56,7 @@ class HendiCtrl():
self.ser.readline()
self.ser.flushInput()
self.ser.write(b'q')
self.ser.flushOutput()
def __write(self, s):
self.ser.flushInput()
@@ -77,7 +78,7 @@ class HendiCtrl():
def cmd(self, s):
self.__write(s)
rsp = hendi.__read()
rsp = self.__read()
print(rsp)
if "OK" in rsp[0]:
return rsp[1]
@@ -128,8 +129,10 @@ if __name__ == '__main__':
hendi.getState()
hendi.getSoftwareIdentifier()
hendi.getSoftwareVersion()
hendi.remoteEnable(True)
hendi.setPower(1234)
hendi.setSwitch(1)
hendi.remoteEnable(True)
if hendi.isRemoteEnable():
switch_state = 1
for p in range(0, 4000, 10):