Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic every #75

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/dsl/word/Every.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ namespace dsl {
* seconds, minutes, hours). Note that you can also define your own unit: See
* http://en.cppreference.com/w/cpp/chrono/duration
*/
template <int ticks = 0, class period = NUClear::clock::duration>
template <int ticks = 0, class period = std::chrono::milliseconds>
struct Every;

template <>
struct Every<0, NUClear::clock::duration> {
template <typename period>
struct Every<0, period> {

template <typename DSL>
static inline void bind(const std::shared_ptr<threading::Reaction>& reaction,
Expand All @@ -93,7 +93,7 @@ namespace dsl {
// Send our configuration out
reaction->reactor.emit<emit::Direct>(std::make_unique<operation::ChronoTask>(
[reaction, jump](NUClear::clock::time_point& time) {
// submit the reaction to the thread pool
// submit the reaction to the thread pool
reaction->reactor.powerplant.submit(reaction->get_task());

time += jump;
Expand Down
Loading