Slow down adc and therefore pid to ~128ms
This commit is contained in:
@@ -19,7 +19,7 @@ void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) {
|
|||||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||||
if (hadc == &hadc1) {
|
if (hadc == &hadc1) {
|
||||||
counter++;
|
counter++;
|
||||||
if (counter % 4 == 0) {
|
if (counter % 64 == 0) {
|
||||||
if (pidTaskNotification) {
|
if (pidTaskNotification) {
|
||||||
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
|
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
|
||||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||||
|
|||||||
Reference in New Issue
Block a user