diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b49d6343d1ce1bcc79d2edba135ee3f79114931..f8295575a2c42a3f5d1769d008c6ac14c2deb4d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- `leds.flash_rocket()` API for making rockets flash asynchronously. +- Basic API for the MAX86150 pulse-oximeter. +- A feature to allow setting the main app on-device. +- Added compatibility to BLE 5.0 capable phones (including iPhones). +- Added pairing dialog in BLE app. Device is only visible when BLE app is + active. +- Option to write HCI layer log files for debugging. +- _Stub_ `ubluetooth` module. Not yet functional! + + +### Changed +- Internal changes to the way interrupts are triggered. +- Updated to a newer version of MicryPython (v1.12). +- Improved BLE security by only allowing man-in-the-middle protected + pairings and specifying minimum key lengths. + +### Fixed +- Made the `vibra` vibration motor API more stable. +- Fixed bug which triggered reboot loops. +- Fixed bug which made the USB serial connection unresponsive. +- Fixed bug which wrote the pairings file more periodically. +- Fixed invalid filesystem locking in BLE startup. ## [v1.15] - 2020-02-02 - [Okra] diff --git a/Documentation/conf.py b/Documentation/conf.py index b80d8dadd0485fdaee5a14577412eb6972d6b213..2186b6da923529f7401dc55f2f0d56ac2f871422 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -114,8 +114,10 @@ autodoc_mock_imports = [ "sys_display", "sys_leds", "sys_max30001", + "sys_max86150", "sys_config", "ucollections", + "uerrno", "urandom", "utime", ] diff --git a/Documentation/index.rst b/Documentation/index.rst index f6ce6fcd564b08a7f01229a1a235334bb8d1c7c2..f83d9ee79b55cae3248cb1529be9cc1f02cda897 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -25,6 +25,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the pycardium/bhi160 pycardium/bme680 pycardium/max30001 + pycardium/max86150 pycardium/buttons pycardium/color pycardium/config diff --git a/Documentation/pycardium/max86150.rst b/Documentation/pycardium/max86150.rst new file mode 100644 index 0000000000000000000000000000000000000000..3e8a869038acac10fd4f6c73212265b4900ecb22 --- /dev/null +++ b/Documentation/pycardium/max86150.rst @@ -0,0 +1,5 @@ +``max86150`` - MAX86150 +======================= + +.. automodule:: max86150 + :members: diff --git a/epicardium/epicardium.h b/epicardium/epicardium.h index 2ad19134960d6ec35e110266ea0abab3754b255a..3e1df57875d60c776b0acb4afbdf614ce81728d7 100644 --- a/epicardium/epicardium.h +++ b/epicardium/epicardium.h @@ -970,7 +970,7 @@ struct max86150_sensor_data { * - ``-EINVAL``: config->ppg_sample_rate is not one of 10, 20, 50, 84, 100, 200 * or config_size is not size of config. * - * .. versionadded:: 1.13 + * .. versionadded:: 1.16 */ API(API_MAX86150_ENABLE, int epic_max86150_enable_sensor(struct max86150_sensor_config *config, size_t config_size)); @@ -979,7 +979,7 @@ API(API_MAX86150_ENABLE, int epic_max86150_enable_sensor(struct max86150_sensor_ * * :returns: 0 in case of success or forward negative error value from stream_deregister. * - * .. versionadded:: 1.13 + * .. versionadded:: 1.16 */ API(API_MAX86150_DISABLE, int epic_max86150_disable_sensor()); diff --git a/pycardium/modules/py/leds.py b/pycardium/modules/py/leds.py index db09834cc63a42c5885bb2dd00dc0d0e1544a3fb..043cef19ffe07ee925eaed63ea91d2d72805d219 100644 --- a/pycardium/modules/py/leds.py +++ b/pycardium/modules/py/leds.py @@ -104,7 +104,7 @@ def flash_rocket(led, value, millis): :param int value: brightness value (0 < value < 32) :param int millis: duration of the rocket being on in milliseconds. - .. versionadded:: 1.?? + .. versionadded:: 1.16 """ return sys_leds.flash_rocket(led, value, millis) diff --git a/pycardium/modules/py/max86150.py b/pycardium/modules/py/max86150.py index 7a799c1ca6096752cba2d3f5e33218ffc1dfd9c3..6040eed0a5e3440dd95865b6e9d478b1647f1919 100644 --- a/pycardium/modules/py/max86150.py +++ b/pycardium/modules/py/max86150.py @@ -8,22 +8,30 @@ Max86150Data = ucollections.namedtuple("Max86150Data", ["red", "infrared", "ecg" class MAX86150: """ - The MAX86150 class provides a stram interface to the MAX86150 PPG and ECG. + The MAX86150 class provides a stream interface to the MAX86150 PPG and ECG. + + **Example**: .. code-block:: python - import MAX86150 + import max86150 m = max86150.MAX86150() - m.read() + + data = m.read() + for sample in data: + print("Red: {} Infrared: {} ECG: {}", sample.red, sample.infrared, sample.ecg) + m.close() + + .. versionadded:: 1.16 """ def __init__(self, callback=None, sample_buffer_len=128, sample_rate=200): """ Initializes the MAX86150 (if it is not already running). - :param callback: If not None: A callback which is called with the data when ever new data is available - + :param callback: If not None: A callback which is called with the data + when ever new data is available """ self.active = False self.stream_id = -uerrno.ENODEV @@ -35,7 +43,9 @@ class MAX86150: def enable_sensor(self): """ - Enables the sensor. Automatically called by __init__. + Enables the sensor. + + Automatically called when instanciating the sensor object. """ interrupt.disable_callback(self.interrupt_id) interrupt.set_callback(self.interrupt_id, self._interrupt) @@ -68,7 +78,7 @@ class MAX86150: def read(self): """ - Read as many samples (signed integer) as currently available. + Read as many samples as currently available. """ assert self.active, "Sensor is inactive" result = []