Closed microbit-sam closed 5 years ago
Hmm. Is this repeatable / deterministic?
Calibration runs but nothing on screen! If you manage to complete the invisible calibration the program continues to run
{
"microbit-dal": {
"bluetooth": {
"enabled": 1,
"private_addressing": 0,
"advertising_timeout": 0,
"tx_power": 6,
"dfu_service": 1,
"device_info_service": 1,
"event_service": 1,
"eddystone_url": 1,
"eddystone_uid": 1,
"open": 0,
"pairing_mode": 1,
"whitelist": 1,
"security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM",
"partial_flashing": 0
},
"gatt_table_size": "0x300"
}
}
Cor. Stealth calibration. That's... unexpected.
Heh. :)
Two things going on here.
1) The compass is configured to activate and calibrate itself as soon as one of the APIs is used. This is being triggered when the BLE magnetometer service listens for compass sample update events.
2) The above trigger is happening just as your fade in animation has started, and you've set the display brightness to zero. :)
I've worked up a couple of patches to:
Set the brightness of the display to maximum brightness while the calibration UX is running, and restore the brightness to its previous value when the algorithm completes.
Backed off the calibration trigger a bit, so that registering an event handler does not trigger calibration, and only a direct call to a related function such as heading() triggers it.
I'll test and push with a new dal-integration-5 tag later today. Got to go judge in the village show first. :)
Program gets stuck starting the service!