<rafael[m]>
<rafael[m]> "BTW there seem to be registers..." <- barafael: now I may have reached way outside of what I do understand properly - but hey, motion detction apparently works. I am kind of sorry I have spammed You with PR 🙂 I hope You don`t mind.
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
Guest64 has joined #rust-embedded
Guest64 has quit [Quit: Client closed]
<barafael[m]>
@rafael all good! I'm glad someone with actual hardware is tinkering with the driver and verifying it works. I have a long history with the mpu6050 and even though it's an old part I hold it dearly. I respect your drive to improve on it and will take a look soon
<barafael[m]>
I had a brief look. Tremendous work. After your changes, let's add conditional opt-out derive for defmt format.
<rafael[m]>
<barafael[m]> "I had a brief look. Tremendous..." <- I was missing that in the new motion.rs, right?
emerent has quit [Ping timeout: 248 seconds]
emerent has joined #rust-embedded
thejpster[m] has quit [Quit: Idle timeout reached: 172800s]
<barafael[m]>
I mean because of Debug2Format
<rafael[m]>
barafael[m]: saw it, I managed to not see the defmt-03 feature in the driver, so that is missing in the motion.rs as well as in all examples. Want that as a separate PR or stuffed into existing No. 11?
<barafael[m]>
Ah right. No.11 is fine
<rafael[m]>
done
chomp4570[m] has joined #rust-embedded
<chomp4570[m]>
I can't believe you and I are the first people to need this, putting a custom codec on an underlying transport must be very common, even in no_std world.
<chomp4570[m]>
I'm looking for this exactly, have you found something in the meantime? I know there is futures-codec, but it allocates. Then there is async-codec but it doesn't support a no_std stream/sink impl because it uses std::io::Error.
<chomp4570[m]>
Or am I the weird one and people are using the allocating futures-codecs and then just being very careful not to overflow their tiny custom heaps? I'm not experienced in embedded and don't know the state of the art.
<dirbaio[m]>
chomp4570[m]: you're not the first one to need this. people just write the decoding loop themselves: read some bytes from the stream, feed them to a COBS (or whatever) decoder. You don't need a Codec abstraction to read COBS.
<dirbaio[m]>
(in fact i've never understood the point of Codec... If you're implementing protocol X and it uses COBS or whatever, you just write code to decode that. you never need a "codec" abstraction so you can easily swap between COBS and line-delimited and length-delimited, no protocol out there ever needs that!)
<chomp4570[m]>
For me it's about only needing to write only the "frame definition" and then getting a nice stream of messages from an asyncread, without having to implement scary unsafe pin things that I would most likely get wrong.
<chomp4570[m]>
s/only//
<dirbaio[m]>
you shouldn't need to use Pin to do that
<chomp4570[m]>
I'm sure you're right, I was saying this after seeing the implementation in futures_codec and async-codec, which do use pin
<barafael[m]>
In my case it was like LinesCodec from Tokio Util. I hand rolled it.
<barafael[m]>
I also had the feeling that I can't be the first one needing this, though. Could embassy-io benefit from a few basic codecs?
<chomp4570[m]>
I would like that
<barafael[m]>
(not sure embassy-io is a good place for that)
<JamesMunns[m]>
yeah, idk then. the docs seem to imply that should be allowed, I'd open a github issue on cargo with a mininal repro (one that just uses echo as a runner on a mostly empty repo)
<mchodzikiewicz[m>
just fyi, my snippet above had non-matched braces but I fixed that and it didn't help - beside question if it supports crate features, it's a shame that it is a silent drop instead of error
<mchodzikiewicz[m>
multiple `config.toml`s suggested in the comment is a good way to proceed for me - in fact it will allow me to get rid of some other args I need to provide atm, namely to support `imc` and `imac` targets
norineko_ has joined #rust-embedded
norineko has quit [Read error: Connection reset by peer]
sroemer has joined #rust-embedded
sroemer has joined #rust-embedded
sroemer has quit [Ping timeout: 265 seconds]
norineko_ is now known as norineko
danielb[m] has quit [Quit: Idle timeout reached: 172800s]
chrysn[m] has quit [Quit: Idle timeout reached: 172800s]
hjeldin__[m] has quit [Quit: Idle timeout reached: 172800s]
laenzi[m] has joined #rust-embedded
<laenzi[m]>
I am struggling with using embedded_hal_bus in an RTIC application. How can I store an AtomicDevice in the Local struct to access it from the task?
kenny has joined #rust-embedded
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
AlexandervanSaas has quit [Quit: Idle timeout reached: 172800s]