diff --git a/BootLoaders/StmMultiUSB/README.md b/BootLoaders/StmMultiUSB/README.md new file mode 100644 index 0000000..52c5a52 --- /dev/null +++ b/BootLoaders/StmMultiUSB/README.md @@ -0,0 +1,2 @@ +[Source for the StmMultiUSB=STM32duino-bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader) +If you want the latest version, you should look for the file generic_boot20_pa1.bin. \ No newline at end of file diff --git a/BootLoaders/StmMultiUSB/StmMultiUSB.bin b/BootLoaders/StmMultiUSB/StmMultiUSB.bin new file mode 100644 index 0000000..e8da0d6 Binary files /dev/null and b/BootLoaders/StmMultiUSB/StmMultiUSB.bin differ diff --git a/Multiprotocol/ASSAN_nrf24l01.ino b/Multiprotocol/ASSAN_nrf24l01.ino index d5c2090..2435bab 100644 --- a/Multiprotocol/ASSAN_nrf24l01.ino +++ b/Multiprotocol/ASSAN_nrf24l01.ino @@ -53,7 +53,11 @@ void ASSAN_send_packet() uint16_t temp; for(uint8_t i=0;i<8;i++) { - temp=Servo_data[i]<<3; + if(mode_select != MODE_SERIAL) // If in PPM mode extend the output to 1000...2000µs + temp=convert_channel_16b_nolim(i,1000,2000); + else + temp=Servo_data[i]; + temp<<=3; packet[2*i]=temp>>8; packet[2*i+1]=temp; } diff --git a/Multiprotocol/FlySky_a7105.ino b/Multiprotocol/FlySky_a7105.ino index 29c01aa..6a70f03 100644 --- a/Multiprotocol/FlySky_a7105.ino +++ b/Multiprotocol/FlySky_a7105.ino @@ -133,7 +133,7 @@ static void __attribute__((unused)) flysky_build_packet(uint8_t init) { uint8_t i; //servodata timing range for flysky. - ////-100% =~ 0x03e8//=1000us(min) + //-100% =~ 0x03e8//=1000us(min) //+100% =~ 0x07ca//=1994us(max) //Center = 0x5d9//=1497us(center) //channel order AIL;ELE;THR;RUD;AUX1;AUX2;AUX3;AUX4 @@ -147,6 +147,8 @@ static void __attribute__((unused)) flysky_build_packet(uint8_t init) uint16_t temp=Servo_data[CH_AETR[i]]; if(sub_protocol == CX20 && CH_AETR[i] == ELEVATOR) temp=servo_mid-temp; //reverse channel + if(mode_select != MODE_SERIAL) //if in PPM mode extend the output to 1000...2000µs + temp=map(temp,servo_min_100,servo_max_100,1000,2000); packet[5 + i*2]=temp&0xFF; //low byte of servo timing(1000-2000us) packet[6 + i*2]=(temp>>8)&0xFF; //high byte of servo timing(1000-2000us) } diff --git a/Multiprotocol/Multi.txt b/Multiprotocol/Multi.txt index 9d499cf..bb76f7e 100644 --- a/Multiprotocol/Multi.txt +++ b/Multiprotocol/Multi.txt @@ -18,7 +18,7 @@ 18,MJXq,WLH08,X600,X800,H26D,E010,H26WH 19,Shenqi 20,FY326,FY326,FY319 -21,SFHSS +21,SFHSS,XK,T8J,T10J,TM-FH 22,J6PRO 23,FQ777 24,ASSAN diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index e161833..c55bb34 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 1 #define VERSION_REVISION 6 -#define VERSION_PATCH_LEVEL 23 +#define VERSION_PATCH_LEVEL 24 //****************** // Protocols //****************** @@ -196,6 +196,13 @@ enum Q303 CX10D = 2, CX10WD = 3, }; +enum SFHSS +{ + XK = 0, + T10J = 1, + T8J = 2, + TM_FH = 3, +}; #define NONE 0 #define P_HIGH 1 @@ -585,6 +592,11 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- CX35 1 CX10D 2 CX10WD 3 + sub_protocol==SFHSS + XK 0 + T10J 1 + T8J 2 + TM_FH 3 Power value => 0x80 0=High/1=Low Stream[3] = option_protocol; diff --git a/Multiprotocol/SFHSS_cc2500.ino b/Multiprotocol/SFHSS_cc2500.ino index 56aa6cd..960352f 100644 --- a/Multiprotocol/SFHSS_cc2500.ino +++ b/Multiprotocol/SFHSS_cc2500.ino @@ -155,17 +155,24 @@ static void __attribute__((unused)) SFHSS_build_data_packet() // Values grow down and to the right. static void __attribute__((unused)) SFHSS_build_data_packet() { + const uint8_t SFHSS_ident[4][3]={ + { 0x81, 0x00, 0x00}, //XK + { 0x81, 0x42, 0x07}, //T8J + { 0x81, 0x0F, 0x09}, //T10J + { 0x82, 0x9A, 0x06} //TM-FH + }; + uint8_t ch_offset = phase == SFHSS_DATA1 ? 0 : 4; uint16_t ch1 = convert_channel_16b_nolim(CH_AETR[ch_offset+0],2020,1020); uint16_t ch2 = convert_channel_16b_nolim(CH_AETR[ch_offset+1],2020,1020); uint16_t ch3 = convert_channel_16b_nolim(CH_AETR[ch_offset+2],2020,1020); uint16_t ch4 = convert_channel_16b_nolim(CH_AETR[ch_offset+3],2020,1020); - packet[0] = 0x81; // can be 80 or 81 for Orange, only 81 for XK + packet[0] = SFHSS_ident[sub_protocol][0]; // can be 80 or 81 for Orange packet[1] = rx_tx_addr[0]; packet[2] = rx_tx_addr[1]; - packet[3] = 0x0f; //10J - packet[4] = 0x09; //10J + packet[3] = SFHSS_ident[sub_protocol][1]; + packet[4] = SFHSS_ident[sub_protocol][2]; packet[5] = (rf_ch_num << 3) | ((ch1 >> 9) & 0x07); packet[6] = (ch1 >> 1); packet[7] = (ch1 << 7) | ((ch2 >> 5) & 0x7F ); diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 758878d..e7dd10d 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -368,7 +368,10 @@ const PPM_Parameters PPM_prot[15]= { FY326 FY319 MODE_SFHSS - NONE + XK + T10J + T8J + TM_FH MODE_J6PRO NONE MODE_FQ777 diff --git a/Protocols_Details.md b/Protocols_Details.md index cc4b91d..e5eda9c 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -209,6 +209,18 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8 ---|---|---|---|---|---|---|--- A|E|T|R|CH5|CH6|CH7|CH8 +### Sub_protocol XK - *0* +XK transmitter + +### Sub_protocol T8J - *1* +Futaba T8J transmitter + +### Sub_protocol T10J - *2* +Futaba T10J transmitter + +### Sub_protocol TM-FH - *3* +Futaba TM-FH transmitter + *** # CYRF6936 RF Module diff --git a/docs/Compiling_STM32.md b/docs/Compiling_STM32.md index 82c5c02..58809af 100644 --- a/docs/Compiling_STM32.md +++ b/docs/Compiling_STM32.md @@ -77,7 +77,7 @@ See below my module for reference This method use USB connector on the STM32 V1.0 board or on the maple clone board. 1. Install first maple USB driver by running the batch file found in Arduino STM32 package folder ```..\hardware\Arduino_STM32\drivers\win\install_drivers.bat``` -1. Download the free STM32 flash loader demonstrator from [ST.com](http://www.st.com/en/development-tools/flasher-stm32.html) and using a USB-TTL device (like FTDI cable) flash the STM32duino bootloader available from Roger Clark's great STM32 site [here](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/tree/master/STM32F1/binaries) .Use bootloader **generic_boot20_pa1.bin** +1. Download the free STM32 flash loader demonstrator from [ST.com](http://www.st.com/en/development-tools/flasher-stm32.html) and use a USB-TTL device (like FTDI cable) to flash the [StmMultiUSB.bin](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/raw/master/BootLoaders/StmMultiUSB/StmMultiUSB.bin) bootloader. 1. Open Arduino IDE,browse to multiprotocol folder,load the sketch multiprotocol.ino.Select the serial COM port(see notes below) 1. In Arduino IDE under "Upload method" select **STM32duino**-bootloader.Click upload ,wait until upload is complete.