File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,23 @@ class flxSerial_ : public flxWriter
53
53
{
54
54
55
55
// If this is a header, we add a stream indicator to the output
56
- // tart the stream with a Mime Type marker, followed by CR
56
+ // start the stream with a Mime Type marker, followed by CR
57
57
if (type == flxLineTypeMime){
58
58
Serial.println ();
59
59
Serial.println (value);
60
60
Serial.println ();
61
+
62
+ // next we'll want to do a header
63
+ _headerWritten = false ;
64
+ }
65
+ else if (type == flxLineTypeHeader)
66
+ {
67
+ // only want to write this out once
68
+ if (_headerWritten == false )
69
+ {
70
+ Serial.println (value);
71
+ _headerWritten = true ;
72
+ }
61
73
}
62
74
else
63
75
{
@@ -93,7 +105,8 @@ class flxSerial_ : public flxWriter
93
105
void operator =(flxSerial_ const &) = delete ;
94
106
95
107
private:
96
- flxSerial_ (){};
108
+ flxSerial_ () : _headerWritten{false }{};
109
+ bool _headerWritten;
97
110
};
98
111
99
112
typedef flxSerial_ *flxSerial;
You can’t perform that action at this time.
0 commit comments