mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Fix kCommandSource adding heating source
This commit is contained in:
parent
f937504dd5
commit
5122ea6c10
@ -354,13 +354,13 @@ String buffer;
|
|||||||
client->println(msg);
|
client->println(msg);
|
||||||
#endif
|
#endif
|
||||||
client->println('.');
|
client->println('.');
|
||||||
#ifdef DEBUG_EMAIL_PORT
|
#ifdef _EMAIL_PORT
|
||||||
AddLog_P2(LOG_LEVEL_INFO, PSTR("%s"),buffer.c_str());
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("%s"),buffer.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
buffer = F("QUIT");
|
buffer = F("QUIT");
|
||||||
client->println(buffer);
|
client->println(buffer);
|
||||||
#ifdef DEBUG_EMAIL_PORT
|
#ifdef _EMAIL_PORT
|
||||||
AddLog_P2(LOG_LEVEL_INFO, PSTR("%s"),buffer.c_str());
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("%s"),buffer.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ enum CommandSource { SRC_IGNORE, SRC_MQTT, SRC_RESTART, SRC_BUTTON, SRC_SWITCH,
|
|||||||
SRC_TIMER, SRC_RULE, SRC_MAXPOWER, SRC_MAXENERGY, SRC_OVERTEMP, SRC_LIGHT, SRC_KNX, SRC_DISPLAY, SRC_WEMO, SRC_HUE, SRC_RETRY, SRC_REMOTE, SRC_SHUTTER,
|
SRC_TIMER, SRC_RULE, SRC_MAXPOWER, SRC_MAXENERGY, SRC_OVERTEMP, SRC_LIGHT, SRC_KNX, SRC_DISPLAY, SRC_WEMO, SRC_HUE, SRC_RETRY, SRC_REMOTE, SRC_SHUTTER,
|
||||||
SRC_HEATING, SRC_MAX };
|
SRC_HEATING, SRC_MAX };
|
||||||
const char kCommandSource[] PROGMEM = "I|MQTT|Restart|Button|Switch|Backlog|Serial|WebGui|WebCommand|WebConsole|PulseTimer|"
|
const char kCommandSource[] PROGMEM = "I|MQTT|Restart|Button|Switch|Backlog|Serial|WebGui|WebCommand|WebConsole|PulseTimer|"
|
||||||
"Timer|Rule|MaxPower|MaxEnergy|Overtemp|Light|Knx|Display|Wemo|Hue|Retry|Remote|Shutter";
|
"Timer|Rule|MaxPower|MaxEnergy|Overtemp|Light|Knx|Display|Wemo|Hue|Retry|Remote|Shutter|Heating";
|
||||||
|
|
||||||
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };
|
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#define XDRV_39 39
|
#define XDRV_39 39
|
||||||
|
|
||||||
|
#define DEBUG_HEATING
|
||||||
|
|
||||||
enum HeatingModes { HEAT_OFF, HEAT_AUTOMATIC_OP, HEAT_MANUAL_OP, HEAT_TIME_PLAN };
|
enum HeatingModes { HEAT_OFF, HEAT_AUTOMATIC_OP, HEAT_MANUAL_OP, HEAT_TIME_PLAN };
|
||||||
enum ControllerModes { CTR_HYBRID, CTR_PI, CTR_RAMP_UP };
|
enum ControllerModes { CTR_HYBRID, CTR_PI, CTR_RAMP_UP };
|
||||||
enum ControllerHybridPhases { CTR_HYBRID_RAMP_UP, CTR_HYBRID_PI };
|
enum ControllerHybridPhases { CTR_HYBRID_RAMP_UP, CTR_HYBRID_PI };
|
||||||
@ -53,7 +55,11 @@ typedef union {
|
|||||||
uint16_t status_output : 1; // Status of the output switch
|
uint16_t status_output : 1; // Status of the output switch
|
||||||
uint16_t status_cycle_active : 1; // Status showing if cycle is active (Output ON) or not (Output OFF)
|
uint16_t status_cycle_active : 1; // Status showing if cycle is active (Output ON) or not (Output OFF)
|
||||||
uint16_t state_emergency : 1; // State for heating emergency
|
uint16_t state_emergency : 1; // State for heating emergency
|
||||||
|
<<<<<<< HEAD
|
||||||
uint16_t counter_seconds : 6; // Second counter
|
uint16_t counter_seconds : 6; // Second counter
|
||||||
|
=======
|
||||||
|
uint16_t counter_seconds : 6; // Second counter used to track minutes
|
||||||
|
>>>>>>> new_branch_dev
|
||||||
};
|
};
|
||||||
} HeatingBitfield;
|
} HeatingBitfield;
|
||||||
|
|
||||||
@ -167,7 +173,7 @@ bool HeatingMinuteCounter()
|
|||||||
|
|
||||||
if ((Heating.status.counter_seconds % 60) == 0) {
|
if ((Heating.status.counter_seconds % 60) == 0) {
|
||||||
result = true;
|
result = true;
|
||||||
Heating.status.counter_seconds = 1;
|
Heating.status.counter_seconds = 0;
|
||||||
}
|
}
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
@ -1156,6 +1162,9 @@ void CmndTimePiIntegrRead(void)
|
|||||||
|
|
||||||
bool Xdrv39(uint8_t function)
|
bool Xdrv39(uint8_t function)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_HEATING
|
||||||
|
char result_chr[FLOATSZ];
|
||||||
|
#endif
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
switch (function) {
|
switch (function) {
|
||||||
@ -1172,6 +1181,18 @@ bool Xdrv39(uint8_t function)
|
|||||||
if (HeatingMinuteCounter()) {
|
if (HeatingMinuteCounter()) {
|
||||||
HeatingSignalProcessingSlow();
|
HeatingSignalProcessingSlow();
|
||||||
HeatingController();
|
HeatingController();
|
||||||
|
#ifdef DEBUG_HEATING
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR(""));
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("------ Heating Start ------"));
|
||||||
|
dtostrfd(Heating.status.counter_seconds, 0, result_chr);
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("Heating.status.counter_seconds: %s"), result_chr);
|
||||||
|
dtostrfd(Heating.status.heating_mode, 0, result_chr);
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("Heating.status.heating_mode: %s"), result_chr);
|
||||||
|
dtostrfd(Heating.status.heating_mode, 0, result_chr);
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("Heating.status.heating_mode: %s"), result_chr);
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("------ Heating End ------"));
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR(""));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FUNC_COMMAND:
|
case FUNC_COMMAND:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user