<JamesMunns[m]>
its more clear that a temporary is being made in this code
<JamesMunns[m]>
ahh I see you're not binding it
<dirbaio[m]>
Yea. With "if let" the temporary lives for the entire if block.
<dirbaio[m]>
So you don't "notice" it heh
<JamesMunns[m]>
I still think it's worth a diagnostic issue :)
<JamesMunns[m]>
All the help we can get with unsafe, y'know?
<dirbaio[m]>
Yea.. With static mut it's easy to fall into the trap because you have a reason to wrap it with {}
<JamesMunns[m]>
Hey ithinuel, lemme know if you have some time to chat. I've been working on a next gen version of bbqueue :)
ilya-epifanov[m] has joined #rust-embedded
<ilya-epifanov[m]>
guys, how do you use floating point functions on a compatible target (thumbv7em-none-eabihf)? Stuff like .powi(), .sqrt(), trigs?
<ilya-epifanov[m]>
I'm now using libm but there's gotta be a better way
cinemaSundays has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
sourcebox[m] has joined #rust-embedded
<sourcebox[m]>
<ilya-epifanov[m]> "I'm now using libm but there's..." <- You can use `micromath` if precision is not that important: https://crates.io/crates/micromath
vollbrecht[m] has quit [Quit: Idle timeout reached: 172800s]
reitermarkus[m] has joined #rust-embedded
<reitermarkus[m]>
Hi, does anyone know if there is a crate for controlling GPIOs via DMA on a Raspberry Pi? Or any other way of getting reliable timings for sending RF signals.
richardeoin has quit [Ping timeout: 252 seconds]
richardeoin has joined #rust-embedded
rmja[m] has quit [Quit: Idle timeout reached: 172800s]
embassy-learner[ has quit [Quit: Idle timeout reached: 172800s]
thejpster[m] has quit [Quit: Idle timeout reached: 172800s]
AlexandrosLiarok has joined #rust-embedded
<AlexandrosLiarok>
what is my best bet on getting an async ssd1309 driver compatible with embedded_graphics ?
<AlexandrosLiarok>
the ssd1309 crate is on an old hal, there is a PR for bumping it to v1 but that is still blocking and doesn't play well with my embassy superloop.
<JamesMunns[m]>
tbh, it's complicated because embedded_graphics isn't async
<JamesMunns[m]>
one option is to use interrupt executors, and do display stuff at the lowest priority, and just do it blocking
<AlexandrosLiarok>
the driver uses a framebuffer and only transmits on flush call.
<AlexandrosLiarok>
I am /mostly/ okay as long as just that is async because I can yield between draw calls.
<JamesMunns[m]>
so, do JUST your graphics rendering at low prio, and do basically everything else at one or more higher prio levels.
<JamesMunns[m]>
you can also make a "fake" display framebuffer, render to that, then do your own manual "flush" command
<JamesMunns[m]>
(i'm not familiar to the ssd1309 specifically tho, but I don't think theres a specific awesome way to do it)
<AlexandrosLiarok>
fair enough, it seems it uses display_interface's WriteOnlyDataCommand to implement the functionality and then has a light layer for the embedded_graphics part.
<AlexandrosLiarok>
I guess I could port it to use AsyncWriteOnlyDataCommand
<AlexandrosLiarok>
then it can be async for all methods including flush and also implement DrawableTarget with a framebuffer.