Skip to content

Commit bd2bf5e

Browse files
authored
Merge pull request #218 from LucienMorey/handle_resettables_in_test
move variable resettting to periodics
2 parents 07fde9f + d15cd42 commit bd2bf5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

magicbot/magicrobot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,9 @@ def _do_periodics(self) -> None:
736736
periodic()
737737
watchdog.addEpoch(name)
738738

739+
for reset_dict, component in self._reset_components:
740+
component.__dict__.update(reset_dict)
741+
739742
def _enabled_periodic(self) -> None:
740743
"""Run components and all periodic methods."""
741744
watchdog = self.watchdog
@@ -748,6 +751,3 @@ def _enabled_periodic(self) -> None:
748751
watchdog.addEpoch(name)
749752

750753
self._do_periodics()
751-
752-
for reset_dict, component in self._reset_components:
753-
component.__dict__.update(reset_dict)

0 commit comments

Comments
 (0)