-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhoge.h
31 lines (22 loc) · 928 Bytes
/
hoge.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
#pragma once
#include <bluefruit.h>
class App {
public:
static void Setup();
static void Loop();
static void OnIdInfo(BLEClientCharacteristic *chr, uint8_t *data, uint16_t length);
static void OnMotor(BLEClientCharacteristic *chr, uint8_t *data, uint16_t length);
static void OnBatteryInfo(BLEClientCharacteristic *chr, uint8_t *data, uint16_t length);
private:
static void OnMessage(MQTTClient *client, char topic[], char payload[], int length);
static void OnConnect(uint16_t conn_handle);
static void OnDisconnect(uint16_t conn_handle, uint8_t reason);
static void StartAcceptNewCube();
static void StopAcceptNewCube();
static bool ConnectToCube(String address);
static void SubscribeTopics(String address);
static void UnsubscribeTopics(String address);
static void UpdateStatusLED();
static String ip_address_;
static bool accept_new_cube_;
};