Skip to content

Commit

Permalink
bugfixes and proper config
Browse files Browse the repository at this point in the history
  • Loading branch information
zsotroav committed Feb 20, 2023
1 parent 4b126ea commit 695dc98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
*/
#define CFG_PIXEL_POLARITY 0

/**
* @brief The implemented SZIG-FOK-GYEM serial protocol version
*/
#define CFG_SERIAL_PROT_VER 1

/**
* @brief Enabling relative mode only updates the pixels that are different compared to the previous state
*/
Expand Down
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ uint8_t buff[DRV_DATABUFF_SIZE] = {0};
// Buffer for incoming small data
byte inbuff[8] = {0};
// Expected handshake
byte handshake[8] = {0xAA, 0x55, 0xAA, 0x55, 0x01, 0x01, 0x18, 0x07};
byte handshake[8] = {0xAA, 0x55, 0xAA, 0x55, CFG_SERIAL_PROT_VER, CFG_PANEL_COUNT, 0x18, 0x07};
// Our reply to the handshake
byte message[6] = {0x01, 0x01, 0x18, 0x07, 0x00, 0x00};
byte message[6] = {CFG_SERIAL_PROT_VER, CFG_PANEL_COUNT, 0x18, 0x07, 0x00, 0x00};

// Connection reference number. Randomized for each connection
// Connection reference number. Randomized later for each connection
byte CD = 0xAF;

void setup()
Expand Down

0 comments on commit 695dc98

Please sign in to comment.