Fix merge

This commit is contained in:
Javier Arigita 2020-04-23 22:44:06 +02:00
parent f325a436ba
commit 29ec129a05
1 changed files with 32 additions and 10 deletions

View File

@ -178,16 +178,6 @@ struct THERMOSTAT {
int8_t temp_hysteresis = THERMOSTAT_TEMP_HYSTERESIS; // Range hysteresis for temperature PI controller, in tenths of degrees celsius
uint8_t temp_frost_protect = THERMOSTAT_TEMP_FROST_PROTECT; // Minimum temperature for frost protection, in tenths of degrees celsius
uint16_t power_max = THERMOSTAT_POWER_MAX; // Maximum output power in Watt
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
uint16_t energy_thermostat_output_max = THERMOSTAT_ENERGY_OUTPUT_MAX; // Maximum allowed energy output for thermostat valve in Watts
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
ThermostatBitfield status; // Bittfield including states as well as several flags
} Thermostat;
@ -331,6 +321,7 @@ bool HeatStateManualToAuto()
// If switch input inactive
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
// AND no switch input action (time in current state) bigger than a pre-defined time
// then go to automatic
@ -339,6 +330,8 @@ bool HeatStateManualToAuto()
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
// AND sensor alive
// AND no switch input action (time in current state) bigger than a pre-defined time
@ -347,6 +340,9 @@ bool HeatStateManualToAuto()
&&(Thermostat.status.sensor_alive == IFACE_ON)
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
@ -455,6 +451,7 @@ void ThermostatCalculatePI()
// and accumulate error = 0
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
if (abs(Thermostat.temp_pi_error) > Thermostat.temp_reset_anti_windup) {
=======
@ -463,6 +460,9 @@ void ThermostatCalculatePI()
=======
if (abs(Thermostat.temp_pi_error) > (int16_t)Thermostat.temp_reset_anti_windup) {
>>>>>>> new_branch_dev
=======
if (abs(Thermostat.temp_pi_error) > (int16_t)Thermostat.temp_reset_anti_windup) {
>>>>>>> new_branch_dev
=======
if (abs(Thermostat.temp_pi_error) > (int16_t)Thermostat.temp_reset_anti_windup) {
>>>>>>> new_branch_dev
@ -544,6 +544,7 @@ void ThermostatCalculatePI()
// If target value has not been reached
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
// AND we are withing the histeresis
=======
@ -552,6 +553,9 @@ void ThermostatCalculatePI()
=======
// AND we are withinvr the histeresis
>>>>>>> new_branch_dev
=======
// AND we are withinvr the histeresis
>>>>>>> new_branch_dev
=======
// AND we are withinvr the histeresis
>>>>>>> new_branch_dev
@ -756,10 +760,13 @@ void ThermostatWork()
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
if (ThermostatSwitchStatus(Thermostat.input_switch_number) == 1) {
Thermostat.status.command_output = IFACE_ON;
@ -769,6 +776,9 @@ void ThermostatWork()
}
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
@ -901,6 +911,7 @@ void CmndTempMeasuredSet(void)
if (value != Thermostat.temp_measured) {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
int16_t temp_delta = (value - Thermostat.temp_measured); // in tenths of degrees
uint32_t time_delta = (timestamp - Thermostat.timestamp_temp_meas_change_update); // in seconds
@ -915,6 +926,11 @@ void CmndTempMeasuredSet(void)
uint32_t time_delta = (timestamp - Thermostat.timestamp_temp_meas_change_update); // in seconds
Thermostat.temp_measured_gradient = (int32_t)((360000 * temp_delta) / ((int32_t)time_delta)); // hundreths of degrees per hour
>>>>>>> new_branch_dev
=======
int32_t temp_delta = (value - Thermostat.temp_measured); // in tenths of degrees
uint32_t time_delta = (timestamp - Thermostat.timestamp_temp_meas_change_update); // in seconds
Thermostat.temp_measured_gradient = (int32_t)((360000 * temp_delta) / ((int32_t)time_delta)); // hundreths of degrees per hour
>>>>>>> new_branch_dev
=======
int32_t temp_delta = (value - Thermostat.temp_measured); // in tenths of degrees
uint32_t time_delta = (timestamp - Thermostat.timestamp_temp_meas_change_update); // in seconds
@ -1228,10 +1244,13 @@ bool Xdrv39(uint8_t function)
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
dtostrfd(Thermostat.temp_measured_gradient, 0, result_chr);
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("Thermostat.temp_measured_gradient: %s"), result_chr);
@ -1245,6 +1264,9 @@ bool Xdrv39(uint8_t function)
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("Thermostat.temp_rampup_output_off: %s"), result_chr);
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev
=======
>>>>>>> new_branch_dev