Fixed Filters, split file in html, script and css

This commit is contained in:
Emanuele Trabattoni
2026-04-08 16:55:03 +02:00
parent 4dc45954e9
commit 12e1e8e7a4
10 changed files with 167 additions and 155 deletions

View File

@@ -157,7 +157,7 @@ void rtIgnitionTask(void *pvParameters)
auto current_time = esp_timer_get_time();
auto cycle_time = current_time - last_cycle_time;
last_cycle_time = current_time;
ign_box_sts.eng_rpm = (uint32_t)(60.0f / (cycle_time / 1000000.0f));
ign_box_sts.eng_rpm = (int32_t)(60.0f / (cycle_time / 1000000.0f));
}
case TRIG_FLAG_12N:
coils = &ign_box_sts.coils12;
@@ -177,7 +177,7 @@ void rtIgnitionTask(void *pvParameters)
// Timeout not occourred, expected POSITIVE edge spark OCCOURRED
if (spark_flag != SPARK_FLAG_TIMEOUT)
{
coils->spark_delay = (uint32_t)(coils->spark_time - coils->trig_time);
coils->spark_delay = (int32_t)(coils->spark_time - coils->trig_time);
coils->sstart_status = softStartStatus::NORMAL; // because spark on positive edge
coils->spark_status = sparkStatus::SPARK_POS_OK; // do not wait for spark on negative edge
}
@@ -197,7 +197,7 @@ void rtIgnitionTask(void *pvParameters)
// Timeout not occourred, expected NEGATIVE edge spark OCCOURRED
if (spark_flag != SPARK_FLAG_TIMEOUT && expected_negative)
{
coils->spark_delay = (uint32_t)(coils->spark_time - coils->trig_time);
coils->spark_delay = (int32_t)(coils->spark_time - coils->trig_time);
coils->sstart_status = softStartStatus::SOFT_START;
coils->spark_status = sparkStatus::SPARK_NEG_OK;
}
@@ -248,7 +248,7 @@ void rtIgnitionTask(void *pvParameters)
ign_box_sts.coils12.peak_n_out = adcReadChannel(adc, ADC_CH_PEAK_12N_OUT);
ign_box_sts.coils34.peak_p_out = adcReadChannel(adc, ADC_CH_PEAK_34P_OUT);
ign_box_sts.coils34.peak_n_out = adcReadChannel(adc, ADC_CH_PEAK_34N_OUT);
ign_box_sts.adc_read_time = (uint32_t)(esp_timer_get_time() - start_adc_read);
ign_box_sts.adc_read_time = (int32_t)(esp_timer_get_time() - start_adc_read);
}
else // simulate adc read timig
vTaskDelay(pdMS_TO_TICKS(1));