Skip to content

Commit

Permalink
velodyne_configuration: handle exception for missing operational rang…
Browse files Browse the repository at this point in the history
…es. Correct typo
  • Loading branch information
tas committed Jul 17, 2024
1 parent c535b29 commit 1b9a033
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion velodyne_configuration/nodes/configuration_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,14 @@ def send_command(self, request):
response.all_in_range = True
outside_range = []
for b in diag:
print(b)
for n in diag[b]:
in_range = self.configurator.check_diagnostics_parameter(b, n, diag[b][n])
print(n)
try:
in_range = self.configurator.check_diagnostics_parameter(b, n, diag[b][n])
except NameError as e:
print("No ranges for parameter", b, n)
in_range = True
if not in_range:
print("parameter %s %s is outside operational ranges [%f]", b, n, diag[b][n])
response.all_in_range = False
Expand Down
2 changes: 1 addition & 1 deletion velodyne_configuration/nodes/example_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self):

spc_cmd_response = self._special_config_srv_proxy(spc_cmd_config_request)

if spc_cmd_response.succes:
if spc_cmd_response.success:
print("all parameters within the operational range")
else:
print("parameter outside its operational range!")
Expand Down

0 comments on commit 1b9a033

Please sign in to comment.