Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
7422956c
Commit
7422956c
authored
Sep 19, 2020
by
Rahix
Browse files
Merge 'Update CHANGELOG and Documentation'
See merge request
card10/firmware!394
parents
46632854
c686b7cf
Pipeline
#4714
passed with stages
in 1 minute and 29 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
7422956c
...
...
@@ -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]
...
...
Documentation/conf.py
View file @
7422956c
...
...
@@ -114,8 +114,10 @@ autodoc_mock_imports = [
"sys_display"
,
"sys_leds"
,
"sys_max30001"
,
"sys_max86150"
,
"sys_config"
,
"ucollections"
,
"uerrno"
,
"urandom"
,
"utime"
,
]
...
...
Documentation/index.rst
View file @
7422956c
...
...
@@ -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
...
...
Documentation/pycardium/max86150.rst
0 → 100644
View file @
7422956c
``max86150`` - MAX86150
=======================
.. automodule:: max86150
:members:
epicardium/epicardium.h
View file @
7422956c
...
...
@@ -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.1
3
* .. versionadded:: 1.1
6
*/
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.1
3
* .. versionadded:: 1.1
6
*/
API
(
API_MAX86150_DISABLE
,
int
epic_max86150_disable_sensor
());
...
...
pycardium/modules/py/leds.py
View file @
7422956c
...
...
@@ -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
)
...
...
pycardium/modules/py/max86150.py
View file @
7422956c
...
...
@@ -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
MAX
86150
import
max
86150
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
=
[]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment