lotus: Change ADC threshold to 2.9

Should still have enough margin for NKRO.
Measurements showed we should be good until 2.8.

But some keyboards would have ghost key presses because the voltage
would randomly drop slightly below 3.0

Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
Daniel Schaefer 2023-03-22 07:45:20 +08:00
parent ec581fd0a4
commit 1284828a07

View File

@ -48,7 +48,7 @@
#define ADC_CH2_PIN GP28
// Voltage threshold - anything below that counts as pressed
const adc10ksample_t ADC_THRESHOLD = (adc10ksample_t) 3.0 * 10000;
const adc10ksample_t ADC_THRESHOLD = (adc10ksample_t) 2.9 * 10000;
adc10ksample_t to_voltage(adcsample_t sample) {
int voltage = sample * 33000;