Files
itc_pressure_optimizer/src/device/PressureCalculator.h
T
2026-07-20 11:28:39 +02:00

43 lines
896 B
C++

#ifndef PRESSURE_CALCULATOR_H
#define PRESSURE_CALCULATOR_H
#include "Average.h"
#include "EventBus.h"
class PressureCalculator {
private:
Average average;
EventBus &eventBus;
struct Event {
float c1contrib;
float c2contrib;
float uncapedPressure;
float cappedPressure;
};
float cachedSP;
float cachedTemperature;
float cachedPower;
float cachedMinimalPressure;
float cachedMaximalPressure;
float cachedConstante1;
float cachedConstante2;
void updateSP(float value);
void updateTemperature(float value);
void updatePower(float value);
void updateMinimalPressure(float value);
void updateMaximalPressure(float value);
void updateConstante1(float value);
void updateConstante2(float value);
void update();
public:
PressureCalculator(EventBus &eventBusReference);
};
#endif