From 0c0e495607c6e71423c2d9440681021e3d6d45ee Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 7 Mar 2021 14:32:04 -0800 Subject: [PATCH] avoid aliasing (#2431) Co-authored-by: Matthew Kennedy --- firmware/config/engines/test_engine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/config/engines/test_engine.cpp b/firmware/config/engines/test_engine.cpp index 32b7955ec8..026cdd2d95 100644 --- a/firmware/config/engines/test_engine.cpp +++ b/firmware/config/engines/test_engine.cpp @@ -112,7 +112,9 @@ void setProteusAnalogPwmTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // The idle control pin is connected to the default TPS input, analog volt 2 engineConfiguration->idle.solenoidPin = GPIOG_4; - engineConfiguration->idle.solenoidFrequency = 5000; + + // 5893hz is coprime with the analog sample rate, 500hz, so hopefully we get less aliasing + engineConfiguration->idle.solenoidFrequency = 5893; // Test range is 20% to 80% engineConfiguration->tpsMin = 200;