center sincos on 50pct

This commit is contained in:
Oskar Weigl
2019-02-05 21:40:40 -08:00
parent a86fb3e59b
commit 8ad4ad92de
+2 -2
View File
@@ -263,8 +263,8 @@ void Encoder::sample_now() {
} break;
case MODE_SINCOS: {
sincos_sample_s_ = get_adc_voltage(GPIO_3_GPIO_Port, GPIO_3_Pin) / 3.3f;
sincos_sample_c_ = get_adc_voltage(GPIO_4_GPIO_Port, GPIO_4_Pin) / 3.3f;
sincos_sample_s_ = (get_adc_voltage(GPIO_3_GPIO_Port, GPIO_3_Pin) / 3.3f) - 0.5f;
sincos_sample_c_ = (get_adc_voltage(GPIO_4_GPIO_Port, GPIO_4_Pin) / 3.3f) - 0.5f;
} break;
default: {