diff --git a/Build-Instructions-SG1/led-size.jpg b/Build-Instructions-SG1/led-size.jpg new file mode 100644 index 0000000..bd0187c Binary files /dev/null and b/Build-Instructions-SG1/led-size.jpg differ diff --git a/Build-Instructions-SG1/stepper-size.jpg b/Build-Instructions-SG1/stepper-size.jpg new file mode 100644 index 0000000..e4a0857 Binary files /dev/null and b/Build-Instructions-SG1/stepper-size.jpg differ diff --git a/Dockerfile b/Dockerfile index 42218ad..f354e32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM espressif/idf:release-v5.0 +FROM espressif/idf:release-v5.1 WORKDIR /app diff --git a/Source/base-fw/main/GateStepper.c b/Source/base-fw/main/GateStepper.c index 1dd4ed4..11945de 100644 --- a/Source/base-fw/main/GateStepper.c +++ b/Source/base-fw/main/GateStepper.c @@ -92,7 +92,7 @@ static IRAM_ATTR void tmr_signal_callback(void* arg) if (m_bPeriodAlternate) { const int32_t s32 = MIN(abs(m_s32Count) , abs(m_s32Target - m_s32Count)); - + /* Former code if (s32 < 50*2) m_s32Period = 2000/2; else if (s32 < 100*2) @@ -110,7 +110,25 @@ static IRAM_ATTR void tmr_signal_callback(void* arg) else if (s32 < 700*2) m_s32Period = 600/2; else - m_s32Period = 400/2; + m_s32Period = 400/2;*/ + /* I just did some tests until I was satisfied */ + /* #1 (100, 1000), (1400, 300) + a = -0.53846153846153846153846153846154 + b = 1053.84 */ + /* #2 (100, 700), (1400, 200) + a = -0.3846 + b = 738.44 */ + const int32_t a = -461; + const int32_t b = 946840; + m_s32Period = (a * s32 + b)/1000; + + // I hoped it would reduce jitter. + m_s32Period = (m_s32Period / 50) * 50; + + if (m_s32Period < 200) + m_s32Period = 200; + if (m_s32Period > 700) + m_s32Period = 700; // Count every two m_s32Count++; diff --git a/Source/base-fw/main/webserver/EmbeddedFiles.txt b/Source/base-fw/main/webserver/EmbeddedFiles.txt deleted file mode 100644 index a868652..0000000 --- a/Source/base-fw/main/webserver/EmbeddedFiles.txt +++ /dev/null @@ -1,20 +0,0 @@ -about-ota.html -config.json -favicon.ico -index.html -settings.html -css/content.css -css/sidenav.css -css/top-menu.css -font/ancient_virtual.ttf.woff -font/eurostile_extended2_bold.woff -font/stargateuniverse.woff -font/copyrights/ancient_virtual_copyright.txt -font/copyrights/eurostile_extended2_bold_copyright.html -font/copyrights/stargateuniverse-lisez-moi.txt -font/copyrights/stargateuniverse-readme.txt -img/home.svg -js/about-ota.js -js/app.js -js/settings.js -js/vue.min.js \ No newline at end of file