Verified Commit 71701572 authored by Rahix's avatar Rahix
Browse files

chore: Document new features in version 1.4

parent 878663f3
......@@ -28,6 +28,8 @@
Before being able to read data from the sensor, you have to call
:py:func:`bme680.init`.
.. versionadded:: 1.4
.. py:function:: get_data()
Perform a single measurement of environmental data.
......@@ -35,6 +37,10 @@
:return: Tuple containing ``temperature`` (°C), ``humidity`` (% r.h.),
``pressure`` (hPa) and ``gas resistance`` (Ohm).
.. versionadded:: 1.4
.. py:function:: deinit()
Deinitialize the sensor.
.. versionadded:: 1.4
``simple_menu`` - Draw a Menu
=============================
.. versionadded:: 1.4
To allow quickly hacking some scripts, Pycardium has a small library for
displaying menus. You can use it like this:
......
......@@ -32,7 +32,11 @@ alarm.
Sets the time to ``secs`` seconds since 2000-01-01 00:00 in the local
timezone.
.. versionchanged:: 1.4
:py:func:`utime.set_time` previously applied a wrong timezone offset,
thus leading to wrong results.
.. py:function:: set_unix_time(secs)
Sets the time to ``secs`` seconds since 1970-01-01 00:00 UTC.
......
......@@ -691,6 +691,8 @@ API(API_LEDS_CLEAR_ALL, void epic_leds_clear_all(uint8_t r, uint8_t g, uint8_t b
/**
* BME680
* ======
*
* .. versionadded:: 1.4
*/
/**
......@@ -710,6 +712,8 @@ struct bme680_sensor_data {
/**
* Initialize the BM680 sensor.
*
* .. versionadded:: 1.4
*
* :return: 0 on success or ``-Exxx`` on error. The following
* errors might occur:
*
......@@ -723,6 +727,8 @@ API(API_BME680_INIT, int epic_bme680_init());
/**
* De-Initialize the BM680 sensor.
*
* .. versionadded:: 1.4
*
* :return: 0 on success or ``-Exxx`` on error. The following
* errors might occur:
*
......@@ -736,6 +742,8 @@ API(API_BME680_DEINIT, int epic_bme680_deinit());
/**
* Get the current BME680 data.
*
* .. versionadded:: 1.4
*
* :param data: Where to store the environmental data.
* :return: 0 on success or ``-Exxx`` on error. The following
* errors might occur:
......@@ -876,6 +884,8 @@ API(API_STREAM_READ, int epic_stream_read(int sd, void *buf, size_t count));
* card10 has a BHI160 onboard which is used as an IMU. BHI160 exposes a few
* different sensors which can be accessed using Epicardium API.
*
* .. versionadded:: 1.4
*
* **Example**:
*
* .. code-block:: cpp
......@@ -1017,6 +1027,8 @@ struct bhi160_sensor_config {
*
* - ``-EBUSY``: The BHI160 driver is currently busy with other tasks and
* could not be acquired for enabling a sensor.
*
* .. versionadded:: 1.4
*/
API(API_BHI160_ENABLE, int epic_bhi160_enable_sensor(
enum bhi160_sensor_type sensor_type,
......@@ -1027,6 +1039,8 @@ API(API_BHI160_ENABLE, int epic_bhi160_enable_sensor(
* Disable a BHI160 sensor.
*
* :param bhi160_sensor_type sensor_type: Which sensor to disable.
*
* .. versionadded:: 1.4
*/
API(API_BHI160_DISABLE, int epic_bhi160_disable_sensor(
enum bhi160_sensor_type sensor_type
......@@ -1034,6 +1048,8 @@ API(API_BHI160_DISABLE, int epic_bhi160_disable_sensor(
/**
* Disable all BHI160 sensors.
*
* .. versionadded:: 1.4
*/
API(API_BHI160_DISABLE_ALL, void epic_bhi160_disable_all_sensors());
......
......@@ -24,6 +24,8 @@ def button_events():
elif ev == buttons.TOP_RIGHT:
# Select
pass
.. versionadded:: 1.4
"""
yield 0
v = buttons.read(buttons.BOTTOM_LEFT | buttons.BOTTOM_RIGHT | buttons.TOP_RIGHT)
......@@ -62,6 +64,8 @@ class Menu:
m.run()
Then, call :py:meth:`~simple_menu.Menu.run` to start the event loop.
.. versionadded:: 1.4
"""
color_1 = color.CHAOSBLUE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment