Commit 6084f80f3433a2ba2d5c56514ffd154333413ede
1 parent
3ba70b09
Renamed a few #define labels
Showing
2 changed files
with
19 additions
and
19 deletions
examples/Advanced_Thermostat/Advanced_Thermostat.ino
| ... | ... | @@ -57,9 +57,9 @@ |
| 57 | 57 | #define CH_MAX_SETPOINT (60.0f) // If your house is well isolated and/or you have low temperature radiators this could be as low as 40.0f |
| 58 | 58 | #define CH_MIN_SETPOINT (10.0f) // If the boiler starts it will warm up untill at least this temperature (unless the desired room temperature is reached before) |
| 59 | 59 | |
| 60 | -#define ENABLE_HEATING (true) // If the boiler supports Central Heating (CH), use the boiler for heating | |
| 61 | -#define ENABLE_COOLING (true) // If the boiler supports cooling, use the boiler for cooling | |
| 62 | -#define ENABLE_DOMESTIC_HOT_WATER (true) // If the boiler supports Domestic Hot Water (DHW), use the boiler for DHW | |
| 60 | +#define BOILER_ENABLE_HEATING (true) // If the boiler supports Central Heating (CH), use the boiler for heating | |
| 61 | +#define BOILER_ENABLE_COOLING (true) // If the boiler supports cooling, use the boiler for cooling | |
| 62 | +#define BOILER_ENABLE_DOMESTIC_HOT_WATER (true) // If the boiler supports Domestic Hot Water (DHW), use the boiler for DHW | |
| 63 | 63 | |
| 64 | 64 | #include <Wire.h> |
| 65 | 65 | #include <Adafruit_Sensor.h> |
| ... | ... | @@ -185,22 +185,22 @@ void loop() { |
| 185 | 185 | |
| 186 | 186 | // primaryFlags is used to tell the secondary device (boiler) what available services (Central heating, cooling, domestic hot water) it wants to make use of, if present |
| 187 | 187 | // The meaning of each bit is defined in enum class OpenTherm::STATUS_FLAGS |
| 188 | - // ENABLE_DOMESTIC_HOT_WATER is a #define. If defined 'true' then domestic hot water is enabled if it is available in the boiler. The previously read secondaryFlags are used to detect this capability | |
| 188 | + // BOILER_ENABLE_DOMESTIC_HOT_WATER is a #define. If defined 'true' then domestic hot water is enabled if it is available in the boiler. The previously read secondaryFlags are used to detect this capability | |
| 189 | 189 | uint8_t primaryFlags; |
| 190 | - if(ENABLE_DOMESTIC_HOT_WATER && (secondaryFlags & uint8_t(OpenTherm::CONFIGURATION_FLAGS::SECONDARY_DHW))) { | |
| 190 | + if(BOILER_ENABLE_DOMESTIC_HOT_WATER && (secondaryFlags & uint8_t(OpenTherm::CONFIGURATION_FLAGS::SECONDARY_DHW))) { | |
| 191 | 191 | Serial.println("Enable Domestic Hot Water (DHW)"); |
| 192 | 192 | primaryFlags |= uint8_t(OpenTherm::STATUS_FLAGS::PRIMARY_DHW_ENABLE); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - // ENABLE_HEATING is a #define. If defined 'true' then central heating is enabled. | |
| 196 | -// if(roomTemperature < ROOM_TEMPERATURE_SETPOINT && ENABLE_HEATING) { | |
| 197 | - if(ENABLE_HEATING) { | |
| 195 | + // BOILER_ENABLE_HEATING is a #define. If defined 'true' then central heating is enabled. | |
| 196 | +// if(roomTemperature < ROOM_TEMPERATURE_SETPOINT && BOILER_ENABLE_HEATING) { | |
| 197 | + if(BOILER_ENABLE_HEATING) { | |
| 198 | 198 | Serial.println("Enable Central Heating (CH)"); |
| 199 | 199 | primaryFlags |= uint8_t(OpenTherm::STATUS_FLAGS::PRIMARY_CH_ENABLE); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - // ENABLE_COOLING is a #define. If defined 'true' then cooling is enabled. secondaryFlags is used to detect the capability | |
| 203 | - if(ENABLE_COOLING && (secondaryFlags & uint8_t(OpenTherm::CONFIGURATION_FLAGS::SECONDARY_COOLING))) { | |
| 202 | + // BOILER_ENABLE_COOLING is a #define. If defined 'true' then cooling is enabled. secondaryFlags is used to detect the capability | |
| 203 | + if(BOILER_ENABLE_COOLING && (secondaryFlags & uint8_t(OpenTherm::CONFIGURATION_FLAGS::SECONDARY_COOLING))) { | |
| 204 | 204 | Serial.println("Enable cooling"); |
| 205 | 205 | primaryFlags |= uint8_t(OpenTherm::STATUS_FLAGS::PRIMARY_COOLING_ENABLE); |
| 206 | 206 | } | ... | ... |
examples/MQTT_Advanced_Thermostat/MQTT_Advanced_Thermostat.ino
| ... | ... | @@ -125,11 +125,11 @@ |
| 125 | 125 | #define CH_MIN_SETPOINT (10.0f) |
| 126 | 126 | |
| 127 | 127 | // If the boiler supports Central Heating (CH), use the boiler for heating |
| 128 | -#define BOILER_HEATING_MODE (true) | |
| 128 | +#define BOILER_ENABLE_HEATING (true) | |
| 129 | 129 | // If the boiler supports cooling, use the boiler for cooling. |
| 130 | -#define BOILER_COOLING_MODE (true) | |
| 130 | +#define BOILER_ENABLE_COOLING (true) | |
| 131 | 131 | // If the boiler supports Domestic Hot Water (DHW), use the boiler for DHW |
| 132 | -#define BOILER_DOMESTIC_HOT_WATER_MODE (true) | |
| 132 | +#define BOILER_ENABLE_DOMESTIC_HOT_WATER (true) | |
| 133 | 133 | |
| 134 | 134 | |
| 135 | 135 | // Cheap sensor tend to be inaccurate. Accuracy can be increased by adding two temperatures as measured by the sensor and the 'real' temperature as measured with a calibrated thermometer |
| ... | ... | @@ -373,20 +373,20 @@ void showCapabilities(uint8_t secondaryFlags, uint8_t secondaryMemberIDCode) { |
| 373 | 373 | uint8_t requestServices(float CHSetpoint) { |
| 374 | 374 | uint8_t primaryFlags = 0; |
| 375 | 375 | |
| 376 | - // BOILER_DOMESTIC_HOT_WATER_MODE is a #define. If defined 'true' then domestic hot water is enabled | |
| 377 | - if(BOILER_DOMESTIC_HOT_WATER_MODE) { | |
| 376 | + // BOILER_ENABLE_DOMESTIC_HOT_WATER is a #define. If defined 'true' then domestic hot water is enabled | |
| 377 | + if(BOILER_ENABLE_DOMESTIC_HOT_WATER) { | |
| 378 | 378 | Serial.println("+ Enable Domestic Hot Water (DHW)"); |
| 379 | 379 | primaryFlags |= uint8_t(OpenTherm::STATUS_FLAGS::PRIMARY_DHW_ENABLE); |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | - // BOILER_HEATING_MODE is a #define. If defined 'true' then central heating is enabled. | |
| 383 | - if(BOILER_HEATING_MODE && CHSetpoint > CH_MIN_SETPOINT) { | |
| 382 | + // BOILER_ENABLE_HEATING is a #define. If defined 'true' then central heating is enabled. | |
| 383 | + if(BOILER_ENABLE_HEATING && CHSetpoint > CH_MIN_SETPOINT) { | |
| 384 | 384 | Serial.println("+ Enable Central Heating (CH)"); |
| 385 | 385 | primaryFlags |= uint8_t(OpenTherm::STATUS_FLAGS::PRIMARY_CH_ENABLE); |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | - // BOILER_COOLING_MODE is a #define. If defined 'true' then cooling is enabled | |
| 389 | - if(BOILER_COOLING_MODE) { | |
| 388 | + // BOILER_ENABLE_COOLING is a #define. If defined 'true' then cooling is enabled | |
| 389 | + if(BOILER_ENABLE_COOLING) { | |
| 390 | 390 | Serial.println("+ Enable cooling"); |
| 391 | 391 | primaryFlags |= uint8_t(OpenTherm::STATUS_FLAGS::PRIMARY_COOLING_ENABLE); |
| 392 | 392 | } | ... | ... |