This moves the .wasm file out of the static/js/ folder and into the
source tree. This way we can import it and webpack will pick it up
and version the file with a hash.
This fixes possibly running with an out of date file from the browser
cache and also fixes running offline.
The file extension had to be changed because there is a default rule in
webpack that matches the .wasm extension and causes the following error:
Failed to compile.
./src/sagas/mpy-cross.wasm
Module parse failed: magic header not detected
File was processed with these loaders:
* ./node_modules/file-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
Error: magic header not detected
The webpack configuration cannot be modified without ejecting
create-react-app or using something like react-app-rewired, which we
would like to avoid.
Also using ncp to copy file now which fixes building on Windows.
There have been some reports of firmware flashing not working with a
checksum timeout error, meaning that we probably overflowed a buffer
on the Bluetooth chip from sending data too fast.
We don't have info of the Bluetooth firmware so we are just guessing
here.
On Windows, we can get the GATT notification from the bootloader before
Windows says we are done writing to the characteristic. This was
observed on the erase and checksum messages with the Control+ hub.
For some reason this significantly improved bluetooth performance so we
had to readjust the frequency of getting the checksum. The new value
actually makes much more sense. It is unlikely that the bootloader
actually had an 8k buffer.
It seems that some container of the Editor component is breaking the
resize calculation when the page firsts loads. So we have to be bit
hacky and defer the call the resize until after all components have
been rendered.
This makes the terminal more efficient by combining individual characters into a single message. Also (mostly) fixes overring the hub and locking it up.
When we first connect, we don't know what state the hub is in. This adds
a new state for that called Unknown and sends a stop request as soon
as we connect to try to get to a known state.