From bb30a5c026b713b4553fd9b8324fe67cb35ee779 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 21 Apr 2017 16:29:04 +0100 Subject: [PATCH 01/28] Bump to microbit-rc9 --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 1da5e64..285c84a 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,6 @@ { "name": "microbit", - "version": "2.0.0-rc8", + "version": "2.0.0-rc9", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { From 193a050ac4a35edf86e6f05461cf0261e21ab4bb Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 29 May 2017 19:37:18 -0700 Subject: [PATCH 02/28] binding to microbit-dal#v2.0.0-rc10 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index 285c84a..806e420 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.0.0-rc9", + "version": "2.0.0-rc10", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal" + "microbit-dal": "lancaster-university/microbit-dal#2.0.0-rc10" }, "extraIncludes": [ "inc" From f4e7e01c1d594a547c326e1567848e69de32d01c Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 29 May 2017 19:47:22 -0700 Subject: [PATCH 03/28] fixed typo in dal dependency --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 806e420..8746791 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#2.0.0-rc10" + "microbit-dal": "lancaster-university/microbit-dal#v2.0.0-rc10" }, "extraIncludes": [ "inc" From a6ab0e6c1b29533ffab6e5551d5e730c40d1e06d Mon Sep 17 00:00:00 2001 From: Sam Kent <32453267+microbit-sam@users.noreply.github.com> Date: Fri, 4 May 2018 14:46:40 +0100 Subject: [PATCH 04/28] Added Partial Flashing (#1) * Enter BLE mode using a MicroBitEvent * Using Key/Value store rather than GPREGRET for Hard Reset persistance * Skip timeout * Updated tag * Updated tag * Updated tag * Updated tag * Removed Listener * Updated animation * Updated tag * Updated tag * Updated tag * Updated tag * Changed animation timing * Updated tag * Updated tag * Updated tag * Updated animation timing * Added incomplete flash flag * Updated tag * Removed Event Listener from MicroBit.h --- module.json | 2 +- source/MicroBit.cpp | 27 ++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/module.json b/module.json index 8746791..5f56861 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#v2.0.0-rc10" + "microbit-dal": "microbit-sam/microbit-dal#pf_v0.2.4" }, "extraIncludes": [ "inc" diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index 45fece1..39e8e32 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -130,16 +130,33 @@ void MicroBit::init() status |= MICROBIT_INITIALIZED; #if CONFIG_ENABLED(MICROBIT_BLE_PAIRING_MODE) - // Test if we need to enter BLE pairing mode... int i=0; + // Test if we need to enter BLE pairing mode + // If a BLEMode Key has been set boot straight into BLE mode + KeyValuePair* BLEMode = storage.get("BLEMode"); + KeyValuePair* flashIncomplete = storage.get("flashIncomplete"); sleep(100); - while (buttonA.isPressed() && buttonB.isPressed() && i<10) + // Animation + uint8_t x = 0; uint8_t y = 0; + while ((buttonA.isPressed() && buttonB.isPressed() && i<25) || BLEMode != NULL || flashIncomplete != NULL) { - sleep(100); - i++; + display.image.setPixelValue(x,y,255); + sleep(50); + i++; x++; - if (i == 10) + // Gradually fill screen + if(x == 5){ + y++; x = 0; + } + + if (i == 25 || BLEMode != NULL) { + // Remove KV if it exists + if(BLEMode != NULL){ + storage.remove("BLEMode"); + delete BLEMode; + } + #if CONFIG_ENABLED(MICROBIT_HEAP_ALLOCATOR) && CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) microbit_create_heap(MICROBIT_SD_GATT_TABLE_START + MICROBIT_SD_GATT_TABLE_SIZE, MICROBIT_SD_LIMIT); #endif From 42cba850c865dfb13b18966e0ed30bdba41f04c1 Mon Sep 17 00:00:00 2001 From: Sam Kent Date: Fri, 25 May 2018 11:58:28 +0100 Subject: [PATCH 05/28] Removed module.json edit. Delte KV Pairs. --- source/MicroBit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index 39e8e32..0f564c7 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -154,8 +154,9 @@ void MicroBit::init() // Remove KV if it exists if(BLEMode != NULL){ storage.remove("BLEMode"); - delete BLEMode; } + delete BLEMode; + delete flashIncomplete; #if CONFIG_ENABLED(MICROBIT_HEAP_ALLOCATOR) && CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) microbit_create_heap(MICROBIT_SD_GATT_TABLE_START + MICROBIT_SD_GATT_TABLE_SIZE, MICROBIT_SD_LIMIT); From d4cac39cf8649d1965afbd9060bceb92e754d76c Mon Sep 17 00:00:00 2001 From: Sam Kent Date: Fri, 25 May 2018 11:59:47 +0100 Subject: [PATCH 06/28] fixup! Removed module.json edit. Delte KV Pairs. --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 5f56861..8746791 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "microbit-sam/microbit-dal#pf_v0.2.4" + "microbit-dal": "lancaster-university/microbit-dal#v2.0.0-rc10" }, "extraIncludes": [ "inc" From 825a95b6d98904dd7d244ac4cadef1116d0ebd2b Mon Sep 17 00:00:00 2001 From: Sam Kent Date: Mon, 18 Jun 2018 11:19:29 +0100 Subject: [PATCH 07/28] Updated tag --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 8746791..c10152a 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#v2.0.0-rc10" + "microbit-dal": "microbit-sam/microbit-dal#pf_v0.3.4" }, "extraIncludes": [ "inc" From ce4c078a4279ad9ab61f08c7cc386f41f113133a Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 6 Jul 2018 05:17:19 +0100 Subject: [PATCH 08/28] Updates to support alternative accelerometer and magnetomter sensors Minor updates to make use of new functionality in microbit-dal that performs autodetection of attached sensors and instatiation of drivers. Also some code cleanups to remove unused code. More specifically: - Changed MicroBitAccelerometer and MicroBitCompass objects to be references. This is to support dynamic autodetection and instantiation of drivers for such hardware. - Updates to initialise MicroBitAccelerometer and MicroBitCompass references through the MicroBitAccelerometer::autoDetect() and MicroBitCompass::autoDetect() methods, respectively. - Add storage object to MicroBitCompassCalibrator constructor to enable persistent storing of calibration data. - Updated use of accelerometer updateSample() to more commonly used getSample() method to improve clarity and to provide a reference example. - Exposed sensor IRQ lines via MicroBitIO. - Removed redundant include of Matrix4.h --- inc/MicroBit.h | 5 ++--- source/MicroBit.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/MicroBit.h b/inc/MicroBit.h index c69e74f..50be683 100644 --- a/inc/MicroBit.h +++ b/inc/MicroBit.h @@ -33,7 +33,6 @@ DEALINGS IN THE SOFTWARE. #include "MicroBitDevice.h" #include "ErrorNo.h" #include "MicroBitSystemTimer.h" -#include "Matrix4.h" #include "MicroBitCompat.h" #include "MicroBitComponent.h" #include "ManagedType.h" @@ -112,8 +111,8 @@ class MicroBit MicroBitButton buttonA; MicroBitButton buttonB; MicroBitMultiButton buttonAB; - MicroBitAccelerometer accelerometer; - MicroBitCompass compass; + MicroBitAccelerometer &accelerometer; + MicroBitCompass &compass; MicroBitCompassCalibrator compassCalibrator; MicroBitThermometer thermometer; diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index 45fece1..15fb8df 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -68,9 +68,9 @@ MicroBit::MicroBit() : buttonA(MICROBIT_PIN_BUTTON_A, MICROBIT_ID_BUTTON_A), buttonB(MICROBIT_PIN_BUTTON_B, MICROBIT_ID_BUTTON_B), buttonAB(MICROBIT_ID_BUTTON_A,MICROBIT_ID_BUTTON_B, MICROBIT_ID_BUTTON_AB), - accelerometer(i2c), - compass(i2c, accelerometer, storage), - compassCalibrator(compass, accelerometer, display), + accelerometer(MicroBitAccelerometer::autoDetect(i2c)), + compass(MicroBitCompass::autoDetect(i2c)), + compassCalibrator(compass, accelerometer, display, storage), thermometer(storage), io(MICROBIT_ID_IO_P0,MICROBIT_ID_IO_P1,MICROBIT_ID_IO_P2, MICROBIT_ID_IO_P3,MICROBIT_ID_IO_P4,MICROBIT_ID_IO_P5, @@ -78,7 +78,8 @@ MicroBit::MicroBit() : MICROBIT_ID_IO_P9,MICROBIT_ID_IO_P10,MICROBIT_ID_IO_P11, MICROBIT_ID_IO_P12,MICROBIT_ID_IO_P13,MICROBIT_ID_IO_P14, MICROBIT_ID_IO_P15,MICROBIT_ID_IO_P16,MICROBIT_ID_IO_P19, - MICROBIT_ID_IO_P20), + MICROBIT_ID_IO_P20, MICROBIT_ID_IO_INT1, MICROBIT_ID_IO_INT2, + MICROBIT_ID_IO_INT3), bleManager(storage), radio(), ble(NULL) @@ -211,7 +212,7 @@ void MicroBit::onListenerRegisteredEvent(MicroBitEvent evt) case MICROBIT_ID_GESTURE: // A listener has been registered for the accelerometer. // The accelerometer uses lazy instantiation, we just need to read the data once to start it running. - accelerometer.updateSample(); + accelerometer.getSample(); break; case MICROBIT_ID_THERMOMETER: From bfc6724b1be5dacaef6813e8bc73a2dbd0e5b429 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 6 Jul 2018 16:39:41 +0100 Subject: [PATCH 09/28] Bump to v2.1.0-rc2 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index 8746791..b5371ea 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.0.0-rc10", + "version": "2.1.0-rc2", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#v2.0.0-rc10" + "microbit-dal": "lancaster-university/microbit-dal#v2.1.0-rc2" }, "extraIncludes": [ "inc" From 53a40e195539ddc7b422cf810383071312ec1f2c Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 6 Jul 2018 16:57:29 +0100 Subject: [PATCH 10/28] Update version to identify dal-integration branch --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index b5371ea..116a3e7 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0-rc2", + "version": "2.1.0-dal-integration", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#v2.1.0-rc2" + "microbit-dal": "lancaster-university/microbit-dal#dal-integration" }, "extraIncludes": [ "inc" From cffaeea8e452a954ea8231ca7f67005e717ae7d9 Mon Sep 17 00:00:00 2001 From: Philipp Henkel Date: Tue, 24 Jul 2018 22:24:37 +0200 Subject: [PATCH 11/28] Fix typo in documentation --- inc/MicroBit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/MicroBit.h b/inc/MicroBit.h index c69e74f..f2927c1 100644 --- a/inc/MicroBit.h +++ b/inc/MicroBit.h @@ -235,7 +235,7 @@ class MicroBit * than the hardware random number generator built int the processor, which takes * a long time and uses a lot of energy. * - * KIDS: You shouldn't use this is the real world to generate cryptographic keys though... + * KIDS: You shouldn't use this in the real world to generate cryptographic keys though... * have a think why not. :-) * * @param max the upper range to generate a number for. This number cannot be negative. From b5500c8f91229b20b4c57dd5816759d3a6c5b11d Mon Sep 17 00:00:00 2001 From: Sam Kent Date: Wed, 1 Aug 2018 14:30:39 +0100 Subject: [PATCH 12/28] BLEMode -> RebootMode --- source/MicroBit.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index 5d568f2..182fb63 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -133,13 +133,13 @@ void MicroBit::init() #if CONFIG_ENABLED(MICROBIT_BLE_PAIRING_MODE) int i=0; // Test if we need to enter BLE pairing mode - // If a BLEMode Key has been set boot straight into BLE mode - KeyValuePair* BLEMode = storage.get("BLEMode"); + // If a RebootMode Key has been set boot straight into BLE mode + KeyValuePair* RebootMode = storage.get("RebootMode"); KeyValuePair* flashIncomplete = storage.get("flashIncomplete"); sleep(100); // Animation uint8_t x = 0; uint8_t y = 0; - while ((buttonA.isPressed() && buttonB.isPressed() && i<25) || BLEMode != NULL || flashIncomplete != NULL) + while ((buttonA.isPressed() && buttonB.isPressed() && i<25) || RebootMode != NULL || flashIncomplete != NULL) { display.image.setPixelValue(x,y,255); sleep(50); @@ -150,13 +150,13 @@ void MicroBit::init() y++; x = 0; } - if (i == 25 || BLEMode != NULL) + if (i == 25 || RebootMode != NULL) { // Remove KV if it exists - if(BLEMode != NULL){ - storage.remove("BLEMode"); + if(RebootMode != NULL){ + storage.remove("RebootMode"); } - delete BLEMode; + delete RebootMode; delete flashIncomplete; #if CONFIG_ENABLED(MICROBIT_HEAP_ALLOCATOR) && CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) From d0cf0db12321bcd74ab157ddc3678f7e1542ef70 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Wed, 5 Sep 2018 17:21:53 +0100 Subject: [PATCH 13/28] Bump microbit-dal dependency to dal-integration-2 --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 116a3e7..20542d0 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#dal-integration" + "microbit-dal": "lancaster-university/microbit-dal#dal-integration-2" }, "extraIncludes": [ "inc" From 7142c8417877c3165058626028a9fd5ecd7431db Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Wed, 5 Sep 2018 17:24:26 +0100 Subject: [PATCH 14/28] Bump version to dal-integration-2 --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 20542d0..398a748 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,6 @@ { "name": "microbit", - "version": "2.1.0-dal-integration", + "version": "2.1.0-dal-integration-2", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { From 4029770eae866e4d23b4f8f83bba3bc287ba8ff1 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Thu, 6 Sep 2018 16:04:06 +0100 Subject: [PATCH 15/28] First compiling buid of integrated heap allocator --- source/MicroBit.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index 182fb63..a6ab40b 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -112,11 +112,6 @@ void MicroBit::init() if (status & MICROBIT_INITIALIZED) return; -#if CONFIG_ENABLED(MICROBIT_HEAP_ALLOCATOR) - // Bring up a nested heap allocator. - microbit_create_nested_heap(MICROBIT_NESTED_HEAP_SIZE); -#endif - // Bring up fiber scheduler. scheduler_init(messageBus); From 77660136091ce851ce83fa1940616112b7690d36 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Thu, 6 Sep 2018 16:48:47 +0100 Subject: [PATCH 16/28] Bump to dal-integration-3 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index 398a748..7e93bca 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0-dal-integration-2", + "version": "2.1.0-dal-integration-3", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#dal-integration-2" + "microbit-dal": "lancaster-university/microbit-dal#dal-integration-3" }, "extraIncludes": [ "inc" From 36fd2895b713bf5b9e9f71da39aa3435f006f83b Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Thu, 6 Sep 2018 20:53:53 +0100 Subject: [PATCH 17/28] Remove legacy condition CONFIG options and add diagnostics --- source/MicroBit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index a6ab40b..eea49c8 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -154,7 +154,7 @@ void MicroBit::init() delete RebootMode; delete flashIncomplete; -#if CONFIG_ENABLED(MICROBIT_HEAP_ALLOCATOR) && CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) +#if CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) microbit_create_heap(MICROBIT_SD_GATT_TABLE_START + MICROBIT_SD_GATT_TABLE_SIZE, MICROBIT_SD_LIMIT); #endif // Start the BLE stack, if it isn't already running. @@ -171,7 +171,7 @@ void MicroBit::init() #endif // Attempt to bring up a second heap region, using unused memory normally reserved for Soft Device. -#if CONFIG_ENABLED(MICROBIT_HEAP_ALLOCATOR) && CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) +#if CONFIG_ENABLED(MICROBIT_HEAP_REUSE_SD) #if CONFIG_ENABLED(MICROBIT_BLE_ENABLED) microbit_create_heap(MICROBIT_SD_GATT_TABLE_START + MICROBIT_SD_GATT_TABLE_SIZE, MICROBIT_SD_LIMIT); #else @@ -180,12 +180,14 @@ void MicroBit::init() #endif #if CONFIG_ENABLED(MICROBIT_BLE_ENABLED) + SERIAL_DEBUG->printf("***BLE_INIT***\r\n"); // Start the BLE stack, if it isn't already running. if (!ble) { bleManager.init(getName(), getSerial(), messageBus, false); ble = bleManager.ble; } + SERIAL_DEBUG->printf("***BLE_INIT_COMPLETE***\r\n"); #endif } From e0b5759fa429847bc401f671ac350c7769178568 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 7 Sep 2018 14:39:49 +0100 Subject: [PATCH 18/28] Remove DEBUG diagnostics --- source/MicroBit.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index eea49c8..e864ad0 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -180,14 +180,12 @@ void MicroBit::init() #endif #if CONFIG_ENABLED(MICROBIT_BLE_ENABLED) - SERIAL_DEBUG->printf("***BLE_INIT***\r\n"); // Start the BLE stack, if it isn't already running. if (!ble) { bleManager.init(getName(), getSerial(), messageBus, false); ble = bleManager.ble; } - SERIAL_DEBUG->printf("***BLE_INIT_COMPLETE***\r\n"); #endif } From 1c7c1518e5c1ebab16c4da7155a2ec483247c5e0 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 7 Sep 2018 18:48:48 +0100 Subject: [PATCH 19/28] Bump to dal-integration-4 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index 7e93bca..17516ea 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0-dal-integration-3", + "version": "2.1.0-dal-integration-4", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#dal-integration-3" + "microbit-dal": "lancaster-university/microbit-dal#dal-integration-4" }, "extraIncludes": [ "inc" From d54e26fd4d2c0812923f60874ea17df24432f636 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Sat, 8 Sep 2018 18:07:41 +0100 Subject: [PATCH 20/28] Prevent auto-compass calibration when a compass event listener is registered - Calibraiton algorithm now only activated when heading() is requested --- source/MicroBit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index e864ad0..e3e8cb7 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -216,8 +216,7 @@ void MicroBit::onListenerRegisteredEvent(MicroBitEvent evt) case MICROBIT_ID_COMPASS: // A listener has been registered for the compass. // The compass uses lazy instantiation, we just need to read the data once to start it running. - // Touch the compass through the heading() function to ensure it is calibrated. if it isn't this will launch any associated calibration algorithms. - compass.heading(); + compass.getSample(); break; From d64e0f6a6488af7e58258a1dcc14622946de47c8 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Sat, 8 Sep 2018 18:11:35 +0100 Subject: [PATCH 21/28] Bump version to dal-integration-5 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index 17516ea..e2d1b0a 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0-dal-integration-4", + "version": "2.1.0-dal-integration-5", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#dal-integration-4" + "microbit-dal": "lancaster-university/microbit-dal#dal-integration-5" }, "extraIncludes": [ "inc" From acb25fa2cb2fa786435b9a36afb0089b00af3176 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Thu, 13 Sep 2018 17:41:33 +0100 Subject: [PATCH 22/28] Bump to dal-integration-6 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index e2d1b0a..5a26bb9 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0-dal-integration-5", + "version": "2.1.0-dal-integration-6", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#dal-integration-5" + "microbit-dal": "lancaster-university/microbit-dal#dal-integration-6" }, "extraIncludes": [ "inc" From 8b2e14219316767795019640d6ef24573710eeeb Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Mon, 17 Sep 2018 10:41:35 -0700 Subject: [PATCH 23/28] version 2.1.0 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index 5a26bb9..f808abc 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0-dal-integration-6", + "version": "2.1.0", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#dal-integration-6" + "microbit-dal": "lancaster-university/microbit-dal#v2.1.0" }, "extraIncludes": [ "inc" From 011cb1ac075d47243ca62314436a69c84d84bede Mon Sep 17 00:00:00 2001 From: Sam Kent Date: Thu, 22 Nov 2018 13:59:48 +0000 Subject: [PATCH 24/28] Remove int1,2,3 --- source/MicroBit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index e3e8cb7..74f3841 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -78,8 +78,7 @@ MicroBit::MicroBit() : MICROBIT_ID_IO_P9,MICROBIT_ID_IO_P10,MICROBIT_ID_IO_P11, MICROBIT_ID_IO_P12,MICROBIT_ID_IO_P13,MICROBIT_ID_IO_P14, MICROBIT_ID_IO_P15,MICROBIT_ID_IO_P16,MICROBIT_ID_IO_P19, - MICROBIT_ID_IO_P20, MICROBIT_ID_IO_INT1, MICROBIT_ID_IO_INT2, - MICROBIT_ID_IO_INT3), + MICROBIT_ID_IO_P20), bleManager(storage), radio(), ble(NULL) From a50e9c3d79fbcd755391d5b0c0c768a5e84a84c5 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Fri, 23 Nov 2018 14:14:21 +0000 Subject: [PATCH 25/28] Bump to v2.1.1 --- module.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module.json b/module.json index f808abc..7f58909 100644 --- a/module.json +++ b/module.json @@ -1,10 +1,10 @@ { "name": "microbit", - "version": "2.1.0", + "version": "2.1.1", "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#v2.1.0" + "microbit-dal": "lancaster-university/microbit-dal#v2.1.1" }, "extraIncludes": [ "inc" From c134ddc3cc2c53cc4314c4eebd31808eed7c154e Mon Sep 17 00:00:00 2001 From: "Matthias L. Jugel" Date: Sat, 12 Jan 2019 14:45:41 +0100 Subject: [PATCH 26/28] refactor new accelerometer code, fix bug related to soft reset (which does not exist) --- inc/MicroBit.h | 2 ++ source/MicroBit.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/inc/MicroBit.h b/inc/MicroBit.h index a0da98c..8e19620 100644 --- a/inc/MicroBit.h +++ b/inc/MicroBit.h @@ -101,8 +101,10 @@ class MicroBit // Serial Interface MicroBitSerial serial; +#ifndef TARGET_NRF51_CALLIOPE // Reset Button InterruptIn resetButton; +#endif // Persistent key value store MicroBitStorage storage; diff --git a/source/MicroBit.cpp b/source/MicroBit.cpp index badeb45..8974372 100644 --- a/source/MicroBit.cpp +++ b/source/MicroBit.cpp @@ -65,7 +65,9 @@ RawSerial* SERIAL_DEBUG = NULL; */ MicroBit::MicroBit() : serial(USBTX, USBRX), +#ifndef TARGET_NRF51_CALLIOPE resetButton(MICROBIT_PIN_BUTTON_RESET), +#endif storage(), i2c(I2C_SDA0, I2C_SCL0), messageBus(), @@ -98,9 +100,12 @@ MicroBit::MicroBit() : // Clear our status status = 0; +// there is no soft reset pin available on the Callipo mini, it is resetted via the KL26z SWD +#ifndef TARGET_NRF51_CALLIOPE // Bring up soft reset functionality as soon as possible. resetButton.mode(PullUp); resetButton.fall(this, &MicroBit::reset); +#endif } /** From 93efd385d266ae2179767258467a54a456b1d1c8 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Sun, 20 Jan 2019 18:31:37 +0000 Subject: [PATCH 27/28] Set microbit-dal version to pxtgc-0 --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 7f58909..01821e8 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "lancaster-university/microbit-dal#v2.1.1" + "microbit-dal": "lancaster-university/microbit-dal#pxtgc-0" }, "extraIncludes": [ "inc" From d242abfe279434c83f133472705bd90d3d9c0328 Mon Sep 17 00:00:00 2001 From: Juri Date: Tue, 16 Jul 2019 20:50:39 +0200 Subject: [PATCH 28/28] switch to amerlander branch --- module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.json b/module.json index 7b36e19..d47ef2e 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "A simple to use collection of the most commonly used components in the micro:bit runtime", "license": "MIT", "dependencies": { - "microbit-dal": "calliope-mini/microbit-dal#v2.1.1-calliope" + "microbit-dal": "Amerlander/microbit-dal#v2.1.1-calliope" }, "extraIncludes": [ "inc"