From b44aa3f943116106224848a3c7ed9867b1edbc20 Mon Sep 17 00:00:00 2001 From: scottc11 Date: Thu, 1 Dec 2022 08:58:25 -0500 Subject: [PATCH] #187 removed unused adc queue which was causing system crashes --- Degree/Inc/AnalogHandle.h | 1 - Degree/Src/AnalogHandle.cpp | 2 -- Degree/Tasks/Src/task_calibration.cpp | 2 -- 3 files changed, 5 deletions(-) diff --git a/Degree/Inc/AnalogHandle.h b/Degree/Inc/AnalogHandle.h index 7912d76..4cc1afc 100644 --- a/Degree/Inc/AnalogHandle.h +++ b/Degree/Inc/AnalogHandle.h @@ -20,7 +20,6 @@ class AnalogHandle { int index; - okQueue queue; okSemaphore denoisingSemaphore; okSemaphore sampleSemaphore; uint16_t idleNoiseThreshold; // how much noise an idle input signal contains diff --git a/Degree/Src/AnalogHandle.cpp b/Degree/Src/AnalogHandle.cpp index 8554237..f230a9d 100644 --- a/Degree/Src/AnalogHandle.cpp +++ b/Degree/Src/AnalogHandle.cpp @@ -127,8 +127,6 @@ void AnalogHandle::sampleReadyCallback(uint16_t sample) } } - - this->queue.send(currValue, (TickType_t)0); // send sample to queue for other tasks } diff --git a/Degree/Tasks/Src/task_calibration.cpp b/Degree/Tasks/Src/task_calibration.cpp index ac5f907..fffa8bc 100644 --- a/Degree/Tasks/Src/task_calibration.cpp +++ b/Degree/Tasks/Src/task_calibration.cpp @@ -22,7 +22,6 @@ void taskObtainSignalFrequency(void *params) // thStartCalibration = xTaskGetCurrentTaskHandle(); - uint16_t sample; float vcoFrequency = 0; // the calculated frequency sample int frequencySampleCounter = 0; // index for storing new frequency sample into freqSamples array float avgFrequencySum = 0; // the sum of all new frequency samples (for calculating a running average afterwards) @@ -47,7 +46,6 @@ void taskObtainSignalFrequency(void *params) while (1) { xSemaphoreTake(sem_obtain_freq, portMAX_DELAY); - xQueueReceive(channel->adc.queue.handle, &sample, portMAX_DELAY); uint16_t curr_adc_sample = channel->adc.read_u16(); // obtain the sample from DMA buffer