Skip to content

Commit

Permalink
Traxxas TQ 6 channels
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallanger committed Apr 4, 2024
1 parent de35ee0 commit e03864e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Multiprotocol/REALACC_nrf24l01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void __attribute__((unused)) REALACC_send_packet()
packet[11]= 0x00 // Flag2
| GET_FLAG(CH7_SW, 0x01) // Calib
| GET_FLAG(CH9_SW, 0x20) // Return
| GET_FLAG(CH10_SW,0x80); // Unknown
| GET_FLAG(CH10_SW,0x80); // Throttle cut
packet[12]= 0x00 // Flag3
| GET_FLAG(CH5_SW, 0x01) // Flip
| GET_FLAG(CH11_SW,0x02) // Rotating
Expand Down
25 changes: 9 additions & 16 deletions Multiprotocol/TRAXXAS_cyrf6936.ino
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,15 @@ static void __attribute__((unused)) TRAXXAS_send_data_packet()
memset(&packet[1],0x00,TRAXXAS_PACKET_SIZE-1);
//Next RF channel ? 0x00 -> keep current, 0x0E change to F=15
//packet[1] = hopping_frequency[0] - 1;
//Steering
uint16_t ch = convert_channel_16b_nolimit(RUDDER,500,1000,false);
packet[2]=ch>>8;
packet[3]=ch;
//Throttle
ch = convert_channel_16b_nolimit(THROTTLE,500,1000,false);
packet[4]=ch>>8;
packet[5]=ch;
//AUX3
ch = convert_channel_16b_nolimit(AILERON,500,1000,false);
packet[6]=ch>>8;
packet[7]=ch;
//AUX4???
ch = convert_channel_16b_nolimit(ELEVATOR,500,1000,false);
packet[12]=ch>>8;
packet[13]=ch;

//6 channels
uint16_t ch;
for(uint8_t i=0; i<6; i++)
{
ch = convert_channel_16b_nolimit(i,500,1000,false);
packet[2+i*2]=ch>>8;
packet[3+i*2]=ch;
}

CYRF_SetPower(0x08);
CYRF_WriteDataPacketLen(packet, TRAXXAS_PACKET_SIZE);
Expand Down

0 comments on commit e03864e

Please sign in to comment.