Bugfix, change debug uart not possible (#33)

* bugfix, print not allowed in constructor

* Update tpuart_data_link_layer.cpp

- start confirm timout only after last byte was sent
- increase BYTE_TIMEOUT

* -bugfix, change debug Uart not possible

* Update esp32_platform.cpp

* Update esp_platform.cpp

* Update knx-bme680.ino

* Update knx-demo.ino

* Update knx-hdc1008.ino

* Update knx-sonoffS20.ino
This commit is contained in:
Bernator 2019-09-09 20:10:56 +02:00 committed by thelsing
parent 7cdc104b29
commit afd07d10cb
9 changed files with 36 additions and 36 deletions

View File

@ -43,7 +43,7 @@ bool trigger = false;
void setup(void)
{
Serial.begin(115200);
ArduinoPlatform::SerialDebug = Serial;
ArduinoPlatform::SerialDebug = &Serial;
delay(5000);
Serial.println("start");

View File

@ -55,7 +55,7 @@ void resetCallback(GroupObject& go)
void setup()
{
Serial.begin(115200);
ArduinoPlatform::SerialDebug = Serial;
ArduinoPlatform::SerialDebug = &Serial;
randomSeed(millis());

View File

@ -22,7 +22,7 @@ uint32_t cyclSend = 0;
void setup(void)
{
Serial.begin(115200);
ArduinoPlatform::SerialDebug = Serial;
ArduinoPlatform::SerialDebug = &Serial;
delay(5000);
Serial.println("start");

View File

@ -25,7 +25,7 @@ void switchCallback(GroupObject& go)
void setup()
{
Serial.begin(115200);
ArduinoPlatform::SerialDebug = Serial;
ArduinoPlatform::SerialDebug = &Serial;
#ifdef ARDUINO_ARCH_ESP8266
WiFiManager wifiManager;

View File

@ -3,7 +3,7 @@
#include <Arduino.h>
Stream& ArduinoPlatform::SerialDebug = Serial;
Stream* ArduinoPlatform::SerialDebug = &Serial;
ArduinoPlatform::ArduinoPlatform(HardwareSerial* knxSerial) : _knxSerial(knxSerial)
{
@ -139,134 +139,134 @@ size_t ArduinoPlatform::readBytesUart(uint8_t *buffer, size_t length)
void print(const char* s)
{
ArduinoPlatform::SerialDebug.print(s);
ArduinoPlatform::SerialDebug->print(s);
}
void print(char c)
{
ArduinoPlatform::SerialDebug.print(c);
ArduinoPlatform::SerialDebug->print(c);
}
void print(unsigned char num)
{
ArduinoPlatform::SerialDebug.print(num);
ArduinoPlatform::SerialDebug->print(num);
}
void print(unsigned char num, int base)
{
ArduinoPlatform::SerialDebug.print(num, base);
ArduinoPlatform::SerialDebug->print(num, base);
}
void print(int num)
{
ArduinoPlatform::SerialDebug.print(num);
ArduinoPlatform::SerialDebug->print(num);
}
void print(int num, int base)
{
ArduinoPlatform::SerialDebug.print(num, base);
ArduinoPlatform::SerialDebug->print(num, base);
}
void print(unsigned int num)
{
ArduinoPlatform::SerialDebug.print(num);
ArduinoPlatform::SerialDebug->print(num);
}
void print(unsigned int num, int base)
{
ArduinoPlatform::SerialDebug.print(num, base);
ArduinoPlatform::SerialDebug->print(num, base);
}
void print(long num)
{
ArduinoPlatform::SerialDebug.print(num);
ArduinoPlatform::SerialDebug->print(num);
}
void print(long num, int base)
{
ArduinoPlatform::SerialDebug.print(num, base);
ArduinoPlatform::SerialDebug->print(num, base);
}
void print(unsigned long num)
{
ArduinoPlatform::SerialDebug.print(num);
ArduinoPlatform::SerialDebug->print(num);
}
void print(unsigned long num, int base)
{
ArduinoPlatform::SerialDebug.print(num, base);
ArduinoPlatform::SerialDebug->print(num, base);
}
void print(double num)
{
ArduinoPlatform::SerialDebug.print(num);
ArduinoPlatform::SerialDebug->print(num);
}
void println(const char* s)
{
ArduinoPlatform::SerialDebug.println(s);
ArduinoPlatform::SerialDebug->println(s);
}
void println(char c)
{
ArduinoPlatform::SerialDebug.println(c);
ArduinoPlatform::SerialDebug->println(c);
}
void println(unsigned char num)
{
ArduinoPlatform::SerialDebug.println(num);
ArduinoPlatform::SerialDebug->println(num);
}
void println(unsigned char num, int base)
{
ArduinoPlatform::SerialDebug.println(num, base);
ArduinoPlatform::SerialDebug->println(num, base);
}
void println(int num)
{
ArduinoPlatform::SerialDebug.println(num);
ArduinoPlatform::SerialDebug->println(num);
}
void println(int num, int base)
{
ArduinoPlatform::SerialDebug.println(num, base);
ArduinoPlatform::SerialDebug->println(num, base);
}
void println(unsigned int num)
{
ArduinoPlatform::SerialDebug.println(num);
ArduinoPlatform::SerialDebug->println(num);
}
void println(unsigned int num, int base)
{
ArduinoPlatform::SerialDebug.println(num, base);
ArduinoPlatform::SerialDebug->println(num, base);
}
void println(long num)
{
ArduinoPlatform::SerialDebug.println(num);
ArduinoPlatform::SerialDebug->println(num);
}
void println(long num, int base)
{
ArduinoPlatform::SerialDebug.println(num, base);
ArduinoPlatform::SerialDebug->println(num, base);
}
void println(unsigned long num)
{
ArduinoPlatform::SerialDebug.println(num);
ArduinoPlatform::SerialDebug->println(num);
}
void println(unsigned long num, int base)
{
ArduinoPlatform::SerialDebug.println(num, base);
ArduinoPlatform::SerialDebug->println(num, base);
}
void println(double num)
{
ArduinoPlatform::SerialDebug.println(num);
ArduinoPlatform::SerialDebug->println(num);
}
void println(void)
{
ArduinoPlatform::SerialDebug.println();
ArduinoPlatform::SerialDebug->println();
}

View File

@ -35,7 +35,7 @@ class ArduinoPlatform : public Platform
virtual int readUart();
virtual size_t readBytesUart(uint8_t* buffer, size_t length);
static Stream& SerialDebug;
static Stream* SerialDebug;
protected:
uint32_t _mulitcastAddr;

View File

@ -36,7 +36,7 @@ void Esp32Platform::macAddress(uint8_t * addr)
void Esp32Platform::restart()
{
ArduinoPlatform::SerialDebug.println("restart");
println("restart");
ESP.restart();
}

View File

@ -37,7 +37,7 @@ void EspPlatform::macAddress(uint8_t * addr)
void EspPlatform::restart()
{
ArduinoPlatform::SerialDebug.println("restart");
println("restart");
ESP.reset();
}

View File

@ -16,7 +16,7 @@ SamdPlatform::SamdPlatform( HardwareSerial* s) : ArduinoPlatform(s)
void SamdPlatform::restart()
{
ArduinoPlatform::SerialDebug.println("restart");
println("restart");
NVIC_SystemReset();
}