Skip to content

Commit 5201e8d

Browse files
committed
SAMD21 uses USBSerial, which subclasses Stream, but not HardwareSerial
1 parent d23d1df commit 5201e8d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/communication/Commander.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "Commander.h"
22

33

4-
Commander::Commander(HardwareSerial& serial){
4+
Commander::Commander(Stream& serial){
55
com_port = &serial;
66
}
77
Commander::Commander(){
@@ -430,4 +430,4 @@ void Commander::printVerbose(const __FlashStringHelper *message){
430430
}
431431
void Commander::printError(){
432432
print(F("err"));
433-
}
433+
}

src/communication/Commander.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Commander
3939
*
4040
* @param serial - Serial com port instance
4141
*/
42-
Commander(HardwareSerial &serial);
42+
Commander(Stream &serial);
4343
Commander();
4444

4545
/**
@@ -90,7 +90,7 @@ class Commander
9090
uint8_t decimal_places = 3; //!< number of decimal places to be used when displaying numbers
9191

9292
// monitoring functions
93-
HardwareSerial* com_port = nullptr; //!< Serial terminal variable if provided
93+
Stream* com_port = nullptr; //!< Serial terminal variable if provided
9494

9595
/**
9696
*

0 commit comments

Comments
 (0)