Skip to content

Commit

Permalink
#187 removed unused adc queue which was causing system crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottc11 committed Dec 1, 2022
1 parent 3bcbe2b commit b44aa3f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion Degree/Inc/AnalogHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class AnalogHandle {

int index;

okQueue<uint16_t, 1> queue;
okSemaphore denoisingSemaphore;
okSemaphore sampleSemaphore;
uint16_t idleNoiseThreshold; // how much noise an idle input signal contains
Expand Down
2 changes: 0 additions & 2 deletions Degree/Src/AnalogHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ void AnalogHandle::sampleReadyCallback(uint16_t sample)
}

}

this->queue.send(currValue, (TickType_t)0); // send sample to queue for other tasks
}


Expand Down
2 changes: 0 additions & 2 deletions Degree/Tasks/Src/task_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit b44aa3f

Please sign in to comment.