You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to find a way to implement the Monotonic trait using embedded_time. The duration and instant types from embedded_time don't fulfill the strict requirements put in place in rtic 1.0. Consider the following implementation:
error[E0271]: type mismatch resolving `<Instant<RtcClock<R, P>> as Sub>::Output == Microseconds`
--> embedded-util/src/time.rs:131:5
|
131 | type Instant = embedded_time::Instant<Self>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Microseconds`, found struct `embedded_time::duration::Generic`
|
= note: expected struct `Microseconds`
found struct `embedded_time::duration::Generic<u64>`
note: required by a bound in `rtic_monotonic::Monotonic::Instant`
--> /home/zoey/.cargo/registry/src/github.com-1ecc6299db9ec823/rtic-monotonic-1.0.0/src/lib.rs:39:30
|
39 | + Sub<Self::Instant, Output = Self::Duration>;
|
However if you switch to using embedded_time::duration::Generic you get the following error:
error[E0277]: the trait bound `embedded_time::duration::Generic<u64>: FixedPoint` is not satisfied
--> embedded-util/src/time.rs:131:5
|
131 | type Instant = embedded_time::Instant<Self>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FixedPoint` is not implemented for `embedded_time::duration::Generic<u64>`
|
= note: required because of the requirements on the impl of `Sub<embedded_time::duration::Generic<u64>>` for `Instant<RtcClock<R, P>>`
note: required by a bound in `rtic_monotonic::Monotonic::Instant`
--> /home/zoey/.cargo/registry/src/github.com-1ecc6299db9ec823/rtic-monotonic-1.0.0/src/lib.rs:38:31
|
38 | + Sub<Self::Duration, Output = Self::Instant>
|
Are there any examples of using embedded_time in rtic 1.0? Or do we have to use fugit from now on?
The text was updated successfully, but these errors were encountered:
You can use embedded_time, but you need to use the 0.13 release branch.
It implements the requirements we have, and we have tested implementing the Monotonic trait against this branch.
Hi,
I can't seem to find a way to implement the
Monotonic
trait usingembedded_time
. The duration and instant types fromembedded_time
don't fulfill the strict requirements put in place in rtic 1.0. Consider the following implementation:The following error will be produced.
However if you switch to using
embedded_time::duration::Generic
you get the following error:Are there any examples of using embedded_time in rtic 1.0? Or do we have to use
fugit
from now on?The text was updated successfully, but these errors were encountered: