Fix global flash strings to compile to one instance instead of one per function
This commit is contained in:
parent
226d1ba6c9
commit
2999fbcbcc
@ -1 +1 @@
|
||||
Subproject commit 9245b49e4c981098ca966343f396f5064f762fb5
|
||||
Subproject commit 6edb2e5a21e0ce58ff2df936caee8b84e240a46b
|
@ -10,9 +10,9 @@
|
||||
|
||||
#include "controller.hpp"
|
||||
|
||||
#define ENDL F("\r\n")
|
||||
#define HELP_CMD F("help")
|
||||
#define SHOW_CMD F("show")
|
||||
GF(ENDL, "\r\n");
|
||||
GF(HELP_CMD, "help");
|
||||
GF(SHOW_CMD, "show");
|
||||
|
||||
template <class Uart>
|
||||
class Terminal {
|
||||
@ -35,7 +35,7 @@ class Terminal {
|
||||
|
||||
// Handle Ctrl + C
|
||||
if (inputByte == 0x03) {
|
||||
m_serial << F("^C");
|
||||
m_serial << F("^C") << ENDL;
|
||||
handleInput = true;
|
||||
break;
|
||||
}
|
||||
@ -105,12 +105,12 @@ class Terminal {
|
||||
char floatBuffer[16];
|
||||
|
||||
sprintf(floatBuffer, "%.2f", Controller::m_adcSample);
|
||||
m_serial << F("Read ADC: ") << floatBuffer << F("\r\n");
|
||||
m_serial << F("Read ADC ....: ") << floatBuffer << ENDL;
|
||||
sprintf(floatBuffer, "%.2f", Controller::m_resistance);
|
||||
m_serial << F("Resistance: ") << floatBuffer << F("\r\n");
|
||||
m_serial << F("Resistance ..: ") << floatBuffer << ENDL;
|
||||
sprintf(floatBuffer, "%.2f", Controller::m_temperature);
|
||||
m_serial << F("Temperature: ") << floatBuffer << F(" C \r\n");
|
||||
m_serial << F("Fan speed: ") << Controller::m_fanSpeed << F("%\r\n");
|
||||
m_serial << F("Temperature .: ") << floatBuffer << F(" C") << ENDL;
|
||||
m_serial << F("Fan speed ...: ") << Controller::m_fanSpeed << F("%") << ENDL;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user