mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 15:48:10 +00:00
DSM2_SFC try 1
Servo refresh rate -> frame rate 16.5/11ms
This commit is contained in:
parent
5542e7005d
commit
0f0df176de
@ -267,6 +267,7 @@ uint16_t DSM_RX_callback()
|
||||
0x01 => 22ms 1024 DSM2 1 packet => number of channels is <8
|
||||
0x02 => 22ms 1024 DSM2 2 packets => either a number of channel >7
|
||||
0x12 => 11ms 2048 DSM2 2 packets => can be any number of channels
|
||||
0x23 => DX3R DSM2 2 surface packets
|
||||
0xA2 => 22ms 2048 DSMX 1 packet => number of channels is <8
|
||||
0xB2 => 11ms 2048 DSMX => can be any number of channels
|
||||
(0x01 or 0xA2) and num_ch < 7 => 22ms else 11ms
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#define CLONE_BIT_MASK 0x20
|
||||
#define DSM_BIND_CHANNEL 0x0D //13 This can be any odd channel
|
||||
#define DSM2_SFC_16500 16500
|
||||
#define DSM2_SFC_11000 11000
|
||||
#define DSM2_SFC_PERIOD 16500
|
||||
|
||||
//During binding we will send BIND_COUNT packets
|
||||
@ -94,9 +96,12 @@ static void __attribute__((unused)) DSM_build_bind_packet()
|
||||
packet[11] = 12;
|
||||
else
|
||||
packet[11] = num_ch; // DX5 DSMR sends 0x48...
|
||||
//packet[11] = 3; // DX3R
|
||||
|
||||
if (sub_protocol==DSMR)
|
||||
packet[12] = 0xa2;
|
||||
else if (sub_protocol==DSM2_SFC)
|
||||
packet[12] = 0x23; // DX3R
|
||||
else if (sub_protocol==DSM2_1F)
|
||||
packet[12] = num_ch<8?0x01:0x02; // DSM2/1024 1 or 2 packets depending on the number of channels
|
||||
else if(sub_protocol==DSM2_2F)
|
||||
@ -389,6 +394,7 @@ uint16_t DSM_callback()
|
||||
else
|
||||
telemetry_set_input_sync(DSM2_SFC_PERIOD);
|
||||
#endif
|
||||
debugln("22/11 %02X", (option&0x40));
|
||||
#ifndef MULTI_AIR
|
||||
if(sub_protocol == DSMR)
|
||||
CYRF_SetPower(0x08); //Keep transmit power in sync
|
||||
@ -401,6 +407,11 @@ uint16_t DSM_callback()
|
||||
case DSM_CH2_WRITE_B:
|
||||
CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS); // clear IRQ flags
|
||||
//debugln_time("");
|
||||
#ifndef MULTI_AIR
|
||||
if(sub_protocol==DSM2_SFC)
|
||||
CYRF_WriteDataPacketLen(packet,2*(num_ch+1));
|
||||
else
|
||||
#endif
|
||||
CYRF_WriteDataPacket(packet);
|
||||
#if 0
|
||||
for(uint8_t i=0;i<16;i++)
|
||||
|
@ -552,6 +552,8 @@ Surface DSM2 receivers, tested with a SR3100
|
||||
|
||||
Extended limits available and no channel mapping. Do not use DSM/AUTO to bind but DSM/2SFC instead.
|
||||
|
||||
Servo refresh rate 22/11ms is repurposed to the frame rates 16.5ms(22) and 11ms(11).
|
||||
|
||||
CH1|CH2|CH3
|
||||
---|---|---
|
||||
STR|THR|AUX1
|
||||
|
Loading…
x
Reference in New Issue
Block a user