Fix DALI ESP32-S3 timing

- Fix ESP8266 DALI exception due to LittleFs issue
This commit is contained in:
Theo Arends 2025-12-02 14:01:33 +01:00
parent f216590a78
commit 43f4fadf28
3 changed files with 7 additions and 3 deletions

View File

@ -92,7 +92,7 @@ void TasmotaDali::write(DaliFrame frame) {
if (frame.meta & TM_DALI_SEND_TWICE) {
SendData(frame); // Takes 14.7 ms
}
delay(2); // Block response
delay(1); // Block response
EnableRxInterrupt();
}

View File

@ -677,9 +677,9 @@ void Energy200ms(void) {
Energy->Settings.energy_export_kWh[i] = RtcEnergySettings.energy_export_kWh[i];
Energy->period_kWh[i] -= RtcEnergySettings.energy_today_kWh[i]; // this becomes a large unsigned, effectively a negative for EnergyShow calculation
Energy->kWhtoday[i] = 0;
Energy->kWhtoday[i] = Energy->kWhtoday[i] % 100; // Roll fractional watt-hours into the next day since kWhtotal truncates to watt-hours.
Energy->energy_today_offset_kWh[i] = 0;
RtcEnergySettings.energy_today_kWh[i] = 0;
RtcEnergySettings.energy_today_kWh[i] = Energy->kWhtoday[i];
Energy->Settings.energy_today_kWh[i] = 0;
Energy->start_energy[i] = 0;

View File

@ -761,6 +761,10 @@ void DaliLoop(void) {
}
Dali->light_sync = true; // Block local loop
if (any_color) {
if (Settings->save_data) {
// Postpone save_data during fast color changes which results in exception 0 on ESP8266
TasmotaGlobal.save_data_counter = 4;
}
char scmnd[20];
snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_COLOR " %s"), scolors);
ExecuteCommand(scmnd, SRC_SWITCH);