summaryrefslogtreecommitdiffstats
path: root/src/HvacService.h
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2023-11-29 15:40:23 -0500
committerScott Murray <scott.murray@konsulko.com>2023-11-29 15:43:58 -0500
commit1f55937667e35fb79dabee0e180787e34a59169a (patch)
tree707961d1643ed844b7f55db25a3a07b7865447ca /src/HvacService.h
parentbe3bc37fbdd48f70a2cee4fb0f61c8b688707b1f (diff)
Add minimal mock support for the VSS signals: Vehicle.Cabin.HVAC.IsAirConditioningActive Vehicle.Cabin.HVAC.IsFrontDefrosterActive Vehicle.Cabin.HVAC.IsRearDefrosterActive Vehicle.Cabin.HVAC.IsRecirculationActive The implemented behavior is to simply push the actuator target value out as the new value, so that VSS clients will see the operation as having completed. Bug-AGL: SPEC-5000 Change-Id: I9501d54dae13825c7eadcdc417d6355b64f9cd36 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'src/HvacService.h')
-rw-r--r--src/HvacService.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/HvacService.h b/src/HvacService.h
index 756f6f3..44cb2cc 100644
--- a/src/HvacService.h
+++ b/src/HvacService.h
@@ -7,6 +7,7 @@
#ifndef _HVAC_SERVICE_H
#define _HVAC_SERVICE_H
+#include <mutex>
#include <glib.h>
#include "KuksaConfig.h"
@@ -43,6 +44,12 @@ private:
HvacCanHelper m_can_helper;
HvacLedHelper m_led_helper;
+ std::mutex m_hvac_state_mutex;
+ bool m_IsAirConditioningActive = false;
+ bool m_IsFrontDefrosterActive = false;
+ bool m_IsRearDefrosterActive = false;
+ bool m_IsRecirculationActive = false;
+
void HandleSignalChange(const std::string &path, const Datapoint &dp);
void HandleSignalSetError(const std::string &path, const Error &error);
@@ -60,6 +67,14 @@ private:
void set_right_fan_speed(uint8_t temp);
void set_fan_speed(uint8_t temp);
+
+ void set_ac_active(bool active);
+
+ void set_front_defrost_active(bool active);
+
+ void set_rear_defrost_active(bool active);
+
+ void set_recirculation_active(bool active);
};
#endif // _HVAC_SERVICE_H