Corrected the MS/TP monitor on Linux.

This commit is contained in:
skarg
2008-02-28 02:08:40 +00:00
parent bf353b0c56
commit 9daa40131d
3 changed files with 15 additions and 8 deletions
+6 -2
View File
@@ -184,6 +184,7 @@ int main(
int rc = 0;
pthread_t hThread;
int my_mac = 127;
long my_baud = 38400;
/* mimic our pointer in the state machine */
mstp_port = &MSTP_Port;
@@ -192,11 +193,14 @@ int main(
RS485_Set_Interface(argv[1]);
}
if (argc > 2) {
my_mac = strtol(argv[2], NULL, 0);
my_baud = strtol(argv[2], NULL, 0);
}
if (argc > 3) {
my_mac = strtol(argv[3], NULL, 0);
if (my_mac > 127)
my_mac = 127;
}
RS485_Set_Baud_Rate(38400);
RS485_Set_Baud_Rate(my_baud);
RS485_Initialize();
MSTP_Port.InputBuffer = &RxBuffer[0];
MSTP_Port.InputBufferSize = sizeof(RxBuffer);