From 4d851c1c5998ffeee63b697f9c5d655e5b5885c4 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Sat, 31 Aug 2013 15:20:15 +0200 Subject: Wrong boards.txt entry (sub-menu items) for Arduino Nano w/atmega328. Fixes #1558 --- boards.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards.txt b/boards.txt index 5c674e7..5857406 100644 --- a/boards.txt +++ b/boards.txt @@ -99,7 +99,7 @@ nano.menu.cpu.atmega328.bootloader.high_fuses=0xDA nano.menu.cpu.atmega328.bootloader.extended_fuses=0x05 nano.menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex -menu.cpu.nano.atmega328.build.mcu=atmega328p +nano.menu.cpu.atmega328.build.mcu=atmega328p ## Arduino Nano w/ ATmega168 ## ------------------------- -- cgit v1.2.3-18-g5258 From cbeaa543fc2ea23efc8a2d64baf2b852a755af23 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 3 Sep 2013 18:40:30 +0200 Subject: Fixed String class regression after f80c6c5f35cddcf4761a3c97feb8504425e9d27d This should make explicit String-from-integer constructor working again: int a = 10; String(a, 4); --- cores/arduino/WString.cpp | 4 ++-- cores/arduino/WString.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index e462bee..63af6d3 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -106,14 +106,14 @@ String::String(unsigned long value, unsigned char base) *this = buf; } -String::String(float value, int decimalPlaces) +String::String(float value, unsigned char decimalPlaces) { init(); char buf[33]; *this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf); } -String::String(double value, int decimalPlaces) +String::String(double value, unsigned char decimalPlaces) { init(); char buf[33]; diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h index f801f63..7402430 100644 --- a/cores/arduino/WString.h +++ b/cores/arduino/WString.h @@ -69,8 +69,8 @@ public: explicit String(unsigned int, unsigned char base=10); explicit String(long, unsigned char base=10); explicit String(unsigned long, unsigned char base=10); - explicit String(float, int decimalPlaces=2); - explicit String(double, int decimalPlaces=2); + explicit String(float, unsigned char decimalPlaces=2); + explicit String(double, unsigned char decimalPlaces=2); ~String(void); // memory management @@ -113,7 +113,7 @@ public: String & operator += (const String &rhs) {concat(rhs); return (*this);} String & operator += (const char *cstr) {concat(cstr); return (*this);} String & operator += (char c) {concat(c); return (*this);} - String & operator += (unsigned char num) {concat(num); return (*this);} + String & operator += (unsigned char num) {concat(num); return (*this);} String & operator += (int num) {concat(num); return (*this);} String & operator += (unsigned int num) {concat(num); return (*this);} String & operator += (long num) {concat(num); return (*this);} -- cgit v1.2.3-18-g5258