forked from pilight/pilight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefines.h.in
81 lines (66 loc) · 2.36 KB
/
defines.h.in
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
/*
Copyright (C) 2013 - 2014 CurlyMo
This file is part of pilight.
pilight 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 3 of the License, or (at your option) any later
version.
pilight 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 pilight. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef _DEFINES_H_
#define _DEFINES_H_
#cmakedefine WEBSERVER
#cmakedefine EVENTS
#cmakedefine FIRMWARE_UPDATER
#define PILIGHT_VERSION "6.0"
#define PULSE_DIV 34
#define MAXPULSESTREAMLENGTH 512
#define EPSILON 0.00001
#ifdef WEBSERVER
#define WEBSERVER_PORT 5001
#define WEBSERVER_ROOT "/usr/local/share/pilight/"
#define WEBSERVER_ENABLE 1
#define WEBSERVER_CACHE 1
#define WEBGUI_TEMPLATE "default"
#define MAX_UPLOAD_FILESIZE 5242880
#define MAX_CACHE_FILESIZE 1048576
#define WEBSERVER_WORKERS 1
#define WEBSERVER_CHUNK_SIZE 4096
#define WEBSERVER_USER "www-data"
#define WEBGUI_WEBSOCKETS 1
#endif
#define MAX_CLIENTS 30
#define BUFFER_SIZE 1025
#define MEMBUFFER 128
#define EOSS "\n\n" // End Of Socket Stream
#define PROTOCOL_ROOT "/usr/local/lib/pilight/protocols/"
#define HARDWARE_ROOT "/usr/local/lib/pilight/hardware/"
#define OPERATOR_ROOT "/usr/local/lib/pilight/operators/"
#define ACTION_ROOT "/usr/local/lib/pilight/actions/"
#define PID_FILE "/var/run/pilight.pid"
#define CONFIG_FILE "/etc/pilight/config.json"
#define LOG_FILE "/var/log/pilight.log"
#define TZDATA_FILE "/etc/pilight/tzdata.json"
#define LOG_MAX_SIZE 1048576 // 1024*1024
#define SEND_REPEATS 10
#define RECEIVE_REPEATS 1
#define UUID_LENGTH 21
#ifdef FIRMWARE_UPDATER
#define FIRMWARE_PATH "/etc/pilight/"
#define FIRMWARE_GPIO_RESET 10
#define FIRMWARE_GPIO_SCK 14
#define FIRMWARE_GPIO_MOSI 12
#define FIRMWARE_GPIO_MISO 13
#endif
#if !defined(PATH_MAX)
#if defined(_POSIX_PATH_MAX)
#define PATH_MAX _POSIX_PATH_MAX
#else
#define PATH_MAX 1024
#endif
#endif
#endif