- Matrix4 was used only for the least mean squres calculation as part of the
MicroBitCompassCalibrator. This has now been replace with an itereative
approximation algorithm.
- Add mutator to allow accelerometer to be added to a compass after construction
- Use floating point values for Sample3D:dSquared() operations to resmove possible overflow
- Change compass calibration hill climb algorithm to use 100 unit steps to converge faster.
- Update autodetect functions to register accelerometer instances with compass instances upon detection
- Clean and fix axis alignments for tilt compensation algorithm
- Autodetection logic added to MicroBitAccelerometer/MicroBitCompass
- Added single byte I2C read utility function into MicroBitI2C
- Added isDetected() method into sensor drivers
- Add pin mapping for third interrupt line as used by FXOS8700
- Move FXOS to open drain interrupt configuration
- Add pullup onto interrupt line to FXOS
Using the function atoi() pulls in a dependency from newlib, which in turn
pulls in locale support, and locale support requires about 350 bytes of
RAM. This patch removes such a dependency by rewriting the MicroBitImage
parsing code so that it directly converts the input string to an integer
instead of building a buffer and passing it to atoi().
This patch saves about 640 bytes of code space and 364 bytes of RAM. It
also reduces the amount of stack space used by the MicroBitImage
constructor.
MicrobitFileSystem occasionally needs to "refresh" FLASH page that have been
marked as deleted, such that they can be used again. When this happens, an
unused FLASH page is used to temporarily hold wanted data (a scratch page).
This is alloctaed ina round robin fashion from all available data pages to
load balance wear across pages.
This patch ensures that a page used in this fashion is erased after use, such
that it is ready for use again as a data page.
This patch may also address https://github.com/Microsoft/pxt/issues/1495
- Analog Input now correctly reads values in the 8 bit range.
- Analog Output now reaches 100% duty cycle for 8 but input value of 255.
- Reintroduce notify() call into updateBLEInputs() method.
- Minor code cleanups
Some higher level languages initialise Strings and Images used RefCounted types. In certain scenarios, they could be initialised with NULL, there was no error checking for this case, and users observed error code 030 (a heap error). This was traced back to some error checking in RefCounted.cpp, where the reference is tested. In these initialisers the RefCounted type was NULL.
Added some additional error checking in ManagedString and ManagedImage.
Closes#283.