added function to set color

This commit is contained in:
Robin Müller 2021-06-11 14:52:09 +02:00
parent 4b095eea89
commit 1630682548
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
4 changed files with 11 additions and 0 deletions

View File

@ -171,6 +171,10 @@ bool ServiceInterfaceBuffer::crAdditionEnabled() const {
return addCrToPreamble; return addCrToPreamble;
} }
void ServiceInterfaceBuffer::setAsciiColorPrefix(std::string colorPrefix) {
this->colorPrefix = colorPrefix;
}
#ifdef UT699 #ifdef UT699
#include "../osal/rtems/Interrupt.h" #include "../osal/rtems/Interrupt.h"

View File

@ -48,6 +48,7 @@ private:
#if FSFW_COLORED_OUTPUT == 1 #if FSFW_COLORED_OUTPUT == 1
std::string colorPrefix; std::string colorPrefix;
void setAsciiColorPrefix(std::string colorPrefix);
#endif #endif
// For EOF detection // For EOF detection

View File

@ -19,5 +19,9 @@ bool ServiceInterfaceStream::crAdditionEnabled() const {
return streambuf.crAdditionEnabled(); return streambuf.crAdditionEnabled();
} }
bool ServiceInterfaceStream::setAsciiColorPrefix(std::string asciiColorCode) {
streambuf.setAsciiColorPrefix(asciiColorCode);
}
#endif #endif

View File

@ -46,6 +46,8 @@ public:
*/ */
bool crAdditionEnabled() const; bool crAdditionEnabled() const;
bool setAsciiColorPrefix(std::string asciiColorCode);
protected: protected:
ServiceInterfaceBuffer streambuf; ServiceInterfaceBuffer streambuf;
}; };