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
IlPalazzo-ojiisa has quit [Ping timeout: 268 seconds]
henrik_alser[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7282 has left #rust-embedded [Error from remote client]
Guest7282 has joined #rust-embedded
emerent has quit [Ping timeout: 276 seconds]
emerent has joined #rust-embedded
starblue has quit [Ping timeout: 264 seconds]
starblue has joined #rust-embedded
HumanG33k has quit [Ping timeout: 264 seconds]
hal21m has joined #rust-embedded
yourarj[m] has quit [Quit: Idle timeout reached: 172800s]
notgull has joined #rust-embedded
notgull has quit [Ping timeout: 268 seconds]
hal21m has quit [Quit: Leaving]
HumanG33k has joined #rust-embedded
ryan-summers[m] has joined #rust-embedded
<ryan-summers[m]> More a general Rust question here, but when spawning a subprocess, I'm getting empty command prompts while the process executes. Can't figure out how to stop it from doing that with the async_process::Command APIs. FWIW the process is a python execution, so maybe it's a flag there? But from what I recall it happens with more than just python
<ryan-summers[m]> * More a general Rust question here, but when spawning a subprocess, I'm getting empty command prompts while the process executes. Can't figure out how to stop it from doing that with the async_process::Command APIs. FWIW the process is a python execution, so maybe it's a flag there? But from what I recall it happens with more than just python. Anyone know how to get it to not open the empty command prompt?
Guest7282 has left #rust-embedded [Error from remote client]
<ryan-summers[m]> Answered my own question here. Windows has process creation flags and one is CREATE_NO_WINDOW, but async_process doesn't expose an API to modify process flags while std::process::Command does have a windows-specific API
<ryan-summers[m]> * Answered my own question here. Windows has process creation flags and one is CREATE_NO_WINDOW, but async_process doesn't expose an API to modify process flags while std::process::Command does have a windows-specific API: https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags
yourarj[m] has joined #rust-embedded
<yourarj[m]> <yourarj[m]> "Namaste and hello everyone..." <- > <@yourarj:matrix.org> Namaste and hello everyone. New to Rust embedded.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/JJNTyLJKKdWhkFUppIrzEMSF>)
<ryan-summers[m]> yourarj[m]: Generally, static mut is indeed the way to go and you need to figure out how to share between different contexts. There's a ton of frameworks built to help with this, like RTIC and embassy
<ryan-summers[m]> Because static muts necessitate a lot of unsafe that you need to justify. Things like RTIC guarantee that safety for you
<JamesMunns[m]> I agree that most people use a framework like rtic, or data structures like those provided by embassy-sync to share static data, but I really really strongly recommend avoiding static mut unless you are familiar enough with rusts unsafe rules.
<JamesMunns[m]> It is decently easy to write unsafe code with undefined behavior, which means the compiler COULD do totally nonsensical and unpredictable things with your code, and pretty much totally invalidates the argument "but I tested it and it works".
<JamesMunns[m]> With static muts you must ensure that you don't have ANY issues with:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/AduNpXDbyvfCaEFrEHJfEyoK>)
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
JamesSizeland[m] has quit [Quit: Idle timeout reached: 172800s]
<diondokter[m]> Is there a shared bus implementation for the new EH 1.0 traits that works with RTIC?
<diondokter[m]> There is the old one, but that hasn't been updated.
<diondokter[m]> I hoped the refcell would work if I keep them in a single priority, but it's still required to be sync
<diondokter[m]> * the refcell implementation from `embedded-hal-bus` would work
<JamesMunns[m]> Might be worth asking in the rtic channel specifically. I'm entirely out of the loop of the synchronization requirements/tooling between async sw tasks and non-async hw tasks :p
dne has quit [Remote host closed the connection]
dne has joined #rust-embedded
Guest7282 has joined #rust-embedded
<Lumpio[m]> mm I should come up with an excuse to write something in embedded Rust since I'm way out of touch too
IlPalazzo-ojiisa has joined #rust-embedded
JorgeMuoz[m] has joined #rust-embedded
<JorgeMuoz[m]> Hi all. Has anyone tried sequential-storage with ESP devices? I cannot find an example :(.
<Lumpio-> JorgeMuoz[m]: Do you necessarily need an example for that specific configuration? Have you tried looking for a NorFlash trait implementation for the HAL/library you're using with ESP(32?)?
<thejpster[m]> adamgreig therealprof : https://github.com/rust-lang/calendar now exists (maps to e.g. https://rust-lang.github.io/calendar/all.ics) - see [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/217588-project-leads-.28public.29/topic/team.20calendars/near/411714819)
therealprof[m] has joined #rust-embedded
<therealprof[m]> thejpster[m]: Wow, that's cool. Are there suggested tools to create those individual ICS entries and convert them to toml without error prone manual copy and paste?
<thejpster[m]> no idea, sorry. It looks like you have to write the toml by hand at the moment.
<thejpster[m]> the ICS is then auto-generated from the toml.
<adamgreig[m]> Oh, great! It will be good to move off the current Google calendar that idk who can edit it or even knows it exists :p
<JorgeMuoz[m]> <Lumpio-> "Jorge Muñoz: Do you necessarily..." <- not any more and yes
<JorgeMuoz[m]> JorgeMuoz[m]: I'm going to use the Non Volatile Storage directly from the esp-idf-svc crate, that gives a key-value storage with wear leveling (thanks to vollbrecht at the esp-rs channel for pointing out)
<JorgeMuoz[m]> JorgeMuoz[m]: but I tried to use the esp_storage that implements the NorFlash trait but not MultiwriteNorFlash, I I got stuck there
<JorgeMuoz[m]> JorgeMuoz[m]: but I'm not even sure if I need esp_storage If I use the std crates for the ESPs :D
<JorgeMuoz[m]> JorgeMuoz[m]: Thanks, Lumpio-
<holo[m]> Hello. I have one more question according to my [own](https://pastebin.com/8puTcKqT) solution vs ready to use [lib](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93) Why with that ready to use library temperature measurement is more accurate to real value of temperature than with my code? I thought it is becasue of this offset value but im not seeing they setting it up anywhere and im not see in methos "messurment" they
<holo[m]> adjusting it. What can be reason of such difference" - around 4 - 5*C eg my is 14 and real is 18?
<holo[m]> s/methos/method/, s/messurment/meassurment/, s/"//
<holo[m]> * Hello. I have one more question according to my [own](https://pastebin.com/8puTcKqT) solution vs ready to use [lib](https://github.com/holotrack/pico-w/blob/main/src/bin/cotwo.rs) Why with that ready to use library temperature measurement is more accurate to real value of temperature than with my code? I thought it is becasue of this
<holo[m]> [[offse](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93)t](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93) value but im not seeing they setting it up anywhere and im not see in method "meassurment" they adjusting it. What can be reason of such difference - around 4 - 5\*C eg my is 14 and real is 18?
<holo[m]> * Hello. I have one more question according to my [own](https://pastebin.com/8puTcKqT) solution vs ready to use [lib](https://github.com/holotrack/pico-w/blob/main/src/bin/cotwo.rs) Why with that ready to use library temperature measurement is more accurate to real value of temperature than with my code? I thought it is becasue of this
<holo[m]> [offse](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93)t\](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93) value but im not seeing they setting it up anywhere and im not see in method "meassurment" they adjusting it. What can be reason of such difference - around 4 - 5\*C eg my is 14 and real is 18?
<holo[m]> * Hello. I have one more question according to my [own](https://pastebin.com/8puTcKqT) solution vs ready to use [lib](https://github.com/holotrack/pico-w/blob/main/src/bin/cotwo.rs) Why with that ready to use library temperature measurement is more accurate to real value of temperature than with my code? I thought it is becasue of this
<holo[m]> [offset](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93)t\](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93) value but im not seeing they setting it up anywhere and im not see in method "meassurment" they adjusting it. What can be reason of such difference - around 4 - 5\*C eg my is 14 and real is 18?
<holo[m]> * Hello. I have one more question according to my [own](https://pastebin.com/8puTcKqT) solution vs ready to use [lib](https://github.com/holotrack/pico-w/blob/main/src/bin/cotwo.rs) Why with that ready to use library temperature measurement is more accurate to real value of temperature than with my code? I thought it is becasue of this
<holo[m]> [offset](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93)t\](https://github.com/hauju/scd4x-rs/blob/main/src/scd4x.rs#L93) value but im not seeing they setting it up anywhere and im not see in method "meassurment" they adjusting it. What can be reason of such difference - around 4 - 5\*C eg my is 14 and they is 19?
<JamesMunns[m]> Can you compare your math functions for turning the I2C payload into a celcius number?
<JamesMunns[m]> It's possible you have some sort of math error
<holo[m]> i took it from they library so they shoud be same:
<holo[m]> my
<holo[m]> they
<K900> 157 vs 175
<holo[m]> ahh ok i see
<holo[m]> 😄
<holo[m]> even in datasheet is 175
<holo[m]> mea culpa
<barnabyw[m]> mixing the tens and ones place is an easy mistake to make when switching between languages like english and german
<holo[m]> is there some solution like gRPC for rust and embeded devices?
JomerDev[m] has joined #rust-embedded
<JomerDev[m]> I've recently come into contact with postcard-rpc: https://github.com/jamesmunns/postcard-rpc
<AdamHott[m]> barnabyw: I went through that Phil's lab video you shared with me, the one to learn how to build PCBs in KiCad. That was such an awesome resource, thanks!
<barnabyw[m]> AdamHott[m]: glad it was helpful! he has many more similar videos, and there are plenty of other channels which talk about PCB design if you’re interested
<JamesMunns[m]> (this allows for basic float operations in no_std without libm/micromath)
<JamesMunns[m]> <JomerDev[m]> "I've recently come into contact..." <- AMA if you have questions, postcard-rpc is still super new, and likely has rough docs/impl edges, but I'm already using it across a bunch of my projects, open to feedback or questions or docs PRs.
<AdamHott[m]> <barnabyw[m]> "glad it was helpful! he has many..." <- He offers a couple of courses through his webpage, would you recommend those?
<barnabyw[m]> never tried them, but if you liked his video and want more of the same in a structured format, they’re probably a good choice
<holo[m]> <JomerDev[m]> "I've recently come into contact..." <- will check, thanks
<holo[m]> If someone interested i found such benchmark: https://github.com/djkoloski/rust_serialization_benchmark but i only find out only those postcards are for no_std
<JamesMunns[m]> (btw, I am the author of postcard and postcard-rpc)
<JamesMunns[m]> The other formats I see used are serde-json-core, and I feel like some of the cbor ones have no-std versions as well
<JamesMunns[m]> but you're right, those ones haven't been included in that benchmark, probably because nobody has submitted it. Postcard is no-std first, but I also provide "full featured" std helpers as well, which makes it easier to bench. I also used that bench suite a lot while preparing the 1.0 release of postcard, so it definitely works well for that :D
<holo[m]> s/rust_serialization_benchmark/rust\_serialization\_benchmark/, s/only//, s/no_std/no\_std/
emerent has quit [Read error: Connection reset by peer]
emerent has joined #rust-embedded
<JamesMunns[m]> holo you can scroll up a bit, cr1901 asked about postcard-rpc over TCP a day or two ago
<JamesMunns[m]> The answer is "yes, you could, but it doesn't support that out of the box yet"
<holo[m]> ahh ok will try to look for it
<holo[m]> thanks
JamesSizeland[m] has joined #rust-embedded
<JamesSizeland[m]> <JamesMunns[m]> "AMA if you have questions..." <- Nice! I've been looking into rpc options from MCU to Linux systems, I'll give the docs a read now but what do you think of capnproto?
<JamesMunns[m]> It's definitely a format!
<JamesMunns[m]> I dunno, I don't know much about it :)
starblue has quit [Quit: WeeChat 3.8]
<JamesSizeland[m]> Postcard is great, well done 👍
<firefrommoonligh> I feel like Postcard is one of those things I've been dodging for a while with no good reason, then will try and love it
<firefrommoonligh> TBD
<firefrommoonligh> I do a lot of packaging rust structs into byte arrays adn vice versa
<JamesMunns[m]> I think we've had a discussion or two :)
<firefrommoonligh> USB, CAN, radios, flash storage etc
<JamesMunns[m]> firefrommoonligh: I've *definitely* shared my opinion on that approach :)
<firefrommoonligh> Yea I should just give it an actual try, like on a device
<firefrommoonligh> Doing it manually has too much inertia
<firefrommoonligh> Like, changing things becomes a pain
<JomerDev[m]> James Munns: Postcard doesn't do bit packing, does it?
<JamesMunns[m]> JomerDev[m]: Not generally. It does use varints for everything, but it is generally "byte addressed".
<JomerDev[m]> Dang, too bad
<JamesMunns[m]> I do have a written spec of the wire format, and how it related to Rust's data types, fwiw: https://postcard.jamesmunns.com/
<JamesMunns[m]> and you can always write your own bit-packed containers by impling the serde traits, it just won't be handled by postcard itself.
<JomerDev[m]> Thats fair. I've been using packed_struct so far but that doesn't do rpc stuff
<JamesMunns[m]> Yeah I mean, you can impl the Serialize, Deserialize, and Schema traits manually for any type and it should Just Work
<JamesMunns[m]> You'll have to express it as some other type tho, like u32 or [u8; 4] or something.
<JomerDev[m]> Maybe I'll just try it out and see if it breaks somehow
andodeki2[m] has joined #rust-embedded
<andodeki2[m]> hey guys
<andodeki2[m]> Does anyone know how i can trigger limp mode if a certain vehicle speed limit threshhold is reached or just pressing a button to activate vehicle limp mode
WSalmon_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
WSalmon has joined #rust-embedded
link445645[m] has quit [Quit: Idle timeout reached: 172800s]
<Darius> I imagine it depends on the vehicle..
IlPalazzo-ojiisa has quit [Remote host closed the connection]
IlPalazzo-ojiisa has joined #rust-embedded
IlPalazzo-ojiisa has quit [Ping timeout: 268 seconds]
<andodeki2[m]> <Darius> "I imagine it depends on the..." <- Like say a Three Wheeler Bajaj
IlPalazzo-ojiisa has joined #rust-embedded
<holo[m]> Before i will continue with network i decided to switch to async variant of emabsy-rsi changed headers and i2c creation commands to be like in [i2c_async.rs ](https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/i2c_async.rs) example and added await to sensor executions commands: https://github.com/holotrack/pico-w/blob/main/src/bin/cotwo.rs
<holo[m]> But im getting such errors:
<barnabyw[m]> looks like the scd4x library you’re using only supports blocking reads
<barnabyw[m]> you can only .await a future, it’s returning results
<barnabyw[m]> you’d have to fork the library and add async support