diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2020-10-11 19:41:57 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2020-10-11 20:35:50 +0200 |
| commit | 5b8e6a22ab68e316e11641dedf5b39e20878c7b7 (patch) | |
| tree | 1bdc1812ca24203f3b99f381b1e9f8c89f60be24 /macros/src/codegen/hardware_tasks.rs | |
| parent | 524273c96a978299b64e51a9cdcc007585a0f170 (diff) | |
Fixing examples and tests, modules now import user imports correctly
Fmt
Correct syntax crate
UI test fix
Fix build script
Cleanup
More cleanup
Diffstat (limited to 'macros/src/codegen/hardware_tasks.rs')
| -rw-r--r-- | macros/src/codegen/hardware_tasks.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/macros/src/codegen/hardware_tasks.rs b/macros/src/codegen/hardware_tasks.rs index d8c228e..ebfa69b 100644 --- a/macros/src/codegen/hardware_tasks.rs +++ b/macros/src/codegen/hardware_tasks.rs @@ -32,9 +32,7 @@ pub fn codegen( let mut hardware_tasks_imports = vec![]; for (name, task) in &app.hardware_tasks { - let (let_instant, instant) = if extra.monotonic.is_some() { - let m = extra.monotonic(); - + let (let_instant, instant) = if let Some(m) = extra.monotonic { ( Some(quote!(let instant = <#m as rtic::Monotonic>::now();)), Some(quote!(, instant)), |
