diff --git a/speeduino/sensors.ino b/speeduino/sensors.ino index 8995b5bc..645bbc1d 100644 --- a/speeduino/sensors.ino +++ b/speeduino/sensors.ino @@ -103,16 +103,16 @@ void initialiseADC() } } //For loop iterating through aux in lines - //Sanity checks to ensure none of the filter values are set to 255 (Which would be the default on a new arduino, but can prevent the sensor readings from going through correctly) - //If an invalid value is detected, it's reset to the default the value burned to EEPROM. + //Sanity checks to ensure none of the filter values are set above 240 (Which would include the 255 value which is the default on a new arduino) + //If an invalid value is detected, it's reset to the default the value and burned to EEPROM. //Each sensor has it's own default value if(configPage4.ADCFILTER_TPS > 240) { configPage4.ADCFILTER_TPS = 50; writeConfig(4); } - if(configPage4.ADCFILTER_CLT > 240) { configPage4.ADCFILTER_TPS = 180; writeConfig(4); } - if(configPage4.ADCFILTER_IAT > 240) { configPage4.ADCFILTER_TPS = 180; writeConfig(4); } - if(configPage4.ADCFILTER_O2 > 240) { configPage4.ADCFILTER_TPS = 100; writeConfig(4); } - if(configPage4.ADCFILTER_BAT > 240) { configPage4.ADCFILTER_TPS = 128; writeConfig(4); } - if(configPage4.ADCFILTER_MAP > 240) { configPage4.ADCFILTER_TPS = 20; writeConfig(4); } - if(configPage4.ADCFILTER_BARO > 240) { configPage4.ADCFILTER_TPS = 64; writeConfig(4); } + if(configPage4.ADCFILTER_CLT > 240) { configPage4.ADCFILTER_CLT = 180; writeConfig(4); } + if(configPage4.ADCFILTER_IAT > 240) { configPage4.ADCFILTER_IAT = 180; writeConfig(4); } + if(configPage4.ADCFILTER_O2 > 240) { configPage4.ADCFILTER_O2 = 100; writeConfig(4); } + if(configPage4.ADCFILTER_BAT > 240) { configPage4.ADCFILTER_BAT = 128; writeConfig(4); } + if(configPage4.ADCFILTER_MAP > 240) { configPage4.ADCFILTER_MAP = 20; writeConfig(4); } + if(configPage4.ADCFILTER_BARO > 240) { configPage4.ADCFILTER_BARO = 64; writeConfig(4); } }