Commit graph

717 commits

Author SHA1 Message Date
Sam Kent f0ea4ad7e1 Added flash_write default scratchAddr 2017-11-15 16:48:23 +00:00
Joe Finney e0f8b005fe Merge pull request #312 from smartyw/master
Reduce default advertising interval and make property of config.json
2017-09-11 11:28:32 +01:00
Martin Woolley b7af033351 Simplified code wrt MICROBIT_BLE_ADVERTISING_INTERVAL since it's guaranteed to be defined 2017-08-31 10:59:17 +01:00
Martin Woolley dcb5398d36 Added MICROBIT_BLE_ADVERTISING_INTERVAL to MicroBitConfig.h 2017-08-31 09:04:12 +01:00
Martin Woolley d03ebf7056 Exposed Bluetooth advertising interval as config.json property and set default to 50ms 2017-08-16 12:13:13 +01:00
Martin Woolley 002272e048 Exposed Bluetooth advertising interval as config.json property 2017-08-16 12:05:32 +01:00
Joe Finney 7f70e588df Merge pull request #303 from smartyw/master
added support for Write Without Response to Client Event characteristic
2017-07-23 18:59:54 +01:00
Martin Woolley ce70039cb5 added support for Write Without Response to Client Event characteristic 2017-07-23 16:18:35 +01:00
Joe Finney f90ef0030d Merge pull request #296 from smartyw/master
BLE Magnetometer service has new characteristic for requesting calilbration
2017-07-18 11:14:13 +01:00
Martin Woolley 4c1950e007 commented out statements removed 2017-07-18 11:12:07 +01:00
Martin Woolley 5980f9015e Refactored to use only one event handler 2017-07-10 09:13:14 +01:00
Joe Finney 5746eb94a8 Merge pull request #299 from lancaster-university/IssuesResolving
Quick Clean up, added MIT Licence to some files and a spelling mistak…
2017-06-14 10:26:21 +01:00
alennie1993 aacba5f36e Quick Clean up, added MIT Licence to some files and a spelling mistake corrected. Issues #269 & #287 resolved. 2017-06-14 10:03:51 +01:00
Aidan Lennie e098364e5f Adding MIT Licence 2017-06-13 17:19:32 +01:00
Martin Woolley 66fd96b098 Added magnetometer calibration characteristic to the Bluetooth Magnetometer Service 2017-06-06 07:50:03 +01:00
Martin Woolley 621e328df1 Added new Magnetometer Calibration characteristic to Magnetometer Service 2017-05-30 10:17:08 +01:00
Joe Finney b84f89d27c Merge pull request #292 from lancaster-university/bugfix_289
Bugfix 289
2017-05-27 14:27:48 +01:00
Joe Finney e19594c73e Update comment for accuracy 2017-05-27 14:26:50 +01:00
Joe Finney 89294e4637 Merge pull request #293 from lancaster-university/bugfix-286
Erase scratch pages after use [#286]
2017-05-27 11:09:19 +01:00
Joe Finney 66d6fb3f81 Erase scratch pages after use [#286]
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
2017-05-27 10:57:21 +01:00
Joe Finney c0995137f0 Cleanup internal method names
- Rename isInput() to isActiveInput() to improve readability
  - Remove isOutput() method
2017-05-25 23:41:37 +01:00
Joe Finney 2fe103f70b Fix MicroBitIOPinService 8bit AnalogInput bug #289
- 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
2017-05-25 16:12:24 +01:00
Joe Finney 0aaedaa5d9 Remove repeated code in MicroBitIOPinService 2017-05-25 13:38:40 +01:00
Joe Finney ac5a750757 Remove redundant code in MicroBitIOPinService 2017-05-25 13:25:50 +01:00
James Devine d5ee7d99b6 microbit-dal: Corrected bad validation in MicroBitImage.printImage
width was validated, height was not. Documentation also modified to have a better example that works.
2017-04-23 00:53:16 +01:00
James Devine 58f8f0f22e microbit-dal: ManagedString heap error
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.
2017-04-23 00:27:18 +01:00
Joe Finney 74fa06c8d0 Bump to microbit-dal v2.0.0-rc9 2017-04-21 16:20:53 +01:00
Joe Finney 20cfd2bc3b microbit: Ensure MicroBitFileSystem status flags are always initialized.
Addresses Issue
2017-04-21 00:23:20 +01:00
James Devine a85d014382 Merge pull request #247 from sh1boot/squash
Quadrature decoder hardware driver.
2017-04-07 10:13:47 +01:00
Simon Hosie c1626c208c Remove sentinel pinNC from QDEC; use NULL instead. 2017-04-06 22:27:22 -07:00
Simon Hosie e2ec932480 Use better quadrature decoder flag names.
Name the quadrature QDEC_USE_xx rather than QDEC_USING_xx, because they
represent intent rather than status.

Also fixes bug where system tick wouldn't be registered at start() when
configured to do so.
2017-04-06 22:00:08 -07:00
Simon Hosie 3fd457c2b8 Quadrature decoder hardware driver. 2017-04-02 02:17:39 -07:00
Joe Finney 2f32db3e14 microbit: Ensure LED matrix display is cleared when brightness is set to '0' (#281)
- Fixed optimsation case for when brightness is set to zero in render() method.
- Introduce equivalent optimsation case for renderGreyscale(), to
  promote consistent behaviour.
2017-03-24 16:27:36 +00:00
Joe Finney fe3a3dd1f4 Update target version for mbed-classic and ble-nrf51822 2017-03-01 17:51:51 +00:00
Joe Finney 1f4893d1ff Bump Revision to microbit-dal-rc8 2017-03-01 17:44:44 +00:00
Joe Finney 9adafccbf6 Merge pull request #276 from lancaster-university/sd-safe-storage
Sd safe storage
2017-03-01 17:43:55 +00:00
Joe Finney 4b3520daa6 Update to MicrobitBLEManager to allow safe storage of BLE bond information 2017-03-01 17:41:28 +00:00
Joe Finney 564e7d700c Set default FS Cache size to zero.
- Workaround for minor bug noted that can cause data corruption. #275
2017-03-01 16:48:57 +00:00
Joe Finney c25ac4a79f Update to use NRF Event to detect end of FLASH write/erase transaction 2017-03-01 16:48:24 +00:00
Joe Finney 73d51d8731 Add Support for Flash Erase / Write operations with BLE Enabled
Nordic's Soft Device is not tolerant to applications making direct access to
the non-volatile memory controller (NVMC) hardware. This patch adds a code
path to replace native NVMC calls with equivalent Soft Device calls when Soft
Device is enabled.

This patch is necessary to resolve issues related to lock ups when using
either MicroBitStorage or MicroBitFileSystem when BLE is enabled.
2017-03-01 02:48:45 +00:00
Joe Finney 96549fb657 Merge pull request #264 from lancaster-university/pwm-patch
Pwm patch + AnalogOut updates
2017-02-28 09:50:33 +00:00
James Devine b90c21de1c microbit-dal: DynamicPWM now has a static period member variable
Previously DynamicPWM had a per instance member variable that was not shared across all instances of DyanmicPWM which is not true to the hardware, that shares a period across all pwm channels.

This commit adds a static member variable, and sets the default to 20000 us - a default set at the mbed layer.
2017-02-24 10:22:51 +00:00
James Devine 15194f2ed2 microbit-dal: swapped pwm implementation for a more stable one
As per issue #218, pwm has always been unstable resulting in a clicking noise atwhen tones are amplified, and twitchy servo controllers.

This commit when combined with lancaster-university/mbed-classic#03f4fb and lancaster-university/mbed-classic#be51bd will produce a more stable waveform, whilst also maintaining the behaviour of DynamicPwm which has now been absorbed by the PWM driver itself.
2017-02-01 19:22:59 +00:00
James Devine 350aad7a90 microbit-dal: revised capability mapping for the MicroBitPin abstraction.
As per issue #115, AnalogOut was not capable on all IO even though there was no reason for this to be the case.

This commit adds a revised PinCapability enumeration, adding AnalogOut capability to all capable pins using the PIN_CAPABILITY_STANDARD enum, which combines PIN_CAPABILITY_DIGITAL and PIN_CAPABILITY_ANALOG_OUT.
2017-01-31 11:52:20 +00:00
Joe Finney f569f5f6d1 Merge pull request #253 from kartben/fix-uart-read
fix for issue #252: bug in MicroBitUARTService#read when buffer conta…
2017-01-06 17:09:04 +00:00
Joe Finney aa1dab73d1 Merge pull request #255 from bluetooth-mdw/master
Delayed disconnecting after pairing complete by 500ms
2016-12-21 11:31:00 +00:00
Martin Woolley 673c16c0ef Moved fiber_remove_idle_component inside condition which delays BLE disconnect 2016-12-20 17:31:40 +00:00
Martin Woolley 404c46251b Delayed disconnecting after pairing complete by 500ms 2016-12-20 13:30:37 +00:00
Martin Woolley ddbcec094e Delayed disconnecting after pairing complete by 500ms 2016-12-20 13:28:10 +00:00
Benjamin Cabé 192c9664b2 update condition to avoid reading an extra character after len characters have been read
Signed-off-by: Benjamin Cabé <>
2016-12-20 10:15:50 +01:00