hardcoded 4 byte binding key

This commit is contained in:
Pawel Spychalski (DzikuVx)
2018-04-26 19:52:46 +02:00
parent f1029051f4
commit 76d4f7d70b
3 changed files with 14 additions and 3 deletions

View File

@@ -5,16 +5,18 @@
* Hardware type. Available types: * Hardware type. Available types:
* ARDUINO_AVR_FEATHER32U4 * ARDUINO_AVR_FEATHER32U4
* ARDUINO_SAMD_FEATHER_M0 * ARDUINO_SAMD_FEATHER_M0
*
* Leave commented for autodetect
*/ */
#define ARDUINO_AVR_FEATHER32U4 // #define ARDUINO_AVR_FEATHER32U4
/* /*
* TX or RX mode for hardware. Available types: * TX or RX mode for hardware. Available types:
* DEVICE_MODE_TX * DEVICE_MODE_TX
* DEVICE_MODE_RX * DEVICE_MODE_RX
*/ */
// #define DEVICE_MODE_TX #define DEVICE_MODE_TX
#define DEVICE_MODE_RX // #define DEVICE_MODE_RX
// #define FEATURE_TX_OLED // #define FEATURE_TX_OLED
// #define FORCE_TX_WITHOUT_INPUT // #define FORCE_TX_WITHOUT_INPUT

View File

@@ -274,6 +274,14 @@ void setup(void)
qsp.debugConfig |= DEBUG_FLAG_LED; qsp.debugConfig |= DEBUG_FLAG_LED;
#endif #endif
/*
* Setup salt bind key
*/
qsp.bindKey[0] = 0x12;
qsp.bindKey[1] = 0x0a;
qsp.bindKey[2] = 0x36;
qsp.bindKey[3] = 0xa7;
} }
uint8_t currentSequenceIndex = 0; uint8_t currentSequenceIndex = 0;

View File

@@ -130,6 +130,7 @@ struct RxDeviceState_t {
}; };
struct QspConfiguration_t { struct QspConfiguration_t {
uint8_t bindKey[4] = {0, 0, 0, 0};
uint8_t protocolState = QSP_STATE_IDLE; uint8_t protocolState = QSP_STATE_IDLE;
uint8_t crc = 0; uint8_t crc = 0;
uint8_t payload[QSP_PAYLOAD_LENGTH] = {0}; uint8_t payload[QSP_PAYLOAD_LENGTH] = {0};