🚧 Web UI

This commit is contained in:
Jonas Bengtsson
2026-10-03 23:48:16 +02:00
parent 43c4c287a0
commit 87c1c8db7b
22 changed files with 2558 additions and 15 deletions
+13
View File
@@ -176,6 +176,19 @@ class WagoDatastore:
self._out_words = [0] * len(self._out_words)
self._notify()
def reset_images(self) -> None:
"""Reconfiguration (§11): zero both images before a layout rebuild.
The arrays keep their full 750-362 geometry (256+764 words per
direction); the VirtualNode re-applies the digital word offsets
and the module layout on top.
"""
self._in_words = [0] * (AREA1_INPUT_WORDS + AREA2_INPUT_WORDS)
self._out_words = [0] * (AREA1_OUTPUT_WORDS + AREA2_OUTPUT_WORDS)
self._digital_in_word_offset = 0
self._digital_out_word_offset = 0
self._notify()
# -- word area dispatch ---------------------------------------------------
def read_words(self, address: int, count: int) -> list[int] | ExceptionResponse: