Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/en/api/preferences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ Preferences directly supports the following data types:
+-------------------+-------------------+---------------+
| ULong | uint32_t | 4 |
+-------------------+-------------------+---------------+
| Float | float_t | 4 |
+-------------------+-------------------+---------------+
| Long64 | int64_t | 8 |
+-------------------+-------------------+---------------+
| ULong64 | uint64_t | 8 |
+-------------------+-------------------+---------------+
| Float | float_t | 8 |
+-------------------+-------------------+---------------+
| Double | double_t | 8 |
+-------------------+-------------------+---------------+
| | const char* | variable |
Expand Down Expand Up @@ -258,6 +258,8 @@ Arduino-esp32 Preferences API
``putInt, putUInt``
********************
``putLong, putULong``
**********************
``putFloat``
**********************

Store a value against a given key in the currently open namespace.
Expand All @@ -268,6 +270,7 @@ Arduino-esp32 Preferences API
size_t putUInt(const char* key, uint32_t value)
size_t putLong(const char* key, int32_t value)
size_t putULong(const char* key, uint32_t value)
size_t putFloat(const char* key, float_t value)

..

Expand All @@ -288,16 +291,15 @@ Arduino-esp32 Preferences API

``putLong64, putULong64``
*************************
``putFloat, putDouble``
***********************
``putDouble``
*************************

Store a value against a given key in the currently open namespace.

.. code-block:: arduino

size_t putLong64(const char* key, int64_t value)
size_t putULong64(const char* key, uint64_t value)
size_t putFloat(const char* key, float_t value)
size_t putDouble(const char* key, double_t value)

..
Expand Down
12 changes: 6 additions & 6 deletions docs/en/tutorials/preferences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ Preferences directly supports the following data types:
+-------------------+-------------------+---------------+
| ULong | uint32_t | 4 |
+-------------------+-------------------+---------------+
| Float | float_t | 4 |
+-------------------+-------------------+---------------+
| Long64 | int64_t | 8 |
+-------------------+-------------------+---------------+
| ULong64 | uint64_t | 8 |
+-------------------+-------------------+---------------+
| Float | float_t | 8 |
+-------------------+-------------------+---------------+
| Double | double_t | 8 |
+-------------------+-------------------+---------------+
| | const char* | |
| String +-------------------+ variable |
| | const char* | variable |
| String +-------------------+ |
| | String | |
+-------------------+-------------------+---------------+
| Bytes | uint8_t | variable |
Expand Down Expand Up @@ -233,9 +233,9 @@ Like so:

.. code-block:: arduino

float myFloat = myPreferences.getFloat("pi");
float_t myFloat = myPreferences.getFloat("pi");

This will retrieve the float value from the namespace key ``"pi"`` and assign it to the float type variable ``myFloat``.
This will retrieve the float_t value from the namespace key ``"pi"`` and assign it to the float_t type variable ``myFloat``.


Summary
Expand Down