EnviroDIY / Arduino-SDI-12

An Arduino library for SDI-12 communication with a wide variety of environmental sensors. This library provides a general software solution, without requiring any additional hardware.
https://github.com/EnviroDIY/Arduino-SDI-12/wiki
BSD 3-Clause "New" or "Revised" License
159 stars 100 forks source link

Fix string usage and add other string types #24

Closed majenkotech closed 7 years ago

majenkotech commented 7 years ago

sendCommand and sendResponse now pass the command/response argument as a String reference instead of cloning the String object to help reduce heap fragmentation by incorrect use of the abominable String class.

The functions have also been overloaded with parameter types of const char * and FlashString (the latter being a typedef of __FlashStringHelper * for convenience) to allow the use of the library by people who don't want their heap fragmenting by the forced use of the abominable String class.

SRGDamia1 commented 7 years ago

This looks good! Thanks!