<re_irc>
<@firefrommoonlight:matrix.org> I have a second nRF DK on the way to practice comm between the two
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 272 seconds]
emerent has quit [*.net *.split]
ni has quit [*.net *.split]
zBeeble42 has quit [*.net *.split]
zBeeble42 has joined #rust-embedded
emerent has joined #rust-embedded
ni has joined #rust-embedded
GenTooMan has quit [*.net *.split]
Lumpio- has quit [*.net *.split]
Shell has quit [*.net *.split]
wose has quit [*.net *.split]
Shell has joined #rust-embedded
Lumpio- has joined #rust-embedded
GenTooMan has joined #rust-embedded
wose has joined #rust-embedded
Ekho has quit [*.net *.split]
hifi has quit [*.net *.split]
hifi has joined #rust-embedded
Ekho has joined #rust-embedded
inara has quit [*.net *.split]
Amanieu has quit [*.net *.split]
re_irc has joined #rust-embedded
Rondom_ has joined #rust-embedded
Amanieu has joined #rust-embedded
inara has joined #rust-embedded
Darius has joined #rust-embedded
mrkajetanp has joined #rust-embedded
fabic has joined #rust-embedded
<re_irc>
<@nihal.pasham:matrix.org> just a quick check - can anyone confirm if this PR works- https://github.com/rust-lang/cargo/pull/9030, been trying to add a build target in cargo.toml for a while but cargo just keeps ignoring it with a warning.
<re_irc>
<@9names:matrix.org> this is assuming i haven't completely misunderstood what you're trying to do and what that PR does :S
<re_irc>
<@nihal.pasham:matrix.org> ahh ok. thank you. I'm guessing the same goes `rustflags`
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 240 seconds]
<re_irc>
<@lachlansneff:matrix.org> @adamgreig think I could get away without a magnetometer?
<re_irc>
<@adamgreig:matrix.org> my rough guess is "yes"
<re_irc>
<@adamgreig:matrix.org> downside is you won't have any absolute roll reference
<re_irc>
<@adamgreig:matrix.org> if your guidance is just "remain vertical during powered ascent" then it probably doesn't matter anyway
<re_irc>
<@lachlansneff:matrix.org> Yeah, that’s really what I’m aiming for now
<re_irc>
<@lachlansneff:matrix.org> I wouldn’t be able to control the roll anyhow
<re_irc>
<@adamgreig:matrix.org> well, even without roll control it means you don't know which angle to pitch if you want to move towards a horizontal target
<re_irc>
<@adamgreig:matrix.org> but you can just tell it "you always start off with a roll of 0=north" and align it on the launch pad and integrate gyro roll thereafter, probably good enough for a few seconds of burn
<re_irc>
<@lachlansneff:matrix.org> I guess I’ll see
<re_irc>
<@adamgreig:matrix.org> (also aiming for horizontal targets is a bit scary, just keeping it vertical is probably nicer...)
<re_irc>
<@adamgreig:matrix.org> no doubt you'll want to change loads of things after the first few flights anyway. otoh magnos are pretty small and cheap so just sticking one on an extra spi bus doesn't seem like much work even if you ignore the data
<re_irc>
<@lachlansneff:matrix.org> Well that’s the thing, I’m having trouble finding one
<re_irc>
<@adamgreig:matrix.org> if you don't have roll control then you'll probably start rolling during motion and then you can't really do better than straight up anyway
<re_irc>
<@firefrommoonlight:matrix.org> I'm now production-limited on an IC multiplexer :/
<Lumpio->
At this rate there will be absolutely no chips left by next year
<Lumpio->
None
<re_irc>
<@dkhayes117:matrix.org> Sounds like a good time for a silicon startup? LOL 🤣
fabic has joined #rust-embedded
<re_irc>
<@ruabmbua:matrix.org> At least I get paid for integrating new ICs into old products 😅
fabic has quit [Ping timeout: 248 seconds]
jackneill has joined #rust-embedded
fabic has joined #rust-embedded
Foxyloxy has joined #rust-embedded
fabic has quit [Ping timeout: 240 seconds]
Foxyloxy has quit [Client Quit]
Foxyloxy has joined #rust-embedded
<re_irc>
<@kistlin:matrix.org> hello, can someone help me with calling a c library?buffer: *mut ::std::os::raw::c_void
<re_irc>
<@kistlin:matrix.org> it takes a "buffer: *mut ::std::os::raw::c_void"
<re_irc>
<@kistlin:matrix.org> ho to allocate memory for it to put the bytes to that location?
<re_irc>
<@newam:matrix.org> ```rs
<re_irc>
<@newam:matrix.org> Something like that
<re_irc>
<@newam:matrix.org> buf.as_ptr() as *mut c_void
<re_irc>
<@newam:matrix.org> let buf: [u8; 2] = [0; 2];
<re_irc>
<@kistlin:matrix.org> hmm seems simple :) thank you. but i need a dynamic size. a vector should work i'll try it.
<re_irc>
<@kistlin:matrix.org> thanks worked perfectly. i used `let buffer: Vec<u16> = vec![0; bytes_required];` to later convert it to a string `String::from_utf16(&buffer)`
<re_irc>
<@burrbull:matrix.org> `buffer.as_mut_slice() as *mut c_void`
<re_irc>
<@kistlin:matrix.org> yes this one works too and i changed `let buffer` to `let mut buffer`
<re_irc>
<@kistlin:matrix.org> is there an advantage in your version?
<re_irc>
<@kistlin:matrix.org> i guess it's cleaner because `as_mut_*` tells about the intention?
<re_irc>
<@burrbull:matrix.org> they are identical
<re_irc>
<@jatsekku:matrix.org> Few days ago, I was tring to get oled ssd1306 working and it is but not properly, today I changed OLED and PCB and still same problem which is very strange btw
<re_irc>
<@burrbull:matrix.org> what pins you use for i2c?
<re_irc>
<@jatsekku:matrix.org> tried pb6 and pb7 and also pb8 pb9
<re_irc>
<@jatsekku:matrix.org> shortly after reset I see the part of first line "Hello worl", but still there is pixel grid and Helllo Rust is shifted to the right
<re_irc>
<@burrbull:matrix.org> f4?
<re_irc>
<@jatsekku:matrix.org> stm32f103c8t6 or rather CH32f103c8t6
<re_irc>
<@jatsekku:matrix.org> But I also tried with arduino as stm32f103 and it was working fine
<re_irc>
<@burrbull:matrix.org> it's strange. examples from ssd1306 crate wokr fine on my f103
tokomak has quit [Read error: Connection reset by peer]
<re_irc>
<@jatsekku:matrix.org> okey, I find my last PCB with original STM32F103 and it's working fine... It's quite interesing anyway that arduino binary compiled for STM32F103 is working, but under rust it's not :/
<Lumpio->
Shouldn't be very surprising, it's different code
<Lumpio->
There can be bugs
<re_irc>
<@burrbull:matrix.org> i2c in f103 has a lot of hacks
<re_irc>
<@burrbull:matrix.org> it can work different on non original chip
<re_irc>
<@jatsekku:matrix.org> yeah, aparently it is