mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 20:56:37 +00:00
Code clean-up
This commit is contained in:
parent
d26c0c0200
commit
bf4c8e975a
@ -232,8 +232,8 @@ static void debugPrintTimestamp(int level, Print * _logOutput)
|
|||||||
_logOutput->printf(PSTR("%03lu]"), millis() % 1000);
|
_logOutput->printf(PSTR("%03lu]"), millis() % 1000);
|
||||||
} else */
|
} else */
|
||||||
{
|
{
|
||||||
//_logOutput->printf(PSTR("[%20.3f]"), (float)millis() / 1000);
|
uint32_t msecs = millis();
|
||||||
_logOutput->printf(PSTR("[%20d]"), 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 == 0) baudrate = SERIAL_SPEED;
|
||||||
if(baudrate >= 9600u) { /* the baudrates are stored divided by 10 */
|
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
|
#ifndef STM32_SERIAL1 // Define what Serial port to use for log output
|
||||||
Serial.setRx(PA3); // User Serial2
|
Serial.setRx(PA3); // User Serial2
|
||||||
Serial.setTx(PA2);
|
Serial.setTx(PA2);
|
||||||
|
@ -52,7 +52,7 @@ void dispatchOutput(int output, bool state)
|
|||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
ledcWrite(99, state ? 1023 : 0); // ledChannel and value
|
ledcWrite(99, state ? 1023 : 0); // ledChannel and value
|
||||||
#elif defined(STM32_CORE_VERSION)
|
#elif defined(STM32F4xx)
|
||||||
digitalWrite(HASP_OUTPUT_PIN, state);
|
digitalWrite(HASP_OUTPUT_PIN, state);
|
||||||
#else
|
#else
|
||||||
analogWrite(pin, state ? 1023 : 0);
|
analogWrite(pin, state ? 1023 : 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user