SLT: added sub_protocols

SLT (11) sub_protocols are now
 - V1 (0): original 6 channels
 - V2 (1): 6 channels, might be able to add channel 7 and 8 but need testing
 - Q200 (2): 5 channels + switches: CH9=FMODE, CH10=FLIP, CH11=VIDON, CH12=VIDOFF
This commit is contained in:
Pascal Langer
2018-09-03 16:02:43 +02:00
parent 2ac20cb575
commit 82fb5dd0da
5 changed files with 115 additions and 39 deletions

View File

@@ -57,7 +57,7 @@ const uint8_t PROGMEM WFLY_init_vals[][2] = {
static void __attribute__((unused)) WFLY_cyrf_bind_config()
{
for(uint8_t i = 0; i < sizeof(init_vals) / 2; i++)
for(uint8_t i = 0; i < sizeof(WFLY_init_vals) / 2; i++)
CYRF_WriteRegister(pgm_read_byte_near(&WFLY_init_vals[i][0]), pgm_read_byte_near(&WFLY_init_vals[i][1]));
CYRF_PROGMEM_ConfigSOPCode(WFLY_sop_bind);
@@ -67,7 +67,7 @@ static void __attribute__((unused)) WFLY_cyrf_bind_config()
static void __attribute__((unused)) WFLY_cyrf_data_config()
{
for(uint8_t i = 0; i < (sizeof(init_vals) / 2)-3; i++)
for(uint8_t i = 0; i < (sizeof(WFLY_init_vals) / 2)-3; i++)
CYRF_WriteRegister(pgm_read_byte_near(&WFLY_init_vals[i][0]), pgm_read_byte_near(&WFLY_init_vals[i][1]));
//CYRF_WriteRegister(CYRF_1E_RX_OVERRIDE, 0x08); // Do not accept CRC with 0 seed but not needed since the RX is not sending any data...