Skip to content

Commit

Permalink
Merge pull request #166 from JdeRobot/changing-freq-names-to-be-more-…
Browse files Browse the repository at this point in the history
…complex

Changing freq control variable names
  • Loading branch information
jmplaza authored Sep 24, 2024
2 parents ac76a04 + f7202a7 commit 5e0f322
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manager/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,16 @@ def add_frequency_control(self, code):
code,
)
frequency_control_code_pre = """
start_time = datetime.now()
start_time_internal_freq_control = datetime.now()
"""
code = (
code[: infinite_loop.end()]
+ frequency_control_code_pre
+ code[infinite_loop.end() :]
)
frequency_control_code_post = """
finish_time = datetime.now()
dt = finish_time - start_time
finish_time_internal_freq_control = datetime.now()
dt = finish_time_internal_freq_control - start_time_internal_freq_control
ms = (dt.days * 24 * 60 * 60 + dt.seconds) * 1000 + dt.microseconds / 1000.0
if (ms < ideal_cycle):
Expand Down

0 comments on commit 5e0f322

Please sign in to comment.