gravity-controller-operator 2.2.0__py3-none-any.whl → 2.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ class SigurBase:
19
19
  return self._send_command(f'"SUBSCRIBE" CE')
20
20
 
21
21
  def _send_command(self, command, get_response=True):
22
- time.sleep(0.3)
22
+ time.sleep(0.15)
23
23
  self.mutex.acquire()
24
24
  command = f'{command}\r\n'
25
25
  self.sock.send(command.encode("utf-8"))
@@ -44,7 +44,7 @@ class SigurDI(DIInterface, SigurBase):
44
44
  raw = self._send_command(f'"GETAPINFO" {point}')
45
45
  response = raw.decode()
46
46
  status = response.split(" ")[-2]
47
- result[point] = status
47
+ result[point] = 0 if status in ("ONLINE_UNLOCKED", "ONLINE_NORMAL") else 1
48
48
  return result
49
49
 
50
50
 
@@ -62,7 +62,7 @@ class SigurRelay(RelayInterface, SigurBase):
62
62
  raw = self._send_command(f'"GETAPINFO" {point}')
63
63
  response = raw.decode()
64
64
  status = response.split(" ")[-2]
65
- result[point] = status
65
+ result[point] = 0 if status in ("ONLINE_UNLOCKED", "ONLINE_NORMAL") else 1
66
66
  return result
67
67
 
68
68
  def change_phys_relay_state(self, addr, state: bool):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gravity_controller_operator
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: SDK предоставляющий универсальный интерфейс для работы со многими промышленными контроллерами ввода-вывода (количество расширяемо)
5
5
  Author: PunchyArchy
6
6
  Author-email: ksmdrmvscthny@gmail.com
@@ -8,15 +8,15 @@ gravity_controller_operator/controllers/arm_k210.py,sha256=qlpQoqoLfZddTVJ-Dzdvk
8
8
  gravity_controller_operator/controllers/emulator_contr.py,sha256=SGZBzUeCXDwWXHcYdMDvErwIj1L81ycnObHvCjB86Sk,943
9
9
  gravity_controller_operator/controllers/moxa.py,sha256=OGvEB6ggDi1NZh7OOEfjxVUTKC-opi0hIcAKTJJAMi0,2407
10
10
  gravity_controller_operator/controllers/netping_relay.py,sha256=0cpioEQbZ19BApAPJT2fXWTKDEB9zf2GU9OUfbBGkAY,2572
11
- gravity_controller_operator/controllers/sigur.py,sha256=UjpCpntfT2hZFgiD7RPjmRcd37gb6qsYvMSj4gvRxZE,2555
11
+ gravity_controller_operator/controllers/sigur.py,sha256=0smnGvihcAH2WxG9k6TaWGDVUmffuR-iaBgEoDI-sl0,2660
12
12
  gravity_controller_operator/controllers/wb_mr6lv.py,sha256=qDmb71t7KXX_w8nhguUpEoMgkPOZcoVs83We5kTgFfk,2358
13
13
  gravity_controller_operator/controllers/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  gravity_controller_operator/controllers/tests/test_moxa_controller.py,sha256=RKwpE4WI6QylPD6qGrse6iv6X8ybzf45oTHHTjlCLXA,1068
15
15
  gravity_controller_operator/docs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  gravity_controller_operator/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  gravity_controller_operator/tests/main_tests.py,sha256=BkgWDKUXVmK4WIYY_5CAHazYmqkKumYPtfbnyxcm_UU,575
18
- gravity_controller_operator-2.2.0.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
19
- gravity_controller_operator-2.2.0.dist-info/METADATA,sha256=TbLtMRc5ln_EIuBDDtPqa9DY9V0D0zp5QN3ESBzJso8,4124
20
- gravity_controller_operator-2.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- gravity_controller_operator-2.2.0.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
22
- gravity_controller_operator-2.2.0.dist-info/RECORD,,
18
+ gravity_controller_operator-2.2.1.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
19
+ gravity_controller_operator-2.2.1.dist-info/METADATA,sha256=rtCJfcUFu7WObQtc1XYqMNNcLTefudBeKx9RGv7S6iI,4124
20
+ gravity_controller_operator-2.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ gravity_controller_operator-2.2.1.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
22
+ gravity_controller_operator-2.2.1.dist-info/RECORD,,