kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Work in progress.
rodzic
ff893cb0d9
commit
b4c4093785
|
@ -41,7 +41,7 @@ SOURCES += about_dialog.cpp
|
|||
SOURCES += utils.c
|
||||
SOURCES += connection.cpp
|
||||
SOURCES += tmc_dev.c
|
||||
SOURCES += tmc_lan.cpp
|
||||
SOURCES += tmc_lan.c
|
||||
SOURCES += tled.cpp
|
||||
SOURCES += edflib.c
|
||||
SOURCES += signalcurve.cpp
|
||||
|
|
2
global.h
2
global.h
|
@ -33,7 +33,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.30_1508312029"
|
||||
#define PROGRAM_VERSION "0.30_1509011907"
|
||||
|
||||
#define MAX_PATHLEN 4096
|
||||
|
||||
|
|
|
@ -25,9 +25,29 @@
|
|||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stropts.h>
|
||||
|
||||
#include "tmc_dev.h"
|
||||
#include "utils.h"
|
||||
#include "tmc_lan.h"
|
||||
|
||||
|
||||
|
||||
#define TMC_LAN_TIMEOUT 5000
|
||||
|
||||
#define MAX_CMD_LEN (255)
|
||||
|
@ -157,7 +177,7 @@ void tmclan_close(struct tmcdev *tmc_device)
|
|||
|
||||
int tmclan_write(struct tmcdev *tmc_device __attribute__ ((unused)), const char *cmd)
|
||||
{
|
||||
int n, len, qry=0;
|
||||
int i, n, len, qry=0;
|
||||
|
||||
char buf[MAX_CMD_LEN + 16],
|
||||
str[256];
|
||||
|
@ -217,7 +237,7 @@ int tmclan_write(struct tmcdev *tmc_device __attribute__ ((unused)), const char
|
|||
|
||||
if(!qry)
|
||||
{
|
||||
for(int i=0; i<20; i++)
|
||||
for(i=0; i<20; i++)
|
||||
{
|
||||
usleep(25000);
|
||||
|
26
tmc_lan.h
26
tmc_lan.h
|
@ -29,26 +29,10 @@
|
|||
#ifndef TMC_LAN_H
|
||||
#define TMC_LAN_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stropts.h>
|
||||
|
||||
#include "global.h"
|
||||
#include "tmc_dev.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
struct tmcdev * tmclan_open(const char *);
|
||||
|
@ -57,6 +41,10 @@ int tmclan_write(struct tmcdev *, const char *);
|
|||
int tmclan_read(struct tmcdev *);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue