Skip to content

Commit f91c7f1

Browse files
committed
Fix monitoring of functions
1 parent 5141942 commit f91c7f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymodbus/server/simulator/http_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,10 @@ def build_html_calls(self, params: dict, html: str) -> str: # pragma: no cover
372372
for function in DecodePDU(True).list_function_codes():
373373
selected = (
374374
"selected"
375-
if function.function_code == self.call_monitor.function
375+
if function == self.call_monitor.function
376376
else ""
377377
)
378-
function_codes += f"<option value={function.function_code} {selected}>function code name</option>"
378+
function_codes += f"<option value={function} {selected}>function code name</option>"
379379
simulation_action = (
380380
"ACTIVE" if self.call_response.active != RESPONSE_INACTIVE else ""
381381
)

0 commit comments

Comments
 (0)