-
Notifications
You must be signed in to change notification settings - Fork 33
/
NextionDriver.h
114 lines (89 loc) · 2.93 KB
/
NextionDriver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* Copyright (C) 2017,2022 by Lieven De Samblanx ON7LDS
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(NextionDriver_H)
#define NextionDriver_H
#define NextionDriver_VERSION "1.25"
#define TRUE 1
#define FALSE 0
#define DEBUG 1
#define NEXTIONPORT ""
#define NEXTIONDRIVERLINK "/dev/ttyNextionDriver"
#define CONFIGFILE "/etc/MMDVM.ini"
#define CONFIGFILE_NEXTIONDRIVER "/etc/NextionDriver.ini"
#define GROUPSFILE "groups.txt"
#define GROUPSFILESRC "https://api.brandmeister.network/v1.0/groups/"
#define USERSFILE "users.csv"
#define USERSFILESRC "https://www.radioid.net/static/user.csv"
#define MAXGROUPS 2500
#define MAXUSERS 300000
#define MODEM_DISPLAY 0
#define MMDVM_DISPLAY 1
#define BAUDRATE3 B9600
#define BAUDRATE4 B115200
#define SERBUFSIZE 1024
typedef struct groupdata
{
int nr;
char *name;
} group_t;
typedef struct userdata
{
int nr;
char *data1;
char *data2;
char *data3;
char *data4;
char *data5;
} user_t;
typedef struct user_idx_data{
char *call;
int nr;
} user_call_idx_t;
extern char TXbuffer[1024],RXbuffer[1024];
extern long sleepTimeOut;
extern int page,statusval,changepages,removeDim,sleepWhenInactive,showModesStatus,waitForLan,sendUserDataMask;
extern int check;
extern char ipaddr[100];
extern int modeIsEnabled[20];
extern int netIsActive[10];
extern char groupsFile[100],usersFile[100];
extern char groupsFileSrc[200],usersFileSrc[200];
extern group_t groups[MAXGROUPS];
extern user_t users[MAXUSERS];
extern int nmbr_groups, nmbr_users;
extern unsigned int RXfrequency,TXfrequency;
extern char location[90];
extern unsigned char tempInF;
extern user_call_idx_t usersCALL_IDX[MAXUSERS];
extern char remotePort[10],localPort[10];
extern int transparentIsEnabled,sendFrameType;
extern char datafiledir[500];
extern char nextionDriverLink[100];
extern int verbose, screenLayout;
extern char OSname[100],PIname[100];
extern char nextionPort[100];
extern char configFile1[200],configFile2[200];
extern char userDBDelimiter;
extern int userDBId,userDBCall,userDBName,userDBX1,userDBX2,userDBX3;
extern int display_TXsock;
extern int display_RXsock;
extern struct addrinfo* display_addr;
char* RGBtoNextionColor(int RGB);
void sendCommand(char *cmd);
void writelog(int level, char *fmt, ...);
#endif