mirror of https://github.com/sfeakes/AqualinkD.git
Quick fix
parent
5aab2be415
commit
d86e25cd35
6
Makefile
6
Makefile
|
@ -166,14 +166,14 @@ $(SL_OBJ_DIR)/%.o: %.c | $(SL_OBJ_DIR)
|
|||
|
||||
# Rules to link
|
||||
$(MAIN): $(OBJ_FILES)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -o $@ $^
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^ $(LIBS)
|
||||
|
||||
$(DEBG): $(DBG_OBJ_FILES)
|
||||
$(CC) $(DBG_CFLAGS) $(INCLUDES) $(LIBS) -o $@ $^
|
||||
$(CC) $(DBG_CFLAGS) $(INCLUDES) -o $@ $^ $(LIBS)
|
||||
|
||||
$(SLOG): CFLAGS := $(CFLAGS) -D SERIAL_LOGGER
|
||||
$(SLOG): $(SL_OBJ_FILES)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -o $@ $^
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^ $(LIBS)
|
||||
|
||||
# Rules to make object directories.
|
||||
$(OBJ_DIR):
|
||||
|
|
|
@ -233,6 +233,7 @@ struct aqualinkdata
|
|||
unsigned char raw_status[AQ_PSTLEN];
|
||||
// Multiple threads update this value.
|
||||
volatile bool updated;
|
||||
volatile bool run_slogger;
|
||||
|
||||
#ifdef AQ_RS16
|
||||
int rs16_vbutton_start;
|
||||
|
|
10
aqualinkd.c
10
aqualinkd.c
|
@ -51,6 +51,7 @@
|
|||
#include "rs_msg_utils.h"
|
||||
#include "serialadapter.h"
|
||||
#include "debug_timer.h"
|
||||
#include "serial_logger.h"
|
||||
|
||||
/*
|
||||
#if defined AQ_DEBUG || defined AQ_TM_DEBUG
|
||||
|
@ -648,7 +649,7 @@ void _processMessage(char *message, bool reset)
|
|||
}
|
||||
*/
|
||||
}
|
||||
else if (strstr(msg, " REV ") != NULL)
|
||||
else if (strstr(msg, " REV ") != NULL || strstr(msg, " REV. ") != NULL)
|
||||
{ // '8157 REV MMM'
|
||||
// A master firmware revision message.
|
||||
strcpy(_aqualink_data.version, msg);
|
||||
|
@ -1765,6 +1766,13 @@ void main_loop()
|
|||
blank_read = 0;
|
||||
}
|
||||
|
||||
if (_aqualink_data.run_slogger) {
|
||||
LOG(AQUA_LOG,LOG_WARNING, "Starting serial_logger, this will take some time!\n");
|
||||
broadcast_aqualinkstate_error(CONNECTION_RUNNING_SLOG);
|
||||
serial_logger(rs_fd, _aqconfig_.serial_port, getSystemLogLevel());
|
||||
_aqualink_data.run_slogger = false;
|
||||
}
|
||||
|
||||
packet_length = get_packet(rs_fd, packet_buffer);
|
||||
|
||||
if (packet_length <= 0)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue