- Enures an event listener is not deleted whilst a fiber is activiely processing a queue
- Added support for resurrection of event listeners in cases where identical listeners are removed/added repetitively.
- Add maximum depth for event queues, to prevent buggy scripts causing total memory exhaustion.
- Suppress generation of A/B click events when A+B click is generated
- preservation of event ordering on messagebus for resursive event generation cases.
- bugfix of message bus processing to prevent occasional dual processing of events
- bugfix MicroBitDisplay to behave correctly when delay parameter is zero.
NOP/clamping behaviour out of teh micro:bit runtime and into the glue layers of higher level
- Updates to many functions to provide explicut return codes.
- Updates to many functions to remove heuristic calidation (NOP/clamping/defaults)
- Updates to ErrorNo.h to provide clearer return values, and place return values in a better scope
- Updates to MicroBitDisplay to use enums where appropriate.
Minor changes to BLE profile services (cleanup prior to merge with master branch):
- Added temperature period characteristic to match design pattern of other sensors.
- Updated endinaness of MicroBitLEDService Matrix to be more intuitive.
- Cleaned up Microbit.cpp by removing unused reference to BLE services.
- Exposed serial number and naming information thr BLE DeviceInformation and API.
- Updated BLE advertisement period to be alightly more repsonsive (200ms vs 1000ms).
- BUGFIX: micro:bit name is now always generated, regardless of BLE services.
- BUGFIX: Scroll Period data length.
Updates to change the behaviour of the scroll/print/animate faily of function away
from being pre-emtive and instead prroviding queing behaviour.
Minor updates to provide complete sets of async equivalent operations
Updates to the scheduler to provide wait/notify/waitone semantics.
All message bus listeners with the micro:bit runtie are non blocking, and safe to be called
in an interrupt context. As such, these have now all been declared MESSAGE_BUS_LISTENER_IMMEDIATE
which should mitigate all unbounded event queueing effects.
Updates to BLE interface to match specification following testing by Bluetooth SIG.
Accelerometer Period: now supports READ and WRITE
Magnetometer Period: now supports READ and WRITE
LED Matrix State: now supports READ and WRITE.
UUIDs of Temperature Service characteristic corrected.
More specifically, the build system now uses the semantic versioning meta-data
held in module.json to define a major.minor.patch version. Additionally, is the branch
being compiled is *not* the master branch, the version is appended with <branchname><githash>.
- Updates to CMake files to expose this to the micro:bit runtime code.
- Addition of uBit.systemVersion() to expose this to application code.
- Displaying of version string over serial if MICROBIT_DBG is enabled.
- Distribution of version string over BLE via the firmware revision characteristic.
First functionally complete BLE profile, matching BLE speicfication v1.6.
More specifically, the following services are now functional:
Also, updates to underlying device drivers to enable greater configurability:
- MicroBitCompass now supports variable sample rates and temperature sensing
- MicroBitAccelerometer now supports variable sample rates and ranges
- MicroBitThermometer introduced
- MicroBitMessageBus adapted to permit enumeration and block removal of listeners
Finally, MicroBit DFU Service has been changed to the new UUIDs specificed in v1.6 of BLE spec.
Previous to this patch an explicit constructor was provided for creating
MatrixPoint instances, which meant that such objects could not be put in
ROM (since they needed to be constructed at runtime).
By using the defualt construction method for structs the MatrixPoint map
is now compiled into the rodata section, hence freeing up RAM.
Saves: 4 bytes data, 56 bytes bss, 148 bytes code.
- renamed fiber flag to be more general.
- renamed idle to idleFiber to be consistent with the rest of the code.
- factored content of idle() into a funciton to avoid dupication.
- added test case to MessageBus::process() to avoid forking fibers if not requested.
- removed fiber_allow_run_idle_within mutator in favour of exposing currentFiber, as a more general solution.
Added new URGENT listener type, that ensures immediate, non queuing delivery of events.
Introduced two-pass algorithm into message bus. Only events with an event listener are now
queued at ingress - this reduces unecessary memory usage for 'uninteresting' events.
Hotfix of a minor bug in the MicroBitDFU Service that prevented BLE notifications
from being sent on the FlashCode characterisitic. Needed as the Samsung companion
app is dependent on this functionality to enable BLE programmming of the micro:bit.
Events in the micro:bit runtime are normally launched through making an instance
of the MicroBitEvent class. This update added configuration support to all the
code creating the MicroBitEvent decide if the newly created event should then be
automatically queued on the MessageBus or processed immediately by event handlers.
MessageBus handlers can now have one of four concurrency modes for the eventuality
of an event being raised whilst a previous event is still being processed. An additional
(optional) parameter is provided to the listen() functions to allow this to be selected
on a per event handler basis. The permissable options are:
The event handler is fired with the new event, regardless of whether or not
a previous event is still be processed by that handler.
The new event is queued until such a time as the previous event has completed
execution. The new event is then processed. This option does not preclude the
processing of the new event by other event handlers.
The new event is dropped, and will never be processed the the event handler.
This option does not preclude the processing of the new event by other event handlers.
The event handler is self-declaring that it never blocks. This flag is used purely
for optimisation, as it permits direct execution of the event hadnelr without inducing
any overhead from the scheduler.
In addition, the following minor revisions were made in this release:
* Cleanup of the #include dependencies contained in the microbit-dal .h files
* Bugfix to the scheduler block on event matching code.
* Introduced a MICROBIT_ID_ALERT MessageBus channel, for general purpose eventing using nonces.