Skip to content

Add support for float formatting on Arduino UNO Wifi Rev. 2 #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2019
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
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit IO Arduino
version=3.2.2
version=3.2.3
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library to access Adafruit IO.
Expand Down
6 changes: 3 additions & 3 deletions src/AdafruitIO_Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void AdafruitIO_Data::setValue(float value, double lat, double lon, double ele,
{
memset(_value, 0, AIO_DATA_LENGTH);

#if defined(ARDUINO_ARCH_AVR)
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
// Use avrlibc dtostre function on AVR platforms.
dtostre(value, _value, precision, 0);
#elif defined(ESP8266)
Expand All @@ -199,7 +199,7 @@ void AdafruitIO_Data::setValue(double value, double lat, double lon, double ele,
{
memset(_value, 0, AIO_DATA_LENGTH);

#if defined(ARDUINO_ARCH_AVR)
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
// Use avrlibc dtostre function on AVR platforms.
dtostre(value, _value, precision, 0);
#elif defined(ESP8266)
Expand Down Expand Up @@ -429,7 +429,7 @@ char* AdafruitIO_Data::charFromDouble(double d, int precision)
{
memset(_double_buffer, 0, sizeof(_double_buffer));

#if defined(ARDUINO_ARCH_AVR)
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
// Use avrlibc dtostre function on AVR platforms.
dtostre(d, _double_buffer, 10, 0);
#elif defined(ESP8266)
Expand Down