mirror of
https://github.com/gonzho000/chpc.git
synced 2025-01-14 20:44:04 +00:00
Add files via upload
This commit is contained in:
parent
629fad6047
commit
f4b00eb92e
1 changed files with 45 additions and 23 deletions
|
@ -30,8 +30,8 @@
|
||||||
|
|
||||||
#define INPUTS_AS_BUTTONS 1 //pulldown resistors required!
|
#define INPUTS_AS_BUTTONS 1 //pulldown resistors required!
|
||||||
|
|
||||||
#define RS485_PYTHON 1
|
//#define RS485_PYTHON 1
|
||||||
//#define RS485_HUMAN 2
|
#define RS485_HUMAN 2
|
||||||
//#define RS485_NONE 3
|
//#define RS485_NONE 3
|
||||||
|
|
||||||
#define EEV_SUPPORT
|
#define EEV_SUPPORT
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
#define EEV_HYSTERESIS 0.6 //must be less than EEV_PRECISE_START, ex: target difference = 4.0, hysteresis = 0.1, when difference in range 4.0..4.1 no EEV pulses will be done;
|
#define EEV_HYSTERESIS 0.6 //must be less than EEV_PRECISE_START, ex: target difference = 4.0, hysteresis = 0.1, when difference in range 4.0..4.1 no EEV pulses will be done;
|
||||||
#define EEV_CLOSEEVERY 86400000 //86400000: every 24 hours, done while HP is NOT working
|
#define EEV_CLOSEEVERY 86400000 //86400000: every 24 hours, done while HP is NOT working
|
||||||
#define EEV_TARGET_TEMP_DIFF 4.0 //target difference between Before Evaporator and After Evaporator
|
#define EEV_TARGET_TEMP_DIFF 4.0 //target difference between Before Evaporator and After Evaporator
|
||||||
//#define EEV_DEBUG //used to debug during fine tuning
|
//#define EEV_DEBUG //used to debug during fine tuning, "RS485_HUMAN" only
|
||||||
|
|
||||||
#define MAGIC 0x46 //change if u want to reinit T sensors
|
#define MAGIC 0x46 //change if u want to reinit T sensors
|
||||||
//-----------------------USER OPTIONS END -----------------------
|
//-----------------------USER OPTIONS END -----------------------
|
||||||
|
@ -118,10 +118,10 @@ v1.3, 30 Apr 2019:
|
||||||
- emergency jumper support
|
- emergency jumper support
|
||||||
- inputs support
|
- inputs support
|
||||||
- ? rewite re-init proc from MAGIC to emergency jumper removal at board start
|
- ? rewite re-init proc from MAGIC to emergency jumper removal at board start
|
||||||
- ? few devices at same lane for RS485_HUMAN
|
|
||||||
- ? EEV target to EEPROM
|
- ? EEV target to EEPROM
|
||||||
- ? list T and other things on screen with buttons
|
- ? list T and other things on screen with buttons
|
||||||
- ? EEV define maximum working position
|
- ? EEV define maximum working position
|
||||||
|
- ? few devices at same lane for RS485_HUMAN
|
||||||
*/
|
*/
|
||||||
//-----------------------changelog END-----------------------
|
//-----------------------changelog END-----------------------
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ wattage1
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
String fw_version = "1.3";
|
String fw_version = "1.4";
|
||||||
|
|
||||||
#ifdef DISPLAY_096
|
#ifdef DISPLAY_096
|
||||||
#define DISPLAY DISPLAY_096
|
#define DISPLAY DISPLAY_096
|
||||||
|
@ -566,6 +566,7 @@ long ReadVcc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
char CheckAddrExists(void) {
|
char CheckAddrExists(void) {
|
||||||
|
/*
|
||||||
for (i = 0; i < 8; i++) { if (dev_addr[i] != Tae.addr[i]) break; }
|
for (i = 0; i < 8; i++) { if (dev_addr[i] != Tae.addr[i]) break; }
|
||||||
if (i == 8) return 1;
|
if (i == 8) return 1;
|
||||||
for (i = 0; i < 8; i++) { if (dev_addr[i] != Tbe.addr[i]) break; }
|
for (i = 0; i < 8; i++) { if (dev_addr[i] != Tbe.addr[i]) break; }
|
||||||
|
@ -593,6 +594,27 @@ char CheckAddrExists(void) {
|
||||||
for (i = 0; i < 8; i++) { if (dev_addr[i] != Ts2.addr[i]) break;}
|
for (i = 0; i < 8; i++) { if (dev_addr[i] != Ts2.addr[i]) break;}
|
||||||
if (i == 8) return 1;
|
if (i == 8) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
*/
|
||||||
|
//!!!!! optimised v1.4, untested !!!!!
|
||||||
|
for (i = 0; i < 8; i++) {
|
||||||
|
if ( (dev_addr[i] != Tae.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tbe.addr[i]) &&
|
||||||
|
(dev_addr[i] != Ttarget.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tsump.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tci.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tco.addr[i]) &&
|
||||||
|
(dev_addr[i] != Thi.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tho.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tbc.addr[i]) &&
|
||||||
|
(dev_addr[i] != Tac.addr[i]) &&
|
||||||
|
(dev_addr[i] != Touter.addr[i]) &&
|
||||||
|
(dev_addr[i] != Ts1.addr[i]) &&
|
||||||
|
(dev_addr[i] != Ts2.addr[i])
|
||||||
|
)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (i == 8) return 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitS_and_D(void) {
|
void InitS_and_D(void) {
|
||||||
|
@ -1712,7 +1734,7 @@ void loop(void) {
|
||||||
#ifdef EEV_DEBUG
|
#ifdef EEV_DEBUG
|
||||||
PrintS(F("EEV: 13 open to work"));
|
PrintS(F("EEV: 13 open to work"));
|
||||||
#endif
|
#endif
|
||||||
if (EEV_OPEN_AFTER_CLOSE != 0) { //full close protection
|
if (EEV_MINWORKPOS != 0) { //full close protection
|
||||||
EEV_apulses = EEV_MINWORKPOS - EEV_cur_pos;
|
EEV_apulses = EEV_MINWORKPOS - EEV_cur_pos;
|
||||||
EEV_adonotcare = 0;
|
EEV_adonotcare = 0;
|
||||||
EEV_fast = 1;
|
EEV_fast = 1;
|
||||||
|
@ -2147,7 +2169,7 @@ void loop(void) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//default, just for example
|
//default, just for example
|
||||||
outString += "{\"result\":\"no_command\"}";
|
outString += "{\"err\":\"no_command\"}";
|
||||||
}
|
}
|
||||||
//crc.integer = CRC16.xmodem((uint8_t& *) outString, outString.length());
|
//crc.integer = CRC16.xmodem((uint8_t& *) outString, outString.length());
|
||||||
//outString += (crc, HEX);
|
//outString += (crc, HEX);
|
||||||
|
|
Loading…
Reference in a new issue