revert on double task wait, normal and soft start working

This commit is contained in:
2026-04-04 20:00:30 +02:00
parent b0842aadef
commit 38c595fd7b
8 changed files with 128 additions and 91 deletions

View File

@@ -1,7 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"Jason2866.esp-decoder",
"pioarduino.pioarduino-ide",
"platformio.platformio-ide"
],
"unwantedRecommendations": [

View File

@@ -10,7 +10,7 @@
[env:esp32-devtest-release]
board = esp32dev
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = arduino
lib_deps =
hideakitai/DebugLog@^0.8.4
@@ -21,8 +21,8 @@ build_type = release
[env:esp32-devtest-debug]
board = esp32dev
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
framework = arduino
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
lib_deps =
hideakitai/DebugLog@^0.8.4
board_build.flash_size = 4MB

View File

@@ -15,7 +15,7 @@ static uint32_t count = 0;
#define SPARK_DLY_MIN 10
#define SPARK_DLY_MAX 490
#define PAUSE_LONG_MIN 10000
#define PAUSE_LONG_MIN 5000
#define PAUSE_LONG_MAX PAUSE_LONG_MIN*100
void clearScreen(){
@@ -46,15 +46,16 @@ static timerStatus stsA = {
.clock_period_us = (uint32_t)PERIOD_US,
.pause_long_us = 10000,
.pause_short_us = 1000,
.coil_pulse_us = 500,
.spark_pulse_us = 50,
.spark_delay_us = 10,
.coil_pulse_us = 1000,
.spark_pulse_us = 100,
.spark_delay_us = 50,
.main_task = NULL};
void setup()
{
Serial.begin(115200);
delay(1000);
LOG_ATTACH_SERIAL(Serial);
pinMode(PIN_TRIG_A12P, OUTPUT);
@@ -98,6 +99,9 @@ void loop()
stsA.pause_long_us = (uint32_t)filtered;
LOG_INFO("Spark Delay uS: ", stsA.spark_delay_us, "\tSoft Start: ", stsA.soft_start ? "TRUE" : "FALSE");
LOG_INFO("Pause: ", (uint32_t)(stsA.pause_long_us / 1000), "ms");
LOG_INFO("Coil Pulse: ", stsA.coil_pulse_us, "us");
LOG_INFO("Spark Pulse: ", stsA.spark_pulse_us, "us");
delay(100);
clearScreen();

View File

@@ -19,5 +19,5 @@
#define SPARK_B34 5
// Pot
#define SPARK_DELAY_POT 12
#define SPARK_DELAY_POT 13
#define FREQ_POT 14