mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
Alter Stream to Print
In prep for Wifi siolution, all output functions changed to expect Print class instead of Stream... Can still pass Serial1 etc because Stream extends Print, but this allows for an output-only class extending Print to collect a response buffer for Wifi sending with AT commands.
This commit is contained in:
@@ -40,7 +40,7 @@ bool Turnout::remove(int n){
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Turnout::show(Stream & stream, int n){
|
||||
void Turnout::show(Print & stream, int n){
|
||||
for(Turnout *tt=firstTurnout;tt!=NULL;tt=tt->nextTurnout){
|
||||
if (tt->data.id==n) {
|
||||
StringFormatter::send(stream,F("<H %d %d>"), tt->data.id, tt->data.tStatus);
|
||||
@@ -49,7 +49,7 @@ void Turnout::show(Stream & stream, int n){
|
||||
}
|
||||
}
|
||||
|
||||
bool Turnout::showAll(Stream & stream){
|
||||
bool Turnout::showAll(Print & stream){
|
||||
bool gotOne=false;
|
||||
for(Turnout * tt=firstTurnout;tt!=NULL;tt=tt->nextTurnout){
|
||||
StringFormatter::send(stream,F("<H %d %d %d %d>"), tt->data.id, tt->data.address, tt->data.subAddress, tt->data.tStatus);
|
||||
|
Reference in New Issue
Block a user