diff --git a/docs/en/api/preferences.rst b/docs/en/api/preferences.rst index ca443a9475d..2ff6f178347 100644 --- a/docs/en/api/preferences.rst +++ b/docs/en/api/preferences.rst @@ -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 | @@ -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. @@ -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) .. @@ -288,8 +291,8 @@ Arduino-esp32 Preferences API ``putLong64, putULong64`` ************************* -``putFloat, putDouble`` -*********************** +``putDouble`` +************************* Store a value against a given key in the currently open namespace. @@ -297,7 +300,6 @@ Arduino-esp32 Preferences API 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) .. diff --git a/docs/en/tutorials/preferences.rst b/docs/en/tutorials/preferences.rst index dd27913c38f..2239f4b8437 100644 --- a/docs/en/tutorials/preferences.rst +++ b/docs/en/tutorials/preferences.rst @@ -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 | @@ -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