aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cores/arduino/Print.cpp2
-rw-r--r--cores/arduino/Stream.h3
-rw-r--r--cores/arduino/WString.cpp2
-rw-r--r--libraries/SoftwareSerial/src/SoftwareSerial.h3
4 files changed, 7 insertions, 3 deletions
diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp
index 5a092af..652fed0 100644
--- a/cores/arduino/Print.cpp
+++ b/cores/arduino/Print.cpp
@@ -257,7 +257,7 @@ size_t Print::printFloat(double number, uint8_t digits)
while (digits-- > 0)
{
remainder *= 10.0;
- int toPrint = int(remainder);
+ unsigned int toPrint = (unsigned int)(remainder);
n += print(toPrint);
remainder -= toPrint;
}
diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h
index db71bb6..e4fd433 100644
--- a/cores/arduino/Stream.h
+++ b/cores/arduino/Stream.h
@@ -66,7 +66,8 @@ class Stream : public Print
// parsing methods
void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
-
+ unsigned long getTimeout(void) { return _timeout; }
+
bool find(char *target); // reads data from the stream until the target string is found
bool find(uint8_t *target) { return find ((char *)target); }
// returns true if target string is found, false if timed out (see setTimeout)
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp
index cd3e0e8..9975303 100644
--- a/cores/arduino/WString.cpp
+++ b/cores/arduino/WString.cpp
@@ -193,7 +193,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
void String::move(String &rhs)
{
if (buffer) {
- if (capacity >= rhs.len) {
+ if (rhs && capacity >= rhs.len) {
strcpy(buffer, rhs.buffer);
len = rhs.len;
rhs.len = 0;
diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.h b/libraries/SoftwareSerial/src/SoftwareSerial.h
index 26183ba..b1a37c4 100644
--- a/libraries/SoftwareSerial/src/SoftwareSerial.h
+++ b/libraries/SoftwareSerial/src/SoftwareSerial.h
@@ -39,7 +39,10 @@ http://arduiniana.org.
* Definitions
******************************************************************************/
+#ifndef _SS_MAX_RX_BUFF
#define _SS_MAX_RX_BUFF 64 // RX buffer size
+#endif
+
#ifndef GCC_VERSION
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif