Skip to content

Commit bbd5ac7

Browse files
committed
Standardized status getter and setter names
Status getters are now called get_###_status, while the corresponding setters are named switch_###.
1 parent 7b08af9 commit bbd5ac7

File tree

30 files changed

+104
-104
lines changed

30 files changed

+104
-104
lines changed

docs/api/tps1100/edm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Distance Measurement
33

44
.. automodule:: geocompy.tps1100.edm
55
:inherited-members:
6-
:exclude-members: activate,get_boomerang_filter,set_boomerang_filter,get_tracklight_brightness,set_tracklight_brightness,is_tracklight_active,switch_tracklight
6+
:exclude-members: switch_edm,get_boomerang_filter_status,switch_boomerang_filter,get_tracklight_brightness,set_tracklight_brightness,get_tracklight_status,switch_tracklight
77

88
Definitions
99
-----------

docs/api/tps1200p/aus.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Alt-User
33

44
.. automodule:: geocompy.tps1200p.aus
55
:inherited-members:
6-
:exclude-members: get_rcs_search_switch,switch_rcs_search
6+
:exclude-members: get_rcs_search_status,switch_rcs_search
77

88
Definitions
99
-----------

docs/api/tps1200p/aut.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Automation
33

44
.. automodule:: geocompy.tps1200p.aut
55
:inherited-members:
6-
:exclude-members: get_atr_status,set_atr_status,get_lock_status,set_lock_status
6+
:exclude-members: get_atr_status,switch_atr,get_lock_status,switch_lock
77

88
Definitions
99
-----------

docs/api/tps1200p/com.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Communication
33

44
.. automodule:: geocompy.tps1200p.com
55
:inherited-members:
6-
:exclude-members: set_send_delay,enable_signoff
6+
:exclude-members: set_send_delay,switch_signoff
77

88
Definitions
99
-----------

docs/api/tps1200p/edm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Distance Measurement
33

44
.. automodule:: geocompy.tps1200p.edm
55
:inherited-members:
6-
:exclude-members: activate,get_boomerang_filter,set_boomerang_filter,get_tracklight_brightness,set_tracklight_brightness,is_tracklight_active,switch_tracklight
6+
:exclude-members: switch_edm,get_boomerang_filter_status,switch_boomerang_filter,get_tracklight_brightness,set_tracklight_brightness,get_tracklight_status,switch_tracklight
77

88
Definitions
99
-----------

docs/api/vivatps/aus.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Alt-User
33

44
.. automodule:: geocompy.vivatps.aus
55
:inherited-members:
6-
:exclude-members: get_rcs_search_switch,switch_rcs_search
6+
:exclude-members: get_rcs_search_status,switch_rcs_search
77

88
Definitions
99
-----------

docs/api/vivatps/edm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Distance Measurement
33

44
.. automodule:: geocompy.vivatps.edm
55
:inherited-members:
6-
:exclude-members: activate,get_boomerang_filter,set_boomerang_filter,get_tracklight_brightness,set_tracklight_brightness,is_tracklight_active,switch_tracklight
6+
:exclude-members: switch_edm,get_boomerang_filter_status,switch_boomerang_filter,get_tracklight_brightness,set_tracklight_brightness,get_tracklight_status,switch_tracklight
77

88
Definitions
99
-----------

src/geocompy/tps1000/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class TPS1000(GeoComProtocol):
7979
>>>
8080
>>> with open_serial("COM1") as line:
8181
... tps = TPS1000(line)
82-
... tps.com.nullproc()
82+
... tps.com.nullprocess()
8383
...
8484
>>>
8585
@@ -92,7 +92,7 @@ class TPS1000(GeoComProtocol):
9292
>>> log = get_logger("Viva", "stdout", DEBUG)
9393
>>> with open_serial("COM1") as line:
9494
... tps = TPS1000(line, log)
95-
... tps.com.nullproc()
95+
... tps.com.nullprocess()
9696
...
9797
>>>
9898
GeoComResponse(COM_NullProc) ... # Startup connection test
@@ -173,7 +173,7 @@ def __init__(
173173
for i in range(retry):
174174
try:
175175
self._conn.send("\n")
176-
response = self.com.nullproc()
176+
response = self.com.nullprocess()
177177
if response.comcode and response.rpccode:
178178
sleep(1)
179179
break

src/geocompy/tps1000/aut.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ def get_atr_status(self) -> GeoComResponse[bool]:
6262
6363
See Also
6464
--------
65-
set_atr_status
65+
switch_atr
6666
"""
6767
return self._request(
6868
9019,
6969
parsers=parsebool
7070
)
7171

72-
def set_atr_status(
72+
def switch_atr(
7373
self,
7474
activate: bool
7575
) -> GeoComResponse[None]:
@@ -100,7 +100,7 @@ def set_atr_status(
100100
--------
101101
get_atr_status
102102
get_lock_status
103-
set_lock_status
103+
switch_lock
104104
"""
105105
return self._request(9018, [activate])
106106

@@ -121,15 +121,15 @@ def get_lock_status(self) -> GeoComResponse[bool]:
121121
122122
See Also
123123
--------
124-
set_lock_status
124+
switch_lock
125125
mot.get_lockon_status
126126
"""
127127
return self._request(
128128
9021,
129129
parsers=parsebool
130130
)
131131

132-
def set_lock_status(
132+
def switch_lock(
133133
self,
134134
activate: bool
135135
) -> GeoComResponse[None]:
@@ -326,9 +326,9 @@ def turn_to(
326326
See Also
327327
--------
328328
get_atr_status
329-
set_atr_status
329+
switch_atr
330330
get_lock_status
331-
set_lock_status
331+
switch_lock
332332
get_tolerance
333333
set_tolerance
334334
get_timeout
@@ -384,9 +384,9 @@ def change_face(
384384
See Also
385385
--------
386386
get_atr_status
387-
set_atr_status
387+
switch_atr
388388
get_lock_status
389-
set_lock_status
389+
switch_lock
390390
get_tolerance
391391
set_tolerance
392392
get_timeout
@@ -443,7 +443,7 @@ def fine_adjust(
443443
See Also
444444
--------
445445
get_atr_status
446-
set_atr_status
446+
switch_atr
447447
get_fine_adjust_mode
448448
set_fine_adjust_mode
449449
"""
@@ -491,7 +491,7 @@ def search(
491491
See Also
492492
--------
493493
get_atr_status
494-
set_atr_status
494+
switch_atr
495495
fine_adjust
496496
"""
497497
return self._request(
@@ -572,7 +572,7 @@ def lock_in(self) -> GeoComResponse[None]:
572572
See Also
573573
--------
574574
get_lock_status
575-
set_lock_status
575+
switch_lock
576576
mot.get_lockon_status
577577
"""
578578
return self._request(9013)

src/geocompy/tps1000/com.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def switch_off(
160160
[_mode.value]
161161
)
162162

163-
def nullproc(self) -> GeoComResponse[None]:
163+
def nullprocess(self) -> GeoComResponse[None]:
164164
"""
165165
RPC 0, ``COM_NullProc``
166166
@@ -169,7 +169,7 @@ def nullproc(self) -> GeoComResponse[None]:
169169
"""
170170
return self._request(0)
171171

172-
def enable_signoff(
172+
def switch_signoff(
173173
self,
174174
enable: bool
175175
) -> GeoComResponse[None]:

0 commit comments

Comments
 (0)