Open realskudd opened 6 months ago
This is not obvious and there probably should be more examples, but it should work:
DataRef<[f32], ReadOnly>
or DataRef<[f32], ReadWrite>
ArrayRead<[f32]>
Vec<f32>
with a copy of the dataref values. If performance is important, you can instead use get with a pre-allocated buffer.
I'd like to be able to read and write
sim/flightmodel/weight/m_fuel
, but with it being an array of floats, I'm not entirely sure how to make it work with xplm.I've tried this:
But it's not valid, given the
f64
that.get()
returns.What's the right way to accomplish this? Is it even implemented yet?