mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-06-07 09:38:25 +02:00
Encrypted protocol, autoconnect, logging refactor
This commit is contained in:
+3
-9
@@ -7,15 +7,6 @@
|
||||
#include "settings.h"
|
||||
#include "connector.h"
|
||||
|
||||
#define MAGIC 0x55aa55aa
|
||||
|
||||
#define CMD_OPEN 1
|
||||
#define CMD_PLUGGED 2
|
||||
#define CMD_UNPLUGGED 4
|
||||
#define CMD_TOUCH 5
|
||||
#define CMD_VIDEO_DATA 6
|
||||
#define CMD_AUDIO_DATA 7
|
||||
#define CMD_SEND_FILE 153
|
||||
|
||||
class Protocol : public IProtocol
|
||||
{
|
||||
@@ -48,6 +39,9 @@ public:
|
||||
bool phoneConnected;
|
||||
|
||||
private:
|
||||
void sendInt(uint32_t cmd, uint32_t value, bool encryption = true);
|
||||
void sendEncryption();
|
||||
|
||||
void onStatus(const char *status) override;
|
||||
void onDevice(bool connected) override;
|
||||
void onData(uint32_t cmd, uint32_t length, uint8_t *data) override;
|
||||
|
||||
Reference in New Issue
Block a user