mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 19:48:11 +00:00
Xerall: few improvements
This commit is contained in:
parent
901f8ca6b0
commit
d6ecac1302
@ -198,4 +198,4 @@
|
|||||||
89,0,LOSI
|
89,0,LOSI
|
||||||
90,0,MouldKg,Analog,0
|
90,0,MouldKg,Analog,0
|
||||||
90,1,MouldKg,Digit,0
|
90,1,MouldKg,Digit,0
|
||||||
91,0,Xerall,Tank,0,FlGr,TakLan,Rate,HLess,Photo,Video,TrimR,TrimE,TrimA
|
91,0,Xerall,Tank,0,FlTa,TakLan,Rate,HLess,Photo,Video,TrimR,TrimE,TrimA
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 2
|
#define VERSION_REVISION 2
|
||||||
#define VERSION_PATCH_LEVEL 95
|
#define VERSION_PATCH_LEVEL 96
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
@ -238,8 +238,6 @@
|
|||||||
#define SX1276_INSTALLED
|
#define SX1276_INSTALLED
|
||||||
#undef ENABLE_PPM
|
#undef ENABLE_PPM
|
||||||
#undef SEND_CPPM
|
#undef SEND_CPPM
|
||||||
#undef IKEAANSLUTA_CC2500_INO
|
|
||||||
#undef MOULDKG_NRF24L01_INO
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Make sure protocols are selected correctly
|
//Make sure protocols are selected correctly
|
||||||
|
@ -56,7 +56,7 @@ static void __attribute__((unused)) XERALL_send_packet()
|
|||||||
if(IS_BIND_IN_PROGRESS)
|
if(IS_BIND_IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if(packet_sent > 24)
|
if(packet_sent > 24)
|
||||||
packet_sent=0; // Hopp after 25 packets
|
packet_sent=0; // Hopp after 25 packets
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -87,15 +87,15 @@ static void __attribute__((unused)) XERALL_send_packet()
|
|||||||
// Normal packet: 08 32 7C 1C 20 20 20 40 0A 00
|
// Normal packet: 08 32 7C 1C 20 20 20 40 0A 00
|
||||||
packet[0] = 0x08;
|
packet[0] = 0x08;
|
||||||
//Throttle
|
//Throttle
|
||||||
packet[1] = convert_channel_16b_limit(THROTTLE ,0,0x32)<<1; //00..64 but only even values
|
packet[1] = convert_channel_16b_limit(THROTTLE ,0,0x32)<<1; //00..64 but only even values
|
||||||
//Rudder
|
//Rudder
|
||||||
packet[2] = (0xFF-convert_channel_8b(RUDDER))&0xF8; //F8..00 -> 5 bits
|
packet[2] = (0xFF-convert_channel_8b(RUDDER))&0xF8; //F8..00 -> 5 bits
|
||||||
//Elevator
|
//Elevator
|
||||||
uint8_t ch = convert_channel_8b(ELEVATOR)>>3;
|
uint8_t ch = convert_channel_8b(ELEVATOR)>>3;
|
||||||
packet[2] |= ch>>2; //00..07 -> 3 bits high
|
packet[2] |= ch>>2; //00..07 -> 3 bits high
|
||||||
packet[3] = ch<<6; //00,40,80,C0 -> 2 bits low
|
packet[3] = ch<<6; //00,40,80,C0 -> 2 bits low
|
||||||
//Aileron
|
//Aileron
|
||||||
packet[3] |= ((0xFF-convert_channel_8b(AILERON))>>3)<<1; //5 bits
|
packet[3] |= ((0xFF-convert_channel_8b(AILERON))>>3)<<1; //5 bits
|
||||||
|
|
||||||
//Trim Rudder 0x00..0x20..0x3F
|
//Trim Rudder 0x00..0x20..0x3F
|
||||||
packet[4] = convert_channel_8b(CH11)>>2;
|
packet[4] = convert_channel_8b(CH11)>>2;
|
||||||
@ -129,7 +129,7 @@ static void __attribute__((unused)) XERALL_send_packet()
|
|||||||
uint8_t sum = 0;
|
uint8_t sum = 0;
|
||||||
for(uint8_t i=1;i<8;i++)
|
for(uint8_t i=1;i<8;i++)
|
||||||
sum += packet[i];
|
sum += packet[i];
|
||||||
packet[8] = sum;
|
packet[8] = sum & 0x0F;
|
||||||
|
|
||||||
//0x00 -> 0x1A on first telemetry packet received
|
//0x00 -> 0x1A on first telemetry packet received
|
||||||
//packet[9] = 0x00;
|
//packet[9] = 0x00;
|
||||||
@ -236,23 +236,23 @@ uint16_t XERALL_callback()
|
|||||||
XN297_SetTXAddr(rx_tx_addr, 5);
|
XN297_SetTXAddr(rx_tx_addr, 5);
|
||||||
}
|
}
|
||||||
wait = 0;
|
wait = 0;
|
||||||
phase = XERALL_DATA; // Resume data
|
phase = XERALL_DATA;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(len == XERALL_PACKET_SIZE && packet_in[0] == 0x12)
|
else if(len == XERALL_PACKET_SIZE && packet_in[0] == 0x12)
|
||||||
{
|
{
|
||||||
BIND_DONE;
|
BIND_DONE;
|
||||||
bind_phase = 0;
|
bind_phase = 0;
|
||||||
wait = 0;
|
wait = 0;
|
||||||
phase = XERALL_DATA; // Resume data
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if(len == 0)
|
else if(len == 0)
|
||||||
wait = 5; // The quad wants to talk let's pause sending data...
|
wait = 5; // The quad wants to talk let's pause sending data...
|
||||||
}
|
}
|
||||||
// switch to RX mode
|
if(wait)
|
||||||
XN297_SetTxRxMode(TXRX_OFF);
|
{ // switch to RX mode
|
||||||
XN297_SetTxRxMode(RX_EN);
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
|
XN297_SetTxRxMode(RX_EN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(wait)
|
if(wait)
|
||||||
{
|
{
|
||||||
|
@ -1901,8 +1901,11 @@ A|E|T|R|FLIP|LIGHT
|
|||||||
## V761 - *48*
|
## V761 - *48*
|
||||||
|
|
||||||
Gyro: -100%=Beginer mode (Gyro on, yaw and pitch rate limited), 0%=Mid Mode ( Gyro on no rate limits), +100%=Mode Expert Gyro off
|
Gyro: -100%=Beginer mode (Gyro on, yaw and pitch rate limited), 0%=Mid Mode ( Gyro on no rate limits), +100%=Mode Expert Gyro off
|
||||||
|
|
||||||
Calib: momentary switch, calib will happen one the channel goes from -100% to +100%
|
Calib: momentary switch, calib will happen one the channel goes from -100% to +100%
|
||||||
|
|
||||||
Flip: momentary switch: hold flip(+100%), indicate flip direction with Ele or Ail, release flip(-100%)
|
Flip: momentary switch: hold flip(+100%), indicate flip direction with Ele or Ail, release flip(-100%)
|
||||||
|
|
||||||
RTN_ACT and RTN: -100% disable, +100% enable
|
RTN_ACT and RTN: -100% disable, +100% enable
|
||||||
|
|
||||||
### Sub_protocol 3CH - *0*
|
### Sub_protocol 3CH - *0*
|
||||||
@ -1922,9 +1925,25 @@ A|E|T|R|GYRO|CALIB|FLIP|RTN_ACT|RTN
|
|||||||
## XERALL - *91*
|
## XERALL - *91*
|
||||||
Model: Xerall TankCopter
|
Model: Xerall TankCopter
|
||||||
|
|
||||||
|
To bind/link the model faster put the throttle low before powering up the model.
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|Flight/Ground|Takeoff/Land/Emerg|RATE|HEADLESS|Photo|Video|TrimR|TrimE|TrimA
|
A|E|T|R|Fly/Tank|Takeoff/Land/Emerg|Rate|HeadLess|Photo|Video|TrimR|TrimE|TrimA
|
||||||
|
|
||||||
|
Fly/Tank: -100%=Fly, +100%=Tank
|
||||||
|
|
||||||
|
Takeoff/Land/Emerg: momentary switch -100%->+100%, same switch for all 3 functions. For Takeoff throttle must be centered before actionning the momentary switch. For Emergency stop hold the momentary switch for a few sec.
|
||||||
|
|
||||||
|
Unlock the motors is achieved like on the original radio by putting sticks in the bottom corners (position depends on your mode 1,2,3,4) and throttle has to be raised to center before recentering the sticks for the motors to keep spinning. Takeoff happens as soon as the throttle goes above center.
|
||||||
|
|
||||||
|
Rate: -100%=Low, +100%=High
|
||||||
|
|
||||||
|
HeadLess: -100%=Off, +100%=On
|
||||||
|
|
||||||
|
Photo: momentary switch -100%->+100% (short press on the original remote)
|
||||||
|
|
||||||
|
Video: -100%=Off, +100%=On (long press on the original remote)
|
||||||
|
|
||||||
## YD717 - *8*
|
## YD717 - *8*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
Loading…
x
Reference in New Issue
Block a user