Skip to content
Snippets Groups Projects
Verified Commit 71701572 authored by rahix's avatar rahix
Browse files

chore: Document new features in version 1.4

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