Version update

pull/46/head
shaun feakes 2018-03-06 19:02:47 -06:00
parent 8f10e6e0fc
commit b55fffa28f
3 changed files with 8 additions and 1 deletions

View File

@ -71,16 +71,20 @@ int init_serial_port(char* tty)
logMessage(LOG_ERR, "Unable to open port: %s\n", tty);
return -1;
}
logMessage(LOG_DEBUG_SERIAL, "Openeded serial port %s\n",tty);
#ifdef BLOCKING_MODE
fcntl(fd, F_SETFL, 0);
newtio.c_cc[VMIN]= 1;
newtio.c_cc[VTIME]= 0;
logMessage(LOG_DEBUG_SERIAL, "Set serial port %s to blocking mode\n",tty);
#else
int flags = fcntl(fd, F_GETFL, 0);
fcntl(fd, F_SETFL, flags | O_NONBLOCK | O_NDELAY);
newtio.c_cc[VMIN]= 0;
newtio.c_cc[VTIME]= 1;
logMessage(LOG_DEBUG_SERIAL, "Set serial port %s to non blocking mode\n",tty);
#endif
tcgetattr(fd, &_oldtio); // save current port settings
@ -93,6 +97,8 @@ int init_serial_port(char* tty)
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &newtio);
logMessage(LOG_DEBUG_SERIAL, "Set serial port %s io attributes\n",tty);
return fd;
}
@ -101,6 +107,7 @@ void close_serial_port(int fd)
{
tcsetattr(fd, TCSANOW, &_oldtio);
close(fd);
logMessage(LOG_DEBUG_SERIAL, "Closed serial port\n");
}
// Generate and return checksum of packet.

Binary file not shown.

View File

@ -1,4 +1,4 @@
#define AQUALINKD_NAME "Aqualink Daemon"
#define AQUALINKD_VERSION "0.8a"
#define AQUALINKD_VERSION "0.9a"