-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathstate.hpp
More file actions
63 lines (48 loc) · 1.55 KB
/
state.hpp
File metadata and controls
63 lines (48 loc) · 1.55 KB
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
#pragma once
#include <Preferences.h>
#include "protocol.h"
// DocGreenDisplay.ino
extern docgreen_status_t scooterStatus;
extern Preferences preferences;
#define PREFERENCE_MAX_SPEED "max-speed"
#define PREFERENCE_SHOW_INTRO "show-intro"
#define PREFERENCE_REENABLE_LIGHT "reenable-light"
#define PREFERENCE_LOCK_ON_BOOT "lock-on-boot"
#define PREFERENCE_LOCK_PIN "lock-pin"
#define PREFERENCE_BLE_ENABLE "ble-enable"
#define PREFERENCE_BLE_CONTROL_ENABLE "ble-ctrl-enable"
#define PREFERENCE_AP_ENABLE "ap-enable"
#define PREFERENCE_AP_SSID "ap-ssid"
#define PREFERENCE_AP_PASSWORD "ap-pw"
#define PREFERENCE_STA_ENABLE "sta-enable"
#define PREFERENCE_STA_SSID "sta-ssid"
#define PREFERENCE_STA_PASSWORD "sta-pw"
#define PREFERENCE_UPDATE_URL "update-url"
// reenable-light.hpp
extern bool reenableLightsAfterError;
void internalSetLight(bool shouldBeOn);
// oled-ui.hpp
#define BUTTON_UP 0b00000001
#define BUTTON_RIGHT 0b00000010
#define BUTTON_DOWN 0b00000100
#define BUTTON_LEFT 0b00001000
#define BUTTON_CANCEL 0b00010000
#define BUTTON_POWER 0b00100000
extern uint8_t pressedButtons;
uint8_t getAndResetButtons();
extern uint32_t configuredSpeed;
extern String scooterPin;
extern bool isLocked;
// wifi.hpp
extern bool wifiApEnabled;
extern bool wifiStaEnabled;
extern String wifiApSsid;
extern String wifiApPassword;
extern String wifiStaSsid;
extern String wifiStaPassword;
// bluetooth.hpp
extern bool bluetoothControlEnabled;
// update.hpp
extern String firmwareUpdateUrl;
extern String firmwareUpdateStatus;
extern void checkForFirmwareUpdates();