Application tasks for signal processing, metal detecting, and LVGL GUI updates. More...
#include "app_tasks.h"
#include "signal.h"
#include "lvgl.h"
#include "ui.h"
#include "app_signal.h"
#include "metal_detecting.h"
#include "main.h"
Functions | |
void | ProduceAudioTask (void *argument) |
Task to produce audio when metal is detected. | |
void | SignalProcessingTask (void *argument) |
Task to process signals and detect metal. | |
void | LvHandlerTask (void *argument) |
Task to handle LVGL GUI updates. | |
Variables | |
static MD_DetectStatus_t | md_flag = NO_TARGET |
static int16_t | phase_diff = 0 |
static uint16_t | magnitude = 0 |
Application tasks for signal processing, metal detecting, and LVGL GUI updates.
This file contains the implementation of various tasks:
Created on: Jul 21, 2024 Author: Viktor
void LvHandlerTask | ( | void * | argument | ) |
Task to handle LVGL GUI updates.
This task updates the LVGL user interface with signal processing results, including depth bar, phase arc, and charts for time and frequency domains.
argument | Task argument (unused). |
void ProduceAudioTask | ( | void * | argument | ) |
Task to produce audio when metal is detected.
This task waits for the AudioSemaphoreHandle to be released, then enables the audio amplifier for a specified duration to produce an audio signal.
argument | Task argument (unused). |
void SignalProcessingTask | ( | void * | argument | ) |
Task to process signals and detect metal.
This task waits for a flag from the input queue, processes the signal to perform FFT and detect metal, and updates detection status and phase difference.
argument | Task argument (unused). |
|
static |
Magnitude of the received signal
|
static |
Metal detection flag
|
static |
Phase difference between signals