Compare commits

..

3 commits

Author SHA1 Message Date
b5c9e36c29
Prefix global variables 2025-06-19 10:21:03 +02:00
8864518c39
Customize it to fit the hardware. 2025-06-05 15:39:05 +02:00
3db798de59
clang-format 2025-05-14 22:51:42 +02:00
2 changed files with 149 additions and 128 deletions

View file

@ -3,24 +3,23 @@ UseTab: Never
IndentWidth: 4 IndentWidth: 4
TabWidth: 4 TabWidth: 4
BreakBeforeBraces: Custom BreakBeforeBraces: Custom
AllowShortFunctionsOnASingleLine: Inline AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortBlocksOnASingleLine: false AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: true AllowShortLambdasOnASingleLine: true
AllowAllArgumentsOnNextLine: true AllowAllArgumentsOnNextLine: true
IndentCaseLabels: true IndentCaseLabels: true
AccessModifierOffset: -4 AccessModifierOffset: -4
NamespaceIndentation: None NamespaceIndentation: All
FixNamespaceComments: false FixNamespaceComments: false
PackConstructorInitializers: Never PackConstructorInitializers: Never
AlignAfterOpenBracket: AlwaysBreak AlignAfterOpenBracket: AlwaysBreak
BreakConstructorInitializersBeforeComma: true
InsertBraces: true InsertBraces: true
BraceWrapping: BraceWrapping:
AfterClass: true # false AfterClass: true # false
AfterControlStatement: false AfterControlStatement: false
AfterEnum: true # false AfterEnum: true # false
AfterFunction: true # false AfterFunction: true # false
AfterNamespace: false AfterNamespace: true # false
AfterObjCDeclaration: true # false AfterObjCDeclaration: true # false
AfterStruct: true # false AfterStruct: true # false
AfterUnion: true # false AfterUnion: true # false

View file

@ -45,7 +45,6 @@ typedef enum OpenThermMessageType // old name OpenThermRequestType; // for backw
OT_UNKNOWN_DATA_ID = 0b111 OT_UNKNOWN_DATA_ID = 0b111
} open_therm_message_type_t; } open_therm_message_type_t;
// clang-format off
typedef enum OpenThermMessageID typedef enum OpenThermMessageID
{ {
MSG_ID_STATUS = 0, // flag8/flag8 |R-| Master and Slave Status flags. MSG_ID_STATUS = 0, // flag8/flag8 |R-| Master and Slave Status flags.
@ -110,11 +109,16 @@ typedef enum OpenThermMessageID
MSG_ID_OTC_CURVE_RATIO = 58, // f8.8 |RW| OTC heat curve ratio (°C) (Remote parameter 3) MSG_ID_OTC_CURVE_RATIO = 58, // f8.8 |RW| OTC heat curve ratio (°C) (Remote parameter 3)
// //
MSG_ID_STATUS_VENTILATION_HEAT_RECOVERY = 70, // flag8/flag8 |??| Master and Slave Status flags ventilation / heat - recovery MSG_ID_STATUS_VENTILATION_HEAT_RECOVERY = 70, // flag8/flag8 |??| Master and Slave Status flags ventilation / heat - recovery
MSG_ID_VSET = 71, // -/u8 |??| Relative ventilation position (0-100%). 0% is the minimum set ventilation and 100% is the maximum set ventilation. MSG_ID_VSET = 71, // -/u8 |??| Relative ventilation position (0-100%). 0% is the minimum set ventilation and 100% is the
MSG_ID_ASF_FLAGS_OEM_FAULT_CODE_VENTILATION_HEAT_RECOVERY = 72, // flag8/u8 |??| Application-specific fault flags and OEM fault code ventilation / heat-recovery // maximum set ventilation.
MSG_ID_OEM_DDIAGNOSTIC_CODE_VENTILATION_HEAT_RECOVERY = 73, // u16 |??| An OEM-specific diagnostic/service code for ventilation / heat-recovery system MSG_ID_ASF_FLAGS_OEM_FAULT_CODE_VENTILATION_HEAT_RECOVERY =
MSG_ID_S_CONFIG_S_MEMEBER_ID_CODE_VENTILATION_HEAT_RECOVERY = 74, // flag8/u8 |??| Slave Configuration Flags / Slave MemberID Code ventilation / heat-recovery 72, // flag8/u8 |??| Application-specific fault flags and OEM fault code ventilation / heat-recovery
MSG_ID_OPENTHERM_VVERSION_VENTILATION_HEAT_RECOVERY = 75, // f8.8 |??| The implemented version of the OpenTherm Protocol Specification in the ventilation / heat-recovery system. MSG_ID_OEM_DDIAGNOSTIC_CODE_VENTILATION_HEAT_RECOVERY =
73, // u16 |??| An OEM-specific diagnostic/service code for ventilation / heat-recovery system
MSG_ID_S_CONFIG_S_MEMEBER_ID_CODE_VENTILATION_HEAT_RECOVERY =
74, // flag8/u8 |??| Slave Configuration Flags / Slave MemberID Code ventilation / heat-recovery
MSG_ID_OPENTHERM_VVERSION_VENTILATION_HEAT_RECOVERY = 75, // f8.8 |??| The implemented version of the OpenTherm Protocol
// Specification in the ventilation / heat-recovery system.
MSG_ID_VENTILATION_HEAT_RECOVERY_VERSION = 76, // u8/u8 |??| Ventilation / heat-recovery product version number and type MSG_ID_VENTILATION_HEAT_RECOVERY_VERSION = 76, // u8/u8 |??| Ventilation / heat-recovery product version number and type
MSG_ID_REL_VENT_LEVEL = 77, // -/u8 |??| Relative ventilation (0-100%) MSG_ID_REL_VENT_LEVEL = 77, // -/u8 |??| Relative ventilation (0-100%)
MSG_ID_RH_EXHAUST = 78, // -/u8 |??| Relative humidity exhaust air (0-100%) MSG_ID_RH_EXHAUST = 78, // -/u8 |??| Relative humidity exhaust air (0-100%)
@ -125,30 +129,46 @@ typedef enum OpenThermMessageID
MSG_ID_TEO = 83, // f8.8 |??| Exhaust outlet temperature (°C) MSG_ID_TEO = 83, // f8.8 |??| Exhaust outlet temperature (°C)
MSG_ID_RPM_EXHAUST = 84, // u16 |??| Exhaust fan speed in rpm MSG_ID_RPM_EXHAUST = 84, // u16 |??| Exhaust fan speed in rpm
MSG_ID_RPM_SUPPLY = 85, // u16 |??| Supply fan speed in rpm MSG_ID_RPM_SUPPLY = 85, // u16 |??| Supply fan speed in rpm
MSG_ID_RBP_FLAGS_VENTILATION_HEAT_RECOVERY = 86, // flag8/flag8 |??| Remote ventilation / heat-recovery parameter transfer-enable & read/write flags MSG_ID_RBP_FLAGS_VENTILATION_HEAT_RECOVERY =
86, // flag8/flag8 |??| Remote ventilation / heat-recovery parameter transfer-enable & read/write flags
MSG_ID_NOMINAL_VENTILATION_VALUE = 87, // u8/- |??| Nominal relative value for ventilation (0-100 %) MSG_ID_NOMINAL_VENTILATION_VALUE = 87, // u8/- |??| Nominal relative value for ventilation (0-100 %)
MSG_ID_TSP_VENTILATION_HEAT_RECOVERY = 88, // u8/u8 |??| Number of Transparent-Slave-Parameters supported by TSPs ventilation / heat-recovery MSG_ID_TSP_VENTILATION_HEAT_RECOVERY =
MSG_ID_TSPindexTSP_VALUE_VENTILATION_HEAT_RECOVERY = 89, // u8/u8 |??| Index number / Value of referred-to transparent TSPs ventilation / heat-recovery parameter. 88, // u8/u8 |??| Number of Transparent-Slave-Parameters supported by TSPs ventilation / heat-recovery
MSG_ID_FHB_SIZE_VENTILATION_HEAT_RECOVERY = 90, // u8/u8 |??| Size of Fault-History-Buffer supported by ventilation / heat-recovery MSG_ID_TSPindexTSP_VALUE_VENTILATION_HEAT_RECOVERY =
MSG_ID_FHB_INDEX_FHB_VALUE_VENTILATION_HEAT_RECOVERY = 91, // u8/u8 |??| Index number / Value of referred-to fault-history buffer entry ventilation / heat-recovery 89, // u8/u8 |??| Index number / Value of referred-to transparent TSPs ventilation / heat-recovery parameter.
MSG_ID_BRAND = 93, // u8/u8 |??| Index number of the character in the text string ASCII character referenced by the above index number MSG_ID_FHB_SIZE_VENTILATION_HEAT_RECOVERY =
MSG_ID_BRAND_VERSION = 94, // u8/u8 |??| Index number of the character in the text string ASCII character referenced by the above index number 90, // u8/u8 |??| Size of Fault-History-Buffer supported by ventilation / heat-recovery
MSG_ID_BRAND_SERIAL_NUMBER = 95, // u8/u8 |??| Index number of the character in the text string ASCII character referenced by the above index number MSG_ID_FHB_INDEX_FHB_VALUE_VENTILATION_HEAT_RECOVERY =
MSG_ID_COOLING_OPERATION_HOURS = 96, // u16 |??| Number of hours that the slave is in Cooling Mode. Reset by zero is optional for slave 91, // u8/u8 |??| Index number / Value of referred-to fault-history buffer entry ventilation / heat-recovery
MSG_ID_POWER_CYCLES = 97, // u16 |??| Number of Power Cycles of a slave (wake-up after Reset), Reset by zero is optional for slave MSG_ID_BRAND = 93, // u8/u8 |??| Index number of the character in the text string ASCII character referenced by the above
MSG_ID_RF_SENSOR_STATUS_INFORMATION = 98, // special/special|??| For a specific RF sensor the RF strength and battery level is written // index number
MSG_ID_BRAND_VERSION = 94, // u8/u8 |??| Index number of the character in the text string ASCII character referenced by
// the above index number
MSG_ID_BRAND_SERIAL_NUMBER = 95, // u8/u8 |??| Index number of the character in the text string ASCII character referenced
// by the above index number
MSG_ID_COOLING_OPERATION_HOURS =
96, // u16 |??| Number of hours that the slave is in Cooling Mode. Reset by zero is optional for slave
MSG_ID_POWER_CYCLES =
97, // u16 |??| Number of Power Cycles of a slave (wake-up after Reset), Reset by zero is optional for slave
MSG_ID_RF_SENSOR_STATUS_INFORMATION =
98, // special/special|??| For a specific RF sensor the RF strength and battery level is written
MSG_ID_REMOTE_OVERRIDE_OOPERATING_MODE_HEATING_DHW = 99, // special/special|??| Operating Mode HC1, HC2/ Operating Mode DHW MSG_ID_REMOTE_OVERRIDE_OOPERATING_MODE_HEATING_DHW = 99, // special/special|??| Operating Mode HC1, HC2/ Operating Mode DHW
// //
MSG_ID_REMOTE_OVERRIDE_FUNCTION = 100, // flag8/- |R-| Function of manual and program changes in master and remote room Setpoint MSG_ID_REMOTE_OVERRIDE_FUNCTION =
100, // flag8/- |R-| Function of manual and program changes in master and remote room Setpoint
// //
MSG_ID_STATUS_SOLAR_STORAGE = 101, // flag8/flag8 |??| Master and Slave Status flags Solar Storage MSG_ID_STATUS_SOLAR_STORAGE = 101, // flag8/flag8 |??| Master and Slave Status flags Solar Storage
MSG_ID_ASF_FLAGS_OEMFAULT_CODE_SOLAR_STORAGE = 102, // flag8/u8 |??| Application-specific fault flags and OEM fault code Solar Storage MSG_ID_ASF_FLAGS_OEMFAULT_CODE_SOLAR_STORAGE =
MSG_ID_S_CONFIG_S_MEMBER_ID_CODE_SOLAR_STORAGE = 103, // flag8/u8 |??| Slave Configuration Flags / Slave MemberID Code Solar Storage 102, // flag8/u8 |??| Application-specific fault flags and OEM fault code Solar Storage
MSG_ID_S_CONFIG_S_MEMBER_ID_CODE_SOLAR_STORAGE =
103, // flag8/u8 |??| Slave Configuration Flags / Slave MemberID Code Solar Storage
MSG_ID_SOLAR_STORAGE_VERSION = 104, // u8/u8 |??| Solar Storage product version number and type MSG_ID_SOLAR_STORAGE_VERSION = 104, // u8/u8 |??| Solar Storage product version number and type
MSG_ID_TSP_SOLAR_SSTORAGE = 105, // u8/u8 |??| Number of Transparent - Slave - Parameters supported by TSPs Solar Storage MSG_ID_TSP_SOLAR_SSTORAGE = 105, // u8/u8 |??| Number of Transparent - Slave - Parameters supported by TSPs Solar Storage
MSG_ID_TSP_INDEX_TSP_VALUE_SOLAR_STORAGE = 106, // u8/u8 |??| Index number / Value of referred - to transparent TSPs Solar Storage parameter. MSG_ID_TSP_INDEX_TSP_VALUE_SOLAR_STORAGE =
106, // u8/u8 |??| Index number / Value of referred - to transparent TSPs Solar Storage parameter.
MSG_ID_FHB_SIZE_SOLAR_STORAGE = 107, // u8/u8 |??| Size of Fault - History - Buffer supported by Solar Storage MSG_ID_FHB_SIZE_SOLAR_STORAGE = 107, // u8/u8 |??| Size of Fault - History - Buffer supported by Solar Storage
MSG_ID_FHB_INDEX_FHB_VALUE_SOLAR_STORAGE = 108, // u8/u8 |??| Index number / Value of referred - to fault - history buffer entry Solar Storage MSG_ID_FHB_INDEX_FHB_VALUE_SOLAR_STORAGE =
108, // u8/u8 |??| Index number / Value of referred - to fault - history buffer entry Solar Storage
MSG_ID_ELECTRICITY_PRODUCER_STARTS = 109, // U16 |??| Number of start of the electricity producer. MSG_ID_ELECTRICITY_PRODUCER_STARTS = 109, // U16 |??| Number of start of the electricity producer.
MSG_ID_ELECTRICITY_PRODUCER_HOURS = 110, // U16 |??| Number of hours the electricity produces is in operation MSG_ID_ELECTRICITY_PRODUCER_HOURS = 110, // U16 |??| Number of hours the electricity produces is in operation
MSG_ID_ELECTRICITY_PRODUCTION = 111, // U16 |??| Current electricity production in Watt. MSG_ID_ELECTRICITY_PRODUCTION = 111, // U16 |??| Current electricity production in Watt.
@ -163,14 +183,16 @@ typedef enum OpenThermMessageID
MSG_ID_DHW_BURNER_STARTS = 119, // u16 |RW| Number of starts burner during DHW mode MSG_ID_DHW_BURNER_STARTS = 119, // u16 |RW| Number of starts burner during DHW mode
MSG_ID_BURNER_OPERATION_HOURS = 120, // u16 |RW| Number of hours that burner is in operation(i.e.flame on) MSG_ID_BURNER_OPERATION_HOURS = 120, // u16 |RW| Number of hours that burner is in operation(i.e.flame on)
MSG_ID_CH_PUMP_OPERATION_HOURS = 121, // u16 |RW| Number of hours that CH pump has been running MSG_ID_CH_PUMP_OPERATION_HOURS = 121, // u16 |RW| Number of hours that CH pump has been running
MSG_ID_DHW_PUMP_VALVE_OPERATION_HOURS = 122, // u16 |RW| Number of hours that DHW pump has been running or DHW valve has been opened MSG_ID_DHW_PUMP_VALVE_OPERATION_HOURS =
122, // u16 |RW| Number of hours that DHW pump has been running or DHW valve has been opened
MSG_ID_DHW_BURNER_OOPERATION_HOURS = 123, // u16 |-W| Number of hours that burner is in operation during DHW mode MSG_ID_DHW_BURNER_OOPERATION_HOURS = 123, // u16 |-W| Number of hours that burner is in operation during DHW mode
MSG_ID_OPENTERM_VERSION_MASTER = 124, // f8.8 |R-| The implemented version of the OpenTherm Protocol Specification in the master. MSG_ID_OPENTERM_VERSION_MASTER =
MSG_ID_OPENTERM_VERSION_SLAVE = 125, // f8.8 |-W| The implemented version of the OpenTherm Protocol Specification in the slave. 124, // f8.8 |R-| The implemented version of the OpenTherm Protocol Specification in the master.
MSG_ID_OPENTERM_VERSION_SLAVE =
125, // f8.8 |-W| The implemented version of the OpenTherm Protocol Specification in the slave.
MSG_ID_MASTER_VERSION = 126, // u8/u8 |-W| Master product version number and type MSG_ID_MASTER_VERSION = 126, // u8/u8 |-W| Master product version number and type
MSG_ID_SLAVE_VERSION = 127, // u8/u8 |R-| Slave product version number and type MSG_ID_SLAVE_VERSION = 127, // u8/u8 |R-| Slave product version number and type
} open_therm_message_id_t; } open_therm_message_id_t;
// clang-format on
typedef enum OpenThermStatus typedef enum OpenThermStatus
{ {