|
Sentinel
|
Battery Task Implementation File. More...
#include "tasks/batteryTask.h"#include "SensorData.h"#include "battery.h"#include "config.h"#include "utils/threadsafe_serial.h"#include <Arduino.h>#include <cstring>Macros | |
| #define | QUEUE_SEND_TIMEOUT_MS 1000 |
| #define | NETWORK_CONNECTED_BIT BIT0 |
Functions | |
| void | sendBatteryData (const sensor_message_t &msg) |
| void | batteryTask (void *parameter) |
| Battery Task function. | |
Variables | |
| QueueHandle_t | dataQueue |
| EventGroupHandle_t | networkEventGroup |
| SemaphoreHandle_t | networkEventMutex |
Battery Task Implementation File.
This file contains the implementation of the batteryTask function, which is used to handle battery monitoring operations in a FreeRTOS task. The task is responsible for reading battery voltage and percentage data from the Battery class and sending it to a queue for processing.
| void batteryTask | ( | void * | parameter | ) |
Battery Task function.
This function handles battery monitoring operations in a FreeRTOS task. It reads battery voltage and percentage data from the Battery class and sends it to a queue for processing. The task runs in an infinite loop, monitoring battery status and sending updates when the battery level changes.
| parameter | Task parameter (unused) |