Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeakes committed May 13, 2024
1 parent a033fc3 commit 675b0f5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
21 changes: 21 additions & 0 deletions extras/aqua.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,33 @@ function check_git_installed {
function check_curl_installed {
command -v curl >/dev/null 2>&1 || { echoerr "curl is not installed. Installing"; exit 1; }
}

#
# Main
#

# Check we are on a arm 32 bit machine.

# below is compatable on all linux.
#if file -Lb /usr/bin/ld | grep -s -i armhf > /dev/null; then
# dpkg is good for debain distros.
if dpkg --print-architecture | grep -s -i armhf > /dev/null; then
echo "Architecture is armhf";
else
echo "Architecture is '`dpkg --print-architecture`'"
echo "This does not look like linux running on a arm 32 platform"
echo "Please use another install method"
echo "https://github.com/sfeakes/AqualinkD/wiki#Install"
exit
fi

# Check something was passed
if [[ $# -eq 0 ]]; then
print_usage
exit
fi


# Pass command line
if [ "$1" == "release" ]; then
check_curl_installed
Expand Down
2 changes: 1 addition & 1 deletion onetouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ bool log_qeuiptment_status_VP2(struct aqualinkdata *aq_data)
} else if (PANEL_SIZE() >= 16 ) {
// Loop over RS 16 buttons.
get_RS16buttoninfo_from_menu(aq_data, i);
}
#endif
}
}

return rtn;
Expand Down
Binary file modified release/aqualinkd
Binary file not shown.
8 changes: 4 additions & 4 deletions simulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#define MAX_STACK 20
int _sim_stack_place = 0;
unsigned char _commands[MAX_STACK];
unsigned char _sim_commands[MAX_STACK];

bool push_simulator_cmd(unsigned char cmd);

Expand All @@ -27,7 +27,7 @@ void simulator_send_cmd(unsigned char cmd)
bool push_simulator_cmd(unsigned char cmd)
{
if (_sim_stack_place < MAX_STACK) {
_commands[_sim_stack_place] = cmd;
_sim_commands[_sim_stack_place] = cmd;
_sim_stack_place++;
} else {
LOG(SIM_LOG, LOG_ERR, "Command queue overflow, too many unsent commands to RS control panel\n");
Expand All @@ -42,9 +42,9 @@ unsigned char pop_simulator_cmd(unsigned char receive_type)
unsigned char cmd = NUL;

if (_sim_stack_place > 0 && receive_type == CMD_STATUS ) {
cmd = _commands[0];
cmd = _sim_commands[0];
_sim_stack_place--;
memmove(&_commands[0], &_commands[1], sizeof(unsigned char) * _sim_stack_place ) ;
memmove(&_sim_commands[0], &_sim_commands[1], sizeof(unsigned char) * _sim_stack_place ) ;
}

LOG(SIM_LOG,LOG_DEBUG, "Sending '0x%02hhx' to controller\n", cmd);
Expand Down

0 comments on commit 675b0f5

Please sign in to comment.