Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
firmware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
François Revol
firmware
Commits
7422956c
Commit
7422956c
authored
Sep 19, 2020
by
Rahix
Browse files
Options
Browse Files
Download
Plain Diff
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
Showing
7 changed files
with
51 additions
and
10 deletions
+51
-10
CHANGELOG.md
CHANGELOG.md
+23
-0
Documentation/conf.py
Documentation/conf.py
+2
-0
Documentation/index.rst
Documentation/index.rst
+1
-0
Documentation/pycardium/max86150.rst
Documentation/pycardium/max86150.rst
+5
-0
epicardium/epicardium.h
epicardium/epicardium.h
+2
-2
pycardium/modules/py/leds.py
pycardium/modules/py/leds.py
+1
-1
pycardium/modules/py/max86150.py
pycardium/modules/py/max86150.py
+17
-7
No files found.
CHANGELOG.md
View file @
7422956c
...
@@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
...
@@ -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/
)
.
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
.
## [Unreleased]
## [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]
## [v1.15] - 2020-02-02 - [Okra]
...
...
Documentation/conf.py
View file @
7422956c
...
@@ -114,8 +114,10 @@ autodoc_mock_imports = [
...
@@ -114,8 +114,10 @@ autodoc_mock_imports = [
"sys_display"
,
"sys_display"
,
"sys_leds"
,
"sys_leds"
,
"sys_max30001"
,
"sys_max30001"
,
"sys_max86150"
,
"sys_config"
,
"sys_config"
,
"ucollections"
,
"ucollections"
,
"uerrno"
,
"urandom"
,
"urandom"
,
"utime"
,
"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
...
@@ -25,6 +25,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/bhi160
pycardium/bhi160
pycardium/bme680
pycardium/bme680
pycardium/max30001
pycardium/max30001
pycardium/max86150
pycardium/buttons
pycardium/buttons
pycardium/color
pycardium/color
pycardium/config
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 {
...
@@ -970,7 +970,7 @@ struct max86150_sensor_data {
* - ``-EINVAL``: config->ppg_sample_rate is not one of 10, 20, 50, 84, 100, 200
* - ``-EINVAL``: config->ppg_sample_rate is not one of 10, 20, 50, 84, 100, 200
* or config_size is not size of config.
* 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
));
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_
...
@@ -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.
* :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
());
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):
...
@@ -104,7 +104,7 @@ def flash_rocket(led, value, millis):
:param int value: brightness value (0 < value < 32)
:param int value: brightness value (0 < value < 32)
:param int millis: duration of the rocket being on in milliseconds.
:param int millis: duration of the rocket being on in milliseconds.
.. versionadded:: 1.
??
.. versionadded:: 1.
16
"""
"""
return
sys_leds
.
flash_rocket
(
led
,
value
,
millis
)
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"
...
@@ -8,22 +8,30 @@ Max86150Data = ucollections.namedtuple("Max86150Data", ["red", "infrared", "ecg"
class
MAX86150
:
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
.. code-block:: python
import
MAX
86150
import
max
86150
m = max86150.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()
m.close()
.. versionadded:: 1.16
"""
"""
def
__init__
(
self
,
callback
=
None
,
sample_buffer_len
=
128
,
sample_rate
=
200
):
def
__init__
(
self
,
callback
=
None
,
sample_buffer_len
=
128
,
sample_rate
=
200
):
"""
"""
Initializes the MAX86150 (if it is not already running).
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
.
active
=
False
self
.
stream_id
=
-
uerrno
.
ENODEV
self
.
stream_id
=
-
uerrno
.
ENODEV
...
@@ -35,7 +43,9 @@ class MAX86150:
...
@@ -35,7 +43,9 @@ class MAX86150:
def
enable_sensor
(
self
):
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
.
disable_callback
(
self
.
interrupt_id
)
interrupt
.
set_callback
(
self
.
interrupt_id
,
self
.
_interrupt
)
interrupt
.
set_callback
(
self
.
interrupt_id
,
self
.
_interrupt
)
...
@@ -68,7 +78,7 @@ class MAX86150:
...
@@ -68,7 +78,7 @@ class MAX86150:
def
read
(
self
):
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"
assert
self
.
active
,
"Sensor is inactive"
result
=
[]
result
=
[]
...
...
Write
Preview
Markdown
is supported
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