Skip to content

Commit d3224ef

Browse files
committed
mipi: Suggest using --dumb-dcs when invalid DCS commands are sent
1 parent ca2450d commit d3224ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mipi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ def find(payload: bytes, dumb: bool) -> Optional[DCSCommand]:
154154
# Argument count does not match. Weird.
155155
expected_args = " or ".join(str(i) for i in dcs.nargs)
156156
print(f"WARNING: DCS command {dcs.name} with incorrect argument count "
157-
f"(expected: {expected_args}, is: {len(payload) - 1})")
157+
f"(expected: {expected_args}, is: {len(payload) - 1}). Consider using --dumb-dcs")
158158
return None
159159

160160
try:
161161
# Try to parse the argument(s)
162162
dcs.get_params(payload[1:])
163163
except ValueError as e:
164164
# Not a valid argument. Weird.
165-
print(f"WARNING: DCS command {dcs.name} with invalid arguments {payload[1:]}: {e}")
165+
print(f"WARNING: DCS command {dcs.name} with invalid arguments {payload[1:]}: {e} Consider using --dumb-dcs")
166166
return None
167167

168168
return dcs

0 commit comments

Comments
 (0)