mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Fixe compilation error with no DEBUG_THERMOSTAT
This commit is contained in:
parent
be6fbefb46
commit
d352277c8e
@ -1253,6 +1253,7 @@ void ThermostatTimerDisarm(uint8_t ctr_output)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_THERMOSTAT
|
#ifdef DEBUG_THERMOSTAT
|
||||||
|
|
||||||
void ThermostatVirtualSwitch(uint8_t ctr_output)
|
void ThermostatVirtualSwitch(uint8_t ctr_output)
|
||||||
{
|
{
|
||||||
char domoticz_in_topic[] = DOMOTICZ_IN_TOPIC;
|
char domoticz_in_topic[] = DOMOTICZ_IN_TOPIC;
|
||||||
@ -1269,28 +1270,6 @@ void ThermostatVirtualSwitchCtrState(uint8_t ctr_output)
|
|||||||
MqttPublish(domoticz_in_topic);
|
MqttPublish(domoticz_in_topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t ThermostatGetDutyCycle(uint8_t ctr_output)
|
|
||||||
{
|
|
||||||
uint8_t value = 0;
|
|
||||||
if ( (Thermostat[ctr_output].status.controller_mode == CTR_PI)
|
|
||||||
|| ((Thermostat[ctr_output].status.controller_mode == CTR_HYBRID)
|
|
||||||
&&(Thermostat[ctr_output].status.phase_hybrid_ctr == CTR_HYBRID_PI))) {
|
|
||||||
value = Thermostat[ctr_output].time_total_pi / Thermostat[ctr_output].time_pi_cycle;
|
|
||||||
}
|
|
||||||
else if ( (Thermostat[ctr_output].status.controller_mode == CTR_RAMP_UP)
|
|
||||||
|| ((Thermostat[ctr_output].status.controller_mode == CTR_HYBRID)
|
|
||||||
&&(Thermostat[ctr_output].status.phase_hybrid_ctr == CTR_HYBRID_RAMP_UP))) {
|
|
||||||
if (Thermostat[ctr_output].status.status_output == IFACE_ON) {
|
|
||||||
value = 100;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
value = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ThermostatDebug(uint8_t ctr_output)
|
void ThermostatDebug(uint8_t ctr_output)
|
||||||
{
|
{
|
||||||
char result_chr[FLOATSZ];
|
char result_chr[FLOATSZ];
|
||||||
@ -1349,6 +1328,27 @@ void ThermostatDebug(uint8_t ctr_output)
|
|||||||
}
|
}
|
||||||
#endif // DEBUG_THERMOSTAT
|
#endif // DEBUG_THERMOSTAT
|
||||||
|
|
||||||
|
uint8_t ThermostatGetDutyCycle(uint8_t ctr_output)
|
||||||
|
{
|
||||||
|
uint8_t value = 0;
|
||||||
|
if ( (Thermostat[ctr_output].status.controller_mode == CTR_PI)
|
||||||
|
|| ((Thermostat[ctr_output].status.controller_mode == CTR_HYBRID)
|
||||||
|
&&(Thermostat[ctr_output].status.phase_hybrid_ctr == CTR_HYBRID_PI))) {
|
||||||
|
value = Thermostat[ctr_output].time_total_pi / Thermostat[ctr_output].time_pi_cycle;
|
||||||
|
}
|
||||||
|
else if ( (Thermostat[ctr_output].status.controller_mode == CTR_RAMP_UP)
|
||||||
|
|| ((Thermostat[ctr_output].status.controller_mode == CTR_HYBRID)
|
||||||
|
&&(Thermostat[ctr_output].status.phase_hybrid_ctr == CTR_HYBRID_RAMP_UP))) {
|
||||||
|
if (Thermostat[ctr_output].status.status_output == IFACE_ON) {
|
||||||
|
value = 100;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
void ThermostatGetLocalSensor(uint8_t ctr_output) {
|
void ThermostatGetLocalSensor(uint8_t ctr_output) {
|
||||||
String buf = ResponseData(); // copy the string into a new buffer that will be modified
|
String buf = ResponseData(); // copy the string into a new buffer that will be modified
|
||||||
JsonParser parser((char*)buf.c_str());
|
JsonParser parser((char*)buf.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user