1
0
forked from me/IronOS

Slow down adc and therefore pid to ~128ms

This commit is contained in:
Ben V. Brown
2021-05-03 22:09:26 +10:00
parent 5b4ae22f12
commit e3deb33d7f

View File

@@ -19,7 +19,7 @@ void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (hadc == &hadc1) {
counter++;
if (counter % 4 == 0) {
if (counter % 64 == 0) {
if (pidTaskNotification) {
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);