Skip to content

Commit 8fa3c60

Browse files
committed
Make the virtual write consistent with hwWriteData
1 parent d2d822e commit 8fa3c60

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,18 +536,14 @@ size_t SARA_R5::write(const char *str)
536536

537537
size_t SARA_R5::write(const char *buffer, size_t size)
538538
{
539-
//size is unused at the moment but could be used if this function is ever updated to use write instead of print.
540-
size_t ignoreMe = size;
541-
ignoreMe -= 0; // Avoid the pesky compiler warning.
542-
543539
if (_hardSerial != NULL)
544540
{
545-
return _hardSerial->print(buffer);
541+
return _hardSerial->write((const uint8_t *)buffer, (int)size);
546542
}
547543
#ifdef SARA_R5_SOFTWARE_SERIAL_ENABLED
548544
else if (_softSerial != NULL)
549545
{
550-
return _softSerial->print(buffer);
546+
return _softSerial->write((const uint8_t *)buffer, (int)size);
551547
}
552548
#endif
553549
return (size_t)0;

0 commit comments

Comments
 (0)