ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
<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)
mchodzikiewicz[m has joined #rust-embedded
<mchodzikiewicz[m> hi, do you know if it is possible to query features in `target.`cfg()`` in `.cargo/config.toml`?... (full message at <https://catircservices.org/_irc/v1/media/download/AQMtx8ztrCVFN2W40PWRb40GJJcJNsZB5Cei2ub0GzWvN5fg5NqtJV97oHAqStdUjyCX676oz6c-IZsz6euccA-_8AAAAAAAAGNhdGlyY3NlcnZpY2VzLm9yZy9zTVJlT3lKdW91emtPYVlEWER3S0ZwbnQ>)
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]> but it also says:
<JamesMunns[m]> > If several <cfg> and <triple> entries match the current target, the flags are joined together.
<JamesMunns[m]> you might need to explicitly `not(feature = "println")` in the first example
<JamesMunns[m]> so:
<JamesMunns[m]> ```
<JamesMunns[m]> s/printn/println
<JamesMunns[m]> but yeah, I think the issue is that you have multiple cfg matches
<JamesMunns[m]> Though it does say:
<JamesMunns[m]> > It is an error if more than one <cfg> runner matches the current target.
<JamesMunns[m]> dunno if that should print an error proactively? might be worth reporting to `cargo` as a bug
<JamesMunns[m]> and no idea if you can use crate features in the cfg statement either.
<JamesMunns[m]> (but it seems like you should be able to?)
<JamesMunns[m]> you could probably test it pretty easily by making your runner like echo or something
<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> thanks, that's what I'll do
<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> there's this issue possibly related but if I understand correctly issue have not been directly acknowledged https://github.com/rust-lang/cargo/issues/13737#issuecomment-2050052195
<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]