1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00
CommandStation-EX/StringFormatter.h
Asbelos e0c76a9dc4 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.
2020-06-12 14:28:35 +01:00

16 lines
424 B
C++

#ifndef StringFormatter_h
#define StringFormatter_h
#include <Arduino.h>
class StringFormatter
{
public:
static int parse(const char * com, int result[], byte maxResults);
static void print( const __FlashStringHelper* input...);
static void send(Print & serial, const __FlashStringHelper* input...);
private:
static void send(Print & serial, const __FlashStringHelper* input,va_list args);
};
#endif