Code clean-up

This commit is contained in:
fvanroie 2020-05-02 00:22:29 +02:00
parent d26c0c0200
commit bf4c8e975a
2 changed files with 5 additions and 5 deletions

View File

@ -232,8 +232,8 @@ static void debugPrintTimestamp(int level, Print * _logOutput)
_logOutput->printf(PSTR("%03lu]"), millis() % 1000);
} else */
{
//_logOutput->printf(PSTR("[%20.3f]"), (float)millis() / 1000);
_logOutput->printf(PSTR("[%20d]"), millis() );
uint32_t msecs = millis();
_logOutput->printf(PSTR("[%16d.%03d]"), msecs/1000, msecs%1000 );
}
}
@ -333,7 +333,7 @@ void debugPreSetup(JsonObject settings)
if(baudrate == 0) baudrate = SERIAL_SPEED;
if(baudrate >= 9600u) { /* the baudrates are stored divided by 10 */
#ifdef STM32_CORE_VERSION_MAJOR
#if defined(STM32F4xx)
#ifndef STM32_SERIAL1 // Define what Serial port to use for log output
Serial.setRx(PA3); // User Serial2
Serial.setTx(PA2);

View File

@ -52,7 +52,7 @@ void dispatchOutput(int output, bool state)
#if defined(ARDUINO_ARCH_ESP32)
ledcWrite(99, state ? 1023 : 0); // ledChannel and value
#elif defined(STM32_CORE_VERSION)
#elif defined(STM32F4xx)
digitalWrite(HASP_OUTPUT_PIN, state);
#else
analogWrite(pin, state ? 1023 : 0);
@ -98,7 +98,7 @@ void dispatchAttribute(String strTopic, const char * payload)
{
if(strTopic.startsWith("p[")) {
dispatchButtonAttribute(strTopic, payload);
} else if(strTopic == F("page")) {
dispatchPage(payload);