replace the TRACE runtime condition by a buildtime one so as to decrease program size

This commit is contained in:
1technophile authored and Florian committed 2018-09-22 12:55:14 +02:00
1 parent f594612dde
commit 0a4255f58c
2 files changed
+15 -15

No files matched your search

+14 -14
View File
@@ -887,43 +887,43 @@ bool to_bool(String const& s) { // thanks Chris Jester-Young from stackoverflow
//trace
void trc(String msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
void trc(int msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
void trc(unsigned int msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
void trc(long msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
void trc(unsigned long msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
void trc(double msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
void trc(float msg){
if (TRACE) {
#ifdef TRACE
Serial.println(msg);
}
#endif
}
+1 -1
View File
@@ -130,4 +130,4 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
#define subjectSYStoMQTT Base_Topic Gateway_Name "/SYStoMQTT"
/*-------------------ACTIVATE TRACES----------------------*/
#define TRACE 1 // 0= trace off 1 = trace on
#define TRACE 1 // commented = trace off, uncommented = trace on