From 399a60ded2f8be127c3b77741d69395035d150a2 Mon Sep 17 00:00:00 2001 From: cfif Date: Thu, 4 Dec 2025 16:14:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StatusData.c | 1 + StatusData.h | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 287 insertions(+), 4 deletions(-) diff --git a/StatusData.c b/StatusData.c index b51eadf..f4cb351 100644 --- a/StatusData.c +++ b/StatusData.c @@ -1,3 +1,4 @@ // // Created by cfif on 03.12.2025. // +#include "StatusData.h" \ No newline at end of file diff --git a/StatusData.h b/StatusData.h index 3de707d..bb3a1e7 100644 --- a/StatusData.h +++ b/StatusData.h @@ -5,6 +5,8 @@ #ifndef HVAC_M7_STATUSDATA_H #define HVAC_M7_STATUSDATA_H +#include "stdint.h" + typedef enum { AROMA_NOT_PRESENT = 0, AROMA_PRESENT = 1, @@ -17,15 +19,295 @@ typedef enum { ALG_DEFAULT = 0xFF } eAlgorithmConfiguration; -typedef struct { +typedef enum { + AQS_CLEAR_AIR_LEVEL = 0, + AQS_LEVEL_1_LOW = 1, + AQS_LEVEL_2_MIDL = 2, + AQS_LEVEL_3_SIGNIFICANT = 3, + AQS_LEVEL_4_HIGH = 4, + AQS_LEVEL_5_VERY = 5, + AQS_ERROR = 0xFF +} eAQS; - - -} tStatusSensor; +typedef enum { + AROMA_OFF = 0, + AROMA_MODE1 = 1, + AROMA_MODE2 = 2, + AROMA_MODE3 = 3 +} eAromatizationIntensivity; typedef struct { eAromaConfiguration AromaConfiguration; eAlgorithmConfiguration AlgorithmConfiguration; +} tStatus_CCU_Configuration; + +// 1 Byte; Float; 2 significant digits y = (1/10)x V; Lower limit (phys): 0 V; Upper limit (phys): 25.5 V; +// 2 Byte; Float; 1 significant digits; HighLow (Motorola) y = (1/10)x -40 °C; Lower limit (phys): -40 °C; Upper limit (phys): 6513.5 °C; +typedef struct { + uint8_t Ignition; + uint8_t Battery; + uint16_t AMB; + uint16_t Incar_FL; + uint16_t Incar_FR; + uint16_t Incar_RL; + uint16_t Incar_RR; + uint16_t Eva_F; + uint16_t Eva_R; + uint16_t Pressure; + uint16_t Duct_FL_Upper; + uint16_t Duct_FL_Lower; + uint16_t Duct_FR_Upper; + uint16_t Duct_FR_Lower; + uint16_t Duct_RL; + uint16_t Duct_RR; + uint16_t Duct_Side_FL; + uint16_t Duct_Side_FR; + uint16_t Duct_Side_RL; + uint16_t Duct_Side_RR; + eAQS AQS; +} tStatus_Sensor; + +// 2 Byte; Float; 1 significant digits; HighLow (Motorola) [0x00..0x03E8] ; y = (1/10)x %; +// Lower limit (phys): 0 %; Upper limit (phys): 100 %; Invalid values: [0x03E9..0xFFFE] Invalid signal (Invalid) [0xFFFF] Not implemented (Not implemented) +typedef struct { + uint16_t Motor_Def; + uint16_t Motor_Vent_SFL; + uint16_t Motor_Vent_CFL; + uint16_t Motor_Foot_1FL; + uint16_t Motor_Foot_2FL; + uint16_t Motor_Vent_CFR; + uint16_t Motor_Vent_SFR; + uint16_t Motor_Foot_1FR; + uint16_t Motor_Foot_2FR; + uint16_t Motor_Vent_SRL; + uint16_t Motor_Vent_CRL; + uint16_t Motor_Foot_RL; + uint16_t Motor_Vent_CRR; + uint16_t Motor_Vent_SRR; + uint16_t Motor_Foot_RR; + uint16_t Motor_Temp1_FL; + uint16_t Motor_Temp2_FL; + uint16_t Motor_Temp1_FR; + uint16_t Motor_Temp2_FR; + uint16_t Motor_Temp_RL; + uint16_t Motor_Temp_RR; + uint16_t Motor_REC; + uint16_t Motor_OSA; + uint16_t Motor_SealingValve; +} tStatus_Actuator; + +// 2 Byte; Float; 1 significant digits; HighLow (Motorola) y = (1/10)x -40 °C; Lower limit (phys): -40 °C; Upper limit (phys): 6513.5 °C; +typedef struct { + uint16_t DuctTgt_Vent_FL; + uint16_t DuctTgt_Foot_FL; + uint16_t DuctTgt_Vent_FR; + uint16_t DuctTgt_Foot_FR; + uint16_t DuctTgt_RL; + uint16_t DuctTgt_RR; +} tStatus_Duct_Tgt; + +// 2 Byte; Float; 1 significant digits; HighLow (Motorola) y = (1/10)x -40 °C; Lower limit (phys): -40 °C; Upper limit (phys): 6513.5 °C; +typedef struct { + uint16_t EvaTgt_F; + uint16_t EvaTgt_R; +} tStatus_Eva_Tgt; + +// 0 = Off!0 = On 1 Byte [0x00] Off [0x01..0xFF] On; Inverse value: 0x01 +typedef struct { + uint8_t _2_Way_Valve; + uint8_t IncarMotor_Front; + uint8_t IncarMotor_Rear; + uint8_t ShutOff_Chiller; + uint8_t ShutOff_Front; + uint8_t ShutOff_Rear; + uint8_t PTC_1; + uint8_t PTC_2; +} tStatus_IO; + +// 2 Byte; Float; 1 significant digits; HighLow (Motorola) [0x00..0x03E8] ; y = (1/10)x %; Lower limit (phys): 0 %; Upper limit (phys): 100 %; Invalid values: [0x03E9..0xFFFE] Invalid signal (Invalid) [0xFFFF] Not implemented (Not implemented) +typedef struct { + uint16_t Pwm_Front; + uint16_t Pwm_Rear; +} tStatus_Pwm1; + +typedef struct { + // 0 = Off!0 = On + //1 Byte + //[0x00] Off + //[0x01..0xFF] On; Inverse value: 0x01 + uint8_t eComp_Statue_Request; + //1 Byte + //y = 50x ; Lower limit (phys): 0; Upper limit (phys): 12750; + uint8_t Pwm_Front; + // 0 = Off!0 = On + //1 Byte + //[0x00] Off + //[0x01..0xFF] On; Inverse value: 0x01 + uint8_t LowTempValve; +} tStatus_Pwm2; + +// 2 Byte; Float; 1 significant digits; HighLow (Motorola) +//[0x00..0x03E8] ; y = (1/10)x %; Lower limit (phys): 0 %; Upper limit (phys): 100 %; +//Invalid values: +//[0x03E9..0xFFFE] Invalid signal (Invalid) +//[0xFFFF] Not implemented (Not implemented) +typedef struct { + uint16_t CoolingFan; +} tStatus_External; + +// 0 = Off!0 = On +//1 Byte +//[0x00] Off +//[0x01..0xFF] On; Inverse value: 0x01 +typedef struct { + uint16_t EMS_Chiller_Req; +} tStatus_EMS; + +typedef struct { + // 0 = Off!0 = On + //1 Byte + //[0x00] Off + //[0x01..0xFF] On; Inverse value: 0x01 + uint8_t Ionizer; + eAromatizationIntensivity AromatizationIntensivity; +} tStatus_Ionizer_Aroma; + + +typedef struct { + uint16_t Motor_Def; +} tStatus_Motor_Def; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_SFL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_CFL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Foot_1FL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Foot_2FL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_CFR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_SFR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Foot_1FR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Foot_2FR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_SRL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_CRL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Foot_RL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_CRR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Vent_SRR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Foot_RR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Temp1_FL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Temp2_FL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Temp1_FR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Temp2_FR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Temp_RL; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_Temp_RR; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_REC; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_OSA; + +typedef struct { + uint16_t Percentage; +} tStatus_Motor_SealingValve; + +typedef struct { + tStatus_CCU_Configuration Status_CCU_Configuration; + tStatus_Sensor Status_Sensor; + tStatus_Actuator Status_Actuator_FB; + tStatus_Duct_Tgt Status_Duct_Tgt; + tStatus_Eva_Tgt Status_Eva_Tgt; + tStatus_IO Status_IO; + tStatus_Pwm1 Status_Pwm1; + tStatus_Pwm2 Status_Pwm2; + tStatus_External Status_External; + tStatus_Ionizer_Aroma Status_Ionizer_Aroma; + + tStatus_Motor_Def Status_Motor_Def; + tStatus_Motor_Vent_SFL Status_Motor_Vent_SFL; + tStatus_Motor_Vent_CFL Status_Motor_Vent_CFL; + tStatus_Motor_Foot_1FL Status_Motor_Foot_1FL; + tStatus_Motor_Foot_2FL Status_Motor_Foot_2FL; + tStatus_Motor_Vent_CFR Status_Motor_Vent_CFR; + tStatus_Motor_Vent_SFR Status_Motor_Vent_SFR; + tStatus_Motor_Foot_1FR Status_Motor_Foot_1FR; + tStatus_Motor_Foot_2FR Status_Motor_Foot_2FR; + tStatus_Motor_Vent_SRL Status_Motor_Vent_SRL; + tStatus_Motor_Vent_CRL Status_Motor_Vent_CRL; + tStatus_Motor_Foot_RL Status_Motor_Foot_RL; + tStatus_Motor_Vent_CRR Status_Motor_Vent_CRR; + tStatus_Motor_Vent_SRR Status_Motor_Vent_SRR; + tStatus_Motor_Foot_RR Status_Motor_Foot_RR; + tStatus_Motor_Temp1_FL Status_Motor_Temp1_FL; + tStatus_Motor_Temp2_FL Status_Motor_Temp2_FL; + tStatus_Motor_Temp1_FR Status_Motor_Temp1_FR; + tStatus_Motor_Temp2_FR Status_Motor_Temp2_FR; + tStatus_Motor_Temp_RL Status_Motor_Temp_RL; + tStatus_Motor_Temp_RR Status_Motor_Temp_RR; + tStatus_Motor_REC Status_Motor_REC; + tStatus_Motor_OSA Status_Motor_OSA; + tStatus_Motor_SealingValve Status_Motor_SealingValve; + + + } tStatusData;