Skip to content

Commit

Permalink
Updates 2.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeakes committed Mar 30, 2024
1 parent ad8a07c commit 1f8001e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Designed to mimic AqualinkRS6 All Button keypad and (like the keypad) is used to
* Improve PDA panels reliability (PDA pannels are slower than RS panels)
* Potentially fixed Pentair VSP / SWG problems since Pentair VSP use a different protocol, this will allow a timed delay for the VSP to post a status messages. Seems to only effect RS485 bus when both a Pentair VSP and Jandy SWG are present.
* Add ```rs485_frame_delay = 4``` to /etc/aqualinkd.conf, 4 is number of milliseconds between frames, 0 will turn off ie no pause.
* PDA Changes to support SWG and Boot.

# Update in Release 2.3.2
* Added support for VSP on panel versions REV 0.1 & 0.2
Expand Down
5 changes: 0 additions & 5 deletions aq_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,4 @@ int PANEL_SIZE();
void initButtons_RS16(struct aqualinkdata *aqdata);
#endif

// Used in equiptment_update_cycle() for additional items on EQUIPMENT STATUS
// TOTAL_BUTTONS is at most 20 so bits 21-31 should be available
#define BOOST_INDEX 21
#define FREEZE_PROTECT_INDEX 22

#endif
18 changes: 12 additions & 6 deletions pda.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
#include "devices_jandy.h"
#include "rs_msg_utils.h"

// Used in equiptment_update_cycle() for additional items on EQUIPMENT STATUS
// TOTAL_BUTTONS is at most 20 so bits 21-31 should be available
#define PDA_BOOST_INDEX 21
#define PDA_FREEZE_PROTECT_INDEX 22


// static struct aqualinkdata _aqualink_data;
static struct aqualinkdata *_aqualink_data;
static unsigned char _last_packet_type;
Expand Down Expand Up @@ -157,13 +163,13 @@ void equiptment_update_cycle(int eqID) {
}

if ((_aqualink_data->frz_protect_state == ON) &&
(! (update_equiptment_bitmask & (1 << FREEZE_PROTECT_INDEX)))) {
(! (update_equiptment_bitmask & (1 << PDA_FREEZE_PROTECT_INDEX)))) {
LOG(PDA_LOG,LOG_DEBUG, "Turn off freeze protect not seen in last cycle\n");
_aqualink_data->frz_protect_state = ENABLE;
}

if ((_aqualink_data->boost) &&
(! (update_equiptment_bitmask & (1 << BOOST_INDEX)))) {
(! (update_equiptment_bitmask & (1 << PDA_BOOST_INDEX)))) {
LOG(PDA_LOG,LOG_DEBUG, "Turn off BOOST not seen in last cycle\n");
setSWGboost(_aqualink_data, false);
}
Expand All @@ -173,9 +179,9 @@ void equiptment_update_cycle(int eqID) {
char *eqName = NULL;
if (eqID < TOTAL_BUTTONS) {
eqName = _aqualink_data->aqbuttons[eqID].name;
} else if (eqID == FREEZE_PROTECT_INDEX) {
} else if (eqID == PDA_FREEZE_PROTECT_INDEX) {
eqName = "FREEZE PROTECT";
} else if (eqID == BOOST_INDEX) {
} else if (eqID == PDA_BOOST_INDEX) {
eqName = "BOOST";
} else {
eqName = "UNKNOWN";
Expand Down Expand Up @@ -668,13 +674,13 @@ void process_pda_packet_msg_long_equiptment_status(const char *msg_line, int lin
else if ((index = rsm_strncasestr(msg, "FREEZE PROTECT", AQ_MSGLEN)) != NULL)
{
_aqualink_data->frz_protect_state = ON;
equiptment_update_cycle(FREEZE_PROTECT_INDEX);
equiptment_update_cycle(PDA_FREEZE_PROTECT_INDEX);
LOG(PDA_LOG,LOG_DEBUG, "Freeze Protect is on\n");
}
else if ((index = rsm_strncasestr(msg, "BOOST", AQ_MSGLEN)) != NULL)
{
setSWGboost(_aqualink_data, true);
equiptment_update_cycle(BOOST_INDEX);
equiptment_update_cycle(PDA_BOOST_INDEX);
}
else if ((_aqualink_data->boost) && ((index = rsm_strncasestr(msg, "REMAIN", AQ_MSGLEN)) != NULL))
{
Expand Down
Binary file modified release/aqualinkd
Binary file not shown.

0 comments on commit 1f8001e

Please sign in to comment.