-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.h
73 lines (53 loc) · 3.73 KB
/
constants.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
#pragma once
#include "misc/led.h"
#include "credentials.h"
#include "sys_constants.h"
#define WIFI_MODE (WIFI_AP_MODE)
#define WIFI_CONNECTION_CHECK_INTERVAL (5000u) // Interval (ms) between Wi-Fi connection check
#define WIFI_MAX_CONNECTION_ATTEMPT_INTERVAL (0u) // Max time (ms) to wait for Wi-Fi connection before switch to AP mode
// 0 - Newer switch to AP mode
#define WEB_AUTH
#define TIME_ZONE (5.f) // GMT +5:00
#define MDNS_NAME "esp_lamp"
#define BUTTON DISABLED
#define BUTTON_PIN (4u)
#define LED_PIN (5u)
#define LED_TYPE WS2812B
#define LED_COLOR_ORDER GRB
#define MATRIX_VOLTAGE (5u)
#define CURRENT_LIMIT (500u)
#define WIDTH (16u)
#define HEIGHT (16u)
#define CALIBRATION_TIMEOUT (5000u) // Timeout for calibration mode
#define POWER_CHANGE_TIMEOUT (1000u) // Timeout for power change animation
#define GAMMA_CORRECTION_RT DISABLED // Real-time gamma correction.
// Warning: rt-correction may have significant performance impact
// when disabled - gamma correction will be applied to palette
#define AUDIO DISABLED
#define AUDIO_PIN (0u)
#define AUDIO_GAIN (1u)
#define AUDIO_GATE (1u)
#define AUDIO_WINDOW_DURATION (5000u)
#define MQTT (0u) // MQTT protocol Enabled
#define MQTT_CONNECTION_TIMEOUT (15000u) // Connection attempt timeout to MQTT server
#define MQTT_RECONNECT_TIMEOUT (5000u) // Time before new reconnection attempt to MQTT server
#define MQTT_PREFIX MDNS_NAME
#define MQTT_TOPIC_BRIGHTNESS MQTT_PREFIX "/brightness"
#define MQTT_TOPIC_POWER MQTT_PREFIX "/power"
#define MQTT_TOPIC_SPEED MQTT_PREFIX "/speed"
#define MQTT_TOPIC_SCALE MQTT_PREFIX "/scale"
#define MQTT_TOPIC_LIGHT MQTT_PREFIX "/light"
#define MQTT_TOPIC_COLOR MQTT_PREFIX "/color"
#define MQTT_TOPIC_PRESET MQTT_PREFIX "/preset"
#define MQTT_TOPIC_PALETTE MQTT_PREFIX "/palette"
#define MQTT_TOPIC_NIGHT_MODE MQTT_PREFIX "/night_mode"
#define MQTT_OUT_PREFIX MQTT_PREFIX "/out"
#define MQTT_OUT_TOPIC_BRIGHTNESS MQTT_OUT_PREFIX "/brightness"
#define MQTT_OUT_TOPIC_POWER MQTT_OUT_PREFIX "/power"
#define MQTT_OUT_TOPIC_SPEED MQTT_OUT_PREFIX "/speed"
#define MQTT_OUT_TOPIC_SCALE MQTT_OUT_PREFIX "/scale"
#define MQTT_OUT_TOPIC_LIGHT MQTT_OUT_PREFIX "/light"
#define MQTT_OUT_TOPIC_COLOR MQTT_OUT_PREFIX "/color"
#define MQTT_OUT_TOPIC_PRESET MQTT_OUT_PREFIX "/preset"
#define MQTT_OUT_TOPIC_PALETTE MQTT_OUT_PREFIX "/palette"
#define MQTT_OUT_TOPIC_NIGHT_MODE MQTT_OUT_PREFIX "/night_mode"