mirror of https://github.com/sfeakes/AqualinkD.git
Version 1.3.5a
parent
05ecbe97e4
commit
30fff5c21f
|
@ -63,6 +63,8 @@ Designed to mimic AqualinkRS6 All Button keypad, and just like the keypad you ca
|
|||
* http://aqualink.ip/simple.html <- (Simple opion if you don't like the above)
|
||||
* http://aqualink.ip/simulator.html <- (RS8 All Button Control Panel simulator)
|
||||
#<a name="release"></a>
|
||||
# Update in Release 1.3.5a
|
||||
* Logic for SWG RS486 checksum_errors
|
||||
# Update in Release 1.3.5
|
||||
* Fixed SWG bug showing off/0% every ~15 seconds (introduced in 1.3.3)
|
||||
* PDA updates for freeze protect / SWG & general speed increase.
|
||||
|
|
|
@ -183,6 +183,10 @@ SPILLOVER IS DISABLED WHILE SPA IS ON
|
|||
|
||||
|
||||
/* AQUAPURE SWG */
|
||||
|
||||
// Number of set SWG % to 0 messages to ignore.
|
||||
#define SWG_ZERO_IGNORE_COUNT 10
|
||||
|
||||
// These are madeup.
|
||||
#define SWG_STATUS_OFF 0xFF
|
||||
#define SWG_STATUS_UNKNOWN -128
|
||||
|
@ -200,6 +204,7 @@ SPILLOVER IS DISABLED WHILE SPA IS ON
|
|||
#define SWG_STATUS_LOW_TEMP 0x40 // low watertemp 0x40
|
||||
#define SWG_STATUS_CHECK_PCB 0x80 // check PCB 0x80
|
||||
|
||||
|
||||
#define CMD_PDA_0x05 0x05
|
||||
#define CMD_PDA_0x1B 0x1b
|
||||
#define CMD_PDA_HIGHLIGHT 0x08
|
||||
|
|
24
aqualinkd.c
24
aqualinkd.c
|
@ -1001,6 +1001,7 @@ void main_loop()
|
|||
unsigned char packet_buffer[AQ_MAXPKTLEN+1];
|
||||
bool interestedInNextAck = false;
|
||||
bool changed = false;
|
||||
int swg_zero_cnt = 0;
|
||||
int i;
|
||||
//int delayAckCnt = 0;
|
||||
|
||||
|
@ -1190,13 +1191,24 @@ void main_loop()
|
|||
else if (packet_buffer[PKT_DEST] == SWG_DEV_ID)
|
||||
{
|
||||
interestedInNextAck = true;
|
||||
|
||||
// Only read message from controller to SWG to set SWG Percent if we are not programming, as we might be changing this
|
||||
if (packet_buffer[3] == CMD_PERCENT && _aqualink_data.active_thread.thread_id == 0)
|
||||
{
|
||||
// Only read message from controller to SWG to set SWG Percent if we are not programming, as we might be changing this
|
||||
_aqualink_data.swg_percent = (int)packet_buffer[4];
|
||||
changed = true;
|
||||
//logMessage(LOG_DEBUG, "SWG set to %d due to packet from control panel to SWG\n", _aqualink_data.swg_percent);
|
||||
//logMessage(LOG_DEBUG, "Read SWG Percent %d from ID 0x%02hhx\n", _aqualink_data.swg_percent, SWG_DEV_ID);
|
||||
{
|
||||
// SWG can get ~10 messages to set to 0 then go back again for some reason, so don't go to 0 until 10 messages are received
|
||||
if (swg_zero_cnt <= SWG_ZERO_IGNORE_COUNT && packet_buffer[4] == 0x00 && packet_buffer[5] == 0x73) {
|
||||
logMessage(LOG_DEBUG, "Ignoring SWG set to %d due to packet packet count %d <= %d from control panel to SWG 0x%02hhx 0x%02hhx\n", (int)packet_buffer[4],swg_zero_cnt,SWG_ZERO_IGNORE_COUNT,packet_buffer[4],packet_buffer[5]);
|
||||
swg_zero_cnt++;
|
||||
} else if (swg_zero_cnt > SWG_ZERO_IGNORE_COUNT && packet_buffer[4] == 0x00 && packet_buffer[5] == 0x73) {
|
||||
_aqualink_data.swg_percent = (int)packet_buffer[4];
|
||||
changed = true;
|
||||
//logMessage(LOG_DEBUG, "SWG set to %d due to packet from control panel to SWG 0x%02hhx 0x%02hhx\n", _aqualink_data.swg_percent,packet_buffer[4],packet_buffer[5]);
|
||||
} else {
|
||||
swg_zero_cnt = 0;
|
||||
_aqualink_data.swg_percent = (int)packet_buffer[4];
|
||||
changed = true;
|
||||
//logMessage(LOG_DEBUG, "SWG set to %d due to packet from control panel to SWG 0x%02hhx 0x%02hhx\n", _aqualink_data.swg_percent,packet_buffer[4],packet_buffer[5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
1
config.c
1
config.c
|
@ -84,6 +84,7 @@ void init_parameters (struct aqconfig * parms)
|
|||
parms->use_panel_aux_labels = false;
|
||||
parms->debug_RSProtocol_packets = false;
|
||||
parms->force_swg = false;
|
||||
//parms->swg_pool_and_spa = false;
|
||||
parms->read_pentair_packets = false;
|
||||
|
||||
generate_mqtt_id(parms->mqtt_ID, MQTT_ID_LEN);
|
||||
|
|
1
config.h
1
config.h
|
@ -59,6 +59,7 @@ struct aqconfig
|
|||
bool read_all_devices;
|
||||
bool use_panel_aux_labels;
|
||||
bool force_swg;
|
||||
//bool swg_pool_and_spa;
|
||||
//bool use_PDA_auxiliary;
|
||||
bool read_pentair_packets;
|
||||
bool debug_RSProtocol_packets;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue