ZotBins Core
Loading...
Searching...
No Matches
fullnessTask.hpp
Go to the documentation of this file.
1
8
9#ifndef FULLNESS_TASK_HPP
10#define FULLNESS_TASK_HPP
11
12#include "freertos/FreeRTOS.h"
13#include "freertos/queue.h"
14#include "freertos/task.h"
15#include "task.hpp"
16
17#include "DistanceBuffer.hpp"
18#include "FullnessMetric.hpp"
19#include "esp_log.h"
20#include <driver/gpio.h>
21
22
23namespace Zotbins
24{
25 class FullnessTask : public Task
26 {
27 public:
32 explicit FullnessTask(QueueHandle_t &messageQueue);
33
38 void start() override;
39
40 float getFullness();
41 private:
48 static void taskFunction(void *task);
49
55 void setup();
56
62 void loop();
63
68 QueueHandle_t &mMessageQueue;
69
74 Fullness::Distance ultrasonic;
75
80 float distance;
81
82 };
83}
84
85#endif
Header file for Fullness class for an hcsr04.
Definition Distance.hpp:24
FullnessTask(QueueHandle_t &messageQueue)
Construct a new Fullness Task object.
Definition fullnessTask.cpp:36
void start() override
Start execution of Fullness Task.
Definition fullnessTask.cpp:42
Task(const char *name, const int priority, const uint32_t stackSize)
Construct a new Task object. Parameters are needed for FreeRTOS.
Definition task.hpp:31
Header file for Task class.