mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
ESP32 compiler option
This commit is contained in:
parent
a627df0ad1
commit
0d8b3c9d1a
@ -175,10 +175,15 @@ void ShutterRtc50mS(void)
|
|||||||
if (Shutter[i].accelerator) {
|
if (Shutter[i].accelerator) {
|
||||||
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Accelerator i=%d -> %d"),i, Shutter[i].accelerator);
|
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Accelerator i=%d -> %d"),i, Shutter[i].accelerator);
|
||||||
ShutterUpdateVelocity(i);
|
ShutterUpdateVelocity(i);
|
||||||
digitalWrite(Pin(GPIO_PWM1, i), LOW);
|
#ifdef ESP8266
|
||||||
// Convert frequency into clock cycles
|
// Convert frequency into clock cycles
|
||||||
uint32_t cc = microsecondsToClockCycles(1000000UL) / Shutter[i].pwm_velocity;
|
uint32_t cc = microsecondsToClockCycles(1000000UL) / Shutter[i].pwm_velocity;
|
||||||
startWaveformClockCycles(Pin(GPIO_PWM1, i), cc/2, cc/2, 0, -1, 0, false);
|
startWaveformClockCycles(Pin(GPIO_PWM1, i), cc/2, cc/2, 0, -1, 0, false);
|
||||||
|
#endif // ESP8266
|
||||||
|
#ifdef ESP32
|
||||||
|
analogWriteFreq(Shutter[i].pwm_velocity)
|
||||||
|
analogWrite(Pin(GPIO_PWM1, i), 50);
|
||||||
|
#endif // ESP32
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user