-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
PoC: SDL simu and WASM target #5940
base: main
Are you sure you want to change the base?
Conversation
bb7c036
to
a3af3bf
Compare
I don't know if my testing this on openSUSE Leap 15.6 is of any value to you, but I have been compiling openTX/edgeTX since 2013 and everything has always worked. In compiling and testing simu (will need to install Emscripten to test wasm) I get the following: Compile error using G++ 11:
According to https://stackoverflow.com/questions/31215971/non-trivial-designated-initializers-not-supported
After that change it compiles, but when running the simu comes up (see screen shot) with the current model but the audio is very noisy and scratchy and the program hangs and has to be killed (see screen shot running in debuger). |
Filesystem access is not yet possible. |
Of course it's not.....says that in the TODOs. I need to learn to read. |
@jtaylor2 thx for trying it out! I've just fixed the audio, which was somehow still using unsigned 16 bit, instead of signed 16 bit, as we do now across all targets. It seems I forgot that while rebasing the code on |
Simu audio good now but I have to comment out radio/src/targets/simu/sdl_simu.cpp:706 to get it to actually run. Otherwise it just comes up and hangs in the delay loop: //SDL_Delay(floor(16.666f - elapsedMS)); |
Description
This PR rewrites
simu
based only SDL2 and ImGui. Additionally, it adds a WASM target based on emscripten, thus allowing to runsimu
in a browser.Features so far:
handleKeyEvents()
)TODOs:
simu
with empty storage leads to corrupted control layout.simu
always starts with empty storage.Screenshot
Requirements
The WASM target requires
emscripten
to be installed. I'm using the version installed bybrew
, which is fairly new:Usage
simu
can be used as usual:The WASM target can be compiled and run with: