-
-
Notifications
You must be signed in to change notification settings - Fork 24
poc for 2024 wasm #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
sys::fsVarsAircraftVarGet(self.simvar, self.units, params_for_get, &mut v); | ||
|
||
// drop the mem | ||
drop(Box::from_raw(params_for_get.array)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the drop is not needed here. I experimented a lot as I initially thought some of the issues I encountered were caused by memory issues, but that was not the case.
|
||
array.push(sys::FsVarParamVariant { | ||
type_: sys::eFsVarParamType_FsVarParamTypeInteger, | ||
__bindgen_anon_1: sys::FsVarParamVariant__bindgen_ty_1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugly, but that's what bindgen gives us here. Guess it happens because there's no anonymous unions in rust
}); | ||
|
||
let params_for_set = sys::FsVarParamArray { | ||
size: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can hold more than one obviously :D Was enough for our use case, but should be handled properly
}; | ||
|
||
self.executor.send(Some(data)).unwrap(); | ||
/* sys::PANEL_SERVICE_POST_KILL => self.executor.send(None).is_ok(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed for 2024 systems as the callbacks are separated now.
Just for information, it's not complete and breaks 2020 compatibility