Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
dd01e5a
Updated board names
jhansson-ard Feb 20, 2023
0428ad8
Merge pull request #523 from jhansson-ard/patch-1
facchinm Feb 24, 2023
daf2713
Correct misspelled word in comment
per1234 Mar 18, 2023
eabd762
Merge pull request #529 from per1234/fix-typo
per1234 Mar 18, 2023
edb06d4
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
6309212
Merge pull request #540 from arduino/dependabot/github_actions/action…
per1234 Sep 4, 2023
bd473a8
Fix spell check false positives by ignoring words
per1234 May 25, 2024
321fca0
Merge pull request #562 from per1234/spellcheck-false-positives
per1234 May 25, 2024
106b2c6
Bump actions/upload-artifact from 3 to 4
dependabot[bot] Oct 9, 2024
6e6036e
Bump arduino/arduino-lint-action from 1 to 2
dependabot[bot] Oct 9, 2024
ee452c9
Merge pull request #573 from arduino/dependabot/github_actions/arduin…
per1234 Oct 10, 2024
8e9f848
Don't upload multiple times to same artifact in sketch compilation wo…
per1234 Oct 18, 2024
c8c514c
Merge pull request #548 from arduino/dependabot/github_actions/action…
per1234 Oct 18, 2024
70ae142
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
855ea01
Merge pull request #599 from arduino/dependabot/github_actions/action…
per1234 Aug 13, 2025
71fcee2
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Oct 27, 2025
87faf93
Merge pull request #607 from arduino/dependabot/github_actions/action…
per1234 Oct 27, 2025
1a6a417
check boundaries converting float/double to String
pennam Oct 29, 2025
85d690c
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 20, 2025
6d00783
Merge pull request #611 from arduino/dependabot/github_actions/action…
per1234 Nov 20, 2025
db1b6a0
use FLT_MAX_10_EXP and DBL_MAX_10_EXP instead of hardcoded values
pennam Nov 28, 2025
7692600
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 15, 2025
7c38f34
Merge pull request #614 from arduino/dependabot/github_actions/action…
per1234 Dec 15, 2025
3a957ab
fix FLOAT / DOUBLE String buffer size
pennam Jan 13, 2026
b80585c
use DECIMAL_DIG instead of hardcoded values
pennam Jan 13, 2026
82a8ad2
Merge pull request #613 from pennam/string-fix
facchinm Jan 15, 2026
d5d1355
Publish core 1.8.7
pennam Jan 21, 2026
b60b4c8
Merge remote-tracking branch 'upstream/master' into upstream-1.8.7
dmadison Feb 2, 2026
41c2f4d
Update version to 1.0.6
dmadison Feb 2, 2026
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
16 changes: 14 additions & 2 deletions cores/arduino/WString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
*/

#include "WString.h"
#include <float.h>

/*********************************************/
/* Static Member Initialisation */
/*********************************************/

size_t const String::FLT_MAX_DECIMAL_PLACES = DECIMAL_DIG;
size_t const String::DBL_MAX_DECIMAL_PLACES = DECIMAL_DIG;

/*********************************************/
/* Constructors */
Expand Down Expand Up @@ -107,15 +115,19 @@ String::String(unsigned long value, unsigned char base)

String::String(float value, unsigned char decimalPlaces)
{
static size_t const FLOAT_BUF_SIZE = (FLT_MAX_10_EXP + 1) + FLT_MAX_DECIMAL_PLACES + 1 /* '-' */ + 1 /* '.' */ + 1 /* '\0' */;
init();
char buf[33];
char buf[FLOAT_BUF_SIZE];
decimalPlaces = decimalPlaces < FLT_MAX_DECIMAL_PLACES ? decimalPlaces : FLT_MAX_DECIMAL_PLACES;
*this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf);
}

String::String(double value, unsigned char decimalPlaces)
{
static size_t const DOUBLE_BUF_SIZE = (DBL_MAX_10_EXP + 1) + DBL_MAX_DECIMAL_PLACES + 1 /* '-' */ + 1 /* '.' */ + 1 /* '\0' */;
init();
char buf[33];
char buf[DOUBLE_BUF_SIZE];
decimalPlaces = decimalPlaces < DBL_MAX_DECIMAL_PLACES ? decimalPlaces : DBL_MAX_DECIMAL_PLACES;
*this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf);
}

Expand Down
3 changes: 3 additions & 0 deletions cores/arduino/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class String
typedef void (String::*StringIfHelperType)() const;
void StringIfHelper() const {}

static size_t const FLT_MAX_DECIMAL_PLACES;
static size_t const DBL_MAX_DECIMAL_PLACES;

public:
// constructors
// creates a copy of the initial value.
Expand Down
2 changes: 1 addition & 1 deletion libraries/Wire/examples/i2c_scanner/i2c_scanner.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not known.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Version 2, June 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
// V3 by louarnold
Expand Down
2 changes: 1 addition & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# https://arduino.github.io/arduino-cli/latest/platform-specification/

name=XInput AVR Boards
version=1.0.5
version=1.0.6

# AVR compile variables
# ---------------------
Expand Down