Compare commits

...

2581 Commits

Author SHA1 Message Date
Jon Sturm
dcbc557bf7
Enable Telemetry on DumbRC receivers (#1111)
Tested with X6FGv1.1, X6FP, X6DC(G)v1.1

I also tested with multiple X6F receivers and some gave RSSI Telem and some gave nothing.
2 of them had the same PCB as the X6FP and neither gave telemetry.
I had a third with the same PCB with the X6FP which did give RSSI
and of my two with an older PCB one gives RSSI telem and the other does not.

Of the receivers I tried only one set packet_in[6] to match the TX packet[1] and it was the
oldest receiver of the ones I own.
2025-05-10 11:51:48 +02:00
pascallanger
e556f5cc40 SGF22 telem improvement? 2025-04-16 07:53:47 +02:00
pascallanger
9ef2415178
Update Protocols_Details.md (#1101) 2025-04-03 18:39:02 +02:00
pascallanger
bc1a809325 Update Protocols_Details.md 2025-04-03 18:36:31 +02:00
pascallanger
082e96e381 DSMR timing 2025-04-02 18:02:44 +02:00
pascallanger
abd26ee113 Update SGF22_nrf24l01.ino 2025-04-02 14:24:18 +02:00
pascallanger
98518b3c92 Update Protocols_Details.md 2025-04-02 14:11:58 +02:00
pascallanger
d19de99172 SGF22 telemetry 2025-04-02 14:10:54 +02:00
pascallanger
13024e3816 Update SGF22_nrf24l01.ino 2025-04-01 23:01:18 +02:00
pascallanger
90fb2d745f Update AFHDS2A_a7105.ino 2025-03-31 22:21:33 +02:00
pascallanger
fa13b67f3a Update Validate.h 2025-03-31 14:56:46 +02:00
pascallanger
10be906bec Update Validate.h 2025-03-31 14:43:42 +02:00
pascallanger
f538884d48 XK2 low batt telemetry 2025-03-28 19:13:13 +01:00
pascallanger
d3e5acf704 Update Protocols_Details.md 2025-03-28 10:33:39 +01:00
pascallanger
2ac4745c62 FX/QF012 telemetry 2025-03-21 21:48:29 +01:00
pascallanger
889e01c7c6 MouldKg update 2025-03-20 17:28:33 +01:00
pascallanger
db5f1f8899 Added AFHDS2A BS4/BS6 support 2025-03-20 14:49:34 +01:00
pascallanger
d091c57e10 MouldKg swap CH5 and CH6 2025-03-14 10:34:15 +01:00
pascallanger
0fcb4b7f1a FX telemetry 2025-03-13 20:15:57 +01:00
pascallanger
432e2e08a4 FX small changes 2025-03-13 19:13:14 +01:00
pascallanger
77efe467ad MouldKg renamed subprotocols 2025-03-13 18:42:34 +01:00
pascallanger
b9c828c878 MouldKg multi 6 ports brick support 2025-03-13 18:29:56 +01:00
pascallanger
99cd4d34d4 MT99xx Trim channels 2025-03-12 17:20:54 +01:00
pascallanger
a9be2a8644 Update MouldKg_nrf24l01.ino 2025-03-12 14:05:53 +01:00
pascallanger
835facd2c3 XK2 Gyro off 2025-03-12 07:45:05 +01:00
pascallanger
9e20e47c5a FX/QF012 details 2 2025-03-12 07:34:47 +01:00
pascallanger
a916275f0d FX/QF012 details 2025-03-12 07:31:32 +01:00
rdba2k
9beade33de
Add FX_QF012 subprotocol (#1091) 2025-03-12 07:17:08 +01:00
pascallanger
5ba70c3571 Update Protocols_Details.md 2025-03-10 17:40:46 +01:00
pascallanger
168aa89c57 New SFC protocol WL91x 2025-03-10 17:38:37 +01:00
pascallanger
fa055e991c ASF try 1 2025-02-27 16:56:58 +01:00
pascallanger
5437d88642 DSMR SR6200 test 1 2025-02-26 21:12:34 +01:00
pascallanger
d800f2c333 SLT2 final 2025-02-26 11:31:26 +01:00
pascallanger
78f6af6448 SLT2 last trial? 2025-02-26 00:00:49 +01:00
pascallanger
b04d4a54f7 SLT2 trial 3 2025-02-25 22:08:50 +01:00
pascallanger
ed65c81add SLT2 trial 2 2025-02-25 20:31:46 +01:00
pascallanger
9bdc24c42a SLT2 trial 2025-02-25 15:39:16 +01:00
pascallanger
7107d46d29 SHENQI2 new protocol 2025-02-24 17:04:07 +01:00
pascallanger
825f560cbb
Update Protocols_Details.md 2025-02-22 11:51:55 +01:00
pascallanger
ccaec304d5 KAMTOM telemetry 2025-02-22 11:48:03 +01:00
pascallanger
22d45349cc
Update Compiling.md (#1078) 2025-02-22 11:36:23 +01:00
pascallanger
5f26d624ad
Update Compiling.md 2025-02-22 11:23:49 +01:00
pascallanger
496c07943f KAMTOM new surface protocol
Missing low batt telem
2025-02-21 21:46:18 +01:00
pascallanger
af87b0f6d1 Update UDIRC_ccnrf.ino 2025-02-19 17:16:04 +01:00
pascallanger
2918e63fb4 XN297Emu add ReSendPayload 2025-02-19 11:54:29 +01:00
pascallanger
ed63ef7efe Update UDIRC_ccnrf.ino 2025-02-19 11:33:17 +01:00
pascallanger
36d25c7773 Update UDIRC_ccnrf.ino 2025-02-19 11:21:26 +01:00
pascallanger
a3ef2b94d4 Update MultiChan.txt 2025-02-18 19:32:19 +01:00
pascallanger
ad8b45773d UDIRC new protocol / WIP 2025-02-18 11:18:13 +01:00
pascallanger
b2dec9b331 Update Protocols_Details.md 2025-02-12 11:57:04 +01:00
pascallanger
565aaed0c7 New XK2/P10 sub protocol 2025-02-09 12:01:28 +01:00
pascallanger
2f520f2e91 Update Protocols_Details.md 2025-02-06 12:03:15 +01:00
pascallanger
f1470a80dd Update Protocols_Details.md 2025-02-06 12:00:07 +01:00
pascallanger
b6f78e93a0 Yuxiang multi IDs/Freqs 2025-02-06 11:57:40 +01:00
pascallanger
58bfd3b8b0 New JIABAILE/Gyro subprotocol 2025-02-06 11:56:24 +01:00
pascallanger
9e5e907f4a Hontai/XKK170 new subprotocol 2025-01-30 23:14:15 +01:00
pascallanger
4b68443c8f Update Multiprotocol.h 2025-01-30 10:37:53 +01:00
pascallanger
f092e137c7 Improve DSM telemetry stability? 2025-01-30 10:28:57 +01:00
pascallanger
7b9941e537 Fix DSMR 2025-01-29 19:48:18 +01:00
pascallanger
d03a8787d1 Update Protocols_Details.md 2025-01-29 10:05:23 +01:00
pascallanger
75f79095ae JIABAILE RX ID in EEPROM
Not an autobind protocol anymore.
2025-01-29 09:42:16 +01:00
pascallanger
b901bedad6 Update H36_nrf24l01.ino 2025-01-28 17:51:06 +01:00
pascallanger
dbbef9181a Update H36_nrf24l01.ino 2025-01-28 14:05:45 +01:00
pascallanger
98a54300e0 New H36 protocol - 1 ID 2025-01-28 14:00:38 +01:00
pascallanger
56fa7e788b Update Protocols_Details.md 2025-01-27 17:54:26 +01:00
pascallanger
7af23017ff Update JIABAILE_nrf24l01.ino 2025-01-27 17:37:00 +01:00
pascallanger
a07c23b25f New car protocol JIABAILE 2025-01-27 16:12:21 +01:00
pascallanger
b5b2dc37d4 SGF22 FX922 flags 2025-01-25 17:49:22 +01:00
pascallanger
756af87ec1 SGF22 Flags trial 2025-01-25 11:31:21 +01:00
pascallanger
e5810a2978 QIDI560 new light flag? 2025-01-23 15:49:35 +01:00
pascallanger
eaf71c2f49 XK2 details 2025-01-21 17:06:21 +01:00
pascallanger
546a962d96 XK2 multi IDs 2025-01-20 19:19:31 +01:00
pascallanger
fd150fa109 XK2 2nd ID 2025-01-20 16:28:48 +01:00
pascallanger
9b66711052 MT99X2/SU35 2025-01-19 16:07:45 +01:00
pascallanger
550754c7f9 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2025-01-19 15:59:42 +01:00
rdba2k
729fdd4719
Add MT99xx2/SU35 protocol (#1033)
* Update Multi.txt

* Update Multi_Protos.ino

* Update _Config.h

* Update Multiprotocol.h

* Update MT99xx_ccnrf.ino
2025-01-19 15:59:13 +01:00
pascallanger
2713b18099 Update Protocols_Details.md 2025-01-19 14:57:51 +01:00
pascallanger
5b5e95066a Traxxas TQ2&TQ1 2025-01-19 14:25:41 +01:00
pascallanger
b1f8560509 Update Yuxiang_nrf24l01.ino 2025-01-19 14:25:21 +01:00
Paul
50c18311c9
Update readme and protocol detals with surface/air info (#1034)
* Update readme and protocol detals with surface/air info

* Update Protocols_Details.md

* Update README.md

---------

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2025-01-19 14:18:20 +01:00
Arild Langseid
95746f80a1
Add RF_SIM sub-protocol to SLT-protocol (#1061)
* Added sub-protocol RF_SIM to the SLT protocol

* fixed typo

---------

Co-authored-by: Arild Langseid <arild@langseid.no>
2025-01-19 14:14:32 +01:00
pascallanger
bb7685e7a5 Update Yuxiang_nrf24l01.ino 2025-01-18 12:24:26 +01:00
pascallanger
a44126583e Yuxiang telemetry
Offset=7, Ratio=3.5
2025-01-18 12:19:33 +01:00
pascallanger
7fbca99bf3 Yuxiang bind ok 2025-01-18 00:36:33 +01:00
pascallanger
8db90fb6fc Yuxiang remove CH8 2025-01-16 11:34:07 +01:00
pascallanger
406f5feca5 Yuxiang TX2 2025-01-15 19:07:03 +01:00
pascallanger
0e5834a457 Update XN297Dump_nrf24l01.ino 2025-01-15 12:46:28 +01:00
pascallanger
75445ee4a7 Update Yuxiang_nrf24l01.ino 2025-01-13 20:28:25 +01:00
pascallanger
e724d6970e YuXiang E190 protocol
Only 1 ID, bind might not work...
2025-01-13 20:24:04 +01:00
pascallanger
190ebaefd4 Update XN297Dump_nrf24l01.ino 2025-01-13 20:22:14 +01:00
pascallanger
3fdf417ac9 V761 Beeper feature on CH10 2025-01-07 21:37:32 +01:00
pascallanger
e05bc7c447 Update XN297Dump_nrf24l01.ino 2025-01-07 15:11:32 +01:00
pascallanger
e2876c7e8c Update SGF22_nrf24l01.ino 2024-10-09 10:09:21 +02:00
pascallanger
7acfebc30e Update Protocols_Details.md 2024-10-09 10:01:08 +02:00
pascallanger
af12b21899 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2024-09-26 10:14:30 +02:00
pascallanger
68a4285b2a Update Protocols_Details.md 2024-09-26 10:14:26 +02:00
rdba2k
f58f7800d2
Update SGF22_nrf24l01.ino (#1023)
add sub protocol "J20" to "SGF22" protocol
2024-09-26 10:11:19 +02:00
rdba2k
10b230d2dd
Update Multiprotocol.h (#1022)
add sub protocol "J20" to "SGF22" protocol
2024-09-26 10:05:12 +02:00
rdba2k
58b19a2130
Update Multi_Protos.ino (#1021)
add sub protocol "J20" to "SGF22" protocol
2024-09-26 10:04:45 +02:00
rdba2k
1b79d7f80f
Update Multi.txt (#1020)
add sub protocol "J20" to "SGF22" protocol
2024-09-26 10:04:07 +02:00
rdba2k
e0299f6c7d
Update _Config.h (#1019)
add sub protocol "J20" to "SGF22" protocol
2024-09-26 10:03:39 +02:00
pascallanger
64ea7111ac SGF22: new F22S sub protocol 2024-09-02 18:14:25 +02:00
pascallanger
edaee63f16 Revert main.yml to use the old version of arduino_cli 2024-07-24 16:20:16 +02:00
Peter Feerick
b449212c34
chore(ci): bump setup-arduino-ci version to remove nodejs warning (#995)
* chore(ci): bump setup-arduino-ci version to remove nodejs warning

Gets rid of the numerous  "The following actions
uses Node.js version which is deprecated and will
be forced to run on node20" warnings

* chore: bump arduino-cli ver
2024-07-18 12:57:48 +02:00
pascallanger
edaad73290 Update Validate.h 2024-07-12 16:06:32 +02:00
pascallanger
3d5e43da3b Update Validate.h 2024-07-12 16:03:30 +02:00
pascallanger
b8c5929521 XK2: 1 TX ID but multiple RX IDs? 2024-07-12 10:00:21 +02:00
pascallanger
8685fcae7f Update Protocols_Details.md 2024-07-11 16:44:53 +02:00
pascallanger
6edd2a14a7 E129/C185 new debug flag 2024-07-11 16:20:32 +02:00
Ben Lye
600ffe87d7
Disable SCANNER ... (#989) 2024-06-14 12:14:55 +02:00
pascallanger
c6ff0e27d9 New protocol XK2 for the XK A160S 2024-06-07 20:28:15 +02:00
pascallanger
7a7b4b2e74 Update Protocols_Details.md 2024-05-21 13:16:41 +02:00
pascallanger
8a30bf1c0a Update FX/Q560 doc 2024-05-21 07:42:59 +02:00
pascallanger
dd82cbec63 Update Protocols_Details.md 2024-05-17 17:08:01 +02:00
pascallanger
be4595fe67 Update FX_nrf24l01.ino 2024-05-17 14:45:30 +02:00
pascallanger
54ae77ed7f FX/Q560 new sub protocol 2024-05-17 11:01:54 +02:00
pascallanger
2bdbd7088c Traxxas TQ 1st gen: try 5 2024-05-04 11:36:14 +02:00
pascallanger
1d3ed78622 J6Pro update 2024-05-04 11:34:59 +02:00
pascallanger
79b1c54007 Traxxas TQ 1st gen: try 4 2024-05-03 00:15:03 +02:00
pascallanger
81eb5dc6bc Traxxas TQ 1st gen: try 2 2024-04-29 19:43:24 +02:00
pascallanger
85a0e4bde8 Traxxas TQ 1st gen: try 2 2024-04-27 11:23:19 +02:00
pascallanger
63dfa316e8 Traxxas TQ 1st gen: try 1 2024-04-26 19:25:23 +02:00
pascallanger
9d383432a5 Update SGF22_nrf24l01.ino 2024-04-24 07:00:44 +02:00
pascallanger
6b181db629 SLT try 1e 2024-04-18 10:40:37 +02:00
pascallanger
873279dbe9 SLT new sub_protocol V1_4CH 2024-04-15 14:13:37 +02:00
pascallanger
f35be2984a SLT try 1d 2024-04-14 13:29:28 +02:00
pascallanger
7ddeb31e95 SLT try 1c 2024-04-14 13:23:50 +02:00
pascallanger
7444c44b48 SLT try 1b 2024-04-13 10:22:39 +02:00
pascallanger
08d1dcbed2 SLT try 1a 2024-04-12 18:24:50 +02:00
pascallanger
3e4f4e36c1 SLT try 1 2024-04-12 18:20:01 +02:00
pascallanger
902419dd3d
Update Protocols_Details.md 2024-04-08 18:36:42 +02:00
pascallanger
038b3b9225 Update Protocols_Details.md 2024-04-04 17:13:35 +02:00
pascallanger
45f0154f4b Update Protocols_Details.md 2024-04-04 16:15:27 +02:00
pascallanger
e03864e35f Traxxas TQ 6 channels 2024-04-04 16:13:35 +02:00
pascallanger
de35ee09f5 Realacc doc update 2024-04-02 16:42:19 +02:00
pascallanger
c88952c35e REALACC: IDs
Any ID
2024-04-02 12:34:04 +02:00
pascallanger
ffae7dda1d Update SGF22_nrf24l01.ino 2024-03-29 16:24:25 +01:00
pascallanger
4f17f76b39 SGF22: new flag 2024-03-29 16:19:20 +01:00
pascallanger
31ef090508 ASF try 4 2024-03-29 15:55:54 +01:00
pascallanger
04d4e39b87 Update _Config.h 2024-03-27 19:34:28 +01:00
pascallanger
b3537ea75a DSM2_SFC try 3 2024-03-26 16:18:34 +01:00
pascallanger
bccc050165 DSM2_SFC try 2 2024-03-26 14:41:19 +01:00
pascallanger
0f0df176de DSM2_SFC try 1
Servo refresh rate -> frame rate 16.5/11ms
2024-03-26 14:37:26 +01:00
pascallanger
5542e7005d ASF try 3 2024-03-26 11:43:42 +01:00
pascallanger
eb35fefd3e ASF try 2 2024-03-25 15:17:51 +01:00
pascallanger
5acc3a8d01 CYRF6936: Findbestchannels flag addition 2024-03-25 15:11:31 +01:00
pascallanger
9e9c3958c6 ASF: try 1 2024-03-23 11:23:42 +01:00
pascallanger
7f3a93ca4c Kyosho3: increase bind time to 2.5s 2024-03-22 18:24:31 +01:00
pascallanger
debc9de11a New protocol Kyosho3/ASF
Only 1 ID and 1 frequency for now
2024-03-22 18:17:21 +01:00
pascallanger
f117105124 SGF22: Fix none working IDs 2024-03-21 16:33:16 +01:00
pascallanger
2e3520acad DSM2SFC timing update 2024-03-19 20:52:50 +01:00
pascallanger
91af921d98 Update Protocols_Details.md 2024-03-19 15:47:56 +01:00
pascallanger
ab45ec6d1c Update Validate.h 2024-03-19 15:44:29 +01:00
pascallanger
26b0b6bd20 Update DSM_cyrf6936.ino 2024-03-19 15:44:21 +01:00
pascallanger
1b9ce32e89 Update DSM_cyrf6936.ino 2024-03-19 14:11:40 +01:00
pascallanger
332e55831c Update Protocols_Details.md 2024-03-18 17:11:23 +01:00
pascallanger
7051438e5d Update Protocols_Details.md 2024-03-18 17:00:40 +01:00
pascallanger
28467fac57 DSM/DSM2SFC new subprotocol 2024-03-18 16:57:54 +01:00
pascallanger
c7513abad8 Update Multiprotocol.h 2024-03-18 09:02:55 +01:00
pascallanger
e6e13c0fdd Docs update 2024-03-17 15:52:42 +01:00
pascallanger
9579a667fc Update REALACC_nrf24l01.ino 2024-03-17 15:28:33 +01:00
pascallanger
cbedda2471 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2024-03-14 20:23:04 +01:00
pascallanger
f8695befe2 REALACC multi IDs 2024-03-14 20:23:02 +01:00
pascallanger
e951e3146b
Update Protocols_Details.md (#955) 2024-03-14 20:22:00 +01:00
pascallanger
4c0b46549f EazyRC multi IDs/RFs 2024-02-28 10:46:10 +01:00
pascallanger
188f8ff9ce Radiolink/RC4G: IDs and RFs 2024-02-26 17:20:08 +01:00
pascallanger
bee6e59582 Update EazyRC_nrf24l01.ino 2024-02-24 09:38:42 +01:00
pascallanger
af47462ba7 EazyRC.2 2024-02-23 19:06:20 +01:00
pascallanger
d6ccd4af54 EazyRC.1 2024-02-23 17:51:38 +01:00
pascallanger
0feedc6fa9 New protocol EazyRC 2024-02-23 17:36:02 +01:00
pascallanger
b5bc7c04fb Rename Traxxas/6519 to Traxxas/TQ 2024-02-23 17:19:09 +01:00
pascallanger
a15371d989 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2024-02-23 11:29:35 +01:00
pascallanger
3c82f37e2b Bumping revision 2024-02-23 11:29:19 +01:00
Ben Lye
4f914a18ae
Automated build process updates (#950)
* 4-in-1 air and surface builds

* Disable serial and PPM-only builds for STM32 x-in-1

* More air and surface builds

* Fix 5-in-1 tests

* T18 air, surface, and LBT builds

* Remove CFlie from DIY 5-in-1 AIR

* Bump action versions

* v4 artifact merging

* Improve artifact merge

* Fix merge

* DIY 5-in-1 LBT

* Tweak CI job name

* Add T-Lite 5-in-1 LBT

* CI job restructure
2024-02-23 11:26:30 +01:00
pascallanger
1cbce29970 Remove Radiolink/RC4G when MULTI_AIR 2024-02-23 11:06:48 +01:00
pascallanger
e0c44ed5a8 Remove DSMR when MULTI_AIR 2024-02-23 11:05:02 +01:00
pascallanger
390e5dd654 Remove Kyosho/FHSS&SYNC when MULTI_AIR 2024-02-22 17:40:56 +01:00
pascallanger
968293e599 Remove Hisky/HK310 when MULTI_AIR 2024-02-22 17:29:00 +01:00
pascallanger
09ee173e3b Remove Pelikan/SCX24 when MULTI_AIR
Save flash space
2024-02-22 17:14:20 +01:00
pascallanger
babfee0f9e Update RadioLink_cc2500.ino 2024-02-21 13:43:44 +01:00
pascallanger
72da3c5bc5 Create MULTI_AIR / MULTI_SURFACE 2024-02-21 12:31:23 +01:00
Ben Lye
4df1e65a7f
Pelikan SCX24 / HPI TF-41 reversed (#917)
* Pelikan SCX24 / HPI TF-41 reversed

* Save some flash and memory

* Save more flash
2024-02-21 12:17:02 +01:00
pascallanger
1459d690d8 Update SGF22_nrf24l01.ino 2024-02-21 11:41:23 +01:00
pascallanger
8d96066215 Merge XK and Tiger protocols 2024-02-21 11:38:31 +01:00
pascallanger
93a5834dd0 Update TRAXXAS_cyrf6936.ino 2024-02-19 21:53:54 +01:00
pascallanger
5f9ac82ed1 SGF22.5 Multiple IDs, 1 set of frequencies 2024-02-19 18:34:27 +01:00
pascallanger
2108912263 Update TRAXXAS_cyrf6936.ino 2024-02-17 11:03:37 +01:00
pascallanger
72f87cade9 XK: new subprotocol Cars
Removed:
 - deadband which was needed on the planes
- force bind since the cars remember the bind info
-
2024-02-17 11:02:52 +01:00
pascallanger
50bd4850fa Radiolink/RC4G
1 ID / 1 set of frequency
2024-02-16 18:03:32 +01:00
pascallanger
dc1490b9b0 SGF22.4 2024-02-16 10:26:48 +01:00
pascallanger
b18adb0efe SGF22.3 2024-02-16 10:24:44 +01:00
pascallanger
53d5684dfd KN: additional trim and flag 2024-02-15 20:52:01 +01:00
pascallanger
724abbc935 SGF22.2 2024-02-15 18:24:58 +01:00
pascallanger
de610b53fc SGF22.1 2024-02-15 16:28:52 +01:00
pascallanger
dd7ee7bdce SGF22 2024-02-15 16:20:37 +01:00
pascallanger
31a9f6860d New protocol SGF22
Only 1 ID!
2024-02-15 15:51:20 +01:00
pascallanger
4a66ae64c6
Update Protocols_Details.md (#940) 2024-02-06 12:06:34 +01:00
pascallanger
11ae26a431 Update Protocols_Details.md 2024-01-31 19:27:54 +01:00
pascallanger
cdabde5d67 Kyosho FHSS and Syncro
Automatically binding a FHSS or a Syncro RX using FHSS
2024-01-31 19:22:36 +01:00
pascallanger
ce75dd3355 Kyosho FHSS/SYNCRO cleanup 2024-01-30 14:53:28 +01:00
pascallanger
69484b5278 Second try 2024-01-30 14:42:24 +01:00
pascallanger
a90e1f2d3a Update Bluefly_ccnrf.ino
Exclude this protocol since it's not working
2024-01-30 14:36:38 +01:00
pascallanger
5af246bba0 Update _Config.h 2024-01-30 12:33:21 +01:00
pascallanger
75a46858da Update Kyosho_a7105.ino 2024-01-30 12:25:25 +01:00
pascallanger
8ac53657ec Kyosho updqte
fixed crash
2024-01-30 12:06:37 +01:00
pascallanger
2888d3e937 TRAXXAS TQ WIP
It still won't work unless you have some luck. I still need to work on the RF frequency.
2024-01-29 18:59:24 +01:00
pascallanger
3d989a47db Typo... 2024-01-29 18:45:32 +01:00
pascallanger
a7d6d12679 Kyosho Syncro
Sub protocol Syncro for KT-331 and KR-331
2024-01-29 17:00:54 +01:00
pascallanger
457703b881
Update Protocols_Details.md 2024-01-18 12:16:59 +01:00
rdba2k
8e663f2531
Update V911S_ccnrf.ino to add 6G/Senior and light for XK A280 (#929) 2024-01-18 12:07:34 +01:00
pascallanger
8c2fe5f65e Traxxas trial 2023-12-24 15:05:13 +01:00
pascallanger
7549783741 Fix Traxxas for any RX 2023-12-22 21:02:10 +01:00
pascallanger
e6bafaabb7 New protocol: BumbleBee 990A
Preliminary
2023-12-22 21:01:15 +01:00
pascallanger
9286ac84f6 Update MultiChan.txt 2023-12-22 20:58:19 +01:00
pascallanger
ede40ac598
Update Protocols_Details.md (#923) 2023-12-21 18:24:08 +01:00
pascallanger
88fad2dc9f
Update Protocols_Details.md (#922) 2023-12-21 18:22:50 +01:00
Frankie Arzu
549d3ad653
Fix for DSM-Auto Bind on Lemon-RX Gen2 (#918)
* #916 Fix for Auto-Bind on Lemon-RX Gen2

Tested with multiple brands (Spektrum, OrangeRX, Lemon-Rx, Admiral).  Even some old DSM 2 receivers.
All work with "Auto" now.   Just in case one needs a LONG bind sending period, when not using "Auto" works the same as before.

* Use 1.8s for Bind Send

Removed the short and long bind count logic.
2023-12-18 12:02:57 +01:00
Frankie Arzu
62aa58d32d
Forward Prog v0.56 (#919)
1. NEW Black&White Radios new model setup. Now it can setup completely a plane from zero
2. Color version; simplified code for Tail mixes, and fix Taileron setup
2023-12-17 11:12:14 +01:00
Paul
21a06c2925
FX9603 added to protocol details (#914)
* Allow zero and limit range of enterd values

* FX9603 added to protocol details
2023-12-12 22:43:34 +01:00
pascallanger
9acb3b0e2c DSM.ino: Saved a few bytes 2023-12-01 19:06:15 +01:00
pascallanger
785edde659 Update DSM.ino 2023-12-01 18:29:23 +01:00
pascallanger
7da6d52a84 CYRF data codes are always 16
Removed useless function argument
LOSI now points to the DSM data codes = dependency on DSM
2023-12-01 10:58:56 +01:00
Ben Lye
61cbe45ce2
Disabled protocols in Atmega CYRF builds (#911) 2023-11-30 16:17:21 +01:00
pascallanger
23af33e214 LOSI multi IDs 2023-11-30 16:04:43 +01:00
pascallanger
11db967b8a LOSI multi ID 2023-11-30 16:02:58 +01:00
pascallanger
d419e2b344 Update Losi_cyrf6936.ino 2023-11-30 12:15:02 +01:00
pascallanger
2b69c1184e Update Losi_cyrf6936.ino 2023-11-30 12:10:17 +01:00
pascallanger
1ceed87298 Update Losi_cyrf6936.ino 2023-11-30 09:47:28 +01:00
pascallanger
a1737eab46 PELIKAN: new hopping tables 2023-11-30 09:46:18 +01:00
pascallanger
9cbcafe6cf Update Losi_cyrf6936.ino 2023-11-29 15:40:18 +01:00
pascallanger
495706314f Pelikan: 1 more High ID / frequency table 2023-11-29 15:40:08 +01:00
pascallanger
595511979b Update Losi_cyrf6936.ino 2023-11-27 20:07:12 +01:00
pascallanger
b8d30f47be Update Losi_cyrf6936.ino 2023-11-27 16:59:41 +01:00
pascallanger
b7097bdfb7 LOSI 2023-11-27 15:56:50 +01:00
pascallanger
a682b0e604 Update Losi_cyrf6936.ino 2023-11-22 08:26:03 +01:00
pascallanger
7e7b555809 LOSI: dynamic channel 2023-11-22 07:57:54 +01:00
pascallanger
62ecaa8412 Revert J6Pro changes 2023-11-22 07:57:30 +01:00
pascallanger
5ae052317d
Update README.md 2023-11-11 11:50:17 +01:00
pascallanger
f3331ca397
Add pointer to Frank DSM Tools page 2023-11-11 11:48:54 +01:00
pascallanger
ffcfd44127 Bluefly fix? 2023-11-11 01:57:45 +01:00
Ben Lye
5ef944241a
Add EU/LBT binaries to the build artifacts (#905)
* Add release LBT builds

* Use friendly build names

* Script cleanup
2023-11-10 17:40:30 +01:00
pascallanger
ab5f75b1b3 BlueFly: New protocol 2023-11-09 18:02:21 +01:00
pascallanger
10ec4dd735 Update Protocols_Details.md 2023-11-09 11:57:26 +01:00
pascallanger
a62d1dcd2e Update Protocols_Details.md 2023-11-08 10:53:57 +01:00
pascallanger
2c9e98e341 Update Protocols_Details.md 2023-10-30 22:48:04 +01:00
pascallanger
0bf94e96b5 E129/C186: New flip flag for C129V2 on CH11 2023-10-30 22:36:09 +01:00
Ben Lye
8d84386c7a
Fix LUA script zipping (#898) 2023-10-30 14:44:43 +01:00
Paul
cd721e31d8
Allow zero and limit range of enterd values (#896) 2023-10-24 01:32:38 +02:00
pascallanger
1294ad21cf E129/C186 new circular flight flag 2023-10-23 11:24:37 +02:00
pascallanger
01bc08575f Update Protocols_Details.md 2023-10-10 12:07:16 +02:00
pascallanger
ecfe17915f V761 telemetry fix 2023-10-09 16:53:17 +02:00
pascallanger
f97aa3597d Commented out by default E01X protocol and subprotocols to gain flash space 2023-09-27 15:36:53 +02:00
pascallanger
2e1d763d54 V761 telemetry
A1 (4.4V -> 2.2V), RSSI equal to 100 means that all telem packets are received and TQLY indicates the number of lost telem packets.
2023-09-26 20:04:35 +02:00
Frankie Arzu
93a2cc8b7f
Version 0.55 (#883) 2023-09-08 14:33:13 +02:00
pascallanger
abfebb3da4 QIDI-550 model
Using FX/9630
Added trims
!! Need to find out the first RF channel calculation !!
2023-09-02 01:11:37 +02:00
johnnym007
ce5f4ec264
Clone subprotocol for DSM (#877)
* Init WIP

* Adding a gitignore

* removing gitignore

* RX routines added

* Finished adding clone and erase

* Update _Config.h

* Update Multiprotocol.ino

* Ready for testing

* Refactor to call init on cloned/normal change

* Remove vscode files

* remove TODO comment

* remove unnecessary brackets

---------

Co-authored-by: john.moore <john.moore@amulethotkey.com>
2023-08-27 16:08:10 +02:00
pascallanger
a41123deb2 FrSky Archer Bind 2023-08-26 00:04:36 +02:00
pascallanger
fabb65a2bb Fix FrSkyX SPORT 2023-08-12 13:17:06 +02:00
pascallanger
eae1329dfe Add flags for KFPLAN Z61 BF109 2023-08-12 13:16:39 +02:00
Ben Lye
a8ae0a2bd1
Fix builds by using older Arduino CLI (#864)
* Used a fixed version of Arduino CLI

* Bump action versions
2023-06-14 14:08:58 +02:00
Ben Lye
c814cc1bd4
Switch back to non-devel boards for CI/CD (#863) 2023-06-14 13:29:34 +02:00
pascallanger
4e7c1502ff Update Protocols_Details.md 2023-06-04 13:48:04 +02:00
pascallanger
8ddee12de5 Update _Config.h 2023-06-04 12:50:39 +02:00
pascallanger
692bcc1fbb Update Scorpio_cyrf6936.ino 2023-06-04 12:38:09 +02:00
pascallanger
0bb345e3fc J6Pro save some flash space 2023-06-04 12:20:10 +02:00
pascallanger
c193d0b9dd Update Multiprotocol.ino 2023-06-04 12:12:22 +02:00
pascallanger
410ce5cc4c Fixed SX1276 protocol 2023-06-04 12:07:27 +02:00
pascallanger
cefe69a692 Fix SPORT when using FRSKYX (V1) protocol set to EU LBT 2023-06-04 12:03:43 +02:00
pascallanger
daa4ded390 New protocol Scorpio
Model Falco 300
2023-06-04 12:02:37 +02:00
pascallanger
5949fca990
Update Protocols_Details.md (#856) 2023-05-15 08:26:13 +02:00
pascallanger
ed2e2e4f32
Update Protocols_Details.md 2023-05-15 08:17:19 +02:00
Frankie Arzu
b2f8f482bb
V0.54 Enhacements (#846)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

* #751 Fix message displaying data path

* #751  More improvements

1. Much easier to select channels > Ch6 for FMode, Gain and Panic channels
2. B&W version for smaller screens (128x64).. Memory footprint still a problem.
3. Fix a lot typos/misspell/grammar in the documentation

* Create DSM_AR636_TextGen.lua

Script to show Telemetry TextGen screens
for AR636 Receiver.
Really useful for BLADE helis using the AR636

Could replace dsmPID.lua

Still needs to be ported to smaller screens.

* #751 Enhancements for Lua Script tools

Enhancements

* Delete DSM_AR636_TextGen.lua

The TextGen functionality is included in DSM_AR636_Tel.lua. No longer needed

* Version 0.54

1. Fix problem with "Attitude Trim" Menu
2. New "MINimalistic" version for radios with very low memory
3. Externalized menu messages shared by all versions. the idea is to allow to translate it into other languages.
4. Correction of TextGen tools to work on black&white radios (some Lua functional differences). TextGen will be working on EdgeTx 2,8.3

---------

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2023-04-16 21:42:31 +02:00
Frankie Arzu
89023d4b55
Remove DSM_AR636_TextGen.lua (#837)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

* #751 Fix message displaying data path

* #751  More improvements

1. Much easier to select channels > Ch6 for FMode, Gain and Panic channels
2. B&W version for smaller screens (128x64).. Memory footprint still a problem.
3. Fix a lot typos/misspell/grammar in the documentation

* Create DSM_AR636_TextGen.lua

Script to show Telemetry TextGen screens
for AR636 Receiver.
Really useful for BLADE helis using the AR636

Could replace dsmPID.lua

Still needs to be ported to smaller screens.

* #751 Enhancements for Lua Script tools

Enhancements

* Delete DSM_AR636_TextGen.lua

The TextGen functionality is included in DSM_AR636_Tel.lua. No longer needed

---------

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2023-03-19 06:19:35 +01:00
Frankie Arzu
66ac007d4c
Frankie dsm telemetry lua scripts enhancements (#835)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

* #751 Fix message displaying data path

* #751  More improvements

1. Much easier to select channels > Ch6 for FMode, Gain and Panic channels
2. B&W version for smaller screens (128x64).. Memory footprint still a problem.
3. Fix a lot typos/misspell/grammar in the documentation

* Create DSM_AR636_TextGen.lua

Script to show Telemetry TextGen screens
for AR636 Receiver.
Really useful for BLADE helis using the AR636

Could replace dsmPID.lua

Still needs to be ported to smaller screens.

* #751 Enhancements for Lua Script tools

Enhancements

---------

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2023-03-18 19:31:48 +01:00
Frankie Arzu
139cd4c583
Telemetry TextGen/Screens for BLADE Helis with AR636 (#813)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

* #751 Fix message displaying data path

* #751  More improvements

1. Much easier to select channels > Ch6 for FMode, Gain and Panic channels
2. B&W version for smaller screens (128x64).. Memory footprint still a problem.
3. Fix a lot typos/misspell/grammar in the documentation

* Create DSM_AR636_TextGen.lua

Script to show Telemetry TextGen screens
for AR636 Receiver.
Really useful for BLADE helis using the AR636

Could replace dsmPID.lua

Still needs to be ported to smaller screens.

---------

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2023-02-07 10:48:46 +01:00
richardclli
0fed2486f5
FX9630 protocol support, resolves #801 (#805)
New protocol FX9630
2023-01-16 20:06:27 +01:00
Filip Kotoucek
11c01004bf
KF606: subprotocol ZC-Z50v2 Cessna (#797)
Maybe newer iteration of Z50. My plane does not have front propeller.
But if there is one, its just for design. This model does not have front motor.

Thanks @pascallanger for support and reviews.
2023-01-15 21:26:35 +01:00
Frankie Arzu
f49f03d7da
Frankie dsm fwrd prg enhancements (#806)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

* #751 Fix message displaying data path

* #751  More improvements

1. Much easier to select channels > Ch6 for FMode, Gain and Panic channels
2. B&W version for smaller screens (128x64).. Memory footprint still a problem.
3. Fix a lot typos/misspell/grammar in the documentation

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2023-01-15 11:27:34 +01:00
Louis Botha
90bb5f8871
Update Protocols_Details.md (#796)
Fixed spelling mistake
2023-01-12 10:59:20 +01:00
Frankie Arzu
401cc76f20
Fix message displaying the DataPath after saving (#787)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

* #751 Fix message displaying data path

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-12-20 23:48:23 +01:00
Frankie Arzu
6297810edc
Updated Ch naming across all display, and updated Docs (#786)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

* #751 Updated channel naming and docs

Updated readme documentation
Consistent naming of Ch across the code.

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-12-20 22:58:38 +01:00
Frankie Arzu
01aef0a822
Frankie dsm fwrd prg enhancements (#785)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

* #751 More fixes on mixers and servo reverse

-- Fix problem reversing servos when using vtail/delta mix
-- Properly detect ch order of multimodule

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-12-20 10:12:34 +01:00
Frankie Arzu
186730231e
Fwrd Programming New Model/Wingtype Setup Menus (#784)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

* #751

New v0.51 version.
- Added new menus to configure Model/Wing type.  Without it, the initial setup will not work properly.

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-12-18 19:45:50 +01:00
pascallanger
770a12ffdf EU 2022-12-08 08:28:45 +01:00
pascallanger
40fa242012
Update Protocols_Details.md 2022-12-06 15:53:42 +01:00
Frankie Arzu
c4e70ab4fd
Frankie dsm fwrd prg enhancements (#776)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

* #751

1. Added Warning Screen
2. Correct handling of Unknown lines in Gyro Settings->Initial Setup

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-12-02 08:53:13 +01:00
Frankie Arzu
2da8b3c42a
Frankie dsm fwrd prg enhancements (#773)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

* #751 A few final changes

1. Update channel names to include channel number. i.e: Ch5 (Gear)
2,  Fix flight mode display for Heli Receiver
3. i think the unknown lines are to request info about the TX settings

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-12-01 08:57:33 +01:00
Frankie Arzu
38a79c816a
Frankie dsm fwrd prg enhancements (#772)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

* #751 more cosmetic things

1. Added AR10360T,
2. Simplify way to configured the hack for more receivers.
3. Change some texts on menus to march spektrum
4. Background color in Spektrum theme to match

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-29 23:23:10 +01:00
Frankie Arzu
1d8f1a0857
Frankie dsm fwrd prg enhancements (#771)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

* #766 More enhacements

Added AR630
Make numbers right justified
Cleanup some log messages and line types.
Updated DSM FWD prog documentation

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-29 07:46:40 +01:00
Frankie Arzu
5901bac374
#766 Fix for editable Gains + Number formatting (#770)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

* #766  make editable Gain Values

Gains and other settings should be editable even when they are VALUE_NOCHANGING. Flight Mode is an exception that is handled properly. Right align numbers.

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-28 20:00:16 +01:00
Frankie Arzu
2e7b1dc904
#766 change validation of required files (#768)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

* #766

Change the way to detect that the files exist. now works on both ETX and OTX

* #766 Strange Flickering in OTX

Strange Flickering happening on OTX. Refreshing the screen on every cycle fixed the problem

* #766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-27 15:10:02 +01:00
Frankie Arzu
7052751261
Frankie dsm fwrd prg enhancements (#763)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

* #751

Write documentation about the protocol so that we don't forget later what we know, and enable others to understand the logs and maybe help solve problems.

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-21 09:52:15 +01:00
Frankie Arzu
60047e2c73
Frankie dsm fwrd prg enhancements (#762)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

* #751 add check for required libraries

Add check that the required files in DSMLIB exist

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-20 18:24:47 +01:00
Frankie Arzu
40b393ac4a
Frankie DSM fwrd Prog (more improvements) (#760)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

* #751 Cosmetic and Show Orientation Images

#751
1. Fix problems when text contradictions between Menu/Line Headers and List Values
2. Show Images of RX orientations
3. Able to Hack getting into Initial Setup and other menus who was failing before
4. Custumize the way Flight Mode reports the Value on Screen

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-20 18:01:16 +01:00
Frankie Arzu
1c6dc01959
Frankie dsm fwrd prg enhancements (#757)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

* #751 Fix problems With Reset RX

1. Fix problem when trying to Factory Reset. Enter Bind Mode. Save backup, Restore Backup

2. Found a way to advance on the Gyro initial Setup menus.. a bit of a hack, but works.

3. Handle RX resets properly. It needed after initial setup

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-18 10:41:59 +01:00
pascallanger
5148449066 FS2A: Turning on/off the LNA during bind. 2022-11-17 20:08:56 +01:00
Frankie Arzu
fcc4d19430
Frankie dsm fwrd prg enhancements (#755)
* #751 DSM Enhancements

 #751 DSM Forward Programming Enhancements (New GUI, etc)

* Make both work on EdgeTx and OpenTX

* #751 Turn OFF simulation by default

Distribution code with RX simulation OFF
Simulation should be only for Development

* #751 Update Readme Documentation

Updated the Readme.txt documentation
and removed compiled luac file that was check in by mistake

Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2022-11-17 17:50:36 +01:00
richardclli
c80f705fa2
Added MPM for Flysky PL18 PCB and casing design. (#754) 2022-11-17 11:37:11 +01:00
pascallanger
c95db35b41 Update Protocols_Details.md 2022-11-17 10:58:38 +01:00
pascallanger
35f3548992 Compilation option 2022-11-17 10:29:53 +01:00
pascallanger
58f6716035
Update README.md 2022-11-17 09:49:30 +01:00
pascallanger
2b15de0f90
Update README.md 2022-11-17 09:47:22 +01:00
pascallanger
be91409df9
Delete DSM FwdPrg.lua 2022-11-17 09:44:18 +01:00
Frankie Arzu
4d8e440965
Frankie dsm fwrd prg enhancements (#753)
DSM Forward Programming Enhancements (New GUI for Color+Touch and BW, etc). Work on EdgeTx and OpenTX.
2022-11-17 09:42:04 +01:00
pascallanger
2d469d074e Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2022-10-30 11:40:11 +01:00
pascallanger
96405d27b5 Extend Kyosho KT-17 bind time 2022-10-30 11:40:07 +01:00
yakulis
75c9fb40a7
Update DSM FwdPrg.lua (#735)
Panic Text Updates - The following strings were updated:
Text[0x00D2]="Panic Channel"
Text[0x008E]="Panic Delay"
Text[0x01FC]="Panic Flight Mode"
2022-10-12 11:35:09 +02:00
Pieter du Preez
cd1c15a45a
Added documentation for using dfu-util for flashing STM32 targets. (#727)
This patch adds documentation, explaining how to flash firmware to DFU
capable multimodules.

A dfu-util command was taken and adapted from:
https://github.com/benlye/flash-multi/blob/master/doc/Troubleshooting.md

Using dfu-util is straight forward, easy and very safe.
2022-10-12 11:34:32 +02:00
pascallanger
2bd50f4c8c V761/TOPRC: new sub protocol
Top RC Hobby mini planes
2022-09-26 12:02:38 +02:00
yakulis
4c2ddcbe48
Update DSM FwdPrg.lua (#733)
Reversing 'Off' and 'On' text values in lines #555 and #556.  They are used in the SAFE and AS3X menu items in the DSM Forward Programming section, and they are functioning backwards. This will correct the issue. This is the fix for Issue #728
2022-09-11 06:01:02 -04:00
Ben Lye
d7f9ef6967
Use devel boards in CI workflow (#709) 2022-07-21 10:20:16 +02:00
pascallanger
bfc8c2f9fd Kyosho2/KT-17: only 1 ID 2022-07-20 17:20:27 +02:00
pascallanger
ce6243d6e3 FX/620: IDs 2022-07-17 09:07:28 +02:00
pascallanger
80f9ff4163 Update FX_nrf24l01.ino 2022-07-15 15:44:10 +02:00
pascallanger
d9f8a3989a FX/FX620: only 1 ID 2022-07-15 15:43:04 +02:00
pascallanger
416f7d5c19 FX/FX620 another try 2022-07-12 08:05:41 +02:00
pascallanger
eb24dd5549 FX/FX620
I messed up the hopping, I must have looked at the wrong file.
2022-07-11 11:12:20 +02:00
pascallanger
ba19592973 FX/FX620 debug off 2022-07-11 09:11:11 +02:00
pascallanger
98d8d7fb5f FX/FX620 new protocol 2022-07-11 09:03:31 +02:00
pascallanger
ad0947b0b7 Updated MT99xx/PA18: need someone to test... 2022-07-09 00:43:28 +02:00
pascallanger
c093f21b31
Update README.md 2022-07-08 10:38:13 +02:00
pascallanger
c5a3e305f9 Update Protocols_Details.md 2022-07-08 09:46:58 +02:00
pascallanger
e085602a6c FX816 is not limited to the P38 2022-07-08 09:46:28 +02:00
pascallanger
dee25215cf Update Protocols_Details.md 2022-07-08 09:41:16 +02:00
Michael
ef1bb1ead7
adjusted comment according to change in commit da33df43 (#696) 2022-07-07 11:44:46 +02:00
pascallanger
90170493c0 Update doc 2022-06-30 17:40:55 +02:00
pascallanger
00a9057186 Update Protocols_Details.md 2022-06-28 14:24:19 +02:00
pascallanger
05c300e979 Update Protocols_Details.md 2022-06-28 10:23:20 +02:00
pascallanger
6730ed6246 Update Protocols_Details.md 2022-06-27 17:20:55 +02:00
pascallanger
0a0463652b E129/C186 protocol
C186/E120 models
2022-06-27 16:59:48 +02:00
pascallanger
4f580a4286
Update Hardware.md 2022-06-16 10:36:34 +02:00
Michael
0616cab386
Fixes a problem where setting failsafe values was only possible once after bind and only set values for the first 12 channels. This fix allows setting failsafe values without having to rebind and sets failsafe values correctly for all possible 16 channels. (#695)
Notes for OpenTX/EdgeTX:
This fix doesn't exhibit servo jitter if failsafe mode was left on Custom, however it is still recommended to set failsafe mode back to Receiver after setting failsafe values.
It is still necessary to wait at least 8 seconds switching back from failsafe mode Custom to failsafe mode Receiver as OpenTX/EdgeTX will trigger the data transfer in Custom mode only every 7 seconds.

Bench tested with HoTT receivers GR-16, GR-24pro, GR-32
Flight tested with HoTT receiver GR-24
2022-06-13 14:28:21 +02:00
Michael
175cfa5e93
This is the Graupner HoTT adapted version of the Model Locator script. It uses the Graupner HoTT telemetry sensor "Rssi" instead of the OpenTX sensor "RSSI". (#693)
Reasoning: The OpenTX sensor "RSSI" is populated by the individual OpenTX telemetry protocol implementations and returns a value from 0..100 (percent) originating from the early FrSky implementation. It turns out that FrSky did not really provide a genuine signal strength indicator in units of dbm but a link quality indicator in 0..100%. With Graupner HoTT the link quality indicator is not a good basis for the model locator as it is very non-linear and doesn't change much with distance. Using the Graupner HoTT telemetry sensor "Rssi" which is a true signal strength indicator serves the purpose of locating a model much better as it varies much more with distance.
2022-06-07 10:51:26 +02:00
Pascal Langer
dbfccad568 Update DSM FwdPrg.lua 2022-04-25 10:33:16 +02:00
Pascal Langer
3fe6dc64fa KF606/MIG320: Added LED control 2022-04-15 17:29:25 +02:00
Peter Feerick
49068af59f
fix: MultiConfig lua set and reset subProtocol (#672) 2022-03-25 09:12:14 +01:00
pascallanger
fbd81c6e26
Update Protocols_Details.md 2022-02-07 18:49:38 +01:00
Ryan5732
9cac96d6a7
Small Readme Typos (#661) 2022-02-03 14:11:26 +01:00
Pascal Langer
5987aa40a6 Another try on PA18 2022-01-25 15:21:22 +01:00
Pascal Langer
30cb812549 Try PA18 2022-01-24 08:36:00 +01:00
Pascal Langer
0fd2e36046 test PA18 2022-01-23 19:08:46 +01:00
Pascal Langer
8b05e55ebd MT99xx2/PA18: new protocol 2022-01-23 17:56:00 +01:00
Pascal Langer
af71a208fd Ready for release 2022-01-16 11:00:50 +01:00
mheimlich
7e5cb8e884
mention XK A800 in V911S/E119 details (#654) 2022-01-16 10:54:04 +01:00
MattCarothers
8c669ea015
Updated several text fields (#651) 2022-01-09 17:25:11 +01:00
Anders Höglund
acd8379077
A few more Spektrum Fwd Programming text updates (#632)
* DSM FP, Added AR8360T

* DSM FP, Added a few unkown empty lines
2021-11-19 08:37:28 +01:00
Pascal Langer
97c6088715 fix compilation? 2021-11-13 19:08:38 +01:00
Pascal Langer
db017c73b6 HS6200 emulation using CYRF for E01X protocol 2021-11-13 19:03:01 +01:00
Anders Höglund
24aaa0dd0c
Text updates in Spektrum Fwd Prog LUA script (#630)
* DSM FP, Added AR636B

* DSM FP, Added AR637TA

* DSM FP, Added On, conflict with AR636B

* DSM FP, Rx name conflict resolved.
2021-11-12 18:37:52 +01:00
Michael
da33df4346
added packet_in[14] to transfer HoTT device warnings to OpenTx (#627) 2021-11-04 14:57:25 +01:00
Pascal Langer
22590ed4f7 Update DSM FwdPrg.lua 2021-10-26 16:34:38 +02:00
Pascal Langer
c0bc64c2aa V911S: increased bind time 2021-10-24 12:03:09 +02:00
Pascal Langer
694d968e8c Update Propel_nrf24l01.ino 2021-10-24 11:04:57 +02:00
Pascal Langer
fff3b8830e MT99xx/A180: F949S flags for RATE, RXLED and 3D6G 2021-10-24 11:04:44 +02:00
Pascal Langer
b740f4cd24 V911S/E119: add 6G_3D channel for P40 plane 2021-10-24 09:57:24 +02:00
Pascal Langer
e247b8b9c1 DSM Fwd Pgm updated 2021-10-20 15:13:56 +02:00
Pascal Langer
4f7af553d1 Update doc 2021-09-17 17:07:15 +02:00
Pascal Langer
570e6f8c64 Update Protocols_Details.md 2021-09-17 09:48:35 +02:00
Pascal Langer
b6e665b567 Devo: fix typo 2021-09-16 16:13:39 +02:00
Pascal Langer
48e82304a0 Update Devo_cyrf6936.ino 2021-09-16 00:30:46 +02:00
Pascal Langer
7b58b9aca0 Devo: support for 2 GPS formats
Use the Fixed ID field, 0/1 first GPS format, +2 for the other format -> 2/3
2021-09-16 00:11:25 +02:00
Pascal Langer
dfcf3f533c Update NRF24l01_SPI.ino 2021-09-16 00:08:47 +02:00
Pascal Langer
4c14925b4f Bump version for release 2021-09-12 19:35:11 +02:00
Pascal Langer
4c74bc869d Update _Config.h 2021-09-11 00:08:09 +02:00
Pascal Langer
45edfa1ec0 AFHDS2A doc update 2021-09-10 23:58:12 +02:00
Pascal Langer
88343b7424 Proto list: fix flags 2021-09-09 08:40:09 +02:00
Pascal Langer
13197840c2 V761: code cleanup 2021-09-09 08:39:37 +02:00
Pascal Langer
ffe4ac68fd Proto list: add number of protocols in the list 2021-09-08 14:30:01 +02:00
Pascal Langer
5bab5f03db Update Multi_Protos.ino 2021-09-08 13:38:25 +02:00
Pascal Langer
ae748e25f8 Update XN297Dump_nrf24l01.ino 2021-09-07 23:17:21 +02:00
Pascal Langer
e9c7959ecb Update V761_nrf24l01.ino 2021-09-07 23:17:11 +02:00
Pascal Langer
bf09855014 Another attempt 2021-09-07 16:59:06 +02:00
Pascal Langer
32bd39f209 Save space in the 5in1 modules 2021-09-07 15:07:37 +02:00
Pascal Langer
940f241b9d Fix compilation issues 2021-09-07 14:29:35 +02:00
Pascal Langer
5c00ce6b88 New 0 protocol: enable to list all protocols and sub protocols 2021-09-07 14:08:24 +02:00
Pascal Langer
016b282246 Multi Status: send frame as soon as a new protocol is selected 2021-09-05 22:15:56 +02:00
Pascal Langer
d6ecac1302 Xerall: few improvements 2021-09-04 11:48:41 +02:00
Ben Lye
901f8ca6b0
Disable some protocols for the DIY 5-in-1 (#618) 2021-09-01 15:20:10 +02:00
Pascal Langer
9c3b6ba9f6 Update Validate.h 2021-09-01 09:45:38 +02:00
Pascal Langer
53ec484028 Update Validate.h 2021-09-01 01:39:26 +02:00
Pascal Langer
246e808cb4 Xerall protocol 2021-09-01 01:21:38 +02:00
Pascal Langer
a7b68dc2aa F949G: will it work? 2021-08-27 10:22:47 +02:00
Pascal Langer
08404f9223 F949G: another try... 2021-08-26 23:43:42 +02:00
Pascal Langer
149554e61c Update MT99xx_ccnrf.ino 2021-08-26 23:23:38 +02:00
Pascal Langer
7b71425db2 F949G test with original radio ID 2021-08-26 23:19:59 +02:00
Pascal Langer
f9cfb7f20f Update Protocols_Details.md 2021-08-26 22:51:57 +02:00
Pascal Langer
506ee43d41 Update _Config.h 2021-08-26 22:35:42 +02:00
Pascal Langer
ebde0915cd MT99xx/F949G: new sub protocol 2021-08-26 22:33:38 +02:00
Pascal Langer
2501656bf4 Update XN297Dump_nrf24l01.ino 2021-08-26 11:52:36 +02:00
Pascal Langer
9356e7654e XN297EMU: allows to send and receive 0 payload length in enhanced mode 2021-08-25 19:07:36 +02:00
Pascal Langer
4f1e5d2452 BUGSMINI: fix
No one has reported an issue but from the look of the code it was broken since some time...
2021-08-25 19:05:24 +02:00
Ben Lye
64c75414d8
Add release build for 64KB CC2500-only module (#615) 2021-08-24 20:54:46 +02:00
Pascal Langer
5147833487 DSM RX: use directly the TX type and channels 2021-08-21 10:14:05 +02:00
Ben Lye
324419241f
Prefix release binaries with mm instead of multi (#596)
Better for radios with 128x64 LCDs.
2021-08-16 17:59:07 +02:00
Pascal Langer
1a921b1cdb Disable multi config if telemetry is disabled 2021-07-05 17:08:57 +02:00
Pascal Langer
25c052c0a3 KF606: new sub protocol MIG320 2021-07-04 14:05:42 +02:00
Pascal Langer
a02586cca9 RadioLink: RSSI correction 2021-07-03 14:09:28 +02:00
Pascal Langer
226e082c5a E129 and E010R5 not supported on atmega328p 2021-06-30 09:45:25 +02:00
Pascal Langer
5afdff8477 V911S: Rate channel on CH6 (default is high) 2021-06-28 18:10:44 +02:00
Pascal Langer
c52ac2cefc Fix XN297Dump enhanced payload detection 2021-06-28 18:04:17 +02:00
pascallanger
09f39ea60f
Update README.md 2021-06-27 12:38:53 +02:00
Harry Phillips
41e31eae6d
Set reserved field in CABELL packet to current channel (#593) 2021-06-24 11:49:47 +02:00
Pascal Langer
dcf20951ba Update Protocols_Details.md 2021-06-20 18:51:23 +02:00
Pascal Langer
6e9ebfd695 Mould King: control up to 4 bricks at the same time 2021-06-20 18:39:27 +02:00
Pascal Langer
c36b112437 Update Multi_Config.ino 2021-06-17 15:42:09 +02:00
Pascal Langer
24fbd44f5b Multi Config: eeprom format for atmega 2021-06-17 15:40:28 +02:00
Pascal Langer
d0db7829e5 Multi config: enabled by default, LUA script update 2021-06-17 15:30:46 +02:00
Pascal Langer
58ed8ca60f Mould King: Analog and digital sub protocols 2021-05-27 19:01:08 +02:00
Pascal Langer
4d2c8ef04e Fix RadioLink: request telemetry every time to time like original instead of all the time 2021-05-25 14:54:17 +02:00
Pascal Langer
438e85c551 MouldKing: match original 2021-05-09 03:36:42 +02:00
Pascal Langer
06b336ee59 Mould King: fix frequencies 2021-05-04 14:58:40 +02:00
pascallanger
a93adeb75e
Update Protocols_Details.md 2021-05-04 11:29:44 +02:00
Pascal Langer
802e69563e ... 2021-05-04 10:53:38 +02:00
Pascal Langer
a8897df3f2 New protocol: Mould King 2021-05-04 10:39:13 +02:00
Pascal Langer
7157d3d906 Losi: optimization 2021-05-03 16:57:08 +02:00
Pascal Langer
96b8a500b4 New protocol: Losi 2021-05-03 15:29:24 +02:00
Pascal Langer
51a3ef8ee9 Update XN297Dump_nrf24l01.ino 2021-05-01 18:45:20 +02:00
Pascal Langer
652d6604e7 Update Multiprotocol.h 2021-05-01 18:35:47 +02:00
Pascal Langer
b9028ab4b4 XN297Dump: CC2500 dump @250K 2021-05-01 18:15:34 +02:00
Konstantin Tretyakov
62c509b03c
Add the IKEA Ansluta remote-controllable lighting protocol (#566)
* Add the IKEA Ansluta remote-controllable lighting protocol

* Fixes to IKEA Ansluta implementation
2021-04-24 21:46:29 +02:00
Pascal Langer
1648a0780a XK: fix twitch on other channels than rudder 2021-04-24 12:54:17 +02:00
pascallanger
3b1af68ed6
Update FUNDING.yml 2021-04-21 13:17:46 +02:00
pascallanger
aeed7bac57
Create FUNDING.yml 2021-04-20 23:17:50 +02:00
Pascal Langer
2bb76a40f3 Pelikan/SCX24: add second hopping table 2021-04-20 22:24:01 +02:00
Pascal Langer
0c129a45aa SCX24 IDs 2021-04-18 16:41:49 +02:00
Pascal Langer
2a383c7285 Pelikan/SCX24: fix? 2021-04-17 22:55:43 +02:00
Pascal Langer
34f16b0b66 MT99XX/Dragon: batt telemetry correction & low batt flag 2021-04-17 18:31:41 +02:00
Pascal Langer
a9d9c4cdfa Update A7105_SPI.ino 2021-04-17 11:57:00 +02:00
Pascal Langer
4a1c986dd0 Kyosho/FHSS fix? 2021-04-17 11:52:21 +02:00
Pascal Langer
756e9b3213 Update Protocols_Details.md 2021-04-16 15:00:33 +02:00
Pascal Langer
61a284863e Update Protocols_Details.md 2021-04-16 14:59:10 +02:00
Pascal Langer
39410c290b Pelikan/SCX24: new sub protocol 2021-04-16 14:50:53 +02:00
Pascal Langer
9e0684b6cb CABELL: code optimization 2021-04-07 09:02:50 +02:00
Pascal Langer
13add5b9f2 Devo: fix GPS year 2021-04-06 18:15:34 +02:00
Pascal Langer
475cd1af98 Atmega CC2500 build: remove FRSKYL to fit 2021-04-06 10:36:15 +02:00
Pascal Langer
04d08c6d67 FrSkyX2: changed bind bytes 2021-04-06 10:18:48 +02:00
Pascal Langer
6295bb1bbc Packed protocols definition to save space 2021-04-05 17:43:42 +02:00
Pascal Langer
931ba2bd68 Hitec: fix freq tune 2021-04-02 17:42:44 +02:00
Pascal Langer
769fb4ff94 Update Protocols_Details.md 2021-03-30 16:41:29 +02:00
Pascal Langer
aa7c18a2bd FrSkyX: fix the need to rebind RXs 2021-03-30 15:13:00 +02:00
Pascal Langer
f95cfa1261 Update Protocols_Details.md 2021-03-30 14:13:18 +02:00
Pascal Langer
8c12aaf2c1 DSMR: new surface protocol 2021-03-30 12:10:29 +02:00
Pascal Langer
94f73bd54f MT99xx: Added voltage telemetry for the Dragon sub protocol 2021-03-27 11:51:53 +01:00
Pascal Langer
9b3549d4a9 FrSkyX: code review 2021-03-25 10:10:53 +01:00
Pascal Langer
7bc05cb63c Update Multiprotocol.h 2021-03-19 17:11:06 +01:00
Pascal Langer
84780a9d90 Multi Config 2021-03-19 17:06:58 +01:00
Pascal Langer
37e029c612 Bug fix in XN297 emu layer when address is 3 bytes and CC2500 in use 2021-03-17 19:24:42 +01:00
Pascal Langer
c47ed8aca8 E016H has its own protocol now 2021-03-17 18:46:48 +01:00
Pascal Langer
5bb0752d5e Update include to xn297... 2021-03-17 17:19:41 +01:00
Pascal Langer
4a626eaf14 Change XN297 emulation layer
Loads of protocols have been touched by this change. Some testing has been done but please test on all your models.
The XN297 emulation selects in this order:
 - the CC2500 if it is available and bitrate=250K. Configure the option field automatically for RF tune.
 - the NRF for all bitrates if it is available
 - if NRF is not available and bitrate=1M then an invalid protocol is sent automatically to the radio.
CC2500 @250K can now receive normal and enhanced payloads.
OMP protocol supports telemetry on CC2500 and is also for NRF only modules including telemetry.
Separation of E016H (new protocol) from E01X due to different structure.
MJXQ, MT99XX, Q303 and XK: some sub protocols available on CC2500 only.
2021-03-17 17:05:42 +01:00
pascallanger
47de19c8a5
DSM RX output ranges 2021-03-15 08:45:27 +01:00
Pascal Langer
3d4cfa30ac Remove spaces 2021-03-15 08:43:25 +01:00
pascallanger
d658bee05a
Add files via upload 2021-03-15 08:39:06 +01:00
pascallanger
820c181394
Update CPPM_HW_Mod.md 2021-03-15 08:07:42 +01:00
pascallanger
c9774f557e
Add files via upload 2021-03-15 08:06:24 +01:00
Pascal Langer
b17618a5a8 Update Protocols_Details.md 2021-03-14 19:22:49 +01:00
Pascal Langer
03d0adbd74 CCPM: added comment to disable the telemetry after setup 2021-03-14 19:00:45 +01:00
Pascal Langer
905ee4b1ed Fix module boot issue? 2021-03-14 11:15:24 +01:00
Pascal Langer
dbc33951a4 Fix for module boot issue? 2021-03-13 18:18:07 +01:00
Pascal Langer
732e66cab2 HoTT: fix Text config in Sync mode 2021-03-13 11:01:51 +01:00
pascallanger
0dab92552a
Update CPPM_HW_Mod.md 2021-03-08 17:47:28 +01:00
pascallanger
047952537a
Update CPPM_HW_Mod.md 2021-03-08 13:39:59 +01:00
pascallanger
d4bf1fb36e
Update CPPM_HW_Mod.md 2021-03-08 13:36:43 +01:00
pascallanger
ff817cd098
Update Protocols_Details.md 2021-03-08 11:36:59 +01:00
pascallanger
04ea44ed4b
Update CPPM_HW_Mod.md 2021-03-08 11:19:10 +01:00
pascallanger
e23c8e2216
Add files via upload 2021-03-08 10:15:47 +01:00
pascallanger
afb4802a2c
Update CPPM_HW_Mod.md 2021-03-07 17:34:16 +01:00
pascallanger
3a5d341514
CPPM hardware mod initial page 2021-03-07 17:31:45 +01:00
pascallanger
b6bcab1604
CPPM hardware mod images 2021-03-07 17:24:15 +01:00
Pascal Langer
0a998d2dc5 Enable CPPM by default 2021-03-07 11:12:49 +01:00
Pascal Langer
7927bc601e CPPM for RX protocols 2021-03-06 18:51:53 +01:00
Pascal Langer
f8cc913898 Update Multiprotocol.ino 2021-03-06 12:00:05 +01:00
Pascal Langer
a5428bc180 Removed SBUS trainer option 2021-03-06 11:33:32 +01:00
Pascal Langer
c0285f81f0 JOYSWAY: fix? 2021-03-05 19:57:33 +01:00
Pascal Langer
600049898a SBUS/CPPM: fixed switching from CPPM to SBUS 2021-03-04 21:28:06 +01:00
Pascal Langer
0e1db8f06b SBUS/CPPM: fixed switching from SBUS to CPPM
There is still an issue from CPPM to SBUS...
2021-03-04 19:02:45 +01:00
Pascal Langer
ec83f1e5a3 Disable SBUS serial when switching to CPPM 2021-03-04 15:23:23 +01:00
Pascal Langer
f8f7769d9c Update DSM subprotocols naming 2021-03-04 10:08:52 +01:00
Pascal Langer
4dacac29c6 SBUS/CPPM: restore normal telemetry on student link lost
Once the setup is done check the "Disable telemetry" box to make sure that there is no interference between the internal module and Multi telemetry.
2021-03-04 09:52:54 +01:00
Pascal Langer
593f3b87f1 SBUS/CPPM: fixed telemetry_link 2021-03-04 09:11:20 +01:00
Pascal Langer
bb70116df0 SBUS and CPPM output 2021-03-03 10:07:19 +01:00
Pascal Langer
d7c24d62ed Update Devo_cyrf6936.ino 2021-03-02 18:32:02 +01:00
Pascal Langer
07df1a8959 DEVO telemetry: reduce the voltage and RSSI refresh frequency 2021-03-02 17:37:28 +01:00
Pascal Langer
ca9e2870ab DEVO: temp telem fix 2021-03-02 16:30:14 +01:00
Pascal Langer
99ca6fa36c DEVO: fix temp telemetry 2021-03-02 16:26:30 +01:00
Pascal Langer
3d82560f71 Update Protocols_Details.md 2021-03-02 16:20:05 +01:00
Pascal Langer
44d362aeb4 DEVO: improve telemetry 2021-03-02 16:14:14 +01:00
Pascal Langer
3d4ed5ad11 SFHSS: Timing debug 2021-03-02 12:01:23 +01:00
Pascal Langer
ca3c2bbdc8 Update Protocols_Details.md 2021-03-02 10:42:25 +01:00
Pascal Langer
90c226c748 LOLI lua script 2021-03-02 10:39:11 +01:00
Pascal Langer
b757283f41 JOYSWAY: new protocol UNTESTED 2021-03-02 10:00:33 +01:00
Pascal Langer
b3132c7bf1 Devo: added telemetry voltage 3 2021-03-02 09:32:59 +01:00
Pascal Langer
9ba56f040a Update Futaba_cc2500.ino 2021-03-01 16:31:11 +01:00
Pascal Langer
ac71b4d981 Update Devo_cyrf6936.ino 2021-03-01 14:02:39 +01:00
Pascal Langer
6bb2c06cf6 Fix compilation 2021-03-01 13:53:39 +01:00
Pascal Langer
2ad3c727fd Few changes... 2021-03-01 13:48:23 +01:00
Pascal Langer
d36af55b84 DEVO: full telemetry 2021-03-01 13:47:44 +01:00
Pascal Langer
f19bb05c7a WFLY: Failsafe values 2021-02-24 16:29:24 +01:00
Pascal Langer
08ea8818fb E010R5: 5th ID 2021-02-24 10:26:58 +01:00
Pascal Langer
59c541d013 MT99xx missing break 2021-02-23 09:52:46 +01:00
Ben Lye
37e2b5f41c
Merge pull request #532 from benlye/new-builds
5-in-1 builds for DIY and T-Lite
2021-02-21 19:16:24 +00:00
Ben Lye
614a330cf2 5-in-1 builds for DIY and T-Lite 2021-02-21 18:58:02 +00:00
Pascal Langer
9106548859 T18 default build 2021-02-21 18:56:48 +01:00
Pascal Langer
2f07e79e50 T18 build by default 2021-02-21 18:35:24 +01:00
Pascal Langer
2233f6f862 SX1276: RF power adjustment for DIY & Jumper T-Lite 2021-02-21 16:05:25 +01:00
Pascal Langer
ae842f0bdc MT99XX Dragon telem prep 2021-02-17 10:26:38 +01:00
Ben Lye
4b36656246
Merge pull request #529 from benlye/build-fix
Update MT99xx_nrf24l01.ino
2021-02-16 19:39:55 +00:00
Ben Lye
ea282489f9 Update MT99xx_nrf24l01.ino 2021-02-16 19:34:01 +00:00
Ben Lye
6f2d9430d0
Merge pull request #528 from benlye/build-fix
Disable CCNRF protocols when needed
2021-02-16 18:40:58 +00:00
Pascal Langer
bccd9dc0d9 Fix XK protocol with latest change 2021-02-16 19:38:34 +01:00
Ben Lye
af919fb940 Fix CCNRF_PROTOCOLS 2021-02-16 18:31:40 +00:00
Ben Lye
7dab0de3c5 Update main.yml 2021-02-16 18:26:14 +00:00
Pascal Langer
2c0525421a Update Protocols_Details.md 2021-02-16 19:08:57 +01:00
Pascal Langer
0844ec2efd Add more protocols which can run with the CC2500
Use CC2500 only when emulating NRF250K/XN297_250K
2021-02-16 19:06:23 +01:00
Pascal Langer
49c3af12f9 AFHDS2A: fix issue with fs-x6b 2021-02-14 20:51:15 +01:00
Pascal Langer
96d335f458 Hide scanner from the available protocols 2021-02-13 20:39:00 +01:00
Pascal Langer
eae412fe41 E010r5: 1 more ID 2021-02-13 09:26:03 +01:00
Pascal Langer
0270420531 XN297dump: increase polling 2021-02-12 19:05:39 +01:00
Pascal Langer
93bb117961 RF switch fix... 2021-02-12 16:29:36 +01:00
Pascal Langer
29d1fb00b1 More code optimization 2021-02-12 11:21:42 +01:00
Pascal Langer
5a49d99c4f Update _Config.h 2021-02-11 20:09:40 +01:00
Pascal Langer
d66bf1a5b3 NRF init changed to most likely default 2021-02-11 18:40:29 +01:00
Pascal Langer
b41dccef67 HONTAI: use the global CRC calculation routine 2021-02-11 10:54:55 +01:00
Pascal Langer
addf2c5143 MT99XX/Dragon: beginner and intermediate swapped... 2021-02-11 09:50:41 +01:00
Pascal Langer
ff829f1f7b M-Link telemetry forwarded to OpenTX 2021-02-10 12:31:37 +01:00
Pascal Langer
7ee72976c4 M-Link: added vario 2021-02-10 10:13:51 +01:00
Pascal Langer
dc18e8e5b2 MT99XX: new subproto Dragon 2021-02-10 09:59:30 +01:00
Pascal Langer
97de2aaf3d One file missing in the push... 2021-02-09 18:31:13 +01:00
Pascal Langer
3b8b2ef376 Protocol init function modified 2021-02-09 18:23:33 +01:00
Pascal Langer
d496f62719 Removed depreciated MULTI_STATUS 2021-02-08 09:36:47 +01:00
Pascal Langer
fc978f95ef Disabling AFHDS2A Hub telemetry to fit in flash... 2021-02-07 19:20:12 +01:00
Pascal Langer
596e8c9b55 Update MLINK_cyrf6936.ino 2021-02-07 18:57:59 +01:00
Pascal Langer
0cf58c2990 MLink: added voltage, current, rpm, temp sensors and lqi 2021-02-07 18:51:36 +01:00
Pascal Langer
6ba1c8b118 Update Protocols_Details.md 2021-02-06 10:36:14 +01:00
Pascal Langer
b949ac0fed Update Protocols_Details.md 2021-02-06 10:35:15 +01:00
Pascal Langer
510f892d2f MLink: use only odd channels like original 2021-02-06 10:23:10 +01:00
Pascal Langer
17750e774a M-Link Failsafe 2021-02-06 09:58:36 +01:00
Pascal Langer
be1591c489 Update Protocols_Details.md 2021-02-05 18:44:48 +01:00
Pascal Langer
3b22705166 Exclude MLink from T18 build to save Flash space 2021-02-05 17:21:07 +01:00
Ben Lye
c05c0a5693
Merge pull request #518 from pascallanger/benlye-patch-1
Update main.yml
2021-02-05 16:15:36 +00:00
Ben Lye
d6fc6a3517
Update main.yml
Disable default configuration builds for T18 and 4in1.
2021-02-05 16:09:30 +00:00
Pascal Langer
7bfaee8b4f Update MLINK_cyrf6936.ino 2021-02-05 16:20:42 +01:00
Pascal Langer
89c00e8f17 Initial M-LINK release 2021-02-05 12:28:35 +01:00
pascallanger
447a58966f
Update Compiling_STM32.md 2021-02-04 14:19:29 +01:00
pascallanger
74162aa972
Update Compiling_STM32.md 2021-02-04 14:15:57 +01:00
Pascal Langer
78a1e61f7a Update Telemetry.ino 2021-02-04 14:07:15 +01:00
Pascal Langer
a917227ddc Bayang: generic frsky hub function 2021-02-04 12:05:57 +01:00
Pascal Langer
c866d07743 Bayang: add PID to telemetry 2021-02-03 19:44:59 +01:00
Pascal Langer
43d969f962 FrSky RX: sub protocol to erase clone IDs 2021-02-03 16:57:14 +01:00
Pascal Langer
3973b42f81 MT99XX fix bind hopping 2021-02-02 17:55:40 +01:00
Pascal Langer
6046ad81db Update Protocols_Details.md 2021-02-02 14:42:22 +01:00
Pascal Langer
63a9874aea Futaba S-FHSS: another fs throw test 2021-02-02 12:06:54 +01:00
Pascal Langer
89420fe2d4 Futaba S-FHSS: failsafe throw test 2021-02-02 10:06:24 +01:00
Pascal Langer
9769354989 MT99XX: no autobind, 1 ID 2021-02-01 21:31:34 +01:00
Pascal Langer
580b996215 MT99XX: code optimization 2021-02-01 19:26:34 +01:00
Pascal Langer
8f5fb5083f MT99X sub A180: timing 2021-02-01 19:06:47 +01:00
Pascal Langer
821076ce95 MT99XX: code cleanup 2021-02-01 18:25:11 +01:00
Pascal Langer
0bfe1f8e63 MT99XX: new sub protocol A180 2021-02-01 15:21:39 +01:00
Pascal Langer
9c35f6f73c Futaba S-FHSS: Fist attempt to fix failsafe 2021-02-01 11:54:16 +01:00
Pascal Langer
983debe6ce WFLY2: Failsafe working for values, hold and no pulse 2021-01-29 15:41:47 +01:00
Pascal Langer
66704b5a13 AFHDS2A: common timing 2021-01-28 15:41:59 +01:00
Pascal Langer
f11da0c1de DSM: fix low power 2021-01-28 09:09:43 +01:00
Pascal Langer
7676398aab Fix OMP protocol 2021-01-25 11:33:30 +01:00
Pascal Langer
9c6c55fa00 E010r5: added 2 TX IDs 2021-01-21 15:31:37 +01:00
Pascal Langer
5b9ca3ba06 Move the CYRF emulation functions around for future 2021-01-21 12:24:46 +01:00
Pascal Langer
23141b6087 E016Hv2 and ESKY150V2 don't need the NRF code anymore 2021-01-21 11:46:54 +01:00
Pascal Langer
6d4b4bd2c0 Update MultiChannelsUpdater.lua 2021-01-21 09:32:45 +01:00
Pascal Langer
5cec22a757 AFHDS2A RX: trial to fix bind with original TX 2021-01-19 22:50:55 +01:00
pascallanger
153ba2e090
Update Transmitters.md 2021-01-19 12:26:15 +01:00
Pascal Langer
21e8bed52b E016HV2: fixed a left over from protocol reverse engineering 2021-01-19 12:15:23 +01:00
Pascal Langer
ecfc5b0313 End bind as requested by the radio on more protocols 2021-01-19 12:13:24 +01:00
Pascal Langer
2bcebbda45 LOLI: adjust timing 2021-01-18 15:51:35 +01:00
Pascal Langer
52e8d87ab1 LOLI RX configuration script 2021-01-18 11:46:19 +01:00
pascallanger
b613345da4
Update Protocols_Details.md 2021-01-17 17:16:11 +01:00
pascallanger
f2665ca786
Update Protocols_Details.md 2021-01-17 16:53:42 +01:00
Pascal Langer
e3189d3aed E010r5: add GLIDE channel 2021-01-17 15:59:05 +01:00
pascallanger
c829e1c86f
Protocol E129: Add E130 model, Protocol E010r5: Add GLIDE channel 2021-01-17 15:57:52 +01:00
pascallanger
8499a508f5
Protocol E129: Add E130 model, Protocol E010r5: Add GLIDE channel 2021-01-17 15:57:42 +01:00
Pascal Langer
50dec0e55d AFHDS2A RX: fixed 2021-01-16 18:33:10 +01:00
Pascal Langer
6f419adb7f Fix CRC in various places 2021-01-16 16:50:45 +01:00
pascallanger
502e8beafb
Update Protocols_Details.md 2021-01-16 15:48:40 +01:00
Pascal Langer
5aae065dc0 New protocol: E129 2021-01-16 15:45:19 +01:00
pascallanger
152dbed3fa
Add Kyosho FHS details 2021-01-14 08:51:22 +01:00
Pascal Langer
b516bb8d20 Fix AFHDS2A RX 2021-01-12 14:02:13 +01:00
Pascal Langer
30e3e84066 LOLI: RX config 2021-01-11 16:27:59 +01:00
Pascal Langer
8338104266 Update XN297Dump_nrf24l01.ino 2021-01-11 12:37:58 +01:00
Pascal Langer
00c6aa52b9 Fix NCC1701... 2021-01-11 12:33:29 +01:00
Pascal Langer
e5689d2f1b Fix FQ777 2021-01-11 12:30:12 +01:00
Pascal Langer
b51dedcea1 M-Link: still work in progress 2021-01-11 12:13:03 +01:00
Pascal Langer
49f004e53f E010r5: added flip, led and calib channels 2021-01-11 12:12:26 +01:00
Pascal Langer
062fc05eac Fix FrSky RX protocol not ending bind when requested 2021-01-11 09:42:16 +01:00
Pascal Langer
6d080d5d5f New LOLI protocol 2021-01-09 18:39:31 +01:00
Pascal Langer
0955340a93 New protocol: E010r5 2021-01-08 21:16:07 +01:00
Ben Lye
9b2318cc7e
Fix EEPROM address variable types (#494) 2020-12-27 09:57:41 +01:00
Pascal Langer
2098cdc5e0 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2020-12-23 10:54:43 +01:00
Pascal Langer
d19b5187c5 AFHDS2A RX: stop bind when requested 2020-12-23 10:54:39 +01:00
pascallanger
2a78b1d6b7
Update README.md 2020-12-22 12:01:05 +01:00
pascallanger
84ae6366eb
Update README.md 2020-12-21 16:12:04 +01:00
pascallanger
e5b235ac83
Update README.md 2020-12-21 16:08:03 +01:00
Ben Lye
0195384592
Merge pull request #486 from benlye/actions-3
Various fixes for CI workflow
2020-12-21 14:56:29 +00:00
Ben Lye
0937f832fc Rename the build artifact archive 2020-12-21 14:50:31 +00:00
Ben Lye
c77b4af2a0 Various fixes for CI workflow 2020-12-21 14:33:55 +00:00
pascallanger
b943bae8dd
Update README.md 2020-12-21 11:39:35 +01:00
pascallanger
4955978eb6
Update README.md 2020-12-21 11:36:39 +01:00
Ben Lye
df409fddf5
Merge pull request #485 from benlye/store-artifacts
Upload build artifacts to workflow job
2020-12-20 20:15:21 +00:00
Ben Lye
0330c596e4 Upload build artifacts to workflow job 2020-12-20 19:56:28 +00:00
Ben Lye
8c6c58f12f
Update main.yml
Only run CI workflow on push or PR if firmware source code has changed.
2020-12-20 19:08:36 +00:00
Ben Lye
4bc08d22b8
Merge pull request #484 from benlye/github-actions
Configure GitHub Actions
2020-12-20 17:44:28 +00:00
Ben Lye
96fb3b20b7 Configure GitHub Actions for testing and releases 2020-12-20 17:11:18 +00:00
Ben Lye
47f713c6c8 Disable Travis 2020-12-20 11:38:34 +00:00
Pascal Langer
443c7a6b99 WFLY2: WBUS <-> PPM 2020-12-20 12:05:43 +01:00
Pascal Langer
e79ca9b7d7 E016H: Calibration on channel 8 2020-12-19 12:16:51 +01:00
Pascal Langer
b94f774f80 WFLY2: Failsafe doc update 2020-12-18 17:34:09 +01:00
Pascal Langer
5614e8bef6 E016H: Multi IDs 2020-12-18 15:30:50 +01:00
Pascal Langer
4ce3a5d298 Renamed protocol E016H to E016HV2 2020-12-18 00:09:13 +01:00
Pascal Langer
f6de3de78c Update Protocols_Details.md 2020-12-17 21:28:42 +01:00
Pascal Langer
8099018132 RLINK: subprotocol DumboRC 2020-12-17 21:24:56 +01:00
Pascal Langer
360dde2e1b E016H: compilation fix 2020-12-17 21:09:13 +01:00
Pascal Langer
cc7b7638d3 Update Protocols_Details.md 2020-12-17 18:23:38 +01:00
Pascal Langer
321e4aee34 E016H v2: new protocol WIP only 1 ID 2020-12-17 18:05:04 +01:00
Pascal Langer
f18847df57 Update Convert.ino 2020-12-17 09:02:11 +01:00
Pascal Langer
a2559a65d3 WFLY2: add switch from PPM <-> WBUS 2020-12-16 18:40:46 +01:00
Pascal Langer
5ac41fdd15 WFLY2: add failsafe (hold/no pulse not available yet) 2020-12-16 16:14:45 +01:00
Pascal Langer
6d38dd2d7a WFLY2: auto stop bind when the RX replies 2020-12-15 23:58:56 +01:00
Ben Lye
667058269c Add latest boards 2020-12-15 09:50:28 +00:00
Ben Lye
ad6f934892 Pin arduino-cli version to 0.13.0 2020-12-15 09:32:34 +00:00
Pascal Langer
714220c349 Update Protocols_Details.md 2020-12-15 10:20:05 +01:00
Pascal Langer
4887fca873 WFLY2: fix bind after code cleanup... 2020-12-15 09:51:11 +01:00
Pascal Langer
cfe80edcb6 WFLY2: update channels throw, bind frequencies 2020-12-14 18:56:12 +01:00
Pascal Langer
484588ff6b WFLY2: documentation 2020-12-14 11:07:21 +01:00
Pascal Langer
1bb059c2a2 WFLY: renamed WFLYRF to WFLY2 2020-12-13 23:15:43 +01:00
Pascal Langer
ef5d9cb6b3 HoTT: update doc for 16 channels 2020-12-13 23:00:47 +01:00
Pascal Langer
37a06c050d HoTT: added support for 16 channels (previously 12) 2020-12-13 22:56:47 +01:00
Pascal Langer
5f0ed395ba WFLYRF: use Radio ID 2020-12-11 13:55:50 +01:00
Pascal Langer
ae27c8b671 WFLYRF: Fixed partial ID for telemetry 2020-12-11 11:23:06 +01:00
Pascal Langer
088bfb9c2f WFLYRF: added ext voltage to A2 2020-12-11 10:57:14 +01:00
Pascal Langer
b01462e36b WFLYRF: fixed normal mode, added telemetry, bind is not working yet 2020-12-11 10:40:00 +01:00
Pascal Langer
abd36dc6a4 WFLY: Track changes in A7105 config (radio has A7106) 2020-12-10 18:57:06 +01:00
Pascal Langer
ebb8a33c1a Fix potential bug with wait loops 2020-12-10 16:52:34 +01:00
Pascal Langer
2b0f663482 WFLY RF: WIP protocol 2020-12-10 16:51:55 +01:00
pascallanger
956e632392
Update Protocols_Details.md 2020-12-10 13:48:04 +01:00
pascallanger
90b6bb8f7d
Update Protocols_Details.md 2020-12-08 18:52:13 +01:00
pascallanger
6153e84abf
Update README.md 2020-12-08 16:51:52 +01:00
pascallanger
16357f29e9
Add files via upload 2020-12-08 16:48:04 +01:00
Pascal Langer
0b8a5a7539 MLINK protocol: WIP, works only for a few sec... 2020-12-05 19:13:11 +01:00
Pascal Langer
6874e3a6a7 Template for WFLY RF 2020-12-05 19:12:11 +01:00
Pascal Langer
96263ed8a6 Prep for M-LINK 2020-12-04 09:00:17 +01:00
Ben Lye
7bb1cb9ae3
Add STM32 EEPROM initialization at startup (#475) 2020-11-30 18:11:35 +01:00
Pascal Langer
20e32c4cb0 Fix XK450 twitching? 2020-11-30 13:36:29 +01:00
Ben Lye
b4421306c0
Fix compiler errors when telemetry is disabled (#474) 2020-11-30 08:38:21 +01:00
Pascal Langer
e53f723fdb Update DSM FwdPrg.lua 2020-11-25 10:37:47 +01:00
Ben Lye
832a331437
Update Frequency_Tuning.md 2020-11-22 10:09:07 +00:00
Ben Lye
12e66bd84f Add tests for STM32F103C8 board 2020-11-09 11:09:12 +00:00
Pascal Langer
d290cc519f Bayang telemetry OpenTX Ratio and Offset 2020-11-06 10:04:01 +01:00
Ben Lye
f4b19fe33e Add module sub-type to signature
Differentiates between the STM32F1 boards.
2020-11-03 08:08:10 +00:00
pascallanger
767d2c079a
Update Protocols_Details.md 2020-10-31 16:24:02 +01:00
pascallanger
7750310be5
Update Protocols_Details.md 2020-10-31 16:06:18 +01:00
Pascal Langer
6de4e1e1dd Protocols order 2020-10-31 15:59:04 +01:00
Ben Lye
627d47f139
C8 MCU flash size check (#461) 2020-10-30 12:21:39 +01:00
pascallanger
36675cf729
Change Travis links 2020-10-30 12:18:15 +01:00
Pascal Langer
33d8234eb3 Update JJRC345_nrf24l01.ino 2020-10-30 12:01:40 +01:00
Pascal Langer
347eb11328 SFHSS name change to Futaba 2020-10-30 12:01:29 +01:00
Ben Lye
5ed61f30e1
STM32 release file name standardization (#451)
Tweak the names of the STM32 serial and CC2500-only release files.
2020-10-11 14:09:42 +01:00
Ben Lye
a633f46f4f
Travis release build changes (#450)
* Move the release build steps into separate shell scripts
* Remove builds that we don't need any more
  * Latest builds of er9x and erSkyTx both support MULTI_TELEMETRY so separate OpenTX / erSkyTx builds are no longer needed
  * Radio can switch telemetry inversion on or off automatically so STM32 inv / noinv builds are no longer needed
2020-10-11 12:52:05 +01:00
Pascal Langer
baf9a0f978 Update DSM FwdPrg.lua 2020-10-03 11:06:22 +02:00
Pascal Langer
c98b8fc8bf Flysky: Fix AFHDS and AFHDS2A 2020-10-03 10:52:11 +02:00
Pascal Langer
2fae0a35b8 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2020-10-01 00:18:28 +02:00
Pascal Langer
b04f38ed3d Indicate ratio values to be used for A1 and A2 voltage sensors
OMP, RadioLink, Hubsan, Bayang, ...
2020-10-01 00:18:13 +02:00
pascallanger
60d5dd4101
Update Protocols_Details.md 2020-10-01 00:06:40 +02:00
Pascal Langer
75b7dd1dd7 Kyosho/Hype: channel order & doc 2020-10-01 00:05:20 +02:00
Pascal Langer
aa2717d6ab Kyosho/Hype: bind fix 2020-09-30 20:30:07 +02:00
Pascal Langer
4058f04b39 Kyosho/Hype: another attempt to fix bind... 2020-09-30 11:06:30 +02:00
Pascal Langer
25ebd55c85 Update Protocols_Details.md 2020-09-29 19:14:41 +02:00
Pascal Langer
d00b58c8ed Kyosho/Hype: fix bind 2020-09-29 17:06:01 +02:00
Pascal Langer
e7eb07a5a4 Kyosho: new sub_protocol Hype
Initial release
2020-09-29 11:24:55 +02:00
Ben Lye
a4cac50261 Add builds for modules with only CC2500 2020-09-24 14:09:08 +01:00
Pascal Langer
4f8da64822 OMP: doc update 2020-09-23 23:52:22 +02:00
Pascal Langer
4f89721cd0 RadioLink: any id
Need to rebind RXs...
2020-09-23 23:42:03 +02:00
Pascal Langer
43c2843490 Update AFHDS2A_a7105.ino 2020-09-23 23:08:26 +02:00
Pascal Langer
c152265284 OMP: doc 2020-09-23 23:05:05 +02:00
Pascal Langer
b591b92b4e Update OMP documentation 2020-09-23 09:41:26 +02:00
Pascal Langer
090388aa1b OMP: improve telemetry 2020-09-22 15:15:14 +02:00
Pascal Langer
c6ab696949 AFHDS2A: fix X6B telemetry issue? 2020-09-21 10:57:19 +02:00
Pascal Langer
df45a3ff83 OMP: prevent telemetry voltage from rolling over 2020-09-21 10:50:01 +02:00
pascallanger
fedd04b724
Update Troubleshooting.md 2020-09-19 21:23:51 +02:00
pascallanger
d8630da09d
Update Troubleshooting.md 2020-09-19 20:35:44 +02:00
pascallanger
6192f7287e
Update README.md 2020-09-18 17:15:18 +02:00
Pascal Langer
5b8a08ab22 OMP: added telemetry 2020-09-18 16:13:45 +02:00
Ben Lye
313b03fb84 Disable PPM/serial in builds as needed 2020-09-17 10:13:00 +01:00
Pascal Langer
5639def6fb Update DSM FwdPrg.lua 2020-09-15 12:05:26 +02:00
Pascal Langer
15a254879c DSM_RX: bind with other radio modules off 2020-09-15 12:03:16 +02:00
pascallanger
5baa9bd256
Update README.md 2020-09-13 11:34:23 +02:00
Pascal Langer
d5346c0eaf Add DISABLE_FLASH_SIZE_CHECK 2020-09-09 16:47:32 +02:00
Pascal Langer
a2213fd6dc DSM Forward Programming: work in progress 2020-09-09 10:45:14 +02:00
Pascal Langer
9b07f12f90 AFHDS2A: add sub proto 2020-09-08 08:49:38 +02:00
Pascal Langer
c9b49483e0 NanoRF 2020-09-07 22:58:37 +02:00
Pascal Langer
e2972a5823 AFHDS2A: enable 16 channels on SBUS 2020-09-07 20:31:47 +02:00
Pascal Langer
d5b3ed832d Update Multiprotocol.ino 2020-09-04 10:59:31 +02:00
Pascal Langer
9fcc030c15 STM32: test flash size 2020-09-04 10:39:30 +02:00
pascallanger
fc81b7ee5a
Update Protocols_Details.md 2020-09-03 17:28:54 +02:00
Pascal Langer
f168abc2bb Fixed frame size 2020-08-31 22:21:21 +02:00
pascallanger
fe6778635e
Add Realacc R11 protocol 2020-08-30 14:57:56 +02:00
Pascal Langer
65a6c19d02 OMP doc 2020-08-30 14:35:44 +02:00
pascallanger
a32b5561a1
Update Protocols_Details.md 2020-08-30 14:30:28 +02:00
pascallanger
4b4393952e
Update README.md 2020-08-24 14:41:10 +02:00
Pascal Langer
ea205b1e69 Bayanf: fix telemetry batt 2020-08-20 19:00:06 +02:00
pascallanger
748140cdee
Update Protocols_Details.md 2020-08-18 12:02:08 +02:00
Pascal Langer
e8037c857f OMP fixes 2020-08-17 08:26:42 +02:00
Pascal Langer
15e37cefee OMP: fix? 2020-08-16 18:48:40 +02:00
Pascal Langer
b1e4daf1c2 OMP: new protocol intial release
Untested!!!
2020-08-15 16:17:18 +02:00
Pascal Langer
4e0fccfc63 Update Protocols_Details.md 2020-08-14 19:40:25 +02:00
Pascal Langer
48b90029c4 V761: Work with any ID. Tested on Eachine RX. 2020-08-14 19:39:24 +02:00
Pascal Langer
8b189af2f9 R9: small change 2020-08-13 21:21:34 +02:00
Pascal Langer
030cdd35a2 Update REALACC_nrf24l01.ino 2020-08-11 00:02:19 +02:00
Pascal Langer
3789998ba9 Update ZSX_nrf24l01.ino 2020-08-10 23:54:51 +02:00
Pascal Langer
ea24ab6032 New protocol Realacc 2020-08-10 23:54:33 +02:00
Pascal Langer
1408431649 XN297Dump: increase the number of RF channels to look for 2020-08-10 22:52:50 +02:00
Pascal Langer
6810372064 RadioLink: enable Range test mode 2020-08-10 20:30:19 +02:00
Pascal Langer
708e2ac5f6 V761 bug fix: the model was not reconnecting unless you did a bind first 2020-08-07 15:18:15 +02:00
Pascal Langer
2178f6761d RadioLink: update A2=Batt telemetry value 2020-08-07 15:11:59 +02:00
Pascal Langer
aa5fd82004 Update FrSky_Rx_cc2500.ino 2020-08-05 09:50:40 +02:00
Pascal Langer
660282db2e RX protocols: abort RX bind as requested 2020-08-04 10:42:35 +02:00
Ben Lye
fdd357619b Fix folder structure inside LUA script zip file 2020-08-03 22:39:10 +01:00
Pascal Langer
5f12f99761 Update Validate.h 2020-08-01 19:35:39 +02:00
Pascal Langer
3d98abb6d4 Rename the Flyzone protocol by Height which is the original manufacturer 2020-08-01 19:19:11 +02:00
Pascal Langer
e35879a5d0 RadioLink: fix 2020-08-01 10:19:30 +02:00
Pascal Langer
37138f03ae Few fixes 2020-07-31 15:58:07 +02:00
Pascal Langer
51d39bbd8c RadioLink: add RXs to the supported list 2020-07-31 10:56:34 +02:00
Pascal Langer
0932a1c93f Update Protocols_Details.md 2020-07-31 10:52:37 +02:00
Pascal Langer
19164521e4 Flyzone protocol: 8 channels support 2020-07-31 10:42:10 +02:00
Pascal Langer
df28cfe3cc Radiolink: final version with 64 IDs 2020-07-31 10:41:07 +02:00
Pascal Langer
354878d542 RadioLink: preparation for final 2020-07-28 15:53:58 +02:00
Pascal Langer
695264d59a RadioLink: update 2020-07-28 00:55:47 +02:00
pascallanger
de190f3349
Update Protocols_Details.md 2020-07-25 14:43:52 +02:00
Pascal Langer
b049385094 Update Protocols_Details.md 2020-07-23 21:40:26 +02:00
Pascal Langer
75dc616130 Update RadioLink_cc2500.ino 2020-07-23 15:08:23 +02:00
Pascal Langer
b542f5e7cd RLINK: remove fixed ID 2020-07-23 10:10:08 +02:00
Pascal Langer
f3bee3cded RLINK: Fix voltage values 2020-07-23 10:03:04 +02:00
Pascal Langer
a9b7ab9a06 Update Protocols_Details.md 2020-07-22 20:13:54 +02:00
Pascal Langer
ed019e954e RadioLink: few fixes 2020-07-22 20:05:56 +02:00
Pascal Langer
65186b4356 Add Kyosho to the Lua channel namer exception list 2020-07-22 18:18:35 +02:00
Pascal Langer
e1d4f9a270 RadioLink Surface protocol: initial commit 2020-07-22 15:37:47 +02:00
Pascal Langer
69c95ca153 Fix compilation issues when Telem is disabled 2020-07-22 15:27:06 +02:00
Pascal Langer
e6976fb08d Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2020-07-21 01:40:19 +02:00
Pascal Langer
f502ba3659 FrSkyX Cloned: 8 channels option 2020-07-21 01:40:14 +02:00
pascallanger
e6ccc7e7cc
Update Protocols_Details.md 2020-07-17 14:21:57 +02:00
Pascal Langer
da9d8851c2 Fix FrSkyX and FrSkyR9 bind options 2020-07-16 10:28:07 +02:00
pascallanger
ad48291d2a
Update Protocols_Details.md 2020-07-16 00:02:29 +02:00
Pascal Langer
d6da230369 Flysky AFHDS2A: 16 channels + LQI
Use the 2 new sub protocols to extend the protocol to 16 channels on IBUS
2020-07-15 23:58:41 +02:00
pascallanger
f8ac406a94
Update Frequency_Tuning.md 2020-07-15 20:31:55 +02:00
Pascal Langer
e691ecd167 Update doc 2020-07-15 19:09:56 +02:00
Pascal Langer
930c26a111 Kyosho: new protocol 2020-07-10 15:25:32 +02:00
Pascal Langer
64419a6cf4 V2x2: fix? 2020-07-09 22:49:48 +02:00
Pascal Langer
5c59cddc7a FrSkyR9: FCC initial support 2020-07-06 09:52:43 +02:00
Ben Lye
4c7a51be46 Create folders in LUA script zip file 2020-07-05 16:54:55 +01:00
Ben Lye
7dad0fb89f Update install_drivers.bat
Change to libusbk driver for DFU device
2020-07-05 16:32:56 +01:00
Pascal Langer
adebb3fc5c FrSkyX: clean up 2020-07-05 17:19:29 +02:00
Pascal Langer
5ab00b9d18 FrSkyX: TXQly is the percentage of telemetry received packets (100...0%) 2020-07-05 00:28:43 +02:00
Pascal Langer
fbd5d7cf48 FrSky R9: telemetry TX to RX attempt 2020-07-04 22:43:19 +02:00
Pascal Langer
84132678cc FrSkyR9: TQLY = percentage of telemetry frames per second 2020-07-04 18:40:29 +02:00
Pascal Langer
78421748ba FrSky R9: fix sensors telem? 2020-07-04 17:50:05 +02:00
Pascal Langer
7112f58dae FrSkyX: fix telem 2020-07-04 15:15:55 +02:00
Pascal Langer
e56f737b34 FrSkyX: fix telemetry not stopping when RX is off 2020-07-04 13:33:56 +02:00
Pascal Langer
49d993f613 FrSkyR9: fix independant compilation issue 2020-07-04 11:48:26 +02:00
Pascal Langer
63dd8a9215 Update iface_sx1276.h 2020-07-03 19:51:22 +02:00
Pascal Langer
d5f819dd59 FrSkyR9: initial telemetry support 2020-07-03 19:51:11 +02:00
pascallanger
a68787f16e
Update Protocols_Details.md 2020-07-03 18:03:36 +02:00
Pascal Langer
858ef5801c FrSkyX: fix AVR telemetry and may be improve telemetry overall 2020-07-03 17:42:12 +02:00
Pascal Langer
9e0bd29cee FrSkyD: clone mode - additional ID byte 2020-07-03 16:15:47 +02:00
Pascal Langer
15395de579 FrSky R9: adding CH1-8/CH9-16 and Telem ON/OFF (not that telem is supported yet) 2020-07-01 15:39:40 +02:00
Pascal Langer
db4aad04a7 FrSkyR9: fix 868 2020-07-01 14:39:11 +02:00
Pascal Langer
466e4cf227 Update DSM protocol details 2020-06-29 23:31:17 +02:00
Ben Lye
05a3780c38
Add latest STM32 board 2020-06-29 19:55:29 +01:00
pascallanger
85ea91cdbb
Update README.md 2020-06-28 19:54:14 +02:00
pascallanger
985d7a6fd9
Update README.md 2020-06-28 19:37:58 +02:00
pascallanger
2a19b8dd45
Update README.md 2020-06-28 19:35:12 +02:00
Pascal Langer
b2b3078861 Update README.md 2020-06-28 19:17:02 +02:00
Pascal Langer
2ac92f5725 Create README.md 2020-06-28 19:15:39 +02:00
Pascal Langer
e2f5afd71e V761 doc updates 2020-06-28 19:07:34 +02:00
Ben Lye
e094ee036d
Zip the LUA scripts for release 2020-06-28 16:06:06 +01:00
Ben Lye
2ad7f3e9f2 Fix LUA script copy 2020-06-28 15:13:33 +01:00
Pascal Langer
8e1f2258f8 OpenTX Lua scripts related to Multi 2020-06-27 17:59:06 +02:00
Pascal Langer
5c01bbf284 V761: additional channles 2020-06-27 17:58:29 +02:00
Pascal Langer
647425fc1a Revert "V761 additonal channels"
This reverts commit 7286049d0709d883a30ace3403ae18eda7928576.
2020-06-27 17:56:19 +02:00
Pascal Langer
7286049d07 V761 additonal channels 2020-06-27 17:55:36 +02:00
Pascal Langer
ce67a065cd V761 - Eachine sub protocol 2020-06-26 17:54:56 +02:00
Ben Lye
8948cb6287 Switch to Arduino CLI instead of IDE for Travis CI builds 2020-06-26 09:56:07 +01:00
pascallanger
4daa5fa2bb
Update Advanced_XN297Ldump.md 2020-06-22 10:10:57 +02:00
Pascal Langer
c49a7dae0a Few changes 2020-06-20 22:04:26 +02:00
Pascal Langer
890a042a43 V2X2 new sub proto MR101 and protocol rewrite
MR101 sub proto for Dromida XL
2020-06-20 21:40:03 +02:00
Pascal Langer
c95e576ef3 DSM RX: end bind and increased retry 2020-06-18 10:53:03 +02:00
Pascal Langer
2aa96dd129 SX1276: indent with tabs 2020-06-15 23:34:56 +02:00
AlessandroAU
908634474b
Adds SX1276_DetectChip() function (#373)
* Adds SX1276_DetectChip() function

works by testing for 0x12 match in version reg 0x42

* fix build err
2020-06-15 23:03:03 +02:00
AlessandroAU
79b525ee71
Implement datasheet errata recommendation (#372) 2020-06-15 23:02:30 +02:00
Pascal Langer
872b8259ab Q90C VTX channel 2020-06-15 19:39:43 +02:00
Pascal Langer
a14c82708f Update Q90C_nrf24l01.ino 2020-06-15 15:30:31 +02:00
Pascal Langer
7e53778680 Update Q90C_nrf24l01.ino 2020-06-15 15:23:02 +02:00
Pascal Langer
210fbe3b9e Update Q90C_nrf24l01.ino 2020-06-15 14:45:49 +02:00
Pascal Langer
0a5fd72bdc DSM: 3 ch timing on CH13 2020-06-15 14:45:42 +02:00
Pascal Langer
6e1701ecc5 Q90C: Flight Modes 2020-06-14 23:22:27 +02:00
Pascal Langer
a5f627a2d6 Q90C test 2020-06-14 22:28:36 +02:00
Pascal Langer
b4a1f175c6 Update Q90C_nrf24l01.ino 2020-06-14 22:22:13 +02:00
Pascal Langer
e0690fa661 Update Q90C_nrf24l01.ino 2020-06-14 19:10:59 +02:00
Pascal Langer
bd962eff35 DSM: SAFE setting how to 2020-06-14 18:34:38 +02:00
Pascal Langer
b515355249 DSM RX: remove reverse on aileron and rudder 2020-06-13 21:54:18 +02:00
Pascal Langer
d1feef97be DSM: adjust end points, solve SAFE? 2020-06-13 16:20:51 +02:00
Pascal Langer
f52f96d44e DSM: selectable refresh rate 22/11ms when supported 2020-06-12 00:25:09 +02:00
Pascal Langer
944ec62f49 Update DSM_cyrf6936.ino 2020-06-10 09:03:41 +02:00
Pascal Langer
30905014d2 DSM: fix 11ms issue on some RXs? 2020-06-09 23:49:51 +02:00
Pascal Langer
32dbdfc6e3 Fix compilation when telemetry is disabled 2020-06-09 20:08:00 +02:00
Pascal Langer
b2e312b41e FrSkyX: force tuning fix for FrSkyX2 2020-06-07 18:06:19 +02:00
Ben Lye
52f4096197
Force 'noinv' for the T18 5in1 release files
And put it in the file name, just for consistency
2020-06-06 19:16:19 +01:00
Ben Lye
c547ea0c0f Disable some protocols for Atmega CC2500 builds
Trying to get the build to fit again.
2020-06-06 18:47:32 +01:00
Ben Lye
c73ee61128 Add T18 5in1 tests and release builds 2020-06-06 18:47:32 +01:00
Pascal Langer
90b287f1f4 Multi 5-in-1 initial support 2020-06-06 01:57:52 +02:00
Pascal Langer
0316c9eea9 HoTT: telem code cleanup 2020-06-05 22:44:32 +02:00
Pascal Langer
374b46966c FrSkyX: small change 2020-06-05 22:22:13 +02:00
Pascal Langer
3705415927 HoTT: fix telemetry 2020-06-05 22:20:19 +02:00
Pascal Langer
bff68f482e Update Protocols_Details.md 2020-06-03 14:08:09 +02:00
Pascal Langer
32ed758072 Update DSM_Rx_cyrf6936.ino 2020-06-03 12:55:45 +02:00
Pascal Langer
5ce99ee419 Test protocol 2020-06-03 11:43:27 +02:00
Pascal Langer
ceea384a36 Pelikan Lite: force_id update 2020-06-03 10:29:34 +02:00
Pascal Langer
fd3b026e12 Update Pelikan_a7105.ino 2020-06-02 19:10:11 +02:00
Pascal Langer
7e451c13a8 Pelikan: add sub protocol for Lite version 2020-06-02 19:04:05 +02:00
Pascal Langer
3dcf74c2e4 Bayang: renamed CX100 to QX100 2020-06-02 17:17:49 +02:00
Pascal Langer
50f1eca4be Bayang: new subprotocol CX100 2020-06-02 14:59:32 +02:00
Pascal Langer
0d97af5ae2 XN297dump: Auto mode small fix 2020-06-02 14:34:50 +02:00
Pascal Langer
aeb8d67219 HoTT: add subprotocols 2020-06-01 22:55:32 +02:00
Pascal Langer
1f65025036 HoTT: add LBT and telemetry improvment 2020-05-31 23:54:13 +02:00
Pascal Langer
8df3687684 Q90C: channels reverse 2020-05-26 22:26:30 +02:00
MRC3742
adf59a9d0d
Misc updates for errors, omissions amd corrections (#359) 2020-05-26 19:52:09 +02:00
Pascal Langer
b9f00bdbc5 Q90C: checksum fix 2020-05-26 12:41:33 +02:00
Pascal Langer
a10e169573 New protocol Q90C 2020-05-24 17:39:14 +02:00
Pascal Langer
317b9a8156 Fix compilation when ESKY150V2 was built without HoTT 2020-05-23 23:34:05 +02:00
Pascal Langer
1c632d462f Update Protocols_Details.md 2020-05-23 22:53:53 +02:00
Pascal Langer
c46b49ccf1 HoTT: cleanup 2020-05-23 22:41:07 +02:00
Pascal Langer
e70708b133 FrSkyX: push more parts to common 2020-05-23 22:39:26 +02:00
Konstantin Tretyakov
62486c2220
JJRC345: Reduce stick sensitivity (#355)
A largely symbolic contribution to record participation in protocol development.
See: https://github.com/DeviationTX/deviation/pull/853
2020-05-23 00:09:46 +02:00
Pascal Langer
cffe66747a JJRC345: last commit 2020-05-22 21:03:01 +02:00
Pascal Langer
b31bbfa04f JJRC345: Change checksum calculation 2020-05-21 23:40:23 +02:00
Pascal Langer
48e4cad3ad JJRC345: add RTH on CH7 2020-05-21 17:49:04 +02:00
Pascal Langer
53f58ce2e1 JJRC345: update 2020-05-21 17:24:11 +02:00
Pascal Langer
eb8b5eac01 JJRC345: update channels range 2020-05-21 11:56:08 +02:00
Pascal Langer
02008a8b2e New protocol JJRC345: WIP
Work in progress
2020-05-21 11:47:51 +02:00
Pascal Langer
5b82599eb9 Update Protocols_Details.md 2020-05-20 12:23:37 +02:00
Pascal Langer
a5e4b2c6fa DSM RX: Fix compilation 2020-05-18 01:30:52 +02:00
Pascal Langer
987753ff73 DSM and DSM RX: fix bind 2020-05-18 01:13:08 +02:00
Pascal Langer
ee080839b1 Update DSM_Rx_cyrf6936.ino 2020-05-17 17:26:43 +02:00
Pascal Langer
4290c75478 HoTT: support for auto sensors discovery and sensors text config 2020-05-17 15:47:56 +02:00
Pascal Langer
cc6be6027d New DSM RX protocol 2020-05-17 15:45:23 +02:00
Pascal Langer
4cfde0a80a Update Protocols_Details.md 2020-05-10 13:41:14 +02:00
Pascal Langer
a77aee0e1a Update Protocols_Details.md 2020-05-09 16:11:36 +02:00
Pascal Langer
6f36473975 Devo basic telemetry 2020-05-09 16:11:10 +02:00
pascallanger
f5720d38bb
Update Flash_from_Tx.md 2020-05-09 09:10:09 +02:00
pascallanger
23478d3d21
Update Protocols_Details.md 2020-05-08 22:50:52 +02:00
Pascal Langer
ba72b6dedd eSky150v2 last minute typo... 2020-05-08 20:01:33 +02:00
Pascal Langer
103f595891 New protocol eSky 150 v2
Protocol: 69
No sub protocol
No extended limit
RX outputs is be set automatically to the eSky default TAER
16 channels
2020-05-08 19:55:16 +02:00
Pascal Langer
957d623b4b FrSky D16 LBT v1.x & 2.1: adjust thresholds to match ETSI requirements 2020-05-02 18:20:47 +02:00
Pascal Langer
2be757e609 Skyartec: small changes 2020-04-22 15:02:06 +02:00
Pascal Langer
c4be660a05 Skyartec: activate cc2500 rf tune 2020-04-21 18:27:15 +02:00
Pascal Langer
c1c5f9fe3a Hide Proto Scanner 2020-04-21 12:15:53 +02:00
Pascal Langer
53c0637a85 Fix a bug introduced with Alpha protocols ordering 2020-04-21 11:43:48 +02:00
Pascal Langer
4ae30dc3b0 New protocol: Skyartec 2020-04-18 19:04:38 +02:00
Pascal Langer
fc5fbc9899 Multi_Names update for OpenTX 2020-04-16 17:03:17 +02:00
Pascal Langer
2397bf365b Update Multi_Names.ino 2020-04-16 13:52:10 +02:00
Pascal Langer
42cd17d5f2 Multi Names: if proto invalid give first available proto 2020-04-16 12:07:19 +02:00
Pascal Langer
a35e01bbeb Update Protocols_Details.md 2020-04-15 11:23:40 +02:00
Pascal Langer
b21e8030b3 Fix independant protocols build 2020-04-15 01:30:06 +02:00
Pascal Langer
0984a42fe5 Update Protocols_Details.md 2020-04-13 22:42:41 +02:00
Pascal Langer
ed50d60108 Update Protocols_Details.md 2020-04-13 22:41:37 +02:00
Pascal Langer
a7f72a73e5 Update Protocols_Details.md 2020-04-13 22:31:26 +02:00
Pascal Langer
1c02cb46f5 FrSky Clone mode
Check documentation for full details: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Protocols_Details.md#FRSKY_RX---55
2020-04-13 22:10:58 +02:00
Pascal Langer
da8fd21177 Update FrSkyL_cc2500.ino 2020-04-11 20:17:02 +02:00
Pascal Langer
7e5cd9819a New protocol FrSkyL: LR12
Model: L9R RX
2 sub protocols: LR12 and LR12_6CH
2020-04-11 20:09:32 +02:00
Pascal Langer
00aecb3ab1 Update Protocols_Details.md 2020-04-10 19:38:49 +02:00
Pascal Langer
cde77a88fd FrSkyRX: added sub_protocol, documentation and more 2020-04-10 19:32:50 +02:00
E1yot
08a555f187
Initial Version of CloneMode (#342)
* Initial Version

* Bugfix and change of the handling of the RX Num.

If RX Num is 63, write a finetune value of 127 to the EEPROM.
A real finetune value of 127 means, the frequency of module is out of range and
the module should be replaced. This way the clone mode should not get unwanted
active by a module with a frequency drift arround 63.
2020-04-10 19:01:01 +02:00
Pascal Langer
4039cbf8af Small corrections 2020-04-07 10:55:54 +02:00
Pascal Langer
3f652fa06c FrSkyX: improve SPort to RX code 2020-04-07 01:43:05 +02:00
Pascal Langer
272d2be3ae Update FrSky_Rx_cc2500.ino 2020-04-05 16:05:51 +02:00
Pascal Langer
7e461344a8 Update Protocols_Details.md 2020-04-05 10:46:26 +02:00
Pascal Langer
8af985a2cb FrSkyRX: check additional ID and use RX num 2020-04-05 10:44:09 +02:00
Pascal Langer
08eee34446 Protocol PROPEL: enhanced telemetry 2020-04-05 09:39:33 +02:00
Pascal Langer
0a5b97a177 New Protocol: PROPEL
Compatible model: PROPEL 74-Z Speeder Bike
Protcol: PROPEL (66)
Sub protocol: none
Autobind protocol
Extended limits not supported
Telemetry supported
14 channels in use due to many features
2020-04-03 19:36:05 +02:00
Bryce Johnson
cab782b38e
redpine updates to make released betaflight and deviation builds (#341)
Co-authored-by: Bryce Johnson <bryce@redpinelabs.com>
2020-04-02 12:39:26 +02:00
pascallanger
d1518d763b
Add files via upload 2020-03-30 21:22:12 +02:00
Pascal Langer
44a676b809 Update Multiprotocol.h 2020-03-30 18:22:13 +02:00
Pascal Langer
d66709ea87 Update Protocols_Details.md 2020-03-29 19:23:28 +02:00
Pascal Langer
358a77cf7c Update Protocols_Details.md 2020-03-29 19:15:32 +02:00
Pascal Langer
1a631908f4 Update FrSky_Rx_cc2500.ino 2020-03-29 19:09:56 +02:00
Pascal Langer
9f32a1f22b FrSkyRX protocol: chanskip test 2020-03-29 18:49:37 +02:00
Pascal Langer
dfd3386319 FrSkyX v2.1: initial support
Rewrite of the FrSkyX code to support both v1 and v2.1.0 with FCC and LBT.
FrSky v1 accessible as usual
FrSky v2.1.0 accessible through the protocol 64=FrSkyX2 with the same subprotocols as v1
The LBT feature is now fully implemented on the TX and turned on for both v1 LBT and v2.1.0 LBT.
For v2.1.0, to access the bind functions Telem=on/off, CH1-8/9-16 and bidirectional SPort (SxR setup for example), you need to update OpenTX to the latest 2.3.8 nightly (not available yet).
2020-03-29 18:44:03 +02:00
Pascal Langer
3df836e6b8 Hitec: fix a bind issue 2020-03-21 19:00:40 +01:00
Pascal Langer
2b8ed25843 FrSkyD: Change hopping frequencies
WARNING: all receivers must be rebound !!!
2020-03-21 15:17:46 +01:00
Pascal Langer
62250d2f25 ESky: addition of sub-protocol ET4 2020-03-21 15:16:01 +01:00
Pascal Langer
a4e9082f53 SLT CC2500 fix 2020-02-20 17:37:58 +01:00
Pascal Langer
7217e8c41d SLT: fix? 2020-02-18 15:50:54 +01:00
Pascal Langer
a7ac093753 SLT: CC2500 fix 2020-02-17 16:44:02 +01:00
Pascal Langer
5503502bad SLT: fix going from NRF to CC2500 2020-02-17 13:10:57 +01:00
Pascal Langer
5124c2a96d SLT: use the CC2500 emulation layer if requested/available 2020-02-17 11:45:28 +01:00
Pascal Langer
73d7728e08 Change CC2500 emulation layer to support NRF24L01 @250K 2020-02-17 11:44:53 +01:00
Pascal Langer
8b7bd00a48 Update Multi.txt 2020-02-16 20:48:49 +01:00
Pascal Langer
68a6af0eb5 Update E119 channels and flags
Default is high rate
CH5 is calib
2020-02-16 20:18:02 +01:00
Pascal Langer
693f9f58eb V911S: new sub protocol E119
Model: Eachine E119
Protocol: V911S -> 46
Sub protocol: E119 -> 1
CH5: left button ???
CH6: right button ???
2020-02-16 20:05:29 +01:00
Tomer Abramovich
4a01e2d472 missed the last 3 bytes here, loop should continue one more time (#322) 2020-01-24 21:09:37 +01:00
pascallanger
e4fd1f4399 FrSkyR9: 16 channels 2020-01-24 14:59:26 +01:00
pascallanger
0d5fcb0849 FrskyR9 protocol 2020-01-24 12:12:07 +01:00
pascallanger
2236c256ba
Merge pull request #320 from UnTraDe/master
initial working version of R9M, 8 CH and BINDING support only
2020-01-24 10:12:19 +01:00
Tomer Abramovich
945ad2e7bd now using FrSkyX_scaleForPXX to scale channel values for FrSky R9 instead of using floating point math 2020-01-23 22:29:57 +02:00
Tomer Abramovich
6f9740f03f moved register definitions to a different file and created higher level functions for using them; added preliminary support for 868 MHz mode, not fully working yet 2020-01-23 22:25:00 +02:00
pascallanger
f9fa4dff73 Update _Config.h 2020-01-22 16:11:42 +01:00
Tomer Abramovich
77bf17967d initial working version of R9M, 8 CH and BINDING support only 2020-01-21 17:42:33 +02:00
pascallanger
7281c0b5bf Comment FRSKYX2 protocol for now 2020-01-21 10:51:07 +01:00
pascallanger
e6cab65560 Fix paranthesis... 2020-01-21 10:29:11 +01:00
pascallanger
cc115323e1 Prep for FrSky X v2 2020-01-20 23:52:17 +01:00
Ben Lye
58665ea7a7 Bubble up errors in release builds 2020-01-17 21:37:16 +00:00
Ben Lye
3920644caf Reduce protocols for debug test builds.
Make the debug builds small enough to pass the buildDefault test.
2020-01-17 21:37:16 +00:00
pascallanger
25aecbf15e XK full ID to address and hop freqs generation 2020-01-16 23:43:29 +01:00
pascallanger
e18d8868d2 Protocol Pelikan: hop freq change with RX_num 2020-01-15 16:28:03 +01:00
pascallanger
c6e5d00a2b Protocol Pelikan: fix rx_tx_addr[1]... 2020-01-14 23:00:50 +01:00
pascallanger
7a5b4dea1a XK X420/X520: 2 valid IDs
IDs are selected using RX num.
2020-01-14 22:51:47 +01:00
pascallanger
5df877f32c Protocol XK X420: Changed bitrate to 1Mbps 2020-01-14 22:05:30 +01:00
pascallanger
c5c7dda2e0 Update XK X420 channel order
Change channel order
Add CH140 for video
2020-01-14 21:25:43 +01:00
pascallanger
492b9e5ed4 New protocol XK
Still work in progress
Subprotocols: X450 and X420 -> not sure if they are subprotocols or just different IDs...
CH5: M-Mode=-100%, 6G-Mode=0%, V-Mode=+100%
CH6: Take off momentary switch
CH7: Emergency stop momentary switch
CH8: 3D/6G momentary switch
CH9: Photo momentary switch
2020-01-14 12:19:12 +01:00
pascallanger
9f721c528d Bayang: rewritten the protocol to be more friendly with main scheduler 2020-01-12 19:42:51 +01:00
pascallanger
7f3c80c2a9 Fix DSM invalid protocol when binding 2020-01-12 18:18:47 +01:00
pascallanger
8f789607e4 Pelikan: add some hopping frequencies 2020-01-12 17:38:30 +01:00
pascallanger
6a9b6ed4be XN297EMU: option=0->nrf24L01, option!=0 -> CC2500
XN297L@250kbps is emulated by default with the NRF24L01. If option (freq tune) is diffrent from 0, the CC2500 module (if installed) will be used instead with option being the freq usual tuning.
2020-01-12 14:06:27 +01:00
pascallanger
953a97dae4 Flyzone: add channel 5 2020-01-12 13:17:17 +01:00
pascallanger
86778c5997 XN297Dump: new auto mode
Automatically:
 - find XN297L packet -> bitrate, scrambling, enhanced...
 - use address to filter incoming packets
 - find all frequencies
 - determine channel order (basic)
 - help to find out the changes by only displaying packets when there is a change in the packet
2020-01-12 13:16:30 +01:00
pascallanger
8c32cdf5fd Pelikan: fix TX and multi ID
Still 1 hopping freq table
2020-01-12 13:00:30 +01:00
pascallanger
d092593e5c Fix FrSky RX bind which could fail if another TX was around 2020-01-12 12:57:16 +01:00
pascallanger
edbf4b6908
Merge pull request #311 from benlye/multi-status-fix
Fix module status on erSkyTX
2020-01-11 10:20:03 +01:00
Ben Lye
43f688d011 Fix module status on erSkyTX 2020-01-10 18:25:56 +00:00
pascallanger
054c3088c3
Merge pull request #305 from Shkolik/Direct_inputs
Direct inputs
2020-01-02 17:29:45 +01:00
Andrew Shkolik
0cedd5bb66 disable myConfig 2019-12-30 16:53:12 -06:00
Andrew Shkolik
1961579fe4 code cleanup 2019-12-30 15:44:16 -06:00
Andrew Shkolik
6906f1652e Inputs logic added 2019-12-24 23:41:04 -06:00
Andrew Shkolik
e2bbe8a422 definitions for direct inputs 2019-12-24 15:03:35 -06:00
pascallanger
8ea4e00d31 Pelikan protocol fix ? 2019-12-20 15:43:44 +01:00
pascallanger
917e27280f Pelikan and Tiger protocol fixes 2019-12-20 09:29:37 +01:00
pascallanger
ec92edfc85 New protocol Tiger
Model: Tiger drone 1400782
Protocol number: 61
No sub_protocol
CH5: Flip
CH6: Light
2019-12-19 23:40:33 +01:00
pascallanger
afd2be6c59 New Pelikan protocol
Protocol number: 60
No sub proto
8 channels AETR...
Extended limit supported
!!Only 1 ID for now!!
2019-12-19 22:39:01 +01:00
pascallanger
a23d50bf0d FrSkyX add bind options CH1-8/CH9-16 & Telem ON/OFF 2019-12-19 17:26:47 +01:00
pascallanger
cace1144db Add TX_LQI (TLQY) comment 2019-12-09 10:47:17 +01:00
pascallanger
0d646ed1a6 Update Protocols_Details.md 2019-12-05 17:14:26 +01:00
pascallanger
e9b09ffecd Update Protocols_Details.md 2019-12-04 10:58:40 +01:00
pascallanger
0008633d6e Bayang RX: Sync 2019-11-30 12:11:08 +01:00
pascallanger
396c005b0a BAYANG RX: enables 6 analog channels
Fix channels range -100%..+100%
2019-11-29 20:26:10 +01:00
pascallanger
d3c3fac4f7 Multi_names mandatory when using multi_telemetry
Validate that sub_proto is valid for the current protocol
Validate that disable channel mapping is valid for the current protocol
2019-11-29 18:50:57 +01:00
pascallanger
cf4acc1d4c Bayang RX: fix warnings 2019-11-29 18:46:24 +01:00
pascallanger
5bd95f8414
Merge pull request #300 from goebish/protocol_bayang_rx
Protocol Bayang rx
2019-11-29 16:37:13 +01:00
Goebish
a31d9a83a3 Use table for channel mapping 2019-11-29 14:26:59 +01:00
Goebish
9b24589897 Fix linefeeds 2019-11-29 14:24:23 +01:00
Goebish
8f3d634132 Fix documentation tag 2019-11-29 14:21:58 +01:00
Goebish
5ef1ccb99b Update protocol details 2019-11-29 13:36:36 +01:00
Goebish
e7d91bc76a Update protocol details 2019-11-29 12:10:56 +01:00
Goebish
e4309824c2 Add missing stuffs 2019-11-29 11:57:06 +01:00
Goebish
cc6a35ac8a Fix channel count 2019-11-29 02:53:19 +01:00
Goebish
1f13a6c281 Add Bayang RX protocol 2019-11-29 02:06:58 +01:00
Goebish
69519bdf14 Add skeleton for Bayang RX protocol 2019-11-28 20:02:59 +01:00
Ben Lye
2e5a8f384a
Add '-inv-' to file names for the xn297dump builds 2019-11-28 18:59:40 +00:00
pascallanger
c803eeb26a Esky150: add sub protocols 4CH and 7CH 2019-11-28 17:01:33 +01:00
pascallanger
6a7497cdf8 Update FX816_nrf24l01.ino 2019-11-27 12:24:49 +01:00
pascallanger
3067ea3a5c New protocol: FX816
Model P38
Protocol number: 58
Sub protocol: None
Channels: A & T
2019-11-27 12:12:13 +01:00
pascallanger
9a5309d84b V911S: revert to nrf24l01 2019-11-27 12:10:49 +01:00
pascallanger
fff18f825a DSM: change timing to see if it improves long range telemetry RX range 2019-11-27 12:08:17 +01:00
Ben Lye
e70bdd4152
Update .travis.yml
Put the 'v' back in the version number in the file names
2019-11-26 09:28:45 +00:00
Ben Lye
cf77a1981f
Travis CI test changes (#297) 2019-11-26 07:51:00 +00:00
pascallanger
10e33f5d5c Update _Config.h 2019-11-21 08:49:39 +01:00
pascallanger
db442d81dd Fix all compilation issues (?) 2019-11-11 19:15:39 +01:00
pascallanger
f800b4f90b
Merge pull request #291 from pascallanger/SPort_Send
New features
2019-11-11 17:30:26 +01:00
pascallanger
712f297d86 Update _Config.h 2019-11-11 17:19:27 +01:00
pascallanger
0afed7d3a4 Fix HoTT menu for internal module 2019-11-11 15:36:39 +01:00
pascallanger
6a03972ff3 Update Protocols_Details.md 2019-11-10 19:34:31 +01:00
pascallanger
0e40f64c6b Enable HoTT RX config menu
Use OpenTX lua script
2019-11-10 18:55:03 +01:00
pascallanger
c83b769f28 Update Multiprotocol.ino 2019-11-10 09:25:42 +01:00
pascallanger
dad3282bbb XN297Dump RF channel display 2019-11-09 19:26:31 +01:00
pascallanger
1621263fb0 HoTT telem doc update 2019-11-09 12:10:56 +01:00
pascallanger
2686cd0c48 Scanner in blocking mode for best perf 2019-11-09 12:10:34 +01:00
pascallanger
b07b081a15 HoTT telemetry size change 2019-11-07 11:13:48 +01:00
pascallanger
c5d4e8c191 Failsafe improvement 2019-11-07 02:30:03 +01:00
pascallanger
928641f535 HoTT: add progmem to tables 2019-11-07 01:56:13 +01:00
pascallanger
c4c5ffec4f HoTT: Failsafe
Failsafe MUST be configured once with the desired channel values (hold or position) while the RX is up (wait 10+sec for the RX to learn the config) and then failsafe MUST be set to RX/Receiver otherwise the servos will jitter!!!
2019-11-07 01:03:57 +01:00
pascallanger
c048e97d3a DSM configurable max throw parameter through option 2019-11-05 19:12:06 +01:00
pascallanger
00f0719659 HoTT: more hop tables 2019-11-05 19:11:28 +01:00
pascallanger
0482627512 HoTT telem 2019-11-05 00:31:20 +01:00
pascallanger
5856442e0f First HoTT version 2019-11-04 19:16:19 +01:00
pascallanger
7b281e47d6 HoTT work in progress 2019-11-04 09:26:12 +01:00
pascallanger
6ef2934c18 Update Telemetry.ino 2019-11-03 15:48:14 +01:00
pascallanger
19b931223b Changed serial timer source 2019-11-03 15:46:05 +01:00
pascallanger
ca15d7108f Prep for HoTT protocol and fix STM32 seed 2019-11-02 20:51:41 +01:00
pascallanger
e6e4d33847 Few changes... 2019-11-02 18:13:47 +01:00
pascallanger
815cf4fd99 FrSky X telemetry quick fix 2019-11-01 18:42:45 +01:00
pascallanger
5cf2bf2cf5 Small tweaks 2019-11-01 15:11:31 +01:00
pascallanger
6632da0276
Fix link 2019-11-01 14:52:50 +01:00
pascallanger
9b499ab7d1 Fix (?) protocol issues 2019-10-31 23:33:10 +01:00
pascallanger
d29461607b Tweakes 2019-10-29 00:36:57 +01:00
pascallanger
243bdf2240 Merge branch 'master' into SPort_Send 2019-10-29 00:02:59 +01:00
pascallanger
cde185901a PPM protcols: remove warning when setting negative option values 2019-10-28 23:29:34 +01:00
pascallanger
a9f35f8095 Update _Config.h 2019-10-27 17:05:02 +01:00
pascallanger
63d7e32e06 INVERT_TELEMETRY_TX flag 2019-10-27 17:02:38 +01:00
pascallanger
400fdb3cc6 FrSkyX LBT RSSI timing improvement 2019-10-27 16:44:36 +01:00
pascallanger
9f1bdc901c FrSkyX LBT: implement LBT instead of transmitting all the time
Needs to be activated using FRSKYX_LBT for now.
2019-10-27 13:20:53 +01:00
pascallanger
61970b028e AFHDS2A: Fix LQI to channel 2019-10-26 15:40:46 +02:00
pascallanger
aee92737ca Fix Failsafe compilation 2019-10-25 22:27:46 +02:00
pascallanger
0fddd9c119 Fix AFHDS2A RX_LQI forward on CH
Hopefully...
2019-10-25 22:03:39 +02:00
pascallanger
b156f66146 Fix Failsafe compilation 2019-10-25 21:35:25 +02:00
pascallanger
63e6590b65 Merge branch 'master' into SPort_Send 2019-10-20 15:48:18 +02:00
pascallanger
103be7f6e0
Update Protocols_Details.md 2019-10-18 18:08:42 +02:00
pascallanger
2154b75499 Fix MULTI_NAMES len... 2019-10-17 22:35:43 +02:00
goebish
6a83cb5577 Frsky rx fixes (#289)
* Restore previous cc2500 register init

* Fix failsafe packets locks

* Fix D8 checksum check
2019-10-17 16:59:08 +02:00
pascallanger
70ce8e9a1f Fix SLT inversion 2019-10-17 16:56:15 +02:00
pascallanger
fdd0a00d5a Correct option value for FrSky protocols 2019-10-17 11:38:23 +02:00
pascallanger
a8cad1e70a Move optionDisp to Data[19] 2019-10-17 09:41:20 +02:00
pascallanger
40afd67fc6 Disable MULTI_SYNC when using RX or Scanner protocols 2019-10-16 20:18:24 +02:00
pascallanger
f3b9206d67 Merge branch 'master' into SPort_Send 2019-10-16 18:54:43 +02:00
pascallanger
b76dd4c8ac
Update Compiling_STM32.md 2019-10-16 12:18:15 +02:00
pascallanger
3eb507ebe6
Update Compiling_STM32.md 2019-10-16 12:17:40 +02:00
pascallanger
fe0a1f0f94 Create T16-internal-connection.png 2019-10-16 11:30:45 +02:00
pascallanger
fab3339b8d
Update Compiling_STM32.md 2019-10-16 10:49:42 +02:00
pascallanger
10604cf820 Create T16-internal-connector.png 2019-10-16 10:45:16 +02:00
pascallanger
e297310a25 Update Scanner_cc2500.ino 2019-10-15 20:00:45 +02:00
pascallanger
d71006f2ae Update Multi_Names.ino 2019-10-15 20:00:41 +02:00
pascallanger
7a8e099a79 Send MULTI NAMES all the time 2019-10-15 11:19:42 +02:00
pascallanger
822aa84fa2 Update Multi_Names.ino 2019-10-15 08:54:02 +02:00
pascallanger
948ce9e8b8 Send current protocol and sub protocol name 2019-10-15 02:04:19 +02:00
goebish
caf145c38a Auto-detect FrSky RX format (#286)
* Calibrate rf channels for D8 too

* Auto-detect D16FCC, D16LBT or D8 format during bind
2019-10-14 00:28:39 +02:00
pascallanger
f964cdec98 Update Multiprotocol.h 2019-10-13 22:23:32 +02:00
pascallanger
6848fab873
FiX AFHDS2A RX LNA switch 2019-10-13 16:46:24 +02:00
pascallanger
72d57cae71 Merge branch 'master' into SPort_Send 2019-10-13 16:37:18 +02:00
pascallanger
a23178e20e Fix ADHDS2A RX LNA switch 2019-10-13 16:35:09 +02:00
pascallanger
5ae4f0288b Global def for the common RX variables 2019-10-13 11:08:20 +02:00
goebish
e0e51eb187 Fix rc channels init (#284) 2019-10-12 20:31:09 +02:00
pascallanger
840944ea94 Merge branch 'SPort_Send' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module into SPort_Send 2019-10-12 19:50:46 +02:00
pascallanger
31ff27b1d3 PPM mode FrSkyX to FrSkyD
If TELEMETRY_FRSKYX_TO_FRSKYD is defined in PPM mode FrSkyX simple telemetry will be sent using FrSkyD format:
RX_RSSI, RX_Batt, TX_RSSI, TX_LQI
2019-10-12 19:50:41 +02:00
goebish
a234ccbd05 Protocol FrSkyD (D8) receiver (#283)
* Rename FrSkyX Rx to FrSky Rx

* Rename protocol

* Add D8 receiver sub protocol
2019-10-12 19:50:11 +02:00
pascallanger
6dfd54b8be Remove travis test for debug 2019-10-11 10:08:25 +02:00
Ben Lye
edb7729b35
Update README.md 2019-10-11 08:46:19 +01:00
pascallanger
d434e63c22 Multi_sync updates
Only for STM32
Enable bidirectionnal serial
2019-10-11 01:14:04 +02:00
pascallanger
cd7ede006c Sync radio -> module 2019-10-10 23:12:09 +02:00
pascallanger
d4d0dc3dbc
Update Compiling_STM32.md 2019-10-10 16:18:15 +02:00
pascallanger
5c7f997e7a Send channel order in MULTI_TELEMETRY 2019-10-09 11:58:50 +02:00
Ben Lye
1623a007a4 Add Channel Order doc page (#281)
* Create Channel_Order.md

* Update Channel_Order.md

* Update README.md
2019-10-08 21:42:48 +02:00
pascallanger
0b19fa0bdf Disable channel mapping + telemetry inversion 2019-10-08 18:52:47 +02:00
pascallanger
897c8b6ec5 Remove "Disable channel mapping" 2019-10-08 00:07:23 +02:00
pascallanger
d427a7fec1
DSM TH_KILL channel 14 2019-10-07 23:31:03 +02:00
pascallanger
b0749a1bee DSM TH_KILL channel 14 2019-10-07 23:30:17 +02:00
pascallanger
2406080515 Update Protocols_Details.md 2019-10-07 23:27:04 +02:00
pascallanger
ff96146b04 Enhanced serial protocol
Protocol 0..255
RX_Num 0..63
Disable channel mapping -> not implemented yet
Disable telemetry
Data 0-9 bytes
2019-10-07 19:06:00 +02:00
pascallanger
e3a5b2825d Merge branch 'master' into SPort_Send 2019-10-07 08:44:51 +02:00
goebish
9fd72b5ad5 Fix scaling for +125% (#280) 2019-10-05 19:02:59 +02:00
goebish
c2bf63991f Fix channel and rssi scaling (#279) 2019-10-05 13:30:50 +02:00
pascallanger
a75ae7b65a Create irx4-lite-cabling.jpg 2019-10-04 19:46:13 +02:00
pascallanger
507e4cb07b Create irx4-lite-boot0.jpg 2019-10-04 19:40:56 +02:00
pascallanger
0f250bb04b Merge branch 'master' into SPort_Send 2019-10-04 19:04:24 +02:00
pascallanger
4a315057a2 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-10-04 19:03:37 +02:00
pascallanger
c8f44a0c4b Fix Multi receiver channels 2019-10-04 19:03:19 +02:00
pascallanger
382d853fe2
Update Compiling_STM32.md 2019-10-04 18:52:48 +02:00
pascallanger
a5996c488e Pictures 2019-10-04 18:48:46 +02:00
pascallanger
760642ecb3 Create irx4-lite.jpg 2019-10-04 18:00:41 +02:00
pascallanger
c7a3548df0 Merge branch 'master' into SPort_Send 2019-10-04 10:32:37 +02:00
pascallanger
d8acc6a5e8 New boards with bin signatures 2019-10-04 10:14:52 +02:00
pascallanger
431808286b Data Buffer signaling 2019-10-03 16:38:50 +02:00
Ben Lye
747fa19259
Update package_multi_4in1_board_index.json 2019-10-02 22:11:18 +01:00
pascallanger
bf61295b76 Fix AFHDS2A_RX 2019-10-02 21:24:50 +02:00
pascallanger
49a1ecea00 Merge branch 'master' into SPort_Send 2019-10-02 21:07:08 +02:00
pascallanger
11f0e55bb1 SPort_Send sequencer 2019-10-02 20:09:18 +02:00
Ben Lye
331da37840 Update Binary_Signature.ino (#278)
Clean up the comments, add bitmasks.
2019-10-02 10:15:13 +02:00
goebish
032e0641a5 Fix AFHDS2A receiver packet filter (#276)
* Add skeleton for AFHDS2A receiver protocol

* Bind & data Ok

* Send channels to TX via telemetry

* Add RSSI

* Fix AVR compilation

* Fix channel number

* Fix packet type check
2019-10-02 09:04:13 +02:00
goebish
f3d2ab61e4 Protocol Flysky AFHDS2A receiver (#275)
* Add skeleton for AFHDS2A receiver protocol

* Bind & data Ok

* Send channels to TX via telemetry

* Add RSSI

* Fix AVR compilation

* Fix channel number
2019-10-01 20:44:26 +02:00
Ben Lye
e8b5f071fe Move signature conditionals to separate file, add channel order (#274) 2019-10-01 11:05:37 +02:00
Ben Lye
ada72d6113
Update Travis Configuration (#273)
Various improvements to the Travis CI script:
* Add channel order builds to releases - now building AETR, TAER, and RETA
* Add PPM builds for each channel order with no inversion and PPM banks set to 5
* Log config diff for each build (diff output folded to keep the log readable)
* Colorify the "Building" lines to make parsing the log easier
* Export .bin files instead of .hex files for the AVR modules
* Add Multi.txt to the release files
2019-10-01 07:43:08 +01:00
pascallanger
c2404d4f0d Code cleanup 2019-09-30 20:53:10 +02:00
pascallanger
821732bba9 Initial S.Port send
!!! No retransmit for now !!!
2019-09-30 17:35:12 +02:00
pascallanger
b6df650f50
Update BOM_DIY_ATmega.md 2019-09-29 15:13:47 +02:00
pascallanger
e783ce5788 Failsafe modification
The following protocols are supporting failsafe: FrSkyX, Devo, WK2x01, SFHSS, HISKY/HK310 and AFHDS2A
In Serial mode failsafe is configured on the radio itself.
In PPM mode and only after the module is up and fully operational, press the bind button for at least 5sec to send the current stick positions as failsafe to the RX.
2019-09-27 16:20:43 +02:00
pascallanger
18af4a0724 AVR modules: Fix KF606, GD00X and Potensic 2019-09-26 15:51:28 +02:00
pascallanger
7e6ec1dc8d Update FrSkyX_Rx_cc2500.ino
Remove compilation warnings for AVR
2019-09-26 15:50:38 +02:00
pascallanger
4fbe0859e0 Update comments 2019-09-25 19:10:55 +02:00
pascallanger
b89c23fe7c PPM channel remapping 2019-09-23 18:13:25 +02:00
goebish
e038c49ae9 Protocol FrskyX D16 RX frequency auto-tune (#270)
* Add autotune during bind

* Fix data phase
2019-09-23 08:11:06 +02:00
Ben Lye
bed02c9384
Update .travis.yml (#269) 2019-09-22 14:17:23 -04:00
pascallanger
96bc4f7cdf Revert Fix FrskyX failsafe hold/no pulse inversion 2019-09-22 20:00:04 +02:00
pascallanger
6503469ddd Bump multi board version to the latest 2019-09-22 17:29:43 +02:00
pascallanger
61a1c3742c Fix FrskyX failsafe hold/no pulse inversion 2019-09-22 17:12:00 +02:00
pascallanger
1fb2a38bc1 Hitec additional telemetry 2019-09-22 17:11:23 +02:00
pascallanger
22a0d79315 FrskyX_RX documentation 2019-09-22 17:05:46 +02:00
MRC3742
0cc72772a3 Repair sub protocol column listing errors for two Protocol (#268) 2019-09-19 20:13:13 +02:00
Pascal Langer
11f4e636e3 AFHDS2A telemetry fix
Discard RX config packets
2019-09-19 10:51:24 +02:00
pascallanger
fef1a2e041
Update Advanced_Debug.md 2019-09-19 09:07:14 +02:00
pascallanger
41a9c8e013
Update Advanced_Debug.md 2019-09-19 08:59:40 +02:00
Pascal Langer
c1ad02b792 Create Debug1.png 2019-09-19 08:55:20 +02:00
Pascal Langer
ab2315c951 FrSkyX: few cosmetic and optimization changes 2019-09-18 11:05:46 +02:00
goebish
7948e33cbc Fix start channel (#267) 2019-09-18 08:48:04 +02:00
goebish
2be2dce584 Protocol FrSky D16 receiver (#266)
* Add skeleton for FrSkyX receiver protocol

* Binds & receives data packets

* Store bind information

* Fix compilation

* Bypass LNA since intended usage implies tx & rx are close together

* Bind channel has FS_AUTOCAL

* Add freq fine tune & low power mode (disable lna)

* Add TX ID check

* Retry longer until first packet is catched

* Fix chanskip for first packet

* Fix defines

* Fix bind

* Send channels to TX

* Fix RSSI reading

* Add missing static keyword

* Fix Validate.h

* Fix compilation
2019-09-17 23:35:19 +02:00
Ben Lye
69bdfe3dba
Update package_multi_4in1_board_index.json 2019-09-17 20:36:24 +01:00
Pascal Langer
d73d163a58 Update Validate.h 2019-09-17 09:53:18 +02:00
Ben Lye
48a52ae5b2 Update Multiprotocol.ino (#265) 2019-09-17 09:37:18 +02:00
Pascal Langer
078dc2ab17 AFHDS2A telemetry AA and AC 2019-09-14 16:34:19 +02:00
Pascal Langer
6f4522caa6 Revert "AFHDS2A telemetry AA and AC"
This reverts commit 3c76ce9f39c3d4e48a2a7d9482fc152533a189aa.
2019-09-14 16:31:27 +02:00
Pascal Langer
3c76ce9f39 AFHDS2A telemetry AA and AC 2019-09-14 16:27:07 +02:00
goebish
8601149051 Fix scanner telemetry (#262)
* Fix scanner telemetry

* Take several samples per channel, keep maximum value
2019-09-14 16:07:49 +02:00
pascallanger
d7ef15d435
Update Compiling_STM32.md 2019-09-12 16:08:20 +02:00
pascallanger
27e3645b56
Update Compiling_STM32.md 2019-09-12 15:55:08 +02:00
pascallanger
95eb4e1a22
Update Compiling_STM32.md 2019-09-12 15:54:18 +02:00
pascallanger
32ea07bf5a
Update Compiling_STM32.md 2019-09-12 15:51:58 +02:00
pascallanger
06272575c5
Flash from TX 2019-09-12 15:50:12 +02:00
Pascal Langer
edd6432d4c Update Validate.h 2019-09-11 15:26:35 +02:00
Pascal Langer
303c4615e9 Fix scanner compilation issue 2019-09-11 12:23:36 +02:00
Pascal Langer
7d327c1622 Scanner 2.4GHz
Thanks to Goebish for this spectrum analyzer.
It will work soon with the OpenTX 2.3 Spectrum Analyser tool.
2019-09-10 23:37:54 +02:00
Ben Lye
6a74b83f98
Update .travis.yml 2019-09-08 14:40:59 +01:00
Ben Lye
c601c2dd98
Update .travis.yml 2019-09-08 14:25:52 +01:00
Ben Lye
c27b60749f
Update Travis CI script (#257)
* Use latest STM32 board options
* Use latest Arduino IDE
* Fix build functions to return an error if the build fails
* Modify the files that get exported to releases
2019-09-08 13:33:26 +01:00
Ben Lye
b3cb286088
Update package_multi_4in1_board_index.json 2019-09-07 18:54:27 +01:00
Ben Lye
361903e8ec
Doc updates for new board package (#256) 2019-09-07 18:23:08 +01:00
Ben Lye
d72c69242d
Update package_multi_4in1_board_index.json
Add AVR board v1.0.8 and STM32 board v1.1.5.
2019-09-06 19:43:10 +01:00
Ben Lye
539819fa0c Accomodate new Debug Option setting in Arduino IDE (#255)
Thanks, that's perfect!
2019-09-06 14:05:57 +02:00
Ben Lye
d80c218744 Add timeout to serial debug (#253)
* Wait 30s for serial debug instead of waiting forever
* Delay of 50ms to allow FTDI debugger to connect at startup
2019-09-05 08:33:01 +02:00
pascallanger
0603d220a9
T16 Flash from TX 2019-09-04 17:39:47 +02:00
pascallanger
e13fe56f47
Include the Jumper T16 2019-09-04 17:38:00 +02:00
pascallanger
acd7694485
Update Protocols_Details.md 2019-09-02 19:23:15 +02:00
pascallanger
7f50edacc8
Update Protocols_Details.md 2019-09-02 19:07:48 +02:00
pascallanger
5a4906c5b5
Update Protocols_Details.md 2019-09-02 19:06:34 +02:00
Pascal Langer
4e906757b9 XN297Dump fix enhanced unscramble mode 2019-08-24 22:39:27 +02:00
Pascal Langer
1f0b21e351 Fix GW008 protocol 2019-08-24 22:14:18 +02:00
Pascal Langer
2f3ea323c7 CHECK_FOR_BOOTLOADER now enabled by default in _config.h 2019-08-24 21:50:36 +02:00
Pascal Langer
d4e77c6499 XN297Dump: added enhanced packet mode 2019-08-24 21:37:26 +02:00
pascallanger
ffc56b049d
Update Advanced_Debug.md 2019-08-20 14:07:38 +02:00
pascallanger
ddac89d732
Update Advanced_Debug.md 2019-08-20 14:06:01 +02:00
Pascal Langer
fecf2805c7 WIP: Advanced topics 2019-08-20 14:01:56 +02:00
Pascal Langer
4dcc88ba32 Serial debug documentation 2019-08-18 18:44:36 +02:00
Pascal Langer
084308d8a4 Update Multi.txt 2019-08-18 17:08:27 +02:00
Pascal Langer
1ffb5c405b New protocol: Flyzone
Models compatible with TX FZ-410
Protocol 53
No sub protocol
2019-08-17 22:37:00 +02:00
Pascal Langer
ad29409407 New protocol ZSX
Model JJRC ZSX-280
Protocol number 52 ,no sub protocol
CH3: Throttle
CH4: Rudder
CH5: Light
2019-08-10 21:43:14 +02:00
Pascal Langer
6f33abb25e New protocol Traxxas
Protocol number: 43
Compatible with receivers 6519
Extended limits supported
CH1=AUX3
CH2=AUX4
CH3=THROTTLE
CH4=STEERING
2019-08-06 17:27:42 +02:00
Pascal Langer
2c9693389e Fix DSM telemetry and global cyrf6936 freq tunning
- Fixed DSM telemetry with some RXs (R720X)
 - Global frequency tunning for all protocols using the CYRF6936 by adjusting channel 15 when enabled
 - Changed default DSM_THROTTLE_KILL_CH to use channel 14
2019-08-01 14:23:08 +02:00
MRC3742
d3c82c4da4 Add option instructions to update STM module (#243) 2019-07-18 10:34:46 +02:00
Pascal Langer
541a96e7b4 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-07-04 10:37:42 +02:00
Pascal Langer
5b234a9cbc Mandatory use of boards AVR 1.0.7 and STM32 1.1.4 solving path space issues 2019-07-04 10:37:25 +02:00
Ben Lye
24c3a62f3a
Update package_multi_4in1_board_index.json 2019-07-04 09:31:51 +01:00
Pascal Langer
23756a387a XN297Dump: fix packet timer 2019-07-03 20:51:13 +02:00
Pascal Langer
efbd350dfd GD00X: fix typo... 2019-07-03 18:27:39 +02:00
Pascal Langer
072e95c84e Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-07-03 18:13:08 +02:00
Pascal Langer
4be26e7202 GD00X: add high/low rates 2019-07-03 18:07:18 +02:00
pascallanger
a616cbb95c
Update Protocols_Details.md 2019-07-03 18:05:54 +02:00
Pascal Langer
8aea9aa3dd Added a common deadband conversion code
Modified protocols:
 - GD00X applied on aileron
 - KF606 applied on aileron
 - POTENSIC applied on throttle
2019-07-03 17:39:05 +02:00
pascallanger
e4992bc917
Update Protocols_Details.md 2019-07-03 16:48:06 +02:00
pascallanger
000b3e97c7
Update Protocols_Details.md 2019-07-03 09:55:16 +02:00
pascallanger
cb91e19413
Update Compiling_STM32.md 2019-07-03 00:18:45 +02:00
pascallanger
c72e690085
Update Compiling_STM32.md 2019-07-02 23:32:27 +02:00
pascallanger
f1a4e659e7
Update Compiling_STM32.md 2019-07-02 23:28:02 +02:00
pascallanger
0d56d17d52
Update Compiling_STM32.md 2019-07-02 23:25:37 +02:00
pascallanger
96c89c8c97
Update Compiling_STM32.md 2019-07-02 23:12:26 +02:00
pascallanger
7df5a1f211
Update Compiling_STM32.md 2019-07-02 23:11:03 +02:00
pascallanger
8ae8e028c7
Update Compiling_STM32.md 2019-07-02 22:34:23 +02:00
pascallanger
581ad5f8f4
Update Compiling_STM32.md 2019-07-02 22:33:05 +02:00
pascallanger
977bae3750
Add files via upload 2019-07-02 22:28:43 +02:00
pascallanger
8a0161607e
Update Protocols_Details.md 2019-07-02 21:51:31 +02:00
Ben Lye
cd6a7bfc3a
Update package_multi_4in1_board_index.json
Add new boards which resolves issue with spaces in the sketch path on Windows.
2019-06-27 15:50:44 +01:00
Pascal Langer
4671700b7d Devo protocol: number of channels 2019-06-23 17:13:30 +02:00
pascallanger
840ca74407
Redpine changes (#240)
* Change Looptimes
state => bind_counter

* minimize whitespace changes
2019-06-20 10:53:31 +02:00
Bryce Johnson
0d8a7e46de Redpine changes (#240)
* Change Looptimes
state => bind_counter
2019-06-20 10:53:17 +02:00
pascallanger
8b9940b0f0
Redpine typo 2019-06-19 16:07:08 +02:00
Pascal Langer
521b819b8a New protocol POTENSIC
Model: A20
Protocol number: 51
Sub protocol: none
Channels:
- CH5 TAKE_OFF/LANDING: momentary switch -100% -> +100%
- CH6 EMERGENCY: Stop +100%
- CH7 MODE: MODE: Beginner -100%, Medium 0%, Advanced +100%
- CH8 HEADLESS: Off -100%, On +100%
2019-06-19 11:25:21 +02:00
Bryce Johnson
208e9ef64b minimize whitespace changes 2019-06-17 19:08:07 -06:00
Bryce Johnson
a7ea8e012e Change Looptimes
state => bind_counter
2019-06-17 19:01:27 -06:00
Pascal Langer
d940a7e49a New Redpine protocol
Protocol Redpine: 50
Sub protocol: Fast=0, Slow=1
Option=freq tunning
2019-06-17 17:16:39 +02:00
Pascal Langer
9d50171034 BUGS fix a bug... 2019-06-10 09:19:56 +02:00
Pascal Langer
701a5b9e28 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-06-09 19:00:27 +02:00
Pascal Langer
d11785ef2d V761... forgot to save the change before pushing... 2019-06-09 19:00:21 +02:00
pascallanger
f4a4d91ef8
V761 additional IDs 2019-06-09 15:06:29 +02:00
Pascal Langer
9514e47ed3 BUGS EEPROM clean: need to rebind BUGS and BUGSMINI 2019-06-09 14:51:21 +02:00
Pascal Langer
9461f2d632 V761 3rd ID 2019-06-09 14:50:17 +02:00
Pascal Langer
f6064d03e1 V761 aileron channel 2019-06-08 21:57:02 +02:00
MRC3742
0d917e0dc5 Update TOC for sub protocols using CC2500 to emulate XN297L @250kbps (#234) 2019-06-08 21:26:25 +02:00
pascallanger
9408af8d08
Update Protocols_Details.md 2019-06-08 21:25:02 +02:00
Pascal Langer
862ab48bbc Update V761_nrf24l01.ino 2019-06-06 10:26:54 +02:00
Pascal Langer
f498347c53 V761 second TX ID/freqs 2019-06-06 10:07:57 +02:00
Pascal Langer
3f77f59c8a XN297L emu scramble option 2019-06-06 01:15:28 +02:00
pascallanger
e96186015d
XN297L CC2500 emulation 2019-06-05 23:31:17 +02:00
Pascal Langer
1fa6e4526b Include full xn297(L) xor tables 2019-06-05 23:23:27 +02:00
Pascal Langer
3853d585a0 XN297L/CC2500 emulation on V911s 2019-06-05 22:53:24 +02:00
Pascal Langer
e8c6225ef0 New XN297L 250Kbps emu layer based on CC2500
This layer can be enabled/disabled with the option XN297L_CC2500_EMU in _config.h
Protocols which are using it so far:
GD00X, KF606 and MJXQ/E010&PHOENIX
2019-06-05 21:54:47 +02:00
Pascal Langer
17c67cc780 Update V761_nrf24l01.ino 2019-06-04 22:42:37 +02:00
Pascal Langer
dcc4236833 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-06-04 22:02:43 +02:00
Pascal Langer
6a7c735924 Fix V761 input 2019-06-04 22:02:20 +02:00
pascallanger
3c40cd853e
Update Protocols_Details.md 2019-06-04 21:59:12 +02:00
pascallanger
5357660b68
KF606 and V761 protocols 2019-06-04 21:56:39 +02:00
Pascal Langer
a15a911f8e New protocol KF606
Model: KF606
Protocol: 49
No sub protocol
Channels: throttle, aileron and trim on ch5
2019-06-04 21:44:40 +02:00
Pascal Langer
ded0487ce6 XN297Dump improvements
Selection of address length
Timing accuracy
2019-06-04 21:41:50 +02:00
pascallanger
e7b079ece7
Update Protocols_Details.md 2019-06-01 16:05:23 +02:00
goebish
0cbe4de920 Fix E010/CC2500 Protocol on AVR (#229)
* Use cc2500 fast frequency hopping

* Calibrate cc2500 PLL if sub-protocol is E010/Phoenix only

* Fix e010 crc for AVR
2019-05-31 09:17:27 +02:00
Ben Lye
5c3bf30fe7
Fix CX20 image 2019-05-29 08:48:21 +01:00
Ben Lye
56b8694fd5
Add CX20 Image 2019-05-29 08:47:25 +01:00
Pascal Langer
c9fecafada WFly frequency tunning 2019-05-18 20:33:32 +02:00
Pascal Langer
f3ca7ad644 WFly freq tuning on channel 15
You need to enable the tuning in _config.h: #define USE_CYRF6936_CH15_TUNING
2019-05-18 17:36:39 +02:00
pascallanger
c3b48c78af
Update Protocols_Details.md 2019-05-18 13:48:02 +02:00
Pascal Langer
18dcc29a0d XN297Dump: auto scramble detection 2019-05-17 20:34:02 +02:00
Pascal Langer
c3a5c263d3 XN297Dump fix CRC... 2019-05-17 19:56:52 +02:00
Pascal Langer
ccdf60d525 XN297DUMP: dynamic address search
The dump process is now looking for addresses with different length (3..5) additonnaly to the packet length.
Untested...
2019-05-17 17:00:08 +02:00
Pascal Langer
443e1cec75 New protocol V761
Protocol number: 48
Sub_protocol: none
Channel 5: +100% expert, 0% mid=gyro on no rate limits, -100% beginer=gyro on and axis rate limited.
ONLY 1 ID IS AVAILABLE SO BE CAREFUL WHILE FLYING.
2019-05-17 16:25:39 +02:00
goebish
aa540514b8 Use CC2500 if available instead of NRF24L01 for E010 and PHOENIX (#225)
* Use CC2500 if available instead of NRF24L01 for E010 and PHOENIX sub protocols

* Update documentation

* Why do I always swap below & above ?
2019-05-16 13:17:39 +02:00
pascallanger
fda7e2e5b6
Update Protocols_Details.md 2019-05-14 18:23:24 +02:00
pascallanger
fb4d5cf437
Update Protocols_Details.md 2019-05-14 18:22:07 +02:00
pascallanger
9fc2898a56
Bayang protocol DHD D4 sub_protocol 2019-05-10 21:52:54 +02:00
Pascal Langer
2e24323adf DHD D4 set to high rates 2019-05-10 21:39:15 +02:00
pascallanger
77abc1ed7c
BUGS3H Altitude Hold 2019-05-10 21:09:31 +02:00
Pascal Langer
259d550d04 AFHDS2A: stop bind process as requested 2019-05-10 19:39:14 +02:00
Pascal Langer
1a8f9c5a12 AFHDS2A extended telemetry forward 2019-05-10 18:17:09 +02:00
Pascal Langer
1916eb3095 AFHDS2A: add debug on full telemetry frames 2019-05-10 11:04:21 +02:00
Pascal Langer
fc3eec7ae1 BUSMINI: 3H altitude hold mode on CH11 2019-05-09 23:56:06 +02:00
Ben Lye
8d10c9b004
Update .travis.yml
Fix file extension for compiled STM32 files
2019-05-09 21:36:49 +01:00
Pascal Langer
511f77f5e7 Bayang DHD D4 sub protocol 2019-05-09 18:23:19 +02:00
pascallanger
a58d7a4d79
Update Protocols_Details.md 2019-05-09 13:33:08 +02:00
Pascal Langer
6748f6ce78 Add XN297 Dump protocol
Protocol number: 63
Sub protocols: 0=250Kb, 1=1Mb, 2=2Mb
Option: -1=scan RF channels, 0-84=RF channel
DEBUG_SERIAL must be enabled
If a valid frame is received the frame will be sent on the serial port.
2019-05-08 22:01:24 +02:00
ben@lye.co.nz
2dcb6b1987 Update the Travis deploy API key 2019-05-08 15:50:43 +01:00
Ben Lye
2b4ac41142
Update .travis.yml
* Change build commands to make log a little easier to read
* Create a backup of the _config.h file before starting
* Add `before_deploy` and `deploy` sections to deploy compiled binaries when a release is tagged
2019-05-08 15:10:37 +01:00
Pascal Langer
2b47958207 Debug on AFHDS2A telemetry 2019-05-06 22:39:18 +02:00
Pascal Langer
5538d4d1c4 AFHDS2A update RF channels and Failsafe
You need to bind all the RXs again...
2019-04-26 17:51:14 +02:00
pascallanger
467756df48
BUGS3MINI 2019-04-18 10:48:38 +02:00
pascallanger
534ebb26c0
Update Protocols_Details.md 2019-04-18 10:45:48 +02:00
Pascal Langer
21790a9725 BUGSMINI sub protocol BUGS3H 2019-04-18 10:44:42 +02:00
Pascal Langer
6bc22c8ac4 BUGSMINI telemetry fix 2019-04-15 23:28:24 +02:00
Pascal Langer
ac1c422f14 Update Multi.txt 2019-04-15 10:51:28 +02:00
pascallanger
efa1860104
MJXQ sub protocol PHOENIX 2019-04-15 10:50:16 +02:00
Pascal Langer
c673b4254f MJXQ (18) new sub protocol PHOENIX (6) 2019-04-15 10:48:20 +02:00
Pascal Langer
96db173694 BUS Mini: Dynamic trims 2019-04-15 10:31:18 +02:00
pascallanger
1d5be624fe
GD00X V2 2019-04-11 23:25:01 +02:00
Pascal Langer
56f9672896 Update GD00X_nrf24l01.ino 2019-04-11 22:47:01 +02:00
Pascal Langer
303b3f08b8 GD00X V2: 64 IDs 2019-04-11 22:42:00 +02:00
Pascal Langer
150e3fd92e GD00x V2 support
Only 1 ID available for now.
Protocol: 47
Sub-protocol: 1
Channels: same as V1
2019-04-09 22:39:03 +02:00
Pascal Langer
840b01273c Update GD00X_nrf24l01.ino 2019-04-03 09:25:48 +02:00
Pascal Langer
8a7beda339 E016H calibration 2019-04-03 09:06:15 +02:00
Pascal Langer
65606f7083 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-04-02 09:16:18 +02:00
Pascal Langer
0095071ebf E016 fix 2019-04-02 09:16:13 +02:00
Ben Lye
ae4ee9061d
Update package_multi_4in1_board_index.json
STM32 board v1.1.1
2019-03-21 17:35:42 +00:00
Ben Lye
6ba06bc006
Update Compiling.md
Added a warning about spaces in the path for Windows users.
2019-03-21 17:32:20 +00:00
Ben Lye
00f247eae1
Update Compiling_STM32.md
Added a warning about spaces in the path for Windows users.
2019-03-21 17:31:07 +00:00
Pascal Langer
c250c91ab4 BUGSMINI flip issue fix 2019-03-11 10:03:16 +01:00
Brian
b1ac10a4c4 Add Silverware's analog aux channel feature to Bayang protocol (#215)
* Expanded Bayang protocol to have Option 2, which adds two analog auxiliary channels driven by channels 14 and 15. The expert byte is taken over, as is the extra txid byte, which is not used by Silverware.

* Change Bayang options - Bit 0 (LSB) enables telemetry and Bit 1 selects analog aux channels

* Changed Bayang protocol bind to ensure binding only when telemetry and analog aux option selections match on RX and TX

* Add details for Bayang protocol update
2019-03-03 20:47:58 +01:00
Pascal Langer
af4185fbea Fix E01X BV statements 2019-03-03 20:42:26 +01:00
Pascal Langer
aa85d4d797 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-02-28 21:45:23 +01:00
Pascal Langer
74cc63e6dd E016H typo fix 2019-02-28 21:45:16 +01:00
pascallanger
04ed613ca3
E016H addition 2019-02-28 21:15:38 +01:00
pascallanger
9ea157b9b6
E016H addition 2019-02-28 21:13:49 +01:00
Pascal Langer
536d7f6124 E016H subprotocol addition to E01X
Protocol E01X (45)
Subprotocol E016H (2)
Channels:
CH5=STOP
CH6=FLIP
CH8=HEADLESS
CH9=RTH
2019-02-28 21:11:05 +01:00
pascallanger
869a01b57f
Update Compiling_STM32.md 2019-02-18 09:44:57 +01:00
Pascal Langer
ea982b23c2 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2019-01-09 16:56:57 +01:00
Pascal Langer
15dfe8cead Fix E01X hang up when option=0 2019-01-09 16:56:53 +01:00
pascallanger
b50027150e
xn297L @250kbps issues 2019-01-09 13:49:45 +01:00
Pascal Langer
103acb8294 Add PPM protocol list definition in _MyConfig.h 2018-12-10 11:34:11 +01:00
pascallanger
aca23b8bca
Update Protocols_Details.md 2018-12-06 16:49:02 +01:00
Ben Lye
aaffbbc5be
Add AVR v1.0.4 and STM32 v1.1.0 boards 2018-12-01 19:32:20 +00:00
MRC3742
e0002c9488 Add Table of Contents (#206)
Adds a chart for quick reference of all available protocols with quick links to each protocols description. Also makes navigating this lengthy file much easier.
2018-11-30 10:35:30 +01:00
pascallanger
687d6d914c
GD00X full id support 2018-11-25 21:41:46 +01:00
Pascal Langer
9a61b2701e GD00X: Implement general ID/Freq 2018-11-25 20:52:44 +01:00
MRC3742
d8224ebefe Correction in example file of #define Module_3 (#205) 2018-11-25 19:13:44 +01:00
Pascal Langer
cc2af73a05 Bayang Visuo support, DSM TH_KILL improvement 2018-11-23 10:03:55 +01:00
Pascal Langer
aecd44ada6 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-11-22 23:29:20 +01:00
Pascal Langer
72593c4d99 _Config.h DSM_THROTTLE_KILL description 2018-11-22 23:29:15 +01:00
pascallanger
52ca258616
Update Protocols_Details.md 2018-11-22 23:24:38 +01:00
pascallanger
04412667ff
Update Protocols_Details.md 2018-11-22 23:08:20 +01:00
pascallanger
4124ec80ec
Update Protocols_Details.md 2018-11-22 23:07:01 +01:00
pascallanger
693ea75e95
Update Protocols_Details.md 2018-11-22 23:01:26 +01:00
pascallanger
9e3c1ab059
Update Compiling.md 2018-11-22 11:42:47 +01:00
pascallanger
5fc860702f
Update Compiling.md 2018-11-22 10:35:30 +01:00
pascallanger
6ad2ee5a47
Update Compiling.md 2018-11-22 10:32:13 +01:00
pascallanger
b0f64297cb
Update Compiling_STM32.md 2018-11-22 10:21:18 +01:00
Pascal Langer
f99a63dbc0 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-11-22 08:34:01 +01:00
Pascal Langer
9261e8fe94 DSM throttle kill: correct channel number 2018-11-22 08:33:57 +01:00
pascallanger
52bb116e24
Update Flash_from_Tx.md 2018-11-21 20:29:52 +01:00
pascallanger
7006c36101
Update Flash_from_Tx.md 2018-11-21 20:27:50 +01:00
pascallanger
f7d452e3f1
Update Flash_from_Tx.md 2018-11-21 20:24:09 +01:00
pascallanger
598e50a40f
Update Flash_from_Tx.md 2018-11-21 20:10:24 +01:00
pascallanger
eadfa26c3b
Add files via upload 2018-11-21 20:03:13 +01:00
pascallanger
b03491fdf7
Update Flash_from_Tx.md 2018-11-21 19:20:51 +01:00
pascallanger
42911c63b3
Update Flash_from_Tx.md 2018-11-21 16:59:33 +01:00
pascallanger
43462757ed
Update Flash_from_Tx.md 2018-11-21 16:58:44 +01:00
pascallanger
0eee1c5d15
Update Flash_from_Tx.md 2018-11-21 16:57:17 +01:00
pascallanger
3a21bf69f1
Update Flash_from_Tx.md 2018-11-21 16:47:26 +01:00
pascallanger
7d4c8f7f07
Update Compiling_STM32.md 2018-11-21 14:26:05 +01:00
pascallanger
866d19d649
Update Compiling_STM32.md 2018-11-21 14:23:55 +01:00
pascallanger
c27ec2475c
Update Compiling_STM32.md 2018-11-21 14:17:44 +01:00
pascallanger
1d64cbfaa0
Update Compiling_STM32.md 2018-11-21 14:15:26 +01:00
pascallanger
5d1baa89e4
Update Compiling_STM32.md 2018-11-21 14:11:24 +01:00
pascallanger
e846ce7e98
Update Compiling_STM32.md 2018-11-21 13:08:27 +01:00
pascallanger
300b3582a6
Update Compiling.md 2018-11-21 12:03:20 +01:00
pascallanger
3a7ffe62b0
Update Compiling.md 2018-11-21 12:02:49 +01:00
Pascal Langer
d990ebe49e _Config.h file update 2018-11-20 21:15:31 +01:00
Pascal Langer
bd78739217 AFHDS2A: LQI to RX channel 2018-11-20 21:04:29 +01:00
Pascal Langer
6c7312a09c DSM: Throttle Kill option 2018-11-20 16:54:55 +01:00
pascallanger
1525e564cb
Update Protocols_Details.md 2018-11-20 13:17:09 +01:00
Pascal Langer
7fb4bbbf3c GD00X fix 2018-11-17 09:08:23 +01:00
Pascal Langer
2553d44d32 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-11-16 09:13:47 +01:00
Pascal Langer
dc902b7a61 E01X test 2018-11-16 09:13:45 +01:00
pascallanger
b992cbd92e
New GD00X protocol 2018-11-16 00:36:52 +01:00
Pascal Langer
22711fad28 Update GD00X 2018-11-15 23:49:26 +01:00
Pascal Langer
a9df0abed3 Update Multiprotocol/GD00X_nrf24l01.ino 2018-11-15 23:16:15 +01:00
Pascal Langer
fd65550f8d Fix typos... 2018-11-15 22:32:50 +01:00
Pascal Langer
b910ad3386 New protocol GD00X
Protocol number: 47
No sub protocol
!!!! ONLY 1 ID AT THIS TIME !!!!
CH1 AILERON
CH3 THROTTLE
CH5 TRIM
CH6 LIGHT
2018-11-15 11:08:07 +01:00
pascallanger
fb9f094365
Update Protocols_Details.md 2018-11-11 17:10:06 +01:00
Pascal Langer
05470446a0 V911S mod
Change AIL and RUD directions.
2018-11-09 10:19:36 +01:00
Pascal Langer
903982afb7 V911S protocol
Protocol number 46
No sub protocol
CH5: yaw calib
2018-11-09 00:31:26 +01:00
Ben Lye
8bea5b125b Tweak protocol builds (#199) 2018-11-07 15:54:17 +01:00
Pascal Langer
c658a892f2 Fix some compilation issues 2018-11-07 15:52:39 +01:00
Pascal Langer
3f0d6cfcf1 Typo fix 2018-11-07 10:48:11 +01:00
Pascal Langer
c6657c199c Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-11-07 09:35:38 +01:00
pascallanger
cf6d980b8b
Update Protocols_Details.md 2018-11-06 22:16:34 +01:00
Pascal Langer
c3ff49e86e E01X new protocol
New protocol E01X number 45
Sub protocol E012 number 0
Sub protocol E015 number 1
Channels:
ARM_SW      CH5
FLIP_SW     CH6
LED_SW      CH7
HEADLESS_SW CH8
RTH_SW      CH9
2018-11-06 22:06:19 +01:00
Pascal Langer
e51f91f041 Bugs protocol fix? 2018-11-06 21:43:55 +01:00
Pascal Langer
2589c67f6c NCC1701 fix 2018-11-05 20:03:39 +01:00
pascallanger
2f4f19b52b
Update Protocols_Details.md 2018-11-05 20:02:48 +01:00
pascallanger
b3ed7563dc
NCC1701 2018-11-03 17:28:40 +01:00
Pascal Langer
ea96c328fc Protocol NCC1701
CH5: Warp
Telemetry:
A1 voltage is used for crash detection. In case of a crash A1=0V. You can be assign a sound to the crash.
2018-11-03 17:24:47 +01:00
Pascal Langer
f42da14413 New NCC1701 protocol
NCC1701 - 44
Model: Air Hogs Star Trek USS Enterprise NCC-1701-A
Autobind protocol
Only 9 IDs available, cycle through them using RX_Num.
2018-11-02 21:20:57 +01:00
pascallanger
2149149723
New Protocol NCC1701 2018-11-02 21:17:51 +01:00
Pascal Langer
f1916b3d0b Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-10-17 13:24:08 +02:00
Pascal Langer
10788976b6 New protocol BUGSMINI
Models: MJX Bugs 3 Mini and 3H
Protocol BUGSMINI = 42
No sub_protocol
Telemetry = RX RSSI and battery voltage  good/warning/bad
RX_Num is used to give a number to a given model. You must use a different RX_Num per MJX Bugs Mini. A maximum of 16 Bugs Mini are supported.
Channels:
ARM	CH5
ANGLE	CH6
FLIP		CH7
PICTURE	CH8
VIDEO	CH9
LED		CH10
2018-10-17 13:23:27 +02:00
pascallanger
567d26a385
New protocol BUGSMINI 2018-10-17 13:21:22 +02:00
Pascal Langer
220eb8f6f4 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-10-11 17:58:11 +02:00
Pascal Langer
b40e7d6e97 Bugs: fixed telemetry disable compilation error 2018-10-11 17:58:07 +02:00
pascallanger
97dd90a718
OpenLRSng 2018-09-24 10:30:26 +02:00
pascallanger
75ba6401a4
Hubsan typo 2018-09-19 17:19:58 -04:00
Pascal Langer
5cf8d8d263 ESKY protocol code review 2018-09-15 08:02:05 -04:00
Pascal Langer
058e09c413 _config.h descriptions update 2018-09-13 17:25:49 -04:00
Pascal Langer
63fb1b1f36 Removed old SLT sub protocols 2018-09-12 14:24:30 -04:00
Pascal Langer
7c0b9ce3c6 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-09-12 09:51:59 -04:00
Pascal Langer
c153d236f2 SLT Q100/Q200/MR100: reverse elevator 2018-09-12 06:49:40 -04:00
pascallanger
3b3a3c275c
Update Protocols_Details.md 2018-09-12 06:45:09 -04:00
Pascal Langer
f4691d08cc SLT Q100/Q200/MRT100: reverse throttle 2018-09-11 15:51:28 -04:00
pascallanger
e5d9471b33
Update Protocols_Details.md 2018-09-11 09:33:54 -04:00
pascallanger
ab9525c507
Update Compiling_STM32.md 2018-09-11 06:06:34 -04:00
pascallanger
b1fb3a5470
Update Protocols_Details.md 2018-09-11 05:24:21 -04:00
pascallanger
b2194790eb
SLT changes 2018-09-11 05:20:45 -04:00
Pascal Langer
8901310ed4 BUGS: fix? 2018-09-11 04:59:07 -04:00
Pascal Langer
09c6adaa95 BUGS: fix 2018-09-10 21:28:37 -04:00
Pascal Langer
5fe1e9674e DSM functions and variables renamed 2018-09-10 09:58:31 +02:00
pascallanger
601116bd59
SLT sub protocols Q100/Q200/MR100 2018-09-10 08:34:30 +02:00
Pascal Langer
27dc02fdec SLT sub protocol Q100
CH9 FMODE
CH10 FLIP
CH13 Gyro calib
2018-09-10 08:11:56 +02:00
Pascal Langer
03f417546e Multi.txt update 2018-09-09 11:29:25 +02:00
Pascal Langer
3b9aa79201 SLT sub protocol MR100 for Vista
CH9: MODE
CH10: FLIP
CH11: VIDEO
CH12:PICTURE
2018-09-09 11:26:01 +02:00
Ben Lye
5aa4936c0e
Add stm32 board v1.0.9 (#192) 2018-09-07 10:27:43 +01:00
pascallanger
1e65d58113
SLT Q200 channels 2018-09-07 10:52:07 +02:00
Pascal Langer
e2a66bdd1f SLT/Q200: gyro calibration on CH13 2018-09-07 10:38:22 +02:00
pascallanger
4f9c30505a
Update README.md 2018-09-06 20:49:28 +02:00
pascallanger
1ec817c96c
SLT sub protocols V1, V2, Q200 2018-09-06 19:09:10 +02:00
pascallanger
41528ae7b6
Update README.md 2018-09-06 18:56:14 +02:00
pascallanger
77d248df0b
Add Travis status 2018-09-06 17:24:56 +02:00
Ben Lye
c6cb13b332
Initial go at Travis CI (#191) 2018-09-06 10:44:16 +01:00
Pascal Langer
d67108fa8b SLT/Q200: Fix frequencies calculation 2018-09-06 10:57:36 +02:00
Pascal Langer
b7447f055a SLT/Q200 subprotocol changes 2018-09-05 15:38:36 +02:00
pascallanger
3902ed19b7
Update Compiling_STM32.md 2018-09-03 19:11:33 +02:00
Pascal Langer
51ba7cf75c Update SLT/Q200 hopping freq 2018-09-03 17:30:53 +02:00
Pascal Langer
82fb5dd0da 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
2018-09-03 16:02:43 +02:00
Ben Lye
2ac20cb575
Update Advanced_Topics.md 2018-08-31 19:39:53 +01:00
Ben Lye
3f33e5b2a8
Created EEPROM doc (#189) 2018-08-31 19:36:46 +01:00
Pascal Langer
655ea98bf1 Hubsan/H501: removed useless channels headless2 and osd 2018-08-31 00:01:05 +02:00
pascallanger
238260612c
Update Protocols_Details.md 2018-08-30 23:58:21 +02:00
pascallanger
cd26c2d8e6
Update Protocols_Details.md 2018-08-29 18:16:23 +02:00
pascallanger
814e28b86a
Update Protocols_Details.md 2018-08-29 17:36:18 +02:00
Pascal Langer
f515ba79af Hubsan sub_protocol 501 features
sub_protocol H501
Model H122D: add flip on ch13 and OSD on ch14
Model H123D: add flight modes on ch16 -> -100% Sport mode 1,0% Sport mode 2, +100% Acro
2018-08-29 17:29:50 +02:00
pascallanger
e6f16700e4
Update Protocols_Details.md 2018-08-29 14:56:24 +02:00
pascallanger
f38e7c35da
Bugs angle/acro mode 2018-08-29 14:54:24 +02:00
Pascal Langer
b3576b7162 BUGS protocol
Add channel for ANGLE/ACRO mode. Angle is +100%, acro is -100%.
Channels mapping:
ARM	CH5
ANGLE	CH6
FLIP		CH7
PICTURE	CH8
VIDEO	CH9
LED		CH10
2018-08-29 14:44:10 +02:00
pascallanger
d9914e95d9
Update Protocols_Details.md 2018-08-29 12:58:54 +02:00
pascallanger
64c79626b4
Update Protocols_Details.md 2018-08-28 16:41:04 +02:00
pascallanger
e047a76855
Update Protocols_Details.md 2018-08-28 16:40:10 +02:00
Pascal Langer
e7449897f9 BUGS new protocol
BUGS new protocol (number 41)
Models: Bugs 3, 6 and 8
Autobind protocol
Telemetry: TX & RX RSSI, Battery voltage good/bad
ARM	CH5
LED		CH6
FLIP		CH7
PICTURE	CH8
VIDEO	CH9
2018-08-28 16:13:28 +02:00
Pascal Langer
db093cf25b Merge branches 'master' and 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-08-21 14:58:48 +02:00
Pascal Langer
4bb4bd9792 New protocol WFLY (40)
Use the CYRF6936 RF component
Extended limit supported
No sub protocol
option=number of channels between 4 and 9. If outside of the range default=9.
2018-08-21 14:58:44 +02:00
pascallanger
c16654c8cf
WFLY protocol 2018-08-21 14:50:17 +02:00
Ben Lye
817ff7e239
Remove boards files and re-org (#185) 2018-08-17 18:53:31 +01:00
Ben Lye
685de52538
Adding stm32 auto-upload scripts for Windows, Mac, and Linux (#184) 2018-08-16 09:29:47 +01:00
Ben Lye
1dc52773f4
Added step for installing libusb on MacOS 2018-08-14 20:04:34 +01:00
pascallanger
fbb04ea88a
Update Compiling_STM32.md 2018-08-12 17:55:57 +02:00
pascallanger
23da318645
Update Compiling_STM32.md 2018-08-12 17:54:40 +02:00
pascallanger
30b77931d7
Jumper serial 2018-08-12 17:50:54 +02:00
pascallanger
39327b2b27
Update Compiling_STM32.md 2018-08-12 17:44:58 +02:00
pascallanger
13c3af96a6
Update Compiling_STM32.md 2018-08-12 17:43:36 +02:00
pascallanger
4411732022
Jumper module serial connection 2018-08-12 17:42:09 +02:00
pascallanger
0c08b8b93b
Update Compiling_STM32.md 2018-08-12 17:23:46 +02:00
pascallanger
838755aabf
Update Compiling_STM32.md 2018-08-12 17:14:03 +02:00
pascallanger
2bca104e33
Update Compiling_STM32.md 2018-08-12 17:10:13 +02:00
pascallanger
cf857f3256
Simplify Upload 2018-08-12 16:58:55 +02:00
Ben Lye
1647d3d841
Add stm32 serial upload method which includes bootloader (#180) 2018-08-10 20:11:32 +01:00
Pascal Langer
2f5252ab88 Hitec: new sub_protocol to support forward telemetry
OPT_FW (0) : OPTIMA + forward telemetry packets to TX to be decoded
OPT_HUB (1) : OPTIMA + basic telemetry using FrSky Hub format
MINIMA (2) : Minima/Micro/RED
2018-08-09 19:51:07 +02:00
pascallanger
eb89b5be1b
Hitec sub_protocols 2018-08-09 19:39:09 +02:00
Ben Lye
e80fe29dba
Recreated STM32 board package v1.0.6 to fix Linux executable files. (#179) 2018-08-09 10:07:07 +01:00
Pascal Langer
74ab2a4bd7 _Config.h tweaks 2018-08-09 09:59:30 +02:00
Pascal Langer
edd4f740e0 Hitec correction 2018-08-08 14:54:37 +02:00
Pascal Langer
d0c9bc801b Hitec: typo in telemetry 2018-08-08 12:44:56 +02:00
Pascal Langer
73dd63caa1 Hitec telemetry comments 2018-08-08 00:37:59 +02:00
Pascal Langer
cc4703ea40 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-08-08 00:30:25 +02:00
Pascal Langer
f105d7c7eb Hitec full telemetry 2018-08-08 00:30:19 +02:00
pascallanger
e85ad00a46
Update Protocols_Details.md 2018-08-08 00:28:35 +02:00
pascallanger
658dfa4290
Update Protocols_Details.md 2018-08-08 00:25:52 +02:00
pascallanger
df75036501
Update Protocols_Details.md 2018-08-08 00:24:57 +02:00
Pascal Langer
9ab5353122 Hitec full telemetry description 2018-08-07 19:35:31 +02:00
Pascal Langer
5345ece322 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-08-07 13:24:52 +02:00
Pascal Langer
9f09c81ef4 Hitec: Minima fix 2018-08-07 13:24:45 +02:00
pascallanger
c8dea20865
Update Troubleshooting.md 2018-08-07 11:16:15 +02:00
Pascal Langer
bf09177916 Hitec improvement
Added 3rd byte of TX ID
Reproduce the F5 frames from original TX
2018-08-06 18:32:39 +02:00
Pascal Langer
d71640ad7e Hitec comments 2018-08-06 01:42:12 +02:00
Pascal Langer
68afcc0c44 Hitec try for Minima
Add F5 packets
2018-08-05 15:46:24 +02:00
Pascal Langer
9b30a3d72a FrSky X: SPORT polling
Mike's corrections to make SPORT working on Taranis.
2018-08-04 23:47:15 +02:00
pascallanger
789cd21618
Add reference to Hitec 2018-08-04 22:27:15 +02:00
Pascal Langer
d9f343e20b Hitec: new protocol
Hitec protocol using the CC2500 RF component
Protocol number: 39
Sub protocols:
 - Optima (0): the TX must be really close to the RX for the bind negociation to complete.
- Minima (1): untested
Optima supports basic telemetry using the FrSky Hub format: RX volt, TX RSSI,&LQI
2018-08-03 18:29:24 +02:00
pascallanger
0b8ff15133
Update Protocols_Details.md 2018-08-03 18:28:48 +02:00
pascallanger
27a4748111
Update Protocols_Details.md 2018-07-23 22:41:28 +02:00
Pascal Langer
18efaef38c Multi 4-in-1 STM32 v1.0.6
Bootloader: Toggle TX invert
2018-07-21 21:53:32 +02:00
Pascal Langer
35137b87ed ... 2018-07-21 10:06:54 +02:00
Pascal Langer
9019c46102 STM32 dual bootloader update
New version of the STM32 dual bootloader:
 - Fix startup issues with OpenTX
 - Auto invert TX if needed
2018-07-21 09:50:29 +02:00
Pascal Langer
52d0869c50 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-07-20 19:14:09 +02:00
Pascal Langer
236b375669 Corona: FD_V3 sub protocol
New subprotocol for FlyDream V3 number 2.
2018-07-20 19:13:56 +02:00
pascallanger
9502b5a12a
Update Protocols_Details.md 2018-07-20 19:12:59 +02:00
Pascal Langer
ad18856f7a AFHDS2A limit to 12 channels 2018-07-20 19:11:03 +02:00
Pascal Langer
9015b78aaf 1.2.0.21 2018-07-20 15:54:01 +02:00
pascallanger
8cc7a4f693
Update Compiling_STM32.md 2018-07-20 15:50:45 +02:00
pascallanger
ac298fee61
Update Compiling_STM32.md 2018-07-20 15:41:17 +02:00
pascallanger
457fc5296e
Update Compiling_STM32.md 2018-07-20 15:39:44 +02:00
pascallanger
b8f3cd1ad8
Update Protocols_Details.md 2018-07-20 15:30:24 +02:00
Pascal Langer
f9f265271a Fix AFHDS2A
Fix bind issue with AFHDS2A
Add frskyd hub telemetry voltage 2 from external battery
Removed cflie warnings...
2018-07-20 15:24:33 +02:00
Arne Schwabe
dde5f6e119 Add the Vantac MPM Lite Board (#173) 2018-06-25 10:28:37 +02:00
Arne Schwabe
add3fb13ef Fix module id returned to be 0 when saved to eeprom (#170)
Also fix that stm32 id is always either 0 or stm32 id
2018-06-12 12:41:38 +02:00
Peter
51c1936c24 Added hardware Jumper 4IN1 and documentation tweak (#163)
* Numbered list since instructions are sequential

* Added 'Jumper JP4IN1' module from Hobbyking.

* Fix table formatting
2018-06-01 13:58:14 +02:00
James Hagerman
07adeaf60d Adding CFlie protocol (#159) 2018-05-04 16:12:04 +02:00
Pascal Langer
811913bf89 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-05-04 16:08:34 +02:00
Pascal Langer
8906c85d06 Few modifications 2018-05-04 16:08:29 +02:00
pascallanger
7df5894ca4
Update Protocols_Details.md 2018-03-12 19:09:12 +01:00
slagdang
fa9e559195 Simplify STM32 Linux compilation steps. (#151)
* Update Linux rules to use Maple rules file already available in this project.

* Additional clarification.

* Correct typo.
2018-02-25 09:09:13 +01:00
slagdang
81f408ee77 Added instructions for Ubuntu linux. Added jumper image for IRX4Plus. (#149) 2018-02-19 10:16:04 +01:00
Pascal Langer
aa8a059553 Documenattion: PPM protocol selection 2018-02-11 14:58:30 +01:00
pascallanger
8c7918577d
Update Transmitters.md 2018-02-11 14:50:26 +01:00
pascallanger
7219885196
Update Protocols_Details.md 2018-02-11 14:48:49 +01:00
pascallanger
9f8915239f
Update Transmitters.md 2018-02-11 14:45:17 +01:00
pascallanger
83401f6e1a
Update Transmitters.md 2018-02-11 14:43:32 +01:00
pascallanger
dd686ad9d1
Update Protocols_Details.md 2018-02-11 14:41:00 +01:00
pascallanger
7d04005c72
Update PPM_Setup.md 2018-02-11 14:40:07 +01:00
pascallanger
cdbaeb1c6c
Update PPM_Setup.md 2018-02-11 14:38:40 +01:00
pascallanger
6bf432a112
Update PPM_Setup.md 2018-02-11 14:37:59 +01:00
pascallanger
f6ef136502
Update Protocols_Details.md 2018-02-11 14:35:04 +01:00
Pascal Langer
4a9d295f1a More examples in _MyConfig.h.example 2018-01-30 12:53:00 +01:00
pascallanger
105e0bb7a4
Update Protocols_Details.md 2018-01-30 12:04:47 +01:00
Pascal Langer
ab27ee50b0 Introduction of Banks for the switch protocol selection 2018-01-30 12:02:45 +01:00
Pascal Langer
f4a4f67453 Addition of LED2 for iRangeX modules 2018-01-25 11:07:54 +01:00
Pascal Langer
fb88eebc2f Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-01-24 10:17:27 +01:00
Pascal Langer
6fea0c2a93 Force latest board versions 2018-01-24 10:17:23 +01:00
Ben Lye
301c8da9eb Arduino IDE Board Updates (#142)
* Fix macOS serial upload

* Add verification switch to serial upload scripts

* Fix do_version.bat

Allow parentheses and other special characters in the sketch path

* Fix AVR board linker flags

* Switch to new STM32 dual bootloader

Single bootloader for flash via USB and from TX

* Increment board versions

* Add new board archive files and add new versions to JSON file
2018-01-24 09:07:22 +01:00
Pascal Langer
4facdf0932 FIX OpenTX DSM autodetect 2018-01-22 13:23:11 +01:00
pascallanger
ce489887db
Update Protocols_Details.md 2018-01-20 11:12:11 +01:00
pascallanger
55e30bd4aa
Update Protocols_Details.md 2018-01-20 10:59:17 +01:00
pascallanger
eb0d03d420
Update Protocols_Details.md 2018-01-19 11:36:40 +01:00
Pascal Langer
db1da2d9cf Corona V1 tweaking 2018-01-10 11:25:07 +01:00
Pascal Langer
6fa3b8597f DSM full throw details 2018-01-09 16:17:17 +01:00
pascallanger
c8da89f0d3
Update Protocols_Details.md 2018-01-09 16:06:56 +01:00
pascallanger
c3c89801e9
Update Protocols_Details.md 2018-01-09 16:06:04 +01:00
Pascal Langer
eb3f8b0d91 DSM max throw config 2018-01-09 16:04:04 +01:00
Pascal Langer
d3285f002e Fix Flysky bug.... 2018-01-09 14:31:58 +01:00
Pascal Langer
e81ee38fa5 DSM: match Spektrum standard for servo throw 2018-01-09 11:56:42 +01:00
Ben Lye
499e854275
Move Arduino IDE boards doc to /doc (#139)
* Create Arduino_IDE_Boards.md
* Update README.md
* Update links to Arduino IDE board instructions (#138)
2018-01-09 08:06:17 +00:00
Pascal Langer
cd235bbcde Removed PPM 125% statements 2018-01-09 09:04:55 +01:00
Pascal Langer
984aa3f413 Switch all protocols to use a resolution of 2048
- Change how PPM is handled with a resolution of 2048 and scaled to match serial input range. PPM is now fully scaled for all protocols which was not the case before. If you are using PPM, you might have to adjust the end points depending on the protocols.
 - Change all range conversions to use 2048 where possible
 - Updated all protocols with new range functions
 - Protocols which are taking advantage of 2048 are Assan, FrSky V/D/X, DSM, Devo, WK2x01
 - Renamed AUX xto CHx for code readbility
2018-01-08 19:37:14 +01:00
Pascal Langer
11287cb9c0 Corona bind timing 2018-01-08 10:21:13 +01:00
Pascal Langer
5cc49a8862 A7105 dynamic tuning on channel 15 2018-01-04 14:37:05 +01:00
Pascal Langer
fabda76e98 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2018-01-03 13:05:04 +01:00
Pascal Langer
70db505dd9 New Corona protocol and autobind bug fix 2018-01-03 13:04:58 +01:00
pascallanger
29fd1c800b
Update Compiling.md 2018-01-03 10:19:05 +01:00
Pascal Langer
d70d8f62a4 Frequency tuning page 2018-01-02 22:08:22 +01:00
Pascal Langer
bef562964d Revert "Merge branch 'Pascal' into master"
This reverts commit fc5495b6d1d68177634fcd92932ba44b8e47d91e, reversing
changes made to f3838ae4b0512f0970f6bafa0d5a9e493ffc0c40.
2017-12-30 05:32:43 +01:00
midelic
fc5495b6d1
Merge branch 'Pascal' into master 2017-12-24 20:24:59 +01:00
Pascal Langer
f3838ae4b0 Prepare for release of a stable version 2017-12-20 12:48:53 +01:00
Ben Lye
b3eccf55ba
Multi Module Board Definition Updates (#133) 2017-12-20 11:31:20 +00:00
Pascal Langer
835cc3d0a2 Removed some dependencies to the SPI library 2017-12-19 22:44:20 +01:00
Ben Lye
b49584ec16 Add force tuning setting for CC2500 protocols (#124) 2017-12-19 20:14:49 +01:00
Pascal Langer
334e49c4ca STM32 final timer fix 2017-12-19 14:27:39 +01:00
Pascal Langer
3fc5be111b STM32 fix timer issues 2017-12-18 21:10:21 +01:00
Arne Schwabe
1bc2dd2964 Fix multi status (#132) 2017-12-18 16:45:09 +01:00
Ben Lye
68dcc75949
Roll back to older STM32 core files (#128) 2017-12-17 00:44:29 +00:00
Pascal Langer
dc9f738f30 STM32 timer hack 2017-12-17 01:13:43 +01:00
Ben Lye
4171d2f93b
Fix board definitions version script to handle spaces in the paths (#127) 2017-12-16 19:14:32 +00:00
Arne Schwabe
64fb90960b Fix Sport polling bytes send without multi header and introduce sport polling header for multi (#126) 2017-12-16 09:14:59 +01:00
Pascal Langer
93e277bb0f Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-12-15 17:31:28 +01:00
Pascal Langer
337216efac Fix for STM32 2017-12-15 17:31:25 +01:00
pascallanger
f1f5b68821
Update Troubleshooting.md 2017-12-14 23:08:33 +01:00
pascallanger
8f941e6d12
Update Troubleshooting.md 2017-12-14 23:08:14 +01:00
pascallanger
6a4dcbd6e1
Update Troubleshooting.md 2017-12-13 15:43:28 +01:00
Ben Lye
7e773dfe1b
Doc updates for OrangeRX module (#123) 2017-12-12 20:20:42 +00:00
pascallanger
465ae75ffc
Update Protocols_Details.md 2017-12-12 20:37:54 +01:00
Pascal Langer
8da03940e8 OrangeRX TX modifications 2017-12-12 10:19:50 +01:00
pascallanger
f280779528
Typo 2017-12-12 08:33:07 +01:00
Ben Lye
5c568da125
Board Definition Updates (#121) 2017-12-11 20:55:24 +00:00
Pascal Langer
f46b8366b0 Small mods 2017-12-11 18:49:50 +01:00
Pascal Langer
1d9c052c01 FrSkyX failsafe 2017-12-11 13:33:42 +01:00
Pascal Langer
544927b9b7 Fix typos 2017-12-11 13:00:08 +01:00
Pascal Langer
8b5bb0d358 Fix compilation errors based on config def 2017-12-10 15:41:50 +01:00
Pascal Langer
6031f1e3b8 FrSkyX failsafe 2017-12-10 11:04:03 +01:00
Ben Lye
c297df76ef
Update Compiling_STM32.md
Added IRX4 images and a note about the need to burn the USB bootloader on Banggood modules.
2017-12-10 09:07:54 +00:00
Ben Lye
122e9f4fca
Add IRX4 boot0 image 2017-12-10 09:05:50 +00:00
Ben Lye
748ed01252
Add IRX programmer image 2017-12-10 08:54:44 +00:00
Pascal Langer
56188328fb Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-12-10 09:48:24 +01:00
Pascal Langer
880e463b01 FrSkyX failsafe 2017-12-10 09:48:20 +01:00
Ben Lye
a53046bf12
Update Compiling_STM32.md 2017-12-09 10:20:29 +00:00
Ben Lye
a8050fd8a1
Doc Updates for STM32 (#120)
* Update Compiling_STM32.md
* Add images
2017-12-09 10:12:23 +00:00
Pascal Langer
6ae819e8d5 Failsafe 2017-12-08 19:41:58 +01:00
Pascal Langer
79c73444ab Failsafe 2017-12-07 21:42:23 +01:00
Pascal Langer
8cc1b07456 Failsafe version 2017-12-07 18:16:16 +01:00
Pascal Langer
0d43614ac3 Failsafe 2017-12-07 17:38:06 +01:00
Pascal Langer
19f879da7f Failsafe 2017-12-07 17:28:01 +01:00
Pascal Langer
ed42bf311f Failsafe 2017-12-07 17:14:14 +01:00
Pascal Langer
fd4346cb64 Changed throttle failsafe value format 2017-12-07 17:02:35 +01:00
Pascal Langer
6e458ebd4a Disable _MyConfig by default 2017-12-07 16:06:45 +01:00
Pascal Langer
0f0be60245 remove _MyConfig.h... 2017-12-07 16:04:59 +01:00
Pascal Langer
27783677c2 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-12-07 16:02:21 +01:00
Pascal Langer
4418cab3a5 Failsafe: default for PPM and set on radio for Serial 2017-12-07 16:02:18 +01:00
Ben Lye
b3cddfe2d4 Update Validate.h (#119)
Add `#undef` for new  esky150 and H8_3D protocols if `NRF24L01_INSTALLED` is not defined.
2017-12-07 15:40:59 +01:00
pascallanger
a19ac87a04
Update README.md 2017-12-07 08:57:35 +01:00
pascallanger
3ba951fd91
Update README.md 2017-12-07 08:54:12 +01:00
pascallanger
824f23c3d6
Update Transmitters.md 2017-12-07 08:47:35 +01:00
Ben Lye
fc49a32008
Documentation updates (#118) 2017-12-06 19:58:22 +00:00
Ben Lye
5ca0d31606 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module into benlye-multi-new 2017-12-06 12:47:46 +00:00
Pascal Langer
ebd44d9628 Sport polling fix 2017-12-02 11:54:15 +01:00
Ben Lye
329fa1c2a5 Enable USE_MY_CONFIG 2017-12-01 19:13:32 +00:00
Ben Lye
9a5bf7999b Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-12-01 17:21:41 +00:00
Pascal Langer
7debad6c67 SPORT polling 2017-12-01 17:55:24 +01:00
Pascal Langer
dc9b84ea8b _MyConfig.h 2017-12-01 16:46:42 +01:00
Pascal Langer
199c254838 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-12-01 15:02:29 +01:00
Pascal Langer
7ff482dafe Rates in Bayang and MJXQ 2017-12-01 15:02:24 +01:00
pascallanger
9376019198
Update README.md 2017-12-01 14:19:19 +01:00
Dennis
cec654a75b Update Protocol Details for CABELL protocol (#117)
* Added CABELL Protocol

* Added additional disclaimer to license.

* Revert "Added additional disclaimer to license."

This reverts commit a00bc9956a155a1a73dbbcd21fd19633d6d121ff.

* Added additional disclaimer

* Added CABELL_NRF24L01_INO define to config

* Updated available protocol list

Added CABELL protocol

* Removed unused variables

* Changed changel range to 45 channels that comply with USA FCC part 97 rules.

This change allows licenced HAMs to operate under part 97 rules instead
of part 15.  These channels are still in the ISM band, but overlap with
the part 97 amateur portion of the band.

* Changed protocol number to 33

Was previously 30, but the main branch has now allocated up to 32, so
changing to 33

* Corrected permutation calculation

* Added sub-protocol for setting failsafe values

* Opened up a free bit in the option byte for future use

* Fixed packet errors when trying to unbind when in bind mode

This use case didn't really make any sense, but it should not cause
packet errors, so fixed it.

* RSSI Telemetry for CABELL protocol

* Pins back to stock configuration

* Split checksum into MSB and LSB fields to avoid endian issue

* struct change for checksum

* Added analog values to telemetry packet that could be used for LIPO voltage

* Added MODE_CABELL to frsk_link_frame

* Updated packet layout comments

* Fixed telemetry conditional compiles in CABELL protocol

* Telemetry working; moved power override bit

* Changed telemetry to 250 kbps and adjustable packet period - imporves reliability/range

* Changed CABELL protocol number to 34

* Fixed typos in comments

* Fix ATMEGA BASH_SERIAL buffer overrun

Changed the compare to TXBUFFER_SIZE to >=
If next wasn't set to zero until > TXBUFFER_SIZE then the next time the
routines get called the the array index references outside the buffer
(e.g tail+1)

* Revert "Fix ATMEGA BASH_SERIAL buffer overrun"

This reverts commit ba4526ee89c2b5a946a659eea2c9581c36254809.

* Updated documentation for CABELL V3 Protocol

* Updated Documentation for the CABELL V3 Protocol
2017-12-01 14:13:06 +01:00
midelic
3e004d01ec add files 2017-12-01 05:02:48 +02:00
midelic
21266d0a17
Delete StmMultiUSB.bin 2017-12-01 04:37:46 +02:00
midelic
2b62b8dab3
Delete StmMultiBoot.bin 2017-12-01 04:37:39 +02:00
midelic
b24564ffe9
Add files via upload 2017-12-01 04:35:35 +02:00
midelic
f57d436640
Add files via upload 2017-12-01 04:32:16 +02:00
midelic
762613bd7f
Add files via upload 2017-12-01 04:29:00 +02:00
midelic
e2ed752b51
add BootLoader folder 2017-12-01 04:27:49 +02:00
midelic
2610926f47
Delete StmBoot.ino.generic_stm32f103c.bin 2017-12-01 02:49:11 +02:00
midelic
cf1a74e532
Delete system_stm32f10x.h 2017-12-01 02:48:59 +02:00
midelic
f55b451d9b
Delete stm32f10x_flash.h 2017-12-01 02:48:52 +02:00
midelic
ae51e389ca
Delete stm32f10x_flash.cpp 2017-12-01 02:48:41 +02:00
midelic
6f71ef1d03
Delete stm32f10x.h 2017-12-01 02:48:30 +02:00
midelic
94a9e4db05
Delete stk500.h 2017-12-01 02:48:16 +02:00
midelic
82dc0c4f32
Delete how to use.txt 2017-12-01 02:48:07 +02:00
midelic
bb5827629e
Delete core_cm3.h 2017-12-01 02:47:58 +02:00
midelic
76f7cb7126
Delete StmBoot.ino 2017-12-01 02:47:47 +02:00
midelic
d5005323d4
Delete README.md 2017-12-01 02:47:31 +02:00
midelic
9bc1a9963f
Delete package_MULTI_index.json 2017-12-01 02:47:06 +02:00
midelic
cefbf2ee70
Delete package_MULTI2_index.json 2017-12-01 02:46:19 +02:00
Pascal Langer
e10dc6dcec Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-30 20:12:27 +01:00
Pascal Langer
e4f4d278a8 Hubsan protocol
Added subprotocol H107 (0)
Added subprotocol H301 (1)
Added subprotocol H501 (2)
2017-11-30 20:12:23 +01:00
Ben Lye
3dd9df558e Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-11-30 13:07:38 +00:00
pascallanger
87c2216d0f
Update Advanced_Topics.md 2017-11-30 14:01:37 +01:00
pascallanger
8cd5ff6bd6
Update Advanced_Topics.md 2017-11-30 14:00:44 +01:00
Pascal Langer
28868e4c78 _MyConfig.h 2017-11-30 13:00:10 +01:00
Pascal Langer
01bef23ac9 CG023 & H8_3D protocols
- Removed sub_protcol H8_3D under protocol CG023
 - Added protocol H8_3D (36)
 - Added sub_protocols H8_3D/H8_3D (0)
 - Added sub_protocols H8_3D/H20H (1)
 - Added sub_protocols H8_3D/H20Mini (2)
 - Added sub_protocols H8_3D/H30Mini (3)
2017-11-29 14:13:12 +01:00
pascallanger
9379bd1792
Update Compiling_STM32.md 2017-11-29 10:30:11 +01:00
Ben Lye
63a479b6b6
Update Compiling_STM32.md
Fix typos and links
2017-11-28 22:19:26 +00:00
Ben Lye
49b0d92c75 Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-11-28 21:44:07 +00:00
Ben Lye
277402a25d
Update STM32 documentation for Boards Definition (#116)
Updating the compiling for STM32 documentation to take advantage of the boards definition.
2017-11-28 20:56:42 +00:00
Pascal Langer
cc83177542 Protocol DM002: add 1 more TX ID/RF set
Total of 3 known TX IDs & RFs sets.
2017-11-28 17:24:24 +01:00
Pascal Langer
5a342cf8e6 Protocol Bayang: new subprotocol IRDRONE
Protocol Bayang (14)
new subprotocol IRDRONE (3)
2017-11-28 17:17:02 +01:00
Ben Lye
7d5dabde82 Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-11-28 14:17:03 +00:00
pascallanger
e3917226cc
Merge pull request #115 from benlye/flash-method-warning
Warn if CHECK_FOR_BOOTLOADER is enabled but a NO_BOOT board is selected
2017-11-28 13:58:47 +01:00
Ben Lye
4e3c1edd52 Add error if CHECK_FOR_BOOTLOADER is not enabled but 'Flash from TX' is
Error rather than silently enabling CHECK_FOR_BOOTLOADER.
2017-11-28 10:13:52 +00:00
Ben Lye
e52b7ea7ff Warn if CHECK_FOR_BOOTLOADER is enabled but a NO_BOOT board is selected
Rather than silently disabling CHECK_FOR_BOOTLOADER  lets throw an error
prompting the user to make the correct selection.
2017-11-28 09:21:03 +00:00
pascallanger
6f60d87f85
Corrected files url 2017-11-28 08:56:08 +01:00
pascallanger
049db615e3
Merge pull request #114 from benlye/stm32-board-1
Initial check-in for STM32 board
2017-11-28 08:40:32 +01:00
Ben Lye
e557155b17 Initial check-in for STM32 board 2017-11-27 21:19:49 +00:00
Pascal Langer
9bf5b0c9a7 ESKY 150: new protocol
New protocol number 35
No sub protocols
option=0->4 channels, option=1->7 channels
2017-11-27 11:20:57 +01:00
Pascal Langer
ea860f24a1 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-26 22:07:37 +01:00
Pascal Langer
5e89d49bd9 Serial debug 2017-11-26 22:07:34 +01:00
pascallanger
cb1ba0e00c
Update Compiling_STM32.md 2017-11-26 21:51:40 +01:00
pascallanger
0f965b6800
Update Compiling_STM32.md 2017-11-26 21:49:29 +01:00
pascallanger
486c2170cd
Update Compiling_STM32.md 2017-11-26 21:49:02 +01:00
pascallanger
83641a4f54
Update Compiling_STM32.md 2017-11-26 21:45:17 +01:00
Pascal Langer
5cb2326ea7 Using Serial for debug 2017-11-26 20:58:36 +01:00
Pascal Langer
84d7986353 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-26 20:38:38 +01:00
Pascal Langer
a3c2628359 Replaced debug serial routines 2017-11-26 20:38:30 +01:00
pascallanger
8ae34bdd9d
Update Compiling_STM32.md 2017-11-26 20:30:54 +01:00
Ben Lye
4a9374936d Re-enable MJXQ 2017-11-26 15:00:58 +00:00
Pascal Langer
110378e3b4 Cabell protocol change 2017-11-26 15:36:33 +01:00
Ben Lye
bd60feff60 Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-11-26 12:45:20 +00:00
Pascal Langer
2181d0b33c Final bit bashing fix? 2017-11-26 08:41:55 +01:00
Ben Lye
2afa7ea691
Merge pull request #112 from benlye/update-avr-board
Update Atmega328 board definition
2017-11-25 22:00:20 +00:00
Ben Lye
d0f76117cd Update Atmega328 board definition
- Tweak to AVR board menu entry
- Exported binary will be named 'multifw.hex'
- Updated zip and JSON files
2017-11-25 21:58:57 +00:00
Ben Lye
e25060a16e
Update Compiling.md
Made it clear that burning bootloader etc. isn't needed after the first upload.
2017-11-25 21:30:33 +00:00
Ben Lye
5e6da326f6
Merge pull request #111 from pascallanger/benlye-doc-updates-1
Documentation updates
2017-11-25 20:52:42 +00:00
Ben Lye
981a8f8d2c
Create Flash_from_Tx.md 2017-11-25 20:50:25 +00:00
Ben Lye
5c7e592e1e
Update Compiling.md 2017-11-25 20:49:09 +00:00
Pascal Langer
2a25f76b56 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-25 09:32:03 +01:00
Pascal Langer
41d579dc23 Invert serial atmega bug correction 2017-11-25 09:32:00 +01:00
Pascal Langer
7d41017850 Updates
Implemented debug output on uart1 for stm32
Replaced hardcoded eeprom offsets with documented constats
Fixed a bug affecting telemetry on Atmega328p using the invert_telemetry flag.
2017-11-24 23:01:47 +01:00
pascallanger
daeba0d43a
Update Compiling_STM32.md 2017-11-24 19:50:36 +01:00
Pascal Langer
24fd5ba361 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-24 13:39:54 +01:00
Pascal Langer
3353637c8f S-FHSS update 2017-11-24 13:39:50 +01:00
pascallanger
9601e6942d
Merge pull request #91 from ScottJD/patch-1
Update BOM_DIY_STM32 & Schematic.md
2017-11-23 19:27:21 +01:00
pascallanger
4b32a93f27
Update Protocols_Details.md 2017-11-23 18:49:21 +01:00
Pascal Langer
9e8978166e New CABELL protocol
Protocol number: 34
sub_protocols:
0 CABELL_V3
1 CABELL_V3_TELEMETRY
6 CABELL_SET_FAIL_SAFE
7 CABELL_UNBIND
2017-11-23 18:44:31 +01:00
Pascal Langer
6bf873f4db timing 2017-11-23 15:53:15 +01:00
Pascal Langer
1318f1a29b S-FHSS failsafe again... 2017-11-23 15:51:07 +01:00
Pascal Langer
d9282ac750 Boards correction 2017-11-22 18:04:40 +01:00
Pascal Langer
205d728798 S-FHSS Failsafe: SFHSS_FAILSAFE_THROTTLE 2017-11-22 15:21:36 +01:00
Pascal Langer
bd9c772a52 S-FHSS: fix failsafe 2017-11-22 14:51:45 +01:00
Pascal Langer
76e9002995 S-FHSS failsafe 2017-11-22 13:56:42 +01:00
Ben Lye
e990d44bb6 Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-11-22 08:04:38 +00:00
pascallanger
2ffa2d7b73
Update Protocols_Details.md 2017-11-21 22:03:28 +01:00
pascallanger
0e4583f8e2
Update Protocols_Details.md 2017-11-21 21:47:08 +01:00
Pascal Langer
3802722bb1 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-21 21:45:12 +01:00
Pascal Langer
41f0a712fd S-FHSS improvements 2017-11-21 21:45:03 +01:00
pascallanger
4633c37380
Update Models.md 2017-11-21 17:22:20 +01:00
Ben Lye
b779becf8c Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new 2017-11-20 21:54:49 +00:00
Pascal Langer
35089febab SFHSS subprotocols 2017-11-20 22:02:14 +01:00
Pascal Langer
a95fd1e1d8 SFHSS sub protocols 2017-11-20 21:58:01 +01:00
Pascal Langer
6535f64699 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-20 19:12:40 +01:00
Pascal Langer
b15a5d4a45 Flysky and Assan output map 2017-11-20 19:12:37 +01:00
pascallanger
65a5c37ffb
Update Compiling_STM32.md 2017-11-20 18:26:46 +01:00
Pascal Langer
6cf58c032c Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-11-20 18:24:31 +01:00
Pascal Langer
e0365df6dd StmMultiUSB bootloader 2017-11-20 18:24:28 +01:00
Ben Lye
40ae0c7257 Add my configuration 2017-11-20 16:34:57 +00:00
pascallanger
aecd4c5266
Update Compiling_STM32.md 2017-11-20 17:18:48 +01:00
Pascal Langer
113caf4970 AVR Boards: auto bootloader setting 2017-11-20 17:04:38 +01:00
Pascal Langer
da2d57c8e9 AVR Boards 2017-11-20 16:52:30 +01:00
Pascal Langer
3aed8b8479 json 2017-11-20 16:27:23 +01:00
pascallanger
ff58a826b1
Delete package_multi_4in1_board_v1.0.0.zip 2017-11-20 16:21:38 +01:00
pascallanger
9a0873e404
Update package_multi_4in1_board_index.json 2017-11-20 16:18:41 +01:00
pascallanger
7d9133793c
Update package_multi_4in1_board_index.json 2017-11-20 16:08:23 +01:00
pascallanger
f43d9883cf
Update package_multi_4in1_board_index.json 2017-11-20 16:07:02 +01:00
pascallanger
067842818e
Update README.md 2017-11-20 16:04:56 +01:00
Pascal Langer
8ea70a1b77 Tons of updates 2017-11-20 16:01:12 +01:00
pascallanger
47207dcead
Delete Compiling_STM32.md 2017-11-20 15:58:19 +01:00
pascallanger
235876a4d8
Delete Models.md 2017-11-20 15:58:06 +01:00
pascallanger
af88abb13f
Delete FrSkyX_cc2500.ino 2017-11-20 15:53:00 +01:00
midelic
f13701b120 SymaX impove rates in headless mode. 2017-11-14 12:15:08 +02:00
midelic
5f7c598a34
fix compile error for avr module when commented FrSkyX protocol 2017-11-06 17:45:14 +01:00
midelic
defd354286
Fix AFHDS2A failsafe problem 2017-11-04 20:43:56 +01:00
midelic
f9e6b30550
Fix AFHDS2A failsafe problem 2017-11-04 20:40:20 +01:00
midelic
d451af365a
Fix telemetry FrSkyX protocol 2017-11-04 17:14:29 +01:00
midelic
57a78535f2 updated version number 2017-10-20 17:06:45 +01:00
midelic
f824ecb7f9 update Compiling_STM32 doc_3 2017-08-04 17:50:04 +03:00
midelic
98f848138d Updated Compiling_STM32 doc_2 2017-08-03 22:45:15 +03:00
midelic
200a1dc3da updated Compiling_STM32 doc 2017-08-03 22:04:29 +03:00
midelic
507e1d2b50 Updated Compiling_STM32 with flashing with TX method 2017-08-03 21:58:56 +03:00
midelic
0f752e2571 Add STM32 bootloader files_2 2017-08-03 18:55:04 +03:00
midelic
ca6cd65d46 Revert "Revert "Add STM32 bootloader files""
This reverts commit ddc287a84ec8e303cf68b56d20769286f6b9dead.
2017-08-03 18:41:06 +03:00
midelic
ddc287a84e Revert "Add STM32 bootloader files"
This reverts commit c92ec031ae8f3407fca520daee50d428c60659e7.
2017-08-03 18:40:03 +03:00
midelic
c92ec031ae Add STM32 bootloader files 2017-08-03 18:39:21 +03:00
midelic
ef2d4d6b12 Add flashing with TX for STM32_board 2017-07-31 22:21:41 +03:00
midelic
2753f6c4e5 added Mike Blandord modifications
- used bootloader to flash multi-module with TX
-updated  FrslyX protocol telemetry sequence
2017-07-28 23:39:51 +03:00
midelic
021577d638 Merge pull request #6 from pascallanger/master
sync main branch
2017-07-26 13:57:09 +03:00
pascallanger
dd3f8b4717 Merge pull request #92 from hexfet/frskyx_seq
Improve FrskyX extended telemetry error recovery
2017-07-23 10:07:08 +02:00
hexfet
a1fb4a0ac5 Revert terminating newline. 2017-07-22 22:41:34 -04:00
hexfet
ebf0c4fae6 Change spaces to tabs. 2017-07-22 22:39:26 -04:00
hexfet
44a086a27b Revert terminating newline. 2017-07-22 22:35:43 -04:00
hexfet
4624075112 Update sequence number logic to send invalid sequence indicator when invalid sequence detected. Works to resync telemetry stream as tested with EU firmware version. 2017-07-22 22:07:42 -04:00
midelic
97a3c8dca1 added more info on flashing USB module. 2017-07-01 15:52:34 +01:00
ScottJD
c50b5d93d7 Update BOM_DIY_STM32 & Schematic.md
Added Digi-Key shared carts for latest build BOM. 
Need to confirm if SV202,SV203, and SV204 each need a strip of 40 header pins for a total of 120 pins as currently since each S1011EC-40-ND part has 40  pins?
2017-06-27 17:58:43 -04:00
midelic
08f9176f3f Update Compiling_STM32.md 2017-06-27 13:00:38 +01:00
midelic
f95ca6eac6 info on compiling firmware for USB version 2017-06-27 11:42:32 +01:00
pascallanger
34165c0d90 Merge pull request #88 from LapinFou/patch-1
Fixed broken link
2017-06-16 14:26:38 +02:00
pascallanger
1f87cf09d7 Merge pull request #89 from LapinFou/patch-2
Fixed broken link
2017-06-16 14:26:20 +02:00
Sebastien Charpentier
005c7b9cb0 Typo 2017-06-16 14:25:32 +02:00
Sebastien Charpentier
2b265bd1de Fixed broken link
Fixed broken link. Bad idea to use space and ampersand... ;)
2017-06-16 14:24:33 +02:00
Sebastien Charpentier
3e83216384 Fixed broken link
A extra space was breaking the link to the Hardware.md file.
2017-06-16 14:01:20 +02:00
pascallanger
a9889b5b79 Merge pull request #84 from schwabe/patch-5
Remove paragraph resulting from the 125% bug in earlier OpenTX versions
2017-05-02 18:03:24 +02:00
Arne Schwabe
2aa5b7917f Remove paragraph resulting from the 125% bug in earlier OpenTX versions 2017-05-02 17:28:49 +02:00
midelic
040354501c Merge pull request #5 from pascallanger/master
sync with base
2017-04-24 20:23:02 +01:00
pascallanger
bd46f6d25f Merge pull request #83 from LapinFou/master
More fixes in the documentation.
2017-04-20 13:46:37 +02:00
Sebastien Charpentier
7e801269af Update Protocol_Details_old.md
Fixed MarkDown.
2017-04-19 21:24:42 +02:00
Sebastien Charpentier
2586e2e661 Update Documentation_To_Do_List.md
Fixed MarkDown
2017-04-19 21:19:57 +02:00
Sebastien Charpentier
fb2a5c2378 Update Tx-erSky9X.md
Fixed MarkDown and broken links.
2017-04-19 21:16:36 +02:00
Sebastien Charpentier
f490fa6e7d Update Tx-FlyskyTH9X.md
Fixed broken link & MarkDown sections.
2017-04-19 21:14:41 +02:00
Sebastien Charpentier
df347be672 Update Bind_Timing.md
MarkDown correction.
2017-04-19 21:10:19 +02:00
Sebastien Charpentier
4e518bf70c Update Tx-Taranis.md
Corrected explanation.
2017-04-19 21:09:29 +02:00
Sebastien Charpentier
29e90246d2 Update Tx-Taranis.md
Fixed list and pictures alignment.
2017-04-19 21:07:14 +02:00
Sebastien Charpentier
1e62c0d836 Update Compiling.md
Fixed broken link.
2017-04-19 21:00:06 +02:00
pascallanger
278ebf4ff2 Merge pull request #81 from LapinFou/master
Align pictures in Compiling.md
2017-04-19 15:21:01 +02:00
Sebastien Charpentier
edc58a3496 Update Compiling.md
Align pictures int section **Connect the programmer**
2017-04-19 15:17:11 +02:00
pascallanger
7c96862b19 Merge pull request #80 from LapinFou/master
Few more corrections.
2017-04-19 15:11:18 +02:00
Sebastien Charpentier
11b18f7468 Update Troubleshooting.md
Cosmetic amelioration.
2017-04-19 15:08:36 +02:00
Sebastien Charpentier
86787b6099 Update README.md
Change formatting of **_Config.h**
2017-04-19 15:04:32 +02:00
Sebastien Charpentier
12645c19aa Update Compiling_STM32.md
Cosmetic fix.
2017-04-19 15:01:24 +02:00
Sebastien Charpentier
7e06a57fd9 Update Compiling_STM32.md
Cosmetic fix.
2017-04-19 15:00:19 +02:00
Sebastien Charpentier
4d7c31cfa1 Update Compiling.md
Fixed **Boards.txt** alignment.
Fixed **On Mac OSX** section.
2017-04-19 14:56:48 +02:00
Sebastien Charpentier
f5e4fc5a3d Update README.md
Correct typo.
2017-04-19 14:51:49 +02:00
Sebastien Charpentier
1c4174431e Update README-old.md
Fixed broken links.
2017-04-19 14:48:46 +02:00
Sebastien Charpentier
60d4f2d6c7 Update PPM_Setup.md
Fixed Markdown.
Fixed link.
2017-04-19 14:44:38 +02:00
pascallanger
5a30a96c0c Merge pull request #79 from LapinFou/master
More fixes
2017-04-19 13:27:51 +02:00
Sebastien Charpentier
09b454ba6a Update Module_Build_yourself_PCB.md
Relative path is better.
2017-04-19 12:07:53 +02:00
Sebastien Charpentier
8ea06e84a6 Update Module_Build_yourself_PCB.md 2017-04-19 12:06:26 +02:00
Sebastien Charpentier
ebaf56d964 Update Advanced_Manually_Setting_ATmega328_Fuses.md
Changed hard-coded links to relative links.
2017-04-19 11:59:16 +02:00
Sebastien Charpentier
517d2bb1ec Update Advanced_ATmega_Serial_Uploader.md 2017-04-19 11:45:57 +02:00
Sebastien Charpentier
706d43ee41 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-04-19 11:45:00 +02:00
Sebastien Charpentier
e537d27e28 Update Compiling_STM32.md
Fixed **Prepare the Arduino IDE:** section.
2017-04-19 11:40:28 +02:00
Sebastien Charpentier
948f28b0af Update Compiling.md
Fixed **On Windows** section.
2017-04-19 11:34:20 +02:00
Sebastien Charpentier
70f7c6a25e Update Compiling.md 2017-04-19 11:33:14 +02:00
Sebastien Charpentier
a0a0cd4f57 Update Compiling.md 2017-04-19 11:32:19 +02:00
Sebastien Charpentier
dfa120339c Update BOM_DIY_STM32 & Schematic.md 2017-04-19 11:30:21 +02:00
Sebastien Charpentier
36f194b9bd Update BOM_DIY_ATmega.md
Fixed **BOM for the DIY STM32** link.
2017-04-19 11:29:54 +02:00
Sebastien Charpentier
12dd851fc3 Update BOM_DIY_ATmega.md 2017-04-19 11:16:07 +02:00
Sebastien Charpentier
cc9a5893de Update BOM_DIY_ATmega.md 2017-04-19 11:15:17 +02:00
Sebastien Charpentier
9d2ac3f2c4 Update README-old.md
Fixed Markdown.
2017-04-19 11:13:33 +02:00
pascallanger
9cda61de3d Merge pull request #78 from LapinFou/LapinFou/FixMarkdownTypo
Fixed markdown typo
2017-04-19 11:04:22 +02:00
Sebastien Charpentier
060d93d68b Merge pull request #1 from LapinFou/LapinFou/FixMarkdownTypo
Fix Markdown typo
2017-04-19 10:58:17 +02:00
Sebastien Charpentier
8d1e8c6699 Merge branch 'master' into LapinFou/FixMarkdownTypo 2017-04-19 10:52:32 +02:00
Sebastien Charpentier
f4865c5206 Update Hardware.md
Highlighted the "more information when clicking on the pictures".
2017-04-19 10:46:53 +02:00
Sebastien Charpentier
2d44c89149 Update Models.md
Fixed **CH6 and CH7** section.
2017-04-19 10:43:59 +02:00
Sebastien Charpentier
c2050d4314 Update Compiling_STM32.md 2017-04-19 10:41:32 +02:00
Sebastien Charpentier
7991605106 Update Compiling_STM32.md 2017-04-19 10:39:45 +02:00
LapinFou
adeea85c9a Cosmetic. 2017-04-19 10:12:01 +02:00
Sebastien Charpentier
c32e390184 Update Compiling.md 2017-04-19 10:07:28 +02:00
LapinFou
154f61fb11 Fixed "Material you need to upload the firmware" section. 2017-04-19 09:56:08 +02:00
LapinFou
b08bcf041b Fixed compiling page. 2017-04-19 09:53:15 +02:00
LapinFou
e51f6e1e86 More corrections. 2017-04-18 20:37:40 +02:00
LapinFou
62e2a0211f Fix categories. 2017-04-18 20:20:27 +02:00
LapinFou
5286e7f89c Typo. 2017-04-18 20:19:35 +02:00
LapinFou
e81ba55967 Test image 2017-04-18 20:12:08 +02:00
LapinFou
25a2689bd0 Test image 2017-04-18 18:42:03 +02:00
LapinFou
c949eb5491 Test image 2017-04-18 18:40:02 +02:00
LapinFou
709c5cbd71 Typo !! 2017-04-18 18:34:55 +02:00
LapinFou
3ac59a5bc0 Typo again... =) 2017-04-18 18:32:49 +02:00
LapinFou
6894228a63 Fixed typo. 2017-04-18 18:28:18 +02:00
LapinFou
a7b914b84e Fixed more typos. 2017-04-18 18:24:20 +02:00
LapinFou
84922e84a3 Fixed Markdown typos. 2017-04-18 18:09:50 +02:00
LapinFou
7ee0b2b0a3 Try to fix again the table. 2017-04-18 17:52:12 +02:00
LapinFou
5c06a241ac Try to fix table. 2017-04-18 17:48:04 +02:00
LapinFou
0cb0128caf Test 2017-04-18 17:46:11 +02:00
midelic
8661b8074c added useful info regarding compiling 2017-04-18 16:22:33 +01:00
midelic
fa52a1a81e fix sintax errors 2017-04-18 16:05:52 +01:00
pascallanger
680fa7a350 Merge pull request #74 from schwabe/patch-4
DSM: Remove special bind stick positions
2017-04-14 12:37:49 +02:00
Arne Schwabe
3850ce88d3 DSM: Remove special bind stick positionsD
Spektrum own remotes transmit normal values during bind and actually use this (e.g. Nano CP X) to select the transmitter mode (e.g. computer vs non-computer radio, so always end normal output
2017-04-12 16:10:18 +02:00
pascallanger
a800f1efc7 Merge pull request #73 from John-RB/master
Missing comma in STM32 V1.1 BOM
2017-04-10 18:28:18 +02:00
John-RB
514bbbe8a3 Missing comma in STM32 V1.1 BOM 2017-04-10 09:44:51 -04:00
pascallanger
700b922350 Fix AFHDS2A power issue 2017-04-10 11:33:26 +02:00
pascallanger
bdfeeb9a41 Fix STM32 issue and OrangeTX compilation 2017-04-10 11:24:21 +02:00
pascallanger
2b80d1a6d8 Merge pull request #70 from John-RB/master
Add V1.1 design to STM32 BOM
2017-04-10 11:07:05 +02:00
John-RB
fa6f2061e7 Add V1.1 design to BOM 2017-04-09 11:48:44 -04:00
John-RB
ff5f12e4d2 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	docs/BOM_DIY_STM32 & Schematic.md
2017-04-09 11:45:47 -04:00
midelic
9ad6e8142d Update BOM_DIY_STM32 & Schematic.md 2017-04-08 20:37:18 +01:00
midelic
49e3534738 Add PCB _STM32_USB_V1.1 board files 2017-04-08 20:27:45 +01:00
John-RB
4cb7ba83e9 Add V1.1 design to BOM 2017-04-07 11:17:51 -04:00
midelic
9282828ffc Add updated multi_STM32 board V1.1 2017-04-03 08:16:14 +01:00
pascallanger
2f2a2d4bee Merge pull request #66 from schwabe/patch-2
Fix formatting and add companion screen
2017-03-31 19:29:09 +02:00
Arne Schwabe
b904e6a889 Highlight the option in the screenshot 2017-03-31 16:33:56 +02:00
Arne Schwabe
804d5723c2 Add image 2017-03-31 16:09:24 +02:00
Arne Schwabe
681e3a6865 Fix formatting, add multimodule companion option 2017-03-31 16:07:28 +02:00
midelic
dd75c56404 typo error fix/cosmetics 2017-03-31 14:14:08 +01:00
pascallanger
86cee1e339 Merge pull request #62 from spectrenoir06/patch-1
fix markdown in Transmitters.md
2017-03-28 09:18:42 +02:00
Spectre
063edc032a Update Transmitters.md 2017-03-27 15:59:38 +02:00
pascallanger
32c59cb583 DM002 2017-03-23 20:48:34 +01:00
pascallanger
0242f88d26 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-03-23 18:05:06 +01:00
pascallanger
940a89fa38 DM002: 2 TX ID/RF & features addition 2017-03-23 18:05:00 +01:00
pascallanger
364a66ad0b Update Protocols_Details.md 2017-03-23 18:03:43 +01:00
pascallanger
f714315b0d DM002 update 2017-03-23 18:03:11 +01:00
pascallanger
ed83471a13 Update Protocols_Details.md 2017-03-22 16:45:54 +01:00
pascallanger
1263aa7884 Update Protocols_Details.md 2017-03-22 16:41:51 +01:00
pascallanger
c21afc3f8a Update Protocols_Details.md 2017-03-22 16:36:51 +01:00
pascallanger
59af0594dc DM002: correct channels 2017-03-22 16:17:12 +01:00
pascallanger
8cf6d4f7d8 add DM002 2017-03-22 14:58:59 +01:00
pascallanger
61ceeb44fb Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-03-22 14:56:00 +01:00
pascallanger
995bb921c1 DM002 protocol
protocol number 33
sub_protocol none=0
ch5=flip
ch6=led
ch7=headless
2017-03-22 14:55:55 +01:00
pascallanger
e7cab78aad Update package_MULTI_index.json 2017-03-07 22:48:07 +01:00
pascallanger
1c06bd45ef Update package_MULTI_index.json 2017-03-07 22:46:43 +01:00
pascallanger
85a3e112e0 Update package_MULTI_index.json 2017-03-07 22:41:39 +01:00
pascallanger
9c5e054dda Boards 2017-03-07 22:25:41 +01:00
pascallanger
86932e6da4 Update BOM_DIY_STM32 & Schematic.md 2017-03-05 21:09:30 +01:00
pascallanger
5f94fdfc93 Update BOM_DIY_STM32 & Schematic.md 2017-03-05 21:08:29 +01:00
midelic
74584dd39e Add eagle CAD files for Multi_STM32_V0.1 2017-03-04 23:00:53 +02:00
pascallanger
18ed5d51a9 STM32 BOM: capacitor polarity added on silkscreen 2017-02-28 13:25:04 +01:00
pascallanger
d7076f5295 PPM: add MIN_PPM_CHANNELS and MAX_PPM_CHANNELS 2017-02-28 10:36:35 +01:00
pascallanger
29a5397491 SLT: revert to previous version 2017-02-28 10:33:43 +01:00
pascallanger
47a4261631 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-02-24 20:22:33 +01:00
pascallanger
a3927218a6 Futaba middle value 1520 2017-02-24 20:22:28 +01:00
midelic
7d846a3d0d Update BOM_DIY_STM32 & Schematic.md 2017-02-24 18:09:56 +01:00
pascallanger
8db1f6d1e2 Update Module_Build_yourself_PCB.md 2017-02-24 17:29:53 +01:00
pascallanger
9cb679d545 Update BOM_DIY_STM32 & Schematic.md 2017-02-24 17:17:36 +01:00
pascallanger
006d705cbd v0.1 schematic 2017-02-24 17:16:12 +01:00
pascallanger
a19a14665f GW008 Autobind protocol 2017-02-24 13:41:32 +01:00
pascallanger
55bc6f9a00 FrSkyX telemetry RSSI and LQi 2017-02-24 13:27:19 +01:00
pascallanger
997d31addd FrSkyX add telemetry TX_RSSI, RX_LQI, TX_LQI 2017-02-24 11:48:25 +01:00
pascallanger
548390b0d7 GW008 protocol addition
Protocol number: 32
No sub_protocol
2017-02-24 11:00:10 +01:00
pascallanger
bd64bdedc3 GW008 protocol 2017-02-24 10:57:53 +01:00
pascallanger
846e09c7cb Disable low power by default 2017-02-23 11:23:25 +01:00
pascallanger
2ba3552578 AFHDS2A: prevent TX inbound swamping during bind 2017-02-23 10:07:09 +01:00
pascallanger
943bb6d15b SFHSS reverse channels direction 2017-02-23 09:15:12 +01:00
pascallanger
af53e75ae4 Update Protocols_Details.md 2017-02-23 09:13:45 +01:00
pascallanger
14ca63571d Fix OrangeTX compilation 2017-02-21 14:20:25 +01:00
pascallanger
10c5ce68f5 Update Protocols_Details.md 2017-02-21 01:03:58 +01:00
pascallanger
d9fb856eb8 Fix Multi OrangeTX build 2017-02-21 00:29:48 +01:00
pascallanger
f5c08158cb Update Compiling.md 2017-02-20 23:26:43 +01:00
pascallanger
9ee0311ea9 FrSkyD compilation issue without telemetry 2017-02-11 11:40:40 +01:00
pascallanger
69ed2d2428 Update Troubleshooting.md 2017-02-10 17:40:47 +01:00
pascallanger
0c5fae01b5 WAIT_FOR_BIND feature
This feature will not activate the selected protocol unless a bind is
requested using bind from channel or the GUI "Bind" button. It is only
enabled if bind from channel and autobind are set since I think they are
working well together.
The goal is to prevent binding other people's model when powering up the
TX, changing model or scanning through protocols.
There is a new blinking pattern associated to it as well as a new status
"Waiting for bind".
This feature is enabled by default in _config.h .
2017-02-10 17:38:07 +01:00
pascallanger
72052925a6 Update Compiling.md 2017-02-10 15:59:47 +01:00
pascallanger
dc2d02bf32 Update Compiling_STM32.md 2017-02-10 15:59:19 +01:00
pascallanger
ee267ea086 Update Compiling_STM32.md 2017-02-10 13:32:53 +01:00
pascallanger
1e730f3376 Update Compiling_STM32.md 2017-02-09 10:24:27 +01:00
pascallanger
c230c52af6 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-02-08 22:42:44 +01:00
pascallanger
219beb4a0e Fix Multi_status bind flag when invalid protocol selected 2017-02-08 22:42:39 +01:00
pascallanger
c4807c44f3 Add protocol/sub_protocol numbers 2017-02-08 12:26:35 +01:00
pascallanger
7dafd14644 Merge pull request #49 from John-RB/master
BOM_DIY_STM32 & Schematic
2017-02-07 17:59:24 +01:00
John-RB
57c3e8c51d BOM_DIY_STM32 & Schematic
Correct Reference ID and Part Number Red LED
2017-02-07 11:55:19 -05:00
midelic
da71eca978 Update Compiling_STM32.md 2017-02-07 17:37:23 +01:00
midelic
7a47af14be Update Compiling_STM32.md 2017-02-07 17:31:18 +01:00
midelic
f67adc53ab Update Compiling_STM32.md 2017-02-07 17:18:54 +01:00
pascallanger
68e9948493 . 2017-02-07 12:09:13 +01:00
pascallanger
894416c719 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-02-07 12:08:57 +01:00
pascallanger
11650450c8 Chip select based on pin definition 2017-02-07 12:08:11 +01:00
midelic
6973d85b10 info STM32 support in arduino IDE 2017-02-07 09:11:01 +01:00
pascallanger
bf5598515e Removed board option in _config.h 2017-02-06 21:51:03 +01:00
midelic
cc03c27d17 info regarding flashing multiSTM32 via USB port 2017-02-06 19:54:09 +01:00
pascallanger
9cd729df71 Update Module_BG_4-in-1.md 2017-02-06 19:06:28 +01:00
pascallanger
d6ee9fbfac Update Module_BG_4-in-1.md 2017-02-06 19:05:02 +01:00
pascallanger
b6999f5c67 Update Hardware.md 2017-02-06 19:03:49 +01:00
pascallanger
c02f273d57 New feature: end bind
This new feature is available:
- in serial mode and when binding from the GUI. As soon as the Bind
window is closed = serial bind bit was set and cleared, the current bind
operation will be terminated.
- if the bind was initiated from the Bind on channel feature (bind
channel goes high) then as soon as the bind channel goes low the current
bind operation will be terminated.
Tested on ersky9x which does open a bind window, not sure about
OpenTX...

Some protocols (Hubsan, Assan, FY326, Shenqi...) which are waiting for
model/RX to reply will stay in bind mode.
2017-02-06 18:46:34 +01:00
pascallanger
8d87bfb4a3 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-02-06 15:50:48 +01:00
pascallanger
0a7cd3d6e9 Reset invert serial when switching protocol 2017-02-06 15:50:43 +01:00
pascallanger
235699b3b9 Update README.md 2017-02-06 15:40:48 +01:00
pascallanger
1aebfbecc1 Update Hardware.md 2017-02-06 15:37:14 +01:00
pascallanger
00e47b9afb MultiOrange: add Walkera protocol 2017-02-06 10:39:58 +01:00
pascallanger
68b94cfcaa FrSkyD small change 2017-02-06 10:32:15 +01:00
pascallanger
0068f21a2d MultiOrange build fix 2017-02-06 10:32:15 +01:00
pascallanger
7a7e639490 Update BOM_DIY_STM32 & Schematic.md 2017-02-06 10:26:25 +01:00
pascallanger
81bae1441e Update BOM_DIY_STM32 & Schematic.md 2017-02-06 10:25:11 +01:00
pascallanger
3516e5ae8a FrSkyD telemetry fix 2017-02-04 10:11:25 +01:00
pascallanger
04bbe3187f FrSky telemetry 2017-02-03 22:02:35 +01:00
pascallanger
877cdec4ea Config.h 2017-02-03 21:08:10 +01:00
pascallanger
21ab94c512 FrSkyD and X telemetry 2017-02-03 21:06:21 +01:00
pascallanger
70f52afb3d Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-02-03 16:49:23 +01:00
pascallanger
85f4dbd670 FrSkyD telemetry and serial TX buffer 2017-02-03 16:49:19 +01:00
pascallanger
bee70e67bc Merge pull request #46 from John-RB/master
STM32 BOM Updates
2017-02-02 22:06:27 +01:00
John-RB
7e137f17a5 STM32 BOM Updates
V1.0t BOM
- Separate line and Part number for each LED
- Dual Input-XOR Part Number with proper part footprint.
V0.8 BOM
- Quantity for Diode
- Separate line and Part number for each LED
- Dual Input-XOR Part Number with proper part footprint.
First Version BOM
- Part number for Red LED
- Dual Input-XOR Part Number with proper part footprint.
2017-02-02 15:10:10 -05:00
John-RB
c576f62ca3 V1.0t BOM
- Separate line and Part number for each LED
- Dual Input-XOR Part Number with proper part footprint.
V0.8 BOM
- Quantity for Diode
- Separate line and Part number for each LED
- Dual Input-XOR Part Number with proper part footprint.
First Version BOM
- Part number for Red LED
- Dual Input-XOR Part Number with proper part footprint.
2017-02-02 14:57:35 -05:00
John-RB
9c8499e6cd Changes for 3 STM32 BOM's
V1.0t BOM
- Separate line and Part number for each LED
- Dual Input-XOR Part Number with proper part footprint.
V0.8 BOM
- Quantity for Diode
- Separate line and Part number for each LED
- Dual Input-XOR Part Number with proper part footprint.
First Version BOM
- Part number for Red LED
- Dual Input-XOR Part Number with proper part footprint.
2017-02-02 14:43:26 -05:00
pascallanger
f81e7cb78a FrSkyD telemetry 2017-02-02 18:07:46 +01:00
pascallanger
773f3048f7 Devo: extended range 2017-02-02 18:07:36 +01:00
pascallanger
40faaea7f8 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-02-02 14:31:05 +01:00
pascallanger
47b4409f3e FrSkyD telemetry 2017-02-02 14:30:56 +01:00
pascallanger
9ce23c3d61 Protocol change: make sure that main loop is aware 2017-02-02 14:30:46 +01:00
pascallanger
f40ffed069 Merge pull request #44 from schwabe/patch-1
add no_multi_telemetry as indicator of crashed
2017-02-02 10:52:24 +01:00
Arne Schwabe
0b223170d9 Update Tx-Taranis.md 2017-02-02 10:09:38 +01:00
pascallanger
e61f8a512c Merge pull request #43 from schwabe/patch-3
Add X7, add multi telemetry section OpenTX/Taranis document
2017-02-02 08:44:53 +01:00
Arne Schwabe
65b43c39ed Explain multi telemetry examples 2017-02-01 22:56:29 +01:00
Arne Schwabe
131645f31e Update Tx-Taranis.md 2017-02-01 22:50:16 +01:00
Arne Schwabe
ca8fc14d36 add x7 screenshots 2017-02-01 22:42:03 +01:00
Arne Schwabe
efe693c0c0 Add Horus and X7 in the overview. 2017-02-01 22:16:13 +01:00
pascallanger
4eb2d073ac SFHSS channels mapping 2017-02-01 17:51:04 +01:00
pascallanger
fd49c02e18 Update BOM_DIY_STM32 & Schematic.md 2017-02-01 14:13:24 +01:00
pascallanger
f0e3d492d3 Update BOM_DIY_STM32 & Schematic.md 2017-02-01 14:12:19 +01:00
pascallanger
3f8ba6be9d Update BOM_DIY_STM32 & Schematic.md 2017-02-01 13:52:57 +01:00
pascallanger
df4563379d Update BOM_DIY_STM32 & Schematic.md 2017-02-01 13:49:24 +01:00
pascallanger
f0f9d8faa7 Update BOM_DIY_STM32 & Schematic.md 2017-02-01 13:39:02 +01:00
pascallanger
031b4b637a Update BOM_DIY_STM32 & Schematic.md 2017-02-01 13:10:25 +01:00
pascallanger
e206ae3403 Update Module_Build_yourself_PCB.md 2017-02-01 13:04:08 +01:00
pascallanger
021c463d80 FrSkyD telemetry 2017-02-01 12:47:28 +01:00
pascallanger
41d75da33f FrSkyD telemetry
- rewritten the handling of the incoming over the air telemetry packet
- rewritten the TX_RSSI calculation (link frame[4])
- added RX LQI and TX_LQI information in the link frame (frame[5] and
frame[6])
2017-02-01 09:28:35 +01:00
pascallanger
c7e7a559a6 FrSkyD Telemetry update 2017-01-31 15:26:49 +01:00
pascallanger
4f5dfcc65b Few comments tweak 2017-01-31 09:12:06 +01:00
pascallanger
e85208110f FrSky D/X telemetry update 2017-01-31 08:46:58 +01:00
midelic
17bb2f11e4 added STM32 module diagrams links 2017-01-31 02:44:04 +02:00
midelic
124db5f11f Rename BOM_DIY_STM32.md to BOM_DIY_STM32 & Schematic.md 2017-01-31 01:24:12 +02:00
midelic
6b099d7298 Added schematic for V1.0 version(USB) 2017-01-31 01:23:09 +02:00
pascallanger
7ac2e227b1 FrSkyD: telemetry fix?
Added CRC check on incoming telemetry packet.
2017-01-30 21:09:27 +01:00
pascallanger
868c1aa251 Update Protocols_Details.md 2017-01-30 21:00:37 +01:00
pascallanger
7283fc89a5 Update Protocols_Details.md 2017-01-30 20:33:12 +01:00
pascallanger
f933560934 Update Protocols_Details.md 2017-01-30 17:35:15 +01:00
pascallanger
7ee918ad49 Multiprotocol status
Along with the latest ersky9x version, display the module version and if
a specific protocol is available or not.
2017-01-30 16:11:46 +01:00
pascallanger
e30ebd39fd FrSkyX LBT EU addition
Add support for LBT EU 16/8 channels accessible through sub protocols
EU_16 and EU_8
Also includes modification of FrSkyV, D, X CC2500 initialization
2017-01-30 16:11:45 +01:00
pascallanger
7ac6ff828c Q303: reverse A&R channels 2017-01-30 16:11:45 +01:00
midelic
017f5f8e74 Added Multi_STM32_V0.8_t board 2017-01-26 18:17:35 +02:00
midelic
2c46feb8f8 Added Multi_STM32_V0.8_t board 2017-01-26 18:14:19 +02:00
midelic
f5171f3f47 move risky flashing methods to advanced topics 2017-01-26 18:04:19 +02:00
midelic
1a2c28435a move risky flashing methods to advanced topics 2017-01-26 18:04:04 +02:00
midelic
7221fc2060 added more compiling info 2017-01-26 15:09:54 +02:00
pascallanger
e17e7ab4ec Update README.md 2017-01-25 21:38:12 +01:00
midelic
46eb0bc474 added more info 2017-01-25 20:50:29 +02:00
pascallanger
b03227ea9f Update README.md 2017-01-25 19:15:27 +01:00
pascallanger
a1de5e15c5 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 19:12:58 +01:00
pascallanger
7f2322ba60 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 19:10:00 +01:00
pascallanger
5c04844461 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 19:09:16 +01:00
pascallanger
591a185fc2 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 19:08:46 +01:00
pascallanger
fbc0b60b68 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 19:06:43 +01:00
pascallanger
325ce8824e Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-01-25 19:01:17 +01:00
pascallanger
d54e25bb44 Image 2017-01-25 19:01:13 +01:00
pascallanger
740943aee2 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 18:42:53 +01:00
pascallanger
73ee93335b Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 18:37:53 +01:00
pascallanger
c69c3361ac Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-25 18:36:11 +01:00
pascallanger
a91d019738 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-01-25 18:32:03 +01:00
pascallanger
dc272a472d Images 2017-01-25 18:31:58 +01:00
pascallanger
b265108322 Update Compiling.md 2017-01-25 17:55:04 +01:00
pascallanger
6cab6a9646 Update Module_BG_4-in-1.md 2017-01-25 17:28:53 +01:00
pascallanger
3baf237fa8 Update Module_BG_4-in-1.md 2017-01-25 17:27:55 +01:00
pascallanger
fa8503546e Update Protocols_Details.md 2017-01-25 17:21:17 +01:00
pascallanger
b9d988c712 Update Troubleshooting.md 2017-01-25 17:18:45 +01:00
pascallanger
2bbf672094 Update Troubleshooting.md 2017-01-25 15:50:07 +01:00
pascallanger
a6f8fe4c95 Update README.md 2017-01-25 15:33:02 +01:00
pascallanger
6d7415880a Update Module_Build_From_Scratch.md 2017-01-25 15:31:56 +01:00
pascallanger
479e4588f3 Update Module_Build_From_Scratch.md 2017-01-25 15:31:25 +01:00
pascallanger
821f1bdc2b Update Module_Build_yourself_PCB.md 2017-01-25 15:29:45 +01:00
pascallanger
5cdd672e84 Update Module_Build_yourself_PCB.md 2017-01-25 15:28:59 +01:00
pascallanger
48fb8d0b92 Update Transmitters.md 2017-01-25 15:24:12 +01:00
pascallanger
52fae655ba Update Module_BG_4-in-1.md 2017-01-25 15:22:46 +01:00
pascallanger
3ab6e84275 Update Transmitters.md 2017-01-25 15:21:43 +01:00
pascallanger
2b5ab6db11 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-01-25 15:20:20 +01:00
pascallanger
a0f6d47153 Image 2017-01-25 15:20:16 +01:00
pascallanger
787901ba73 Update Transmitters.md 2017-01-25 15:16:34 +01:00
pascallanger
37c7167128 Update Module_BG_4-in-1.md 2017-01-25 15:09:44 +01:00
pascallanger
35e1ddc578 Update README.md 2017-01-25 15:07:05 +01:00
pascallanger
d61e7b8729 Update README.md 2017-01-25 14:58:28 +01:00
pascallanger
8ef73f9dd2 Update Module_BG_4-in-1.md 2017-01-25 14:40:15 +01:00
pascallanger
f7448cc2e4 Fix Hopping_table[47]=0 2017-01-25 14:35:38 +01:00
pascallanger
6af35b5ec5 Images 2017-01-25 14:14:51 +01:00
pascallanger
8f4e5c6064 Update Module_BG_4-in-1.md 2017-01-25 14:14:37 +01:00
pascallanger
2d76775e40 Update Module_BG_4-in-1.md 2017-01-25 14:13:52 +01:00
pascallanger
8eb71cbe74 Update Module_BG_4-in-1.md 2017-01-25 14:10:56 +01:00
pascallanger
9146a8bb21 Update Module_BG_4-in-1.md 2017-01-25 14:08:48 +01:00
pascallanger
445bca7333 Update Module_BG_4-in-1.md 2017-01-25 14:07:57 +01:00
pascallanger
6286551ef5 Image 2017-01-25 14:05:21 +01:00
pascallanger
1ae6a69c7a Update Module_BG_4-in-1.md 2017-01-25 13:52:10 +01:00
pascallanger
34851b772f Update Module_BG_4-in-1.md 2017-01-25 13:49:15 +01:00
pascallanger
4823aa378e Update Module_BG_4-in-1.md 2017-01-25 13:48:42 +01:00
pascallanger
40a42e86ee Update Module_BG_4-in-1.md 2017-01-25 13:47:56 +01:00
pascallanger
c518b52243 Merge pull request #40 from schwabe/patch-3
Update Module_BG_4-in-1.md
2017-01-25 13:42:16 +01:00
pascallanger
abccc3c3cd Update Module_BG_4-in-1.md 2017-01-25 13:38:59 +01:00
pascallanger
9786b7139e Update Module_BG_4-in-1.md 2017-01-25 13:37:56 +01:00
pascallanger
28e8e3434e Images 2017-01-25 13:33:58 +01:00
pascallanger
cdf59fba10 Update Compiling.md 2017-01-25 13:02:58 +01:00
midelic
be8571cb56 Multi_STM32 flashing info 2017-01-25 13:52:52 +02:00
midelic
857715e55c Multi_STM32 flashing info. 2017-01-25 13:30:08 +02:00
midelic
5ccc815a47 Multi_STM32 flashing info 2017-01-25 02:36:32 +02:00
midelic
d77c04109b Multi_STM32 module- connection example 2017-01-25 02:27:05 +02:00
midelic
1ba8b8b1b1 added flashing info for Multi_STM32 module 2017-01-25 02:19:42 +02:00
midelic
caa349b59b add Multi_STM32 flashing diagram. 2017-01-25 02:15:43 +02:00
pascallanger
9a7350149d Update Protocols_Details.md 2017-01-24 22:55:55 +01:00
pascallanger
7f435363f7 Update Protocols_Details.md 2017-01-24 22:48:43 +01:00
pascallanger
832cb79f88 New protocol Q303
Q303 protocol number: 31
Sub ptotocols:
-  Q303 = 0
-  CX35 = 1
- CX10D = 2
- CX10WD = 3
2017-01-24 22:46:11 +01:00
pascallanger
ba7290fdda New protocol Q303
Q303 protocol number: 31
Sub ptotocols:
-  Q303 = 0
-  CX35 = 1
- CX10D = 2
- CX10WD = 3
2017-01-24 16:58:48 +01:00
pascallanger
85ee4a95ec Simplification of chanskip usage 2017-01-24 16:58:48 +01:00
pascallanger
eb164c511f Update end points and map function 2017-01-24 16:58:47 +01:00
pascallanger
26e3119ef3 Use define 2017-01-24 16:58:47 +01:00
pascallanger
6c38b54f7d Update Compiling.md 2017-01-24 09:22:30 +01:00
pascallanger
7e6badaf5d Update Compiling.md 2017-01-24 08:40:09 +01:00
pascallanger
c104e8e1f0 Update Compiling.md 2017-01-23 21:41:29 +01:00
pascallanger
c8d04f3373 Images 2017-01-23 21:40:50 +01:00
pascallanger
f64f417711 Update Compiling.md 2017-01-23 21:38:38 +01:00
pascallanger
92fe975e3d Update Compiling.md 2017-01-23 21:37:46 +01:00
pascallanger
e00731ef8f Images 2017-01-23 21:35:17 +01:00
pascallanger
0d7d0664f6 Update BOM_DIY_STM32.md 2017-01-23 21:09:02 +01:00
pascallanger
b59b0ef041 Update Compiling.md 2017-01-23 18:52:32 +01:00
pascallanger
964aa0ecce Update Compiling.md 2017-01-23 18:51:02 +01:00
pascallanger
a9ecf06cd4 Update README.md 2017-01-23 18:45:59 +01:00
pascallanger
76da6857e7 Update README.md 2017-01-23 18:45:16 +01:00
pascallanger
9eef60c93d Update README.md 2017-01-23 18:41:49 +01:00
pascallanger
df412bbef7 Update Compiling.md 2017-01-23 18:38:03 +01:00
pascallanger
b4c6632162 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2017-01-23 18:36:06 +01:00
pascallanger
5f2eb6bd32 Update Compiling.md 2017-01-23 18:34:02 +01:00
pascallanger
ea532b15fc Update Compiling.md 2017-01-23 18:30:26 +01:00
pascallanger
01bd1fde39 Update Compiling.md 2017-01-23 18:29:56 +01:00
pascallanger
c6c1c61ff6 Update Compiling.md 2017-01-23 18:29:21 +01:00
pascallanger
bbd33c70c1 Update Compiling.md 2017-01-23 18:28:31 +01:00
pascallanger
a2592342fe Update Compiling.md 2017-01-23 18:26:11 +01:00
pascallanger
db06e12337 Update Compiling.md 2017-01-23 18:24:56 +01:00
pascallanger
22139c9650 Image 2017-01-23 18:10:49 +01:00
pascallanger
3b1e2e38fb Image 2017-01-23 16:43:19 +01:00
pascallanger
6f6da47ebe Update Compiling.md 2017-01-23 15:33:03 +01:00
pascallanger
f3237172f3 Iamge 2017-01-23 15:30:52 +01:00
pascallanger
45dc64af5a Image 2017-01-23 15:22:20 +01:00
pascallanger
4df71bff7f Update Compiling.md 2017-01-23 14:35:23 +01:00
pascallanger
f5003d3505 Images 2017-01-23 14:33:27 +01:00
pascallanger
f2f3fab3e2 More images 2017-01-23 14:07:57 +01:00
pascallanger
2357e139f0 Update Module_Build_yourself_PCB.md 2017-01-23 13:15:12 +01:00
midelic
c74eaa47a3 Added OSH Park link for USB board 2017-01-23 14:14:56 +02:00
pascallanger
591f9fa4c2 Added old STM32 PCB version 0.8t 2017-01-23 13:14:07 +01:00
pascallanger
766ffa3e65 STM32 1.0t board + schematic 2017-01-23 13:03:01 +01:00
pascallanger
78d2c7beaa Update Module_Build_yourself_PCB.md 2017-01-23 13:02:19 +01:00
pascallanger
f11c38238a Update BOM_DIY_STM32.md 2017-01-23 11:11:49 +01:00
pascallanger
6d388d50ee Update BOM_DIY_STM32.md 2017-01-23 11:10:24 +01:00
pascallanger
9479254562 Update BOM_DIY_STM32.md 2017-01-23 11:09:42 +01:00
pascallanger
9c9fdaf35d Update BOM_DIY_STM32.md 2017-01-23 11:09:07 +01:00
pascallanger
a4767591ae Update Module_Build_yourself_PCB.md 2017-01-23 11:06:40 +01:00
pascallanger
ecbc50b990 Update Module_Build_yourself_PCB.md 2017-01-23 10:02:48 +01:00
pascallanger
dde9cc27d0 Update Module_Build_yourself_PCB.md 2017-01-23 09:18:11 +01:00
Arne Schwabe
703c03e84b Update Module_BG_4-in-1.md 2017-01-19 16:59:22 +01:00
pascallanger
2f831b3e6f Update Module_Build_yourself_PCB.md 2017-01-12 20:50:29 +01:00
pascallanger
d54eec0b87 Update BOM_DIY_ATmega.md 2017-01-12 20:48:06 +01:00
pascallanger
bc80554cd3 YD717: possible fix for old CX10 2017-01-07 13:18:18 +01:00
pascallanger
a696d330e5 Update Protocols_Details.md 2017-01-04 11:49:44 +01:00
pascallanger
b1479ab3c5 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2017-01-04 11:35:43 +01:00
pascallanger
e51fb06ceb WK2x01: added fixed id mode for WK2801 2017-01-04 11:35:38 +01:00
pascallanger
dc0f2bde6b Add WK2X01 protocol and sub protocols 2017-01-03 20:19:57 +01:00
pascallanger
eb13f267fe New Bind from channel feature 2017-01-03 20:09:28 +01:00
pascallanger
8677e73d75 WK2x01: subprotocols addition
WK2801 number 0, 8 channels, fixed id is not supported
WK2401 number 1, 4 channels
W6_5_1 number 2, 6 channels
W6_6_1 number 3, 7 channels
W6_HEL number 4, 6 channels, option is used to limit COL
W6_HEL_I number 5, 6 channels, COL inverted, option is used to limit COL
2017-01-03 19:56:20 +01:00
pascallanger
fbb919d767 New protocol WK2x01
Protocol WK2x01 number 30
Sub protocols:
- WK2801 number 0, 8 channels, fixed id not supported
- WK2601 number 1, 6/7 channels, option is used see doc for details
- WK2401 number 2, 4 channels
Extended limits supported
Autobind protocol
Most receivers support WK2801 so always start trying this sub protocol
first.
2017-01-03 19:19:53 +01:00
pascallanger
1f0f9a2eae DSM function name change for uniqness 2017-01-03 19:07:10 +01:00
pascallanger
282b2a0a43 Bind from channel: Cosmetic code change 2017-01-03 12:00:25 +01:00
pascallanger
6d0e4d5a38 Fix Bind channel 2017-01-02 18:22:03 +01:00
pascallanger
43956bbf2c Bind channel fix 2017-01-02 17:45:08 +01:00
pascallanger
18e31b3821 Bind channel: configurable channel number
Bind channel can be configured between 5 and 16.
2017-01-02 17:26:35 +01:00
pascallanger
0d0acb9d10 Bind function on channel 16
Toggling channel 16 (-100%->+100%->-100%) will execute a bind only if
the loaded protocol is an autobind protocol or autobind is set AND
throttle is low (below -95%).
2017-01-02 17:04:50 +01:00
pascallanger
6a792ce6a0 FrSky D and X hopping table fix
All RXs using these protocols must be rebinded.
2017-01-02 15:56:32 +01:00
pascallanger
917cea5052 STM32: use manuf ID as global ID 2017-01-01 12:31:13 +01:00
pascallanger
c98f0d3c81 FrSkyX: don't change ID when RX_Num changes 2016-12-29 12:24:38 +01:00
pascallanger
88d650e638 Multi.txt: add missing Q222 2016-12-29 12:22:15 +01:00
pascallanger
72ebe937fb Multi Telemetry: fixed DSM 2016-12-23 09:48:13 +01:00
pascallanger
8efa5bc1dc Multi Telemetry: update version 2016-12-22 10:31:00 +01:00
pascallanger
9b6d2bce58 Multi Telemetry: fix patch level 2016-12-21 20:26:31 +01:00
pascallanger
7bb26a7f07 FrSkyD and FrSkyX: random frequencies 2016-12-21 18:06:03 +01:00
pascallanger
9585b3919a Update Protocols_Details.md 2016-12-20 17:16:56 +01:00
pascallanger
f56c9deb00 MULTI_TELEMETRY: couple of additions 2016-12-19 17:33:30 +01:00
pascallanger
c6221fc60f Merge pull request #35 from schwabe/multi_telemetry
Multi telemetry
2016-12-19 17:09:58 +01:00
pascallanger
acfe3e912e Batch to build for OrangeTX typo 2016-12-19 17:05:13 +01:00
pascallanger
50be0ebe3c Update Protocols_Details.md 2016-12-19 16:12:44 +01:00
pascallanger
704dc803b8 MJXQ/E010: Added 1 more TXID/Freqs 2016-12-19 15:43:25 +01:00
pascallanger
e2d64e9140 ASSAN update 2016-12-19 15:43:25 +01:00
Arne Schwabe
bdef0612f7 Keep old AFHDS2A format for ersky9x 2016-12-18 16:54:44 +01:00
Arne Schwabe
a196b71d36 Implement Multiprotocol Telemetry
This allows the multi module to tell the TX software (e.g. OpenTX) which telemetry protocol is in use. Also Status of the module and signaling binding/invalid protocol
2016-12-18 15:40:05 +01:00
Arne Schwabe
fff8116430 Describe multi telemetry protocol 2016-12-18 15:38:44 +01:00
pascallanger
2be6fb13d2 Merge pull request #34 from acklenx/patch-2
Update Compiling.md
2016-12-18 11:59:15 +01:00
Quincy Acklen
faa6d7f148 Update Compiling.md 2016-12-17 20:16:41 -05:00
gerrievanzyl
982fc2838d Update Compiling_STM32.md 2016-12-14 18:26:06 -05:00
pascallanger
a8351319f8 Update Protocols_Details.md 2016-12-14 09:17:08 +01:00
pascallanger
5b1901708c Update Protocols_Details.md 2016-12-14 09:15:33 +01:00
pascallanger
fa8d4f511f Core: PPM not setting ID properly for some protocols 2016-12-13 20:29:21 +01:00
pascallanger
b4215afe82 Update Protocols_Details.md 2016-12-13 18:20:32 +01:00
pascallanger
2ad25e8fbc Update Protocols_Details.md 2016-12-13 17:41:32 +01:00
pascallanger
67d0e9d2c2 MJXQ: Fixed E010 and added H26WH
Protocol: 18
Sub_protocol for H26WH: 5
2016-12-13 14:58:02 +01:00
pascallanger
f69aae550f Hontai: new sub_protocol FQ777_951
Protocol: 26
Sub protocol: 3
2016-12-12 18:07:43 +01:00
pascallanger
2d26acd991 Hontai -> FQ777_951 2016-12-12 18:04:12 +01:00
pascallanger
8dec1453c4 FY326: new sub protocol FY319
Protocol: 20
Sub_protocol: 1
Untested
2016-12-12 15:47:58 +01:00
pascallanger
241d1e181f H3D: more channels 2016-12-12 14:45:36 +01:00
pascallanger
f267c597e0 H83D more flags 2016-12-12 14:45:43 +01:00
pascallanger
192437896d NRF24L01 updates 2016-12-12 14:07:46 +01:00
pascallanger
d59ae7fce1 Update Protocols_Details.md 2016-12-12 13:49:04 +01:00
pascallanger
18b21005f1 Q222 flags 2016-12-12 13:45:40 +01:00
pascallanger
94ac91cce3 Add more E010 TXID/Freq
Total 14
2016-12-12 11:20:33 +01:00
pascallanger
46e255bccc Bayang telemetry: remove startup warning 2016-12-12 11:20:33 +01:00
pascallanger
87de5b5305 V2X2: new subprotocol JXD506
Protocol number: 5
Subprotocol: 1
2016-12-12 11:20:33 +01:00
pascallanger
1ddc923631 Q222: flags 2016-12-12 11:20:33 +01:00
pascallanger
03f65606fd Sub protocol JXD506 2016-12-12 11:06:12 +01:00
pascallanger
148cf9552b Update Protocols_Details.md 2016-12-09 17:18:40 +01:00
pascallanger
bf230322d0 Bayang: change back A1/A2 to max resolution 2016-12-09 16:56:00 +01:00
pascallanger
758779a8f5 MJXQ/E010: TX IDs vs Freq 2016-12-09 16:54:24 +01:00
pascallanger
55eb39c51d Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-12-09 16:51:59 +01:00
pascallanger
13b8475c54 Add FY805 in Multi.txt for ersky9x 2016-12-09 16:51:55 +01:00
pascallanger
d3d52b44ee Revert "Bayang: change A1 and A2 back to maximum resolution"
This reverts commit d2886432b7becdb5bfe66692b396f9c6c61d7de6.
2016-12-09 16:51:17 +01:00
pascallanger
d2886432b7 Bayang: change A1 and A2 back to maximum resolution 2016-12-09 16:50:56 +01:00
pascallanger
7bb8737ff9 MT99xx/FY805: new protocol addition 2016-12-09 10:30:51 +01:00
pascallanger
3904c36a6e New MT99xx subprotocol FY805
Protocol: MT99xx (number 17)
Subprotocol: FY805 (number 4)
Supports headless and flip. For flip I'm not sure of the flag since it
was missing from the dumps.
Untested protocol...
2016-12-09 10:19:35 +01:00
pascallanger
c2577df6f7 Bayang telemetry : sending volt/4
Change for Taranis
2016-12-09 08:24:51 +01:00
pascallanger
36cb0fb4cd Bad _config.h file pushed... 2016-12-08 15:11:06 +01:00
pascallanger
ec79793f3d Update Protocols_Details.md 2016-12-07 19:23:27 +01:00
pascallanger
188bf76ed1 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-12-07 19:16:13 +01:00
pascallanger
e4e909737c CX10/Q2x2 protocol update 2016-12-07 19:16:09 +01:00
pascallanger
d32421c583 Bayang telemetry 2016-12-06 23:00:16 +01:00
pascallanger
63cbcdc3ea FQ777-124 2016-12-06 22:49:17 +01:00
pascallanger
dfd8d0fa3d Added: Bayang telemetry
Changed telemetry configuration and validation for AFHDS2A and HUBSAN
Added default Bayang telemetry from Silverxxx:
- Option=1 to activate telemetry (option=0 -> standard Bayang protocol)
- Value returned to the TX: RX RSSI, TX RSSI, A1=uncompensated battery
voltage, A2=compensated battery voltage
2016-12-06 22:30:48 +01:00
pascallanger
7d7ca11c81 Telemetry: volatile 2016-12-05 21:51:27 +01:00
pascallanger
ee50a31bba Merge pull request #29 from benlye/patch-1
Added CX-20 details
2016-12-05 21:25:48 +01:00
benlye
179930ad80 Fixed the stock flight modes 2016-12-05 20:20:51 +00:00
benlye
fdb02da5ed Added CX-20 details 2016-12-05 17:41:25 +00:00
pascallanger
5499beb510 Update Module_BG_4-in-1.md 2016-12-05 18:07:47 +01:00
pascallanger
96046d2ee2 V2c image 2016-12-05 18:07:03 +01:00
pascallanger
a35a209066 Update Module_BG_4-in-1.md 2016-12-05 17:48:56 +01:00
pascallanger
8139c33b86 V2a and V2b pictures 2016-12-05 17:47:21 +01:00
pascallanger
da40562ee3 V2 Pictures 2016-12-05 17:43:33 +01:00
pascallanger
ce478583ab 4-in-1 Board v2a 2016-12-05 17:38:54 +01:00
pascallanger
6215af0e5a Added Flysky/CX20 protocol 2016-12-04 21:36:59 +01:00
pascallanger
8f0ecac842 Core: stop transmitting if serial or ppm signal disappears 2016-12-04 18:58:29 +01:00
pascallanger
54dd562d88 Flysky/CX20 fully reversed 2016-12-04 18:56:03 +01:00
pascallanger
c24f7a86d4 Flysky/CX20 reversed elevator channel 2016-12-02 20:28:47 +01:00
pascallanger
d6b4437664 Latest protocol file for ersky9X
To be placed on the SD Card.
2016-12-02 18:20:35 +01:00
pascallanger
68e74b9830 Update Protocols_Details.md 2016-12-02 16:11:34 +01:00
pascallanger
3fa40b2303 Bayang: add sub_protocol H8S3D
Protocol: 14
Sub_protocol: 1
2016-12-02 10:19:42 +01:00
pascallanger
5feb73c65b New Bayang/H8S3D sub_protocol 2016-12-02 10:17:34 +01:00
pascallanger
33d676e1fe Core: option to reverse input channels 2016-12-01 22:30:27 +01:00
pascallanger
afb7af287b Flysky->CX20: hopping frequency based on any TXID 2016-11-30 18:28:56 +01:00
pascallanger
d6291a4c47 Flysky/CX20 fix 2016-11-30 17:02:09 +01:00
pascallanger
7228b84bf8 Flysky CX20 mods 2016-11-30 12:18:39 +01:00
pascallanger
2dbf8ebb65 Flysky: typos... 2016-11-30 07:55:07 +01:00
pascallanger
2d90844239 Flysky: addition of sub_protocol CX20
sub_protocol=4
7 channels
supports bind and extended channels
Only 1 TXID supported for now
2016-11-29 22:30:13 +01:00
pascallanger
bf6e66ea47 Update Protocols_Details.md 2016-11-28 10:37:42 +01:00
pascallanger
5edaa6ec29 SLT: fix 2016-11-25 22:44:17 +01:00
pascallanger
881ca67f80 Update README.md 2016-11-25 14:41:50 +01:00
pascallanger
1c0ed2a2c1 Q222 some channels direction reverse 2016-11-25 11:44:32 +01:00
pascallanger
245d27ea71 CX10 channel modifications 2016-11-25 10:28:18 +01:00
pascallanger
f14d4b8ac3 SLT 2016-11-24 20:28:42 +01:00
pascallanger
fdc867b9d5 Q222 2016-11-24 20:22:52 +01:00
pascallanger
8e876d6a99 Q222: arming 2016-11-24 19:06:33 +01:00
pascallanger
c9de0b4cf2 Q2X2 protocol addition for Q222/Q242/Q282
Q2X2 protocol : 29
Sub-protocols:
- Q222 : 0
- Q242 : 1
- Q282 : 2
2016-11-23 21:56:00 +01:00
pascallanger
27b3a86155 SLT Vista format 2016-11-23 15:35:27 +01:00
pascallanger
683bdc838d SLT 2016-11-18 16:51:52 +01:00
pascallanger
4f9f10ddf2 Core: blinking pattern for PPM signal detection 2016-11-18 16:51:52 +01:00
gerrievanzyl
6fe3f90a26 Update Module_BG_4-in-1.md 2016-11-17 16:00:26 +02:00
gerrievanzyl
5bdb7eee85 Update Module_BG_4-in-1.md 2016-11-17 15:59:31 +02:00
pascallanger
34262a45ca Blinking patterns 2016-11-17 12:55:30 +01:00
pascallanger
7c22110c96 SLT Fix? 2016-11-16 21:17:03 +00:00
pascallanger
6ad9fb8f27 AFHDS2A sub protocols and validation 2016-11-06 16:36:44 +01:00
pascallanger
4348f4b0d4 STM32: USART init changed 2016-11-06 16:34:40 +01:00
pascallanger
22529e28d8 Fixed compilation issue if telemetry is not enabled 2016-11-06 16:32:43 +01:00
pascallanger
aa52bcee8c Apply J6Pro modifications from Vlad 2016-11-06 15:47:40 +01:00
pascallanger
d731ab3682 Merge pull request #23 from schwabe/opentx_flysky_telemetry
Allow TX to request forwarding of FlySky telemetry data
2016-11-06 15:16:45 +01:00
Arne Schwabe
7840438bfc Allow TX to request forwarding of FlySky telemetry data 2016-11-05 01:21:26 +01:00
gerrievanzyl
455a2dba8a Note about the bootloader reducing memory 2016-11-03 13:21:44 -04:00
gerrievanzyl
01c310c913 clarifications 2016-11-03 13:19:19 -04:00
gerrievanzyl
a679d6f2e1 Updated instructions to set fuses before uploading fw 2016-11-03 13:14:03 -04:00
gerrievanzyl
e8af56bdbe Add files via upload 2016-11-03 11:40:49 -04:00
gerrievanzyl
efa099ac5b Jumper on new STM V1.0 board 2016-11-03 11:40:29 -04:00
gerrievanzyl
81181aa7e6 Formatting for clarity 2016-11-03 11:33:11 -04:00
gerrievanzyl
1ab6640983 Emphasised channel order 2016-11-03 11:27:34 -04:00
gerrievanzyl
e5636cde05 emphasised channel order 2016-11-03 11:26:28 -04:00
gerrievanzyl
0a0d00b26e Emphasised channel order 2016-11-03 11:25:18 -04:00
gerrievanzyl
6c9afcff81 Emphasised channel order 2016-11-03 11:23:39 -04:00
gerrievanzyl
b7933b282b USB flashing and updated firmware 2016-11-01 20:52:38 -04:00
gerrievanzyl
653c34758b Updated for USB board and latest firmware 2016-11-01 20:51:24 -04:00
gerrievanzyl
9d18ab795e Added link to OShpark for V0.8 board 2016-11-01 20:29:40 -04:00
gerrievanzyl
a5c06c67bc Update BOM_DIY_STM32.md
Added BOM for Midelic's new board
2016-11-01 20:12:15 -04:00
gerrievanzyl
db2f790bf7 Update BOM_DIY_STM32.md 2016-11-01 17:52:47 -04:00
gerrievanzyl
5cbc6b5f6a Update BOM_DIY_STM32.md 2016-11-01 17:51:59 -04:00
gerrievanzyl
f7ecf40633 MULTI_STM32 USB images 2016-11-01 17:12:33 -04:00
gerrievanzyl
6cd83c60ef Merge pull request #21 from schwabe/patch-2
Fine tune Taranis docu to include Horus
2016-11-01 16:52:19 -04:00
gerrievanzyl
90ffce63e5 Merge pull request #20 from schwabe/patch-1
Move multi specific compiler flags to multi board definition
2016-11-01 16:51:57 -04:00
Arne Schwabe
2910ebc0fd More corrections 2016-11-01 14:50:24 +01:00
Arne Schwabe
02fab95637 Add images for OpenTX 2016-11-01 14:45:54 +01:00
Arne Schwabe
22d2209a1b Update Tx-Taranis.md 2016-11-01 14:45:20 +01:00
Arne Schwabe
e2bea81c64 Add files via upload 2016-11-01 14:41:59 +01:00
Arne Schwabe
466b8bd1cc horus-settings.png 2016-11-01 14:35:51 +01:00
Arne Schwabe
c5287d2869 Add horus to supported platforms 2016-11-01 14:24:23 +01:00
Arne Schwabe
010502ed9d Also update Windows section 2016-10-31 19:06:49 +01:00
Arne Schwabe
be06e74d94 Move multi specific compiler flags to multi board definition
This has the advantage not modifying the other boards and the user needs to only edit one file instead of two.
2016-10-31 19:04:47 +01:00
gerrievanzyl
199d2cf851 Merge pull request #18 from schwabe/patch-1
Add Inductrix details
2016-10-31 11:09:30 -04:00
gerrievanzyl
deab1b4962 Add files via upload 2016-10-31 11:06:09 -04:00
gerrievanzyl
d04411e4a8 Update Models.md 2016-10-31 11:04:09 -04:00
gerrievanzyl
ce52b57a52 Update Models.md 2016-10-31 10:36:29 -04:00
Arne Schwabe
c760c19056 Add Inductrix details 2016-10-31 13:36:33 +01:00
gerrievanzyl
6b5e469b19 Update Compiling.md 2016-10-28 18:19:26 -04:00
gerrievanzyl
8663489ae4 Update Module_Build_yourself_PCB.md 2016-10-27 17:24:04 -04:00
gerrievanzyl
877ef1d7ed Update Module_BG_4-in-1.md 2016-10-27 17:22:58 -04:00
gerrievanzyl
6a81035f10 Update Module_Build_From_Scratch.md 2016-10-27 17:21:53 -04:00
gerrievanzyl
1f7276bbfd Update Module_Build_From_Scratch.md 2016-10-27 17:20:50 -04:00
gerrievanzyl
90e8490a85 Update Module_Build_From_Scratch.md 2016-10-27 17:19:43 -04:00
gerrievanzyl
38d51988d9 Update Module_Build_yourself_PCB.md 2016-10-27 17:18:49 -04:00
gerrievanzyl
b8fccd1bac Update Module_BG_4-in-1.md 2016-10-27 17:17:44 -04:00
pascallanger
ded8e7b916 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-10-27 11:15:31 +02:00
pascallanger
f56ca6318a STM32: align STM32 code with other platforms for tx_pause/tx_resume 2016-10-27 11:15:25 +02:00
pascallanger
5bd6ba4f36 Update Protocols_Details.md 2016-10-26 18:57:23 +02:00
pascallanger
909fb2eb2b AFHDS2A: working version
- Wait for transmit completion before switching to RX (no more fixed
delays...)
- Verify if data has been received before processing it (better handling
of telemetry)
- Added TX_RSSI (along with the existing RX_RSSI)
Known issue: RX_RSSI value needs to be looked at. I'm seeing only values
between 157 (bad) and 196 (good). Is this normal for this protocol?
2016-10-26 13:51:54 +02:00
pascallanger
b2209eaad0 AFHDS2A fix 2016-10-24 23:14:42 +02:00
pascallanger
dcae3c4acb Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-10-22 13:36:19 +02:00
pascallanger
3a3a2ec76d AFHDS2A 2016-10-22 13:36:07 +02:00
gerrievanzyl
5e2ba192c1 Update Compiling.md 2016-10-22 07:11:48 -04:00
gerrievanzyl
6d4452bf94 Update README.md 2016-10-22 07:08:44 -04:00
gerrievanzyl
998f9491f6 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2016-10-22 07:06:43 -04:00
gerrievanzyl
fa7efeb283 Update README.md 2016-10-22 06:25:46 -04:00
gerrievanzyl
22206b6a99 Update README.md 2016-10-22 06:21:16 -04:00
gerrievanzyl
34036ee355 Update Module_Build_yourself_PCB.md 2016-10-22 06:17:49 -04:00
gerrievanzyl
2eb2d555ad Update Module_BG_4-in-1.md 2016-10-22 06:14:22 -04:00
gerrievanzyl
722abf9cab Update Transmitters.md 2016-10-22 06:13:16 -04:00
pascallanger
357d3b8140 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-10-22 12:06:49 +02:00
pascallanger
01ef79ac33 AFHDS2A again 2016-10-22 12:06:44 +02:00
gerrievanzyl
8d2456f238 Update Transmitters.md 2016-10-22 05:59:22 -04:00
gerrievanzyl
bb164edb55 Update README.md 2016-10-22 05:48:59 -04:00
gerrievanzyl
21117eaa17 Add files via upload 2016-10-22 05:32:14 -04:00
gerrievanzyl
573f823f48 Delete DIY_Multiprotocol_Module_Overview.png 2016-10-22 05:31:13 -04:00
gerrievanzyl
47ca3b5d33 Add files via upload 2016-10-22 05:30:43 -04:00
pascallanger
7334134b45 Update README.md 2016-10-21 21:31:08 +02:00
pascallanger
e6be594395 Update README.md 2016-10-21 21:29:57 +02:00
pascallanger
e2b6697362 AFHDS2A addition 2016-10-21 21:28:17 +02:00
pascallanger
f78e11057d ... 2016-10-21 19:57:48 +02:00
pascallanger
314ee96525 AFHDS2A: another trial 2016-10-21 19:39:59 +02:00
pascallanger
efc1223d45 AFHDS2A: again... 2016-10-21 18:37:27 +02:00
pascallanger
38d9aa4997 AFHDS2A: another trial... 2016-10-21 18:10:25 +02:00
pascallanger
42c7431416 AFHDS2A: changes 2016-10-21 10:55:55 +02:00
pascallanger
d1e40ee71c AFHDS2A cosmetic changes 2016-10-20 22:55:50 +02:00
pascallanger
43169d8bab AFHDS2A: few changes 2016-10-20 22:33:37 +02:00
pascallanger
8cbbb52b95 Fixed compilation issues due to AFHDS2A introduction 2016-10-20 21:55:02 +02:00
pascallanger
807a55fcdc AFHDS2A: option value changed
Option value should be between 0 and 70 which gives a value between 50
and 400Hz (value in Hz = 50 + 5*option)
2016-10-20 21:21:10 +02:00
pascallanger
8c5351445b AFHDS2A: Missing static... 2016-10-20 20:35:36 +02:00
pascallanger
999c630c5a AFHDS2A protocol addition: UNTESTED
Protocol number: 28
Sub protocols:  PWM_IBUS = 0, PPM_IBUS = 1, PWM_SBUS = 2, PPM_SBUS = 3
Option value =0->50Hz, =1->400Hz, =2->5Hz
Extended channel range supported
Telemetry supported for voltage and RSSI (RX RSSI)
2016-10-20 19:29:52 +02:00
pascallanger
a0186ce8e4 MJXQ enhancements 2016-10-20 19:29:52 +02:00
gerrievanzyl
9fe336d564 Update Module_Build_yourself_PCB.md 2016-10-18 13:07:52 -04:00
gerrievanzyl
34a1d4e6b9 Update Documentation_To_Do_List.md 2016-10-18 12:54:27 -04:00
gerrievanzyl
bafa548f2f Update Transmitters.md 2016-10-18 12:41:10 -04:00
gerrievanzyl
fa709a9bdc Update Advanced_Topics.md 2016-10-18 12:35:23 -04:00
pascallanger
2a1cc7e3ea Update Protocols_Details.md 2016-10-18 14:38:40 +02:00
pascallanger
68648b9920 Typos... 2016-10-18 09:27:14 +02:00
pascallanger
b9f297935b Added batch file to help compiling OrangeTX 2016-10-17 09:06:21 +02:00
pascallanger
eb6fc4f8cf Fix for STM32 board 2016-10-17 08:37:09 +02:00
pascallanger
8a177c34fa Added Arduino.h for stm32 board 2016-10-16 23:25:52 +02:00
pascallanger
22a5f411d0 Move map redefinition to arduino.ino 2016-10-16 23:12:28 +02:00
pascallanger
f557609e9e STM32 board & DSM fixes
Loads of changes:
STM32 board introduction: NOT TESTED
XMEGA renamed to ORANGE_TX to be more explicit
DSM: added reset if cyrf freezed
Validate: added a validate file to verify the different compilation
options
2016-10-16 19:51:52 +02:00
pascallanger
cde8deaf4b Update Compiling_STM32.md 2016-10-14 11:44:21 -04:00
gerrievanzyl
48eb1c6d67 Update Module_Build_yourself_PCB.md 2016-10-05 17:24:00 -04:00
gerrievanzyl
4db741a87c Update README.md 2016-10-05 17:14:48 -04:00
gerrievanzyl
3188ca6884 Update README.md 2016-10-05 17:14:26 -04:00
gerrievanzyl
bb9cd171bf Delete Protocol_Details.md 2016-10-05 17:12:43 -04:00
gerrievanzyl
7a81638258 Update Compiling_STM32.md 2016-10-05 17:12:19 -04:00
gerrievanzyl
6519db1fe8 Update README.md 2016-10-05 17:11:40 -04:00
gerrievanzyl
f313d319d4 Update README.md 2016-10-05 17:09:55 -04:00
gerrievanzyl
a8c4e6fedc Update Protocols_Details.md 2016-10-05 17:07:29 -04:00
gerrievanzyl
db16458cf5 Update Protocols_Details.md 2016-10-05 17:06:51 -04:00
gerrievanzyl
38a9562eaf Delete Protocols_Details_old.md 2016-10-05 17:06:11 -04:00
gerrievanzyl
b2327e8bf7 Create Protocol_Details_old.md 2016-10-05 17:05:55 -04:00
gerrievanzyl
aafef107ec Create Protocols_Details_old.md 2016-10-05 17:05:25 -04:00
gerrievanzyl
4b442e75f7 Update Protocols_Details.md 2016-10-05 17:04:32 -04:00
gerrievanzyl
e8f103799b Update Compiling.md 2016-10-05 17:04:03 -04:00
gerrievanzyl
618685dc05 Update Compiling.md 2016-10-05 17:01:52 -04:00
gerrievanzyl
f0d50e53fa Update Compiling.md 2016-10-05 17:00:29 -04:00
gerrievanzyl
1b4828f4fa Update Compiling.md 2016-10-05 16:59:03 -04:00
gerrievanzyl
56730d67a2 Update Protocols_Details.md 2016-10-05 16:58:22 -04:00
gerrievanzyl
b02516b0b3 Update Compiling.md 2016-10-05 16:57:23 -04:00
gerrievanzyl
1eb32f86bd Update Protocol_Details.md 2016-10-05 16:53:43 -04:00
gerrievanzyl
3b669e64e2 Update Protocol_Details.md 2016-10-05 16:16:03 -04:00
gerrievanzyl
fbccd70f7d Update Models.md 2016-10-05 16:09:40 -04:00
gerrievanzyl
61e5231d99 Update Models.md 2016-10-05 16:01:01 -04:00
gerrievanzyl
5c101c5a85 Update Models.md 2016-10-05 14:24:37 -04:00
gerrievanzyl
a6e991923e Update Module_Build_yourself_PCB.md 2016-10-05 09:31:14 -04:00
gerrievanzyl
f0c494ecea Update Advanced_ATmega_Serial_Uploader.md 2016-10-05 09:03:42 -04:00
gerrievanzyl
40dfdf9bb1 Update Advanced_Manually_Setting_ATmega328_Fuses.md 2016-10-05 09:01:45 -04:00
gerrievanzyl
770e0f01f1 Update README.md 2016-10-05 08:05:32 -04:00
gerrievanzyl
8448d3e516 Update Tx-erSky9X.md 2016-10-04 20:41:38 -04:00
gerrievanzyl
292a11f942 Update Tx-FlyskyTH9X.md 2016-10-04 20:39:37 -04:00
gerrievanzyl
6099986f5b Update Tx-Taranis.md 2016-10-04 20:37:20 -04:00
gerrievanzyl
53d18d8947 Update Hardware.md 2016-10-04 20:30:58 -04:00
gerrievanzyl
f77bdd233b Update Transmitters.md 2016-10-04 20:29:14 -04:00
gerrievanzyl
dc25a1294c Update README.md 2016-10-04 20:27:33 -04:00
gerrievanzyl
8f4bffa950 Update Tx-Taranis.md 2016-10-04 14:08:45 -04:00
gerrievanzyl
96195fa16a Update Tx-Taranis.md 2016-10-04 14:06:35 -04:00
gerrievanzyl
4e8a59ad4e Update README.md 2016-10-04 14:04:31 -04:00
gerrievanzyl
e42ee6d6be Update README.md 2016-10-04 13:35:23 -04:00
gerrievanzyl
f6a04a8b36 Update Hardware.md 2016-10-04 13:32:32 -04:00
gerrievanzyl
36b94b81ce Update Hardware.md 2016-10-04 13:31:58 -04:00
gerrievanzyl
d66e782152 Update Compiling_STM32.md 2016-10-04 13:04:07 -04:00
gerrievanzyl
d122d39d3a Update Compiling_STM32.md 2016-10-04 13:03:07 -04:00
gerrievanzyl
7c3053e8cd Update Compiling_STM32.md 2016-10-04 13:01:41 -04:00
gerrievanzyl
ecdfa61755 Update Module_OrangeRx.md 2016-10-04 12:43:53 -04:00
gerrievanzyl
7321117c99 Update Module_OrangeRx.md 2016-10-04 12:27:14 -04:00
gerrievanzyl
b50560eadf Update Module_OrangeRx.md 2016-10-04 12:26:51 -04:00
gerrievanzyl
60841e6312 Update Tx-Taranis.md 2016-10-04 11:46:09 -04:00
gerrievanzyl
66cc61f967 Update README.md 2016-10-04 10:19:08 -04:00
gerrievanzyl
1933f4bcc8 Update Transmitters.md 2016-10-03 15:31:26 -04:00
gerrievanzyl
977f5ca9ce Update Transmitters.md 2016-10-03 15:30:23 -04:00
gerrievanzyl
e5e529d3d2 Update Transmitters.md 2016-10-03 15:17:33 -04:00
gerrievanzyl
e1f9d6091c Update Tx-erSky9X.md 2016-10-03 13:40:12 -04:00
gerrievanzyl
a83d8064f2 Create Tx-erSky9X.md 2016-10-03 13:36:16 -04:00
gerrievanzyl
9afb5e7272 Update Transmitters.md
Removed links to firmware - should be on the individual tx pages
updated links to Tx-ersky9X.md
2016-10-03 09:22:57 -04:00
gerrievanzyl
4c7c2ccc74 Update Tx-FlyskyTH9X.md 2016-10-03 09:08:51 -04:00
gerrievanzyl
a6d5686c1c Update Module_Build_yourself_PCB.md 2016-10-02 08:17:32 -04:00
gerrievanzyl
8fa1b92deb Update Tx-FlyskyTH9X.md 2016-10-02 08:11:19 -04:00
gerrievanzyl
f06e3643b6 Update Hardware.md 2016-10-02 08:05:46 -04:00
gerrievanzyl
cd8e59bc9c Update Models.md 2016-09-30 10:40:55 -04:00
gerrievanzyl
b6eeeea1ea Update Module_Build_yourself_PCB.md 2016-09-28 17:26:19 -04:00
gerrievanzyl
aea642fcde Create BOM_DIY_ATmega.md 2016-09-28 17:25:12 -04:00
gerrievanzyl
27bec7ad05 Update BOM_DIY_STM32.md 2016-09-28 17:18:10 -04:00
gerrievanzyl
80cb3458de Update BOM_DIY_STM32.md 2016-09-28 16:55:14 -04:00
gerrievanzyl
615048df04 Update BOM_DIY_STM32.md 2016-09-28 16:54:41 -04:00
gerrievanzyl
4e07b56f3e Update BOM_DIY_STM32.md 2016-09-28 16:54:19 -04:00
gerrievanzyl
7d18da13a1 Update BOM_DIY_STM32.md 2016-09-28 16:44:55 -04:00
gerrievanzyl
a49e9e346f Update BOM_DIY_STM32.md 2016-09-28 16:13:35 -04:00
gerrievanzyl
87fd267183 Update Module_Build_yourself_PCB.md 2016-09-28 15:04:04 -04:00
gerrievanzyl
c61fefb55f Update Module_Build_yourself_PCB.md 2016-09-28 15:03:24 -04:00
gerrievanzyl
c644031041 Update BOM_DIY_STM32.md 2016-09-28 15:02:36 -04:00
gerrievanzyl
79f0f52825 Create BOM_DIY_STM32.md 2016-09-28 14:49:18 -04:00
gerrievanzyl
03ac62044b Update Documentation_To_Do_List.md 2016-09-28 06:13:12 -04:00
gerrievanzyl
531bc0f887 Update Models.md 2016-09-25 09:14:11 -04:00
gerrievanzyl
af8b60ca29 Update Documentation_To_Do_List.md 2016-09-25 08:16:51 -04:00
gerrievanzyl
80c14e9ebd Update Module_Build_yourself_PCB.md 2016-09-25 08:05:11 -04:00
gerrievanzyl
3d658eff29 Update README.md 2016-09-25 08:01:54 -04:00
gerrievanzyl
8a8a75aa79 Update README.md 2016-09-25 08:01:23 -04:00
gerrievanzyl
ea3fe06613 Update Module_BG_4-in-1.md 2016-09-25 07:33:52 -04:00
gerrievanzyl
92e7f6bd68 Update Hardware.md 2016-09-25 07:32:03 -04:00
gerrievanzyl
96b22a00ff Update Hardware.md 2016-09-25 07:25:36 -04:00
gerrievanzyl
cfddbc5b3f Update Hardware.md 2016-09-25 07:23:37 -04:00
gerrievanzyl
725009d719 Update Documentation_To_Do_List.md 2016-09-25 07:19:00 -04:00
gerrievanzyl
7f7370f6db Update Documentation_To_Do_List.md 2016-09-25 07:04:41 -04:00
pascallanger
0fcc1316b2 DSM: 11ms max 10ch after switch to 22ms map 2016-09-25 10:08:29 +02:00
pascallanger
e9933bebe7 DSM: 11ms channel mapping 2016-09-24 13:58:06 +02:00
pascallanger
9810081b11 DSM: cleaned init_vals and data_vals 2016-09-23 21:27:44 +02:00
gerrievanzyl
6522d252cb Update Compiling.md 2016-09-23 11:24:57 -04:00
gerrievanzyl
a2867cffb7 Update Compiling.md 2016-09-23 11:19:48 -04:00
gerrievanzyl
e92c1b53a1 Add files via upload 2016-09-23 17:14:26 +02:00
gerrievanzyl
52aecb47e7 Update Compiling.md 2016-09-23 11:08:58 -04:00
gerrievanzyl
c4652d39fa Update Compiling.md 2016-09-23 11:08:21 -04:00
pascallanger
c7b155ccac Fix OrangeTX pins... 2016-09-23 16:55:28 +02:00
pascallanger
96d18535f8 DSM changes 2016-09-23 16:50:23 +02:00
gerrievanzyl
98471e39e1 Add files via upload 2016-09-23 16:36:17 +02:00
pascallanger
f55fc5776e DSM: Fix Orange RX
Removed Col8 completely from the equation since there are too many
issues with it.
Code cleaning.
2016-09-23 16:01:26 +02:00
gerrievanzyl
f9a8d1cc40 Update Compiling.md 2016-09-23 15:38:59 +02:00
gerrievanzyl
e55a210cf9 Update Tx-FlyskyTH9X.md 2016-09-23 15:34:25 +02:00
gerrievanzyl
d19d4406f6 Update Tx-FlyskyTH9X.md 2016-09-22 23:00:35 +02:00
gerrievanzyl
9697331abb Update Transmitters.md 2016-09-22 22:48:16 +02:00
gerrievanzyl
91db02f2da Update Transmitters.md 2016-09-22 22:39:31 +02:00
gerrievanzyl
b933b30e0a Update Advanced_Bluetooth_Telemetry.md 2016-09-22 22:29:53 +02:00
gerrievanzyl
2cb9a7c199 Update PPM_Setup.md 2016-09-22 22:25:22 +02:00
gerrievanzyl
06ff17ebb2 Update README.md 2016-09-22 22:16:59 +02:00
gerrievanzyl
44a573ecd5 Update README.md 2016-09-22 22:15:43 +02:00
gerrievanzyl
ffa7952fc1 Update Advanced_Bluetooth_Telemetry.md 2016-09-22 22:05:58 +02:00
gerrievanzyl
701514a168 Update Advanced_Topics.md 2016-09-22 22:03:23 +02:00
gerrievanzyl
1565bc9e1a Update Advanced_Topics.md 2016-09-22 22:02:20 +02:00
gerrievanzyl
0681bad8e6 Update Advanced_ATmega_Serial_Uploader.md 2016-09-22 22:01:46 +02:00
gerrievanzyl
23a21bb39f Add files via upload 2016-09-22 21:57:43 +02:00
gerrievanzyl
9aabb575c1 Update Advanced_Topics.md 2016-09-22 21:56:49 +02:00
pascallanger
cf607e892b OrangeTX Cyrf reset pin 2016-09-22 08:29:29 +02:00
pascallanger
6bf906f2a7 Added Multiplex TX end points 2016-09-21 22:07:13 +02:00
pascallanger
7e897d604c Removing unecessary Resets... 2016-09-21 15:05:26 +02:00
pascallanger
39887df3ec OrangeTX code cleanning 2016-09-21 15:00:39 +02:00
pascallanger
fbb7a684bf Fixed OrangeTX compilation 2016-09-21 14:45:17 +02:00
pascallanger
449ad6cd0d DSM2 random channels 2016-09-21 14:29:09 +02:00
pascallanger
cfcd6e5f93 Code cleanup 2016-09-21 14:28:37 +02:00
pascallanger
73aab88109 Some cleanning 2016-09-20 18:27:09 +02:00
pascallanger
beb692a3c4 Fix pins again... 2016-09-20 01:04:25 +02:00
pascallanger
fe8385e759 Update README.md 2016-09-19 23:55:46 +02:00
pascallanger
58fb331019 Update README.md 2016-09-19 23:52:25 +02:00
pascallanger
e4986a6a47 New documentation 2016-09-19 23:48:14 +02:00
pascallanger
fcd47ecec6 Correct pins... 2016-09-19 23:43:14 +02:00
pascallanger
174e6ad637 Merge pull request #15 from bikemike/configurable_pins
made pins configurable and added support for nano
2016-09-19 21:12:08 +02:00
pascallanger
2ac4097e32 Update Protocols_Details.md 2016-09-19 19:23:40 +02:00
pascallanger
dd13ac5cbb Update Protocols_Details.md 2016-09-19 19:18:56 +02:00
pascallanger
9c55a898f7 New DSM protocol
DSM sub_protocols are now:
- DSM2/1024@22ms
- DSM2/2048@11ms
- DSMX/2048@22ms
- DSMX/2048@11ms
Option=number of channels from 4 to 12 for normal receivers or -4 to -12
fro OrangeRX. An invalid option value will end up with 6 channels.
2016-09-19 18:58:09 +02:00
Mike Morrison
bb9018c094 made pins configurable and added support for nano 2016-09-16 20:34:28 -07:00
pascallanger
b09b4183bb DSM revert changes due to issues 2016-09-16 17:59:57 +02:00
pascallanger
3d7bc6583d Fix LED blink in PPM mode 2016-09-16 16:56:46 +02:00
pascallanger
99e8be227e PPM Telemetry: added serial speeds
Only supported for none invert telemetry:
FrSkyD (Incl Hubsan): 9600bps
FrSkyX: 57600bps
DSM: 125000bps
2016-09-16 10:39:44 +02:00
pascallanger
b1c38cc793 Typo... 2016-09-15 16:02:36 +02:00
pascallanger
26e4e70fc8 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-09-15 12:38:58 +02:00
pascallanger
04bdf3f26a Multi core extended to support up to 63 protocols
Compatible with ersky9x at this time.
2016-09-15 12:38:49 +02:00
pascallanger
cafeacf69f Update README.md 2016-09-14 18:29:31 +02:00
pascallanger
4c2d6d78ea E010 now supports multi IDs 2016-09-13 17:21:35 +02:00
pascallanger
ea7d0cdef5 E010 semi arbitrary transmitter ID 2016-09-13 16:38:04 +02:00
pascallanger
47bae63548 Orange TX module compilation fixes 2016-09-12 21:44:30 +02:00
pascallanger
8470f4f7fb DSM: fixed BIND_TEST... 2016-09-12 21:42:55 +02:00
pascallanger
242f9d55ed DSM: loads of changes... 2016-09-12 16:42:13 +02:00
pascallanger
236ac52925 Fix global ID random 2016-09-12 16:41:40 +02:00
pascallanger
baab9a9c89 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-09-12 16:40:51 +02:00
pascallanger
3d26e6e340 Hontai/X5C1 fix 2016-09-12 16:40:45 +02:00
pascallanger
c34ab48972 Update Protocols_Details.md 2016-09-10 10:06:50 +02:00
pascallanger
cf0abf21db Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-09-10 09:42:47 +02:00
pascallanger
7918b392e8 Hontai fix 2016-09-10 09:42:39 +02:00
pascallanger
f0ced15e6a Update Protocols_Details.md 2016-09-10 09:39:33 +02:00
pascallanger
c0204cb725 Update Protocols_Details.md 2016-09-10 09:27:53 +02:00
pascallanger
eb3905447f Hontai channels fix 2016-09-10 09:25:36 +02:00
pascallanger
16c7459906 Merge pull request #14 from klks/master
Fix hontai code for X5C1
2016-09-10 09:12:04 +02:00
klks
eae5f87eed Fix hontai code for X5C1 2016-09-10 11:28:53 +08:00
pascallanger
d4b85e3b1c Hontai protocol & Bit bashing pause/resume 2016-09-09 18:34:29 +02:00
pascallanger
a989c3b7d0 HONTAI protocol addition 2016-09-09 12:15:16 +02:00
pascallanger
d96ba9fa46 Flysky Flash space optimization 2016-09-04 16:49:00 +02:00
pascallanger
2261d655ea DEVO/J6pro Flash space optimization 2016-09-04 16:49:00 +02:00
pascallanger
8b67049863 Added NRF24L01_ReadPayloadLength 2016-09-04 16:49:00 +02:00
pascallanger
48258dd9dd Renamed FrSky protocols 2016-09-03 11:57:40 +02:00
pascallanger
e04c573726 Renamed FrSky protocols 2016-09-03 11:56:39 +02:00
pascallanger
4daec3794e Renamed FrSky protocols to match with receivers 2016-09-03 11:49:25 +02:00
pascallanger
f0646dde32 FrSky1 Fix 2016-09-03 10:12:30 +02:00
pascallanger
ec2086e0f7 Fixed invert serial compilation 2016-09-01 20:12:17 +02:00
pascallanger
2ac704178c FRSKY1 2016-09-01 18:12:35 +02:00
pascallanger
7c43c38e28 FRSKY1 2016-09-01 18:09:35 +02:00
pascallanger
043a8336e5 Code cleaning (XMEGA) 2016-09-01 17:41:38 +02:00
pascallanger
ee27535b82 Update README.md 2016-09-01 14:42:56 +02:00
pascallanger
89e6ae2475 Update Protocols_Details.md 2016-09-01 14:40:17 +02:00
pascallanger
e51615f520 DSM2 renamed to DSM 2016-09-01 14:00:49 +02:00
pascallanger
6e59897587 Update Protocols_Details.md 2016-09-01 13:53:48 +02:00
pascallanger
bd0644a261 Update Protocols_Details.md 2016-09-01 13:53:10 +02:00
pascallanger
d7825e1bf8 Update README.md 2016-09-01 13:47:42 +02:00
pascallanger
97956b6c5e FrSky1 CRC messed up... 2016-09-01 13:42:33 +02:00
pascallanger
8150504ea0 NRF CE 2016-09-01 13:05:56 +02:00
pascallanger
942dec81c7 Typo 2016-09-01 08:08:00 +02:00
pascallanger
dcbc377c62 FrSky1 optim 2016-08-31 15:54:24 +02:00
pascallanger
7b65233699 FrSky 1way protocol + cosmetic 2016-08-31 15:43:45 +02:00
pascallanger
eabfd8b5c4 Important changes of the scheduler and interrupts 2016-08-31 10:26:27 +02:00
pascallanger
b7b2799611 FrSky option applied live 2016-08-31 10:22:36 +02:00
pascallanger
ece59ac374 FrSky ppm option value default 40 2016-08-31 10:20:56 +02:00
pascallanger
83cc8b772c Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-08-31 10:19:59 +02:00
pascallanger
8b5bc18142 YD717 4-in-1 V2 compatibility 2016-08-31 10:19:55 +02:00
pascallanger
e1413baa9a Update Protocols_Details.md 2016-08-30 23:30:18 +02:00
pascallanger
03640e6d37 Changed update_serial_data 2016-08-29 17:32:21 +02:00
pascallanger
2588011524 Orange DSM module update 2016-08-29 09:51:34 +02:00
pascallanger
0c16a6804a E010 2016-08-29 08:29:57 +02:00
pascallanger
e2021fdf5d Update README.md 2016-08-29 08:24:52 +02:00
pascallanger
33b5694d35 MJXQ/E010 mod 2016-08-29 08:23:17 +02:00
pascallanger
af7d04fef6 Added E010 2016-08-28 14:05:21 +02:00
pascallanger
14e3419e4c Added MJXQ / E010 2016-08-28 14:03:22 +02:00
pascallanger
f6c5252376 DEVO PPM fixed id mode 2016-08-27 11:38:07 +02:00
pascallanger
78ee77444f Update README.md 2016-08-27 08:26:05 +02:00
pascallanger
fb022970b5 Update Protocols_Details.md 2016-08-26 21:02:50 +02:00
pascallanger
e5d378dc93 Update Protocols_Details.md 2016-08-26 18:46:03 +02:00
pascallanger
5969902263 MJXQ fix 2016-08-26 17:21:21 +02:00
pascallanger
d5894de142 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-08-26 16:18:58 +02:00
pascallanger
059c6baa4e FrSkyX/SFHSS rfcal & second channel ASSAN 2016-08-26 16:18:50 +02:00
pascallanger
bbf9331baf Update README.md 2016-08-26 10:56:27 +02:00
pascallanger
a5b084f506 Update README.md 2016-08-26 10:55:13 +02:00
pascallanger
3b5471b97c Update Protocols_Details.md 2016-08-25 21:22:33 +02:00
pascallanger
fae37fe67d Update Protocols_Details.md 2016-08-25 19:39:08 +02:00
pascallanger
1f975efda1 Merge branch 'master' of https://github.com/pascallanger/DIY-Multiprotocol-TX-Module 2016-08-25 15:44:11 +02:00
pascallanger
3b3b61f52c DEVO channel order 2016-08-25 15:44:02 +02:00
pascallanger
1c1f6e21c5 Update Protocols_Details.md 2016-08-25 15:40:01 +02:00
pascallanger
8b60c7cc09 Update Protocols_Details.md 2016-08-25 15:30:57 +02:00
pascallanger
d4f9752cd4 Update Protocols_Details.md 2016-08-25 15:29:14 +02:00
pascallanger
6332a37f5b DEVO bind procedure 2016-08-25 15:28:57 +02:00
pascallanger
840a583a0b Devo fix 2016-08-25 14:48:48 +02:00
pascallanger
e7ed80d3e0 Devo fix 2016-08-25 13:42:21 +02:00
pascallanger
c2b9376313 Removed duplicate Telemetry defines 2016-08-25 11:40:38 +02:00
pascallanger
7a8b291189 Couples of fixes and improvements 2016-08-25 11:26:08 +02:00
pascallanger
e63f71d3a7 . 2016-08-24 15:05:31 +02:00
pascallanger
061c97caca New _Config.h file, MJXQ fix, 16 bit regs 2016-08-24 15:05:31 +02:00
pascallanger
988d28f2fd Update README.md 2016-08-23 13:39:10 +02:00
pascallanger
af8a0ea9c0 Update Protocols_Details.md 2016-08-23 13:07:37 +02:00
pascallanger
c78e8d8358 ASSAN protocol and FRSKY/FRSKYX/SFHSS option 2016-08-23 13:06:14 +02:00
pascallanger
392f7098bc ASSAN protocol addition 2016-08-23 12:56:04 +02:00
pascallanger
195f918543 DSM2 bind improvement? 2016-08-22 18:17:14 +02:00
pascallanger
b2579538fa Fix Cyrf reset... 2016-08-21 19:23:41 +02:00
pascallanger
35b97c4f45 Fixed disable telemetry compilation issue 2016-08-21 18:05:16 +02:00
pascallanger
adaa89a963 ASSAN protocol, FQ777 compilation fix on older Arduino 2016-08-21 17:54:12 +02:00
pascallanger
fc1429fae5 FQ777 fixed 2016-08-20 09:13:47 +02:00
pascallanger
4090f95098 Update Protocols_Details.md 2016-08-18 22:01:24 +02:00
pascallanger
3189d8d43e FQ777 2016-08-18 14:15:15 +02:00
pascallanger
cd6d10e428 SFHSS finally fixed 2016-08-17 15:50:59 +02:00
pascallanger
7d37236d78 SFHSS again 2016-08-17 14:28:25 +02:00
pascallanger
7c127acf17 Another SFHSS trial... 2016-08-17 13:44:20 +02:00
pascallanger
0a4ce2350a SFHSS fix? 2016-08-16 16:27:53 +02:00
pascallanger
181a70cb1f SFHSS fix? 2016-08-16 11:06:24 +02:00
pascallanger
7438545a16 Invert serial, optimization and SFHSS 2016-08-15 11:52:43 +02:00
pascallanger
9e902a5dd4 FQ777 Mod and FrSkyX optimization 2016-08-07 18:47:26 +02:00
pascallanger
91e395884f MT99xx->LS: more channels 2016-08-03 23:08:57 +02:00
pascallanger
7107c68a41 MT99xx->LS: more channels 2016-08-03 22:50:37 +02:00
pascallanger
86728b79e3 Fixed FQ777 2016-08-03 17:32:50 +02:00
pascallanger
e04f901590 LS protocol features 2016-08-03 10:12:08 +02:00
pascallanger
47ad2b5cfa MT99xx fix 2016-08-03 09:05:31 +02:00
pascallanger
cea0f1766f Update Protocols_Details.md 2016-08-03 09:05:10 +02:00
pascallanger
407e57d334 Update Protocols_Details.md 2016-08-02 20:55:29 +02:00
pascallanger
c4e66d0c9c Revert throttle on MT99xx... 2016-08-02 20:34:07 +02:00
pascallanger
c54f1ca9b0 Update README.md 2016-08-01 22:08:53 +02:00
pascallanger
f9fdc36d0d Arduino 1.6.10 and extra optimization 2016-08-01 22:06:29 +02:00
pascallanger
6d546094ef New protocols and optimizations
New protocols:
- FQ777 for FQ777-124
- MT99xx -> "LS" for 114/124
2016-08-01 21:57:27 +02:00
pascallanger
8dc5ae4f86 Add FQ777 2016-07-29 23:03:49 +02:00
pascallanger
fd7b81af10 Add FQ777 2016-07-29 22:54:30 +02:00
pascallanger
3abd859664 Update Protocols_Details.md 2016-07-29 11:33:48 +02:00
pascallanger
6134ce39d4 Update README.md 2016-07-29 11:31:12 +02:00
pascallanger
8ea42ea432 Couple of optimizations 2016-07-28 20:58:12 +02:00
pascallanger
fd4ff00ee2 J6Pro channel remapping 2016-07-28 15:01:32 +02:00
pascallanger
9d981b09ca Add J6Pro channels 2016-07-28 14:56:48 +02:00
pascallanger
ed807e0fe5 Add J6Pro in protocol list 2016-07-28 13:02:48 +02:00
pascallanger
32b962b036 J6Pro protocol addition 2016-07-27 22:24:58 +02:00
pascallanger
8ac476b6bd Update README.md 2016-07-27 22:06:13 +02:00
pascallanger
9ab8b84d81 Fixed Frsky telemetry 2016-07-27 20:55:53 +02:00
pascallanger
05cc4b4bd1 Update README.md 2016-07-27 20:22:24 +02:00
pascallanger
b28cf30f47 Update README.md 2016-07-27 20:21:17 +02:00
pascallanger
5bf8b0a2b6 Update README.md 2016-07-27 20:06:51 +02:00
pascallanger
d2891a49fc Update README.md 2016-07-27 20:03:39 +02:00
pascallanger
bec8ba6c2f BG board might need a resistor change to fix bind. 2016-07-27 19:58:50 +02:00
pascallanger
9e097be657 BG module needs to be flashed. 2016-07-27 19:51:19 +02:00
pascallanger
b008f55847 New BG board 2016-07-27 19:46:36 +02:00
pascallanger
487d90f260 Update README.md 2016-05-10 13:32:02 +02:00
pascallanger
671a745acc Update README.md 2016-05-09 15:43:50 +02:00
pascallanger
80880f4d2a Update README.md 2016-05-09 15:37:46 +02:00
pascallanger
109fba828b Update README.md 2016-04-20 19:44:34 +02:00
pascallanger
0a845fdfa6 Update README.md 2016-04-20 19:29:05 +02:00
pascallanger
5a5b8464fc 4in1 module addition 2016-04-20 19:27:56 +02:00
pascallanger
86d0b92a66 MultiOrange one more fix... 2016-04-20 17:53:59 +02:00
pascallanger
9f75234dac Fix xmega compile issue when devo is added 2016-04-20 17:34:28 +02:00
pascallanger
a58b129503 Orange module TAER order and Devo option 2016-04-19 14:29:47 +02:00
pascallanger
6d752acb28 Fixed xn297 scramble mode affecting cx-10a and probably other xn297 based protocols... 2016-04-18 19:43:12 +02:00
pascallanger
4486582006 LT8900 emulator address convention changed, updated Shenqi protocol accordingly. 2016-04-15 15:46:32 +02:00
pascallanger
ed027fd3ce SFHSS change 2016-04-12 15:00:06 +02:00
pascallanger
a92cb848c0 SFHSS change 2016-04-12 08:21:06 +02:00
pascallanger
e573e36aa6 SFHSS change 2016-04-11 21:17:46 +02:00
pascallanger
fc61753953 DSM2/X pncodes fix and FrSky RSSI&TSSI swap fix 2016-04-10 20:04:20 +02:00
pascallanger
9b74e19a99 Update README.md 2016-04-06 15:41:42 +02:00
pascallanger
e9e39cb985 Added all CC2500 power settings 2016-04-06 14:58:06 +02:00
pascallanger
d938f2ea50 Multi core fixes, DSM2/X fixes and telemetry, SFHSS addition, Flysky fixes, FrSkyX full telemetry and sub protocols
Many things since last commit...
2016-04-06 12:57:42 +02:00
pascallanger
6c3535951f Added SFHSS, DSM telemetry, FrSkyX telemetry and sub_protocols 2016-04-06 12:44:04 +02:00
pascallanger
cee78b4ae3 Update README.md 2016-04-06 12:33:43 +02:00
pascallanger
1ee646e1ce Update README.md 2016-04-06 12:32:14 +02:00
pascallanger
6199dec82f Update README.md 2016-03-18 17:20:15 +01:00
pascallanger
59f307bdb3 Update Protocols_Details.md 2016-03-18 17:16:39 +01:00
pascallanger
24747355ce Update README.md 2016-03-18 17:13:20 +01:00
pascallanger
3d287a2827 New FY326 protocol 2016-03-18 17:11:37 +01:00
pascallanger
def28df4dd Update README.md 2016-03-15 13:36:51 +01:00
pascallanger
d90e698a15 Update Protocols_Details.md 2016-03-13 09:39:34 +01:00
pascallanger
f4d6f88e5c Update Protocols_Details.md 2016-03-13 09:30:30 +01:00
pascallanger
799dce4b13 DSM2: Option enables the selection of the number of channels
- 0 : 4 channels @22ms
- 1 : 5 channels @22ms
- 2 : 6 channels @22ms
- 3 : 7 channels @22ms

- 4 : 4 channels @11ms
- 5 : 5 channels @11ms
- 6 : 6 channels @11ms
- 7 : 7 channels @11ms

- 8 : 8 channels @22ms
- 9 : 9 channels @22ms
- 10 : 10 channels @22ms
- 11 : 11 channels @22ms
- 12 : 12 channels @22ms
2016-03-13 09:29:25 +01:00
pascallanger
a025d028d4 Capital 'M' 2016-03-08 22:20:49 +01:00
pascallanger
8cfa9a891d Delete multiprotocol.h 2016-03-08 22:18:44 +01:00
pascallanger
5b44439dd2 Update README.md 2016-03-03 17:10:40 +01:00
pascallanger
44fb7dcdaa Add Arduino Mini has a supported platform. 2016-03-03 16:34:57 +01:00
pascallanger
4f5d1ba26b Correct serial init 2016-03-03 16:26:43 +01:00
pascallanger
0a08b09d70 Update Protocols_Details.md 2016-02-26 19:40:34 +01:00
pascallanger
35eedda352 Update README.md 2016-02-26 19:32:11 +01:00
pascallanger
05fb8bc742 Added Shenqi protocol and LT8910 emulation layer 2016-02-26 19:02:26 +01:00
pascallanger
795df2937e Space and ram optimization on FrSky & FrSkyX 2016-02-15 21:15:09 +01:00
pascallanger
5607740e77 Update Protocols_Details.md 2016-02-13 09:06:58 +01:00
pascallanger
d4287d3046 Update README.md 2016-02-11 23:01:39 +01:00
pascallanger
71ef72bae3 Update README.md 2016-02-11 22:56:26 +01:00
pascallanger
c310d698ca Short description on how to compile 2016-02-11 22:52:41 +01:00
pascallanger
13ce3d1c92 Separate MD files for readability 2016-02-11 22:35:38 +01:00
pascallanger
122ed79a98 Create Protocols_Details.md 2016-02-11 22:29:33 +01:00
pascallanger
6d655242a6 Update list of protocols 2016-02-11 22:11:08 +01:00
pascallanger
09cab9d825 Removed some pics 2016-02-10 16:33:12 +01:00
pascallanger
d8bd38c124 OSH Park link 2016-02-10 16:31:20 +01:00
pascallanger
abc8bf0e62 PCB v2.3d details 2016-02-10 11:39:41 +01:00
pascallanger
24106ac3d2 PCB v2.3d pictures 2016-02-10 11:26:57 +01:00
pascallanger
bf506d382f PCB v2.3d 2016-02-10 10:53:13 +01:00
pascallanger
84b1a9bbec PCB v2.3d 2016-02-10 10:45:35 +01:00
pascallanger
d67afd4396 Update README.md 2016-02-09 08:55:56 +01:00
pascallanger
9f2f7eff5b Update README.md 2016-02-08 09:20:35 +01:00
pascallanger
c863d5976b Fix MT99xx... 2016-02-06 11:33:50 +01:00
pascallanger
d6338e9daf Update README.md 2016-02-05 18:44:26 +01:00
pascallanger
b393d2666d Added FrSkyX protocol, Added MT99xx YZ sub protocol, Ram usage optimization 2016-02-05 17:28:09 +01:00
pascallanger
c5b1e73312 Update README.md 2016-02-04 22:08:07 +01:00
pascallanger
fa65222228 Added FrSkyX description and telemetry info 2016-02-04 21:59:49 +01:00
pascallanger
38e57ccd71 Update README.md 2016-02-04 14:19:48 +01:00
pascallanger
86d3d26273 New protocol MJXQ 2016-02-04 13:35:16 +01:00
pascallanger
db8e4a03a8 New protocol MJXQ and FTDI upload method 2016-02-04 13:24:16 +01:00
pascallanger
c90db8594a Update README.md 2016-02-03 18:32:08 +01:00
pascallanger
855ca77194 Update README.md 2016-02-03 18:24:56 +01:00
pascallanger
4f23af070e Update README.md 2016-02-03 17:49:42 +01:00
pascallanger
626613b545 Update README.md 2016-02-02 16:02:16 +01:00
pascallanger
c26de3bd67 Update README.md 2016-02-02 16:00:34 +01:00
pascallanger
c059915bd3 Update README.md 2016-02-01 15:22:58 +01:00
pascallanger
d2d70dcb38 Update README.md 2016-02-01 15:21:14 +01:00
pascallanger
846292442c CX10 sub protocol details 2016-02-01 15:19:12 +01:00
pascallanger
11283a2199 MT99xx protocol for MT99xx, Eachine H7, Yi Zhan i6S 2016-02-01 13:23:41 +01:00
pascallanger
4c8a0b9a63 MT99XX protocol 2016-02-01 12:18:09 +01:00
pascallanger
54accbf21f CG023 small change 2016-02-01 11:49:10 +01:00
pascallanger
08dc0db2e2 Preparation for new protocol MT99XX (includes H7) 2016-02-01 11:41:36 +01:00
pascallanger
38c6330a2a CX-10A bind improvement 2016-02-01 11:39:36 +01:00
pascallanger
2f983f42fe Update README.md 2016-01-31 22:03:43 +01:00
pascallanger
b9e45c4bb0 Fix: Hubsan telemetry packet check function 2016-01-28 19:31:03 +01:00
pascallanger
9d3b1d75d1 Revert "Fix: Hubsan telemetry packet check function & Change: Telemetry variables to static"
This reverts commit ac78ddcc8240970b153ad0fddad54e8800187656.
2016-01-28 19:27:56 +01:00
pascallanger
ac78ddcc82 Fix: Hubsan telemetry packet check function & Change: Telemetry variables to static 2016-01-28 18:43:59 +01:00
pascallanger
f912d84ab6 Telemetry display for Hubsan TX RSSI 2016-01-28 17:27:58 +01:00
pascallanger
85548d6e8e Add: Telemetry display for Hubsan TX RSSI 2016-01-28 17:25:15 +01:00
pascallanger
c74de12ceb Fix: small bug in telemetry for Hubsan 2016-01-28 11:42:56 +01:00
pascallanger
017a21c17f Added: Display error messages if wrong board type is selected at compilation time 2016-01-28 11:26:49 +01:00
pascallanger
9a63038a5f Arduino 1.6.7 support 2016-01-28 10:53:14 +01:00
pascallanger
304fc2536b Fix: Arduino 1.6.7 compilation issues 2016-01-28 10:51:11 +01:00
pascallanger
365169a9fb Update README.md 2016-01-28 09:52:44 +01:00
pascallanger
4b82ead18b Improved Toolchain section 2016-01-28 09:48:19 +01:00
pascallanger
141d7cc268 Update README.md 2016-01-28 09:45:00 +01:00
pascallanger
ee8e94cfb0 Telemetry additions 2016-01-27 18:09:20 +01:00
pascallanger
b50bedef39 Hub telemetry and fix compilation warnings/errors if protocols are commented 2016-01-27 17:57:33 +01:00
pascallanger
a689ce4de9 Fix: Update_aux_flags missplaced for PPM input 2016-01-26 22:33:17 +01:00
pascallanger
ae0478a7e9 Frsky telemetry update 2016-01-26 13:46:38 +01:00
pascallanger
ee6eed5ac5 Update README.md 2016-01-25 18:16:20 +01:00
pascallanger
9140c426c4 New protocol CX-10/Q242 2016-01-25 18:14:56 +01:00
pascallanger
a41bfabede HK310: 2 packets per 5ms + Core: reset CC2500 at boot 2016-01-25 17:23:03 +01:00
pascallanger
5d26357025 Couple of edits... 2016-01-25 17:23:01 +01:00
pascallanger
644c10e994 Update README.md 2016-01-25 17:07:37 +01:00
pascallanger
b3ca0beead Fix typo in ESky 2016-01-23 12:59:28 +01:00
pascallanger
93300c6821 Fix: removed reset of nrf24l01 if not previously used... 2016-01-23 09:03:15 +01:00
pascallanger
2bd8d7ee32 Update README.md 2016-01-22 16:34:34 +01:00
pascallanger
95c339ef74 Update README.md 2016-01-22 16:33:46 +01:00
pascallanger
76ad1d5ef7 Default PPM protocols and settings 2016-01-22 16:30:59 +01:00
pascallanger
151e82a2c3 _Config.h file and all protocol settings for PPM mode 2016-01-22 16:23:59 +01:00
pascallanger
3fcaf93788 Update README.md 2016-01-21 17:26:31 +01:00
pascallanger
b8927d66e9 PPM fix 2016-01-20 21:30:37 +01:00
pascallanger
9273f364fc Update README.md 2016-01-20 14:34:29 +01:00
pascallanger
bc42dbf88a Core and all protocols have been updated
Lot of changes in this new master
ChangeLog:
- Core: LED flashing when an invalid protocol has been selected
- Core: Channels 5 to 12 available as switches for all protocols: code
and size optimization
- Documentation (readme.md): fully updated, all protocols/sub
protocols/channels described, models example, many improvements
- All protocols have been updated in some way, here are some highlights:
* Bayang: added picture, video and inverted channels
* CG023->H8_3D: added light and calibration channels
* CX10: added sub protocols Q282, JC3015_1, JC3015_2, MK33041
* ESky: added new protocol - untested
* Hubsan: added compatibility with the new Hubsan Plus protocol
* KN: fully rewritten protocol: added sub protocols WLTOYS and FEILUN,
11 channels support

New version successfully tested on all my models: Flysky RX/F939/V911
protocol Flysky, Frsky RX protocol Frsky, Hubsan X4 protocol Hubsan,
Hisky HCP100/HCP80 protocol Hisky, HK-3000/HK3100 RX protocol
Hisky/HK310, XINXUN X39 protocol YD717/XINXUN, Symax X5C-1 protocol
SymaX/SYMAX, Cheerson CX-10A protocol CX10/BLUE, Eachine 3D-X4 protocol
CG023.

To access new protocols from er9x/ersky9x, you need to build a version
from this github repository https://github.com/pascallanger/mbtx based
on the latest er9x r820 and ersky9x r218.
2016-01-20 10:51:17 +01:00
pascallanger
481d4c15d6 Hubsan Plus protocol compatibility 2016-01-19 19:11:56 +01:00
pascallanger
563030e732 Added one more LED status: flash in case of invalid protocol selected 2016-01-19 18:44:08 +01:00
pascallanger
4f9137d009 KN channels and sub protocols 2016-01-19 00:19:32 +01:00
pascallanger
ed1b4d1885 YD717: corrected sub protocol name 2016-01-18 21:01:02 +01:00
pascallanger
6bbcd9020e V2x2 clarification 2016-01-18 18:56:15 +01:00
pascallanger
0ba916a7d6 Syma X5C protocol clarification 2016-01-18 18:21:04 +01:00
pascallanger
cf498462eb Hubsan Plus protocol addition 2016-01-18 17:02:39 +01:00
pascallanger
e8b8b861a4 CX10 new sub protocols 2016-01-18 15:28:11 +01:00
pascallanger
4afb045234 Update README.md 2016-01-18 13:54:09 +01:00
pascallanger
ef5c876085 Update README.md 2016-01-16 22:48:45 +01:00
pascallanger
7fbcfeec9c Update README.md 2016-01-16 12:05:24 +01:00
pascallanger
2981a8ef83 Update README.md 2016-01-15 11:29:22 +01:00
pascallanger
b1e8bfe2ab Update README.md 2016-01-15 11:14:36 +01:00
pascallanger
623d568eb9 Update README.md 2016-01-15 10:40:57 +01:00
pascallanger
3625834be3 Update README.md 2016-01-12 15:52:51 +01:00
pascallanger
925a4f4a57 H8 3D channels clarifications 2016-01-11 11:17:03 +01:00
pascallanger
0729b21e67 H8_3D protocol addition 2016-01-10 16:10:27 +01:00
pascallanger
393d37a8c6 Add H8_3D description 2016-01-10 16:07:27 +01:00
pascallanger
c1454e4414 Range function fixed 2016-01-02 13:51:16 +01:00
pascallanger
282c48ec63 Not needed 2016-01-01 23:10:36 +01:00
pascallanger
c02a5d7f19 Removing Binaries from git history 2016-01-01 23:06:45 +01:00
pascallanger
8a06230aab Update README.md 2016-01-01 22:58:36 +01:00
pascallanger
d01d6f8fd6 hex file location under Release 2016-01-01 22:54:43 +01:00
pascallanger
fdf6cc9912 Update README.md 2015-12-31 10:28:19 +01:00
pascallanger
00a93233ad Update README.md 2015-12-31 10:19:21 +01:00
pascallanger
30dcf40e48 Update README.md 2015-12-30 21:14:24 +01:00
464 changed files with 257666 additions and 4562 deletions

12
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [pascallanger]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=VF2K9T23DRY56&lc=US&item_name=DIY%20Multiprotocol&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted

378
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,378 @@
# Workflow for testing MULTI-Module firmware builds
name: MULTI Test, Build, Deploy, Release
on:
# Trigger the workflow on pushes, except those that are tagged (avoids double-testing releases)
push:
branches:
- '**'
tags-ignore:
- '**'
paths:
- '.github/workflows/**'
- 'buildroot/bin/**'
- 'Multiprotocol/**'
# Trigger the workflow on pull requests to the master branch
pull_request:
branches:
- master
paths:
- '.github/workflows/**'
- 'buildroot/bin/**'
- 'Multiprotocol/**'
# Triggers the workflow on release creation
release:
types:
- created
# Allows the workflow to be triggered manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
# Configure the board matrix
strategy:
fail-fast: false
matrix:
include:
- board: "multi4in1:avr:multiatmega328p:bootloader=none"
name: "ATmega328p"
- board: "multi4in1:avr:multiatmega328p:bootloader=optiboot"
name: "ATmega328p (Optiboot)"
- board: "multi4in1:avr:multixmega32d4"
name: "OrangeRX"
- board: "multi4in1:STM32F1:multistm32f103c8:debug_option=none"
name: "STM32F103 (64KB)"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=none"
name: "STM32F103 (128KB)"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=native"
name: "STM32F103 (128KB, USB Debug)"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=ftdi"
name: "STM32F103 (128KB, Serial Debug)"
- board: "multi4in1:STM32F1:multi5in1t18int"
name: "T18 5-in-1 (128KB)"
# Set the build name using the friendly board name
name: "[Test] ${{ matrix.name }}"
# Set the environment variables
env:
BOARD: ${{ matrix.board }}
steps:
- uses: actions/checkout@v4
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v2
with:
version: "0.32.2"
- name: Prepare build environment
run: |
echo "Github Ref: $GITHUB_REF"
echo "Event name: ${{ github.event_name }}"
echo "Event action: ${{ github.event.action }}"
echo "Tag name: ${{ github.event.release.tag_name }}"
arduino-cli config init --additional-urls https://raw.githubusercontent.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/master/package_multi_4in1_board_index.json,https://raw.githubusercontent.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/devel/source/package_multi_4in1_board_devel_index.json
arduino-cli core update-index
if [[ "$BOARD" =~ ":avr:" ]]; then
arduino-cli core install arduino:avr;
fi
if [[ "$BOARD" =~ "multi4in1-devel:avr" ]]; then
arduino-cli core install multi4in1-devel:avr
elif [[ "$BOARD" =~ "multi4in1:avr" ]]; then
arduino-cli core install multi4in1:avr
fi
if [[ "$BOARD" =~ "multi4in1-devel:STM32F1:" ]]; then
arduino-cli core install multi4in1-devel:STM32F1
elif [[ "$BOARD" =~ "multi4in1:STM32F1:" ]]; then
arduino-cli core install multi4in1:STM32F1
fi
chmod +x ${GITHUB_WORKSPACE}/buildroot/bin/*
echo "${GITHUB_WORKSPACE}/buildroot/bin" >> $GITHUB_PATH
mkdir ./build
mkdir ./binaries
- name: Configure MULTI-Module firmware options
run: |
# Load the build functions
source ./buildroot/bin/buildFunctions;
# Get the version
getMultiVersion
echo "MULTI_VERSION=$(echo $MULTI_VERSION)" >> $GITHUB_ENV
# Get all the protocols for this board
getAllProtocols
echo "A7105_PROTOCOLS=$(echo $A7105_PROTOCOLS)" >> $GITHUB_ENV
echo "CC2500_PROTOCOLS=$(echo $CC2500_PROTOCOLS)" >> $GITHUB_ENV
echo "CYRF6936_PROTOCOLS=$(echo $CYRF6936_PROTOCOLS)" >> $GITHUB_ENV
echo "NRF24L01_PROTOCOLS=$(echo $NRF24L01_PROTOCOLS)" >> $GITHUB_ENV
echo "SX1276_PROTOCOLS=$(echo $SX1276_PROTOCOLS)" >> $GITHUB_ENV
echo "CCNRF_INO_PROTOCOLS=$(echo $CCNRF_INO_PROTOCOLS)" >> $GITHUB_ENV
echo "ALL_PROTOCOLS=$(echo $ALL_PROTOCOLS)" >> $GITHUB_ENV
# Get all the RF modules for this board
getAllRFModules
echo "ALL_RFMODULES=$(echo $ALL_RFMODULES)" >> $GITHUB_ENV
# Disable CHECK_FOR_BOOTLOADER when not needed
if [[ "$BOARD" =~ ":avr:multiatmega328p:bootloader=none" ]]; then
opt_disable CHECK_FOR_BOOTLOADER;
fi
# Trim the build down for the Atmega328p board
if [[ "$BOARD" =~ ":avr:multiatmega328p:" ]]; then
opt_disable $ALL_PROTOCOLS
opt_enable FRSKYX_CC2500_INO AFHDS2A_A7105_INO MJXQ_NRF24L01_INO DSM_CYRF6936_INO;
fi
# Trim the enabled protocols down for the STM32F103CB board with debugging or the STM32F103C8 board in general
if [[ "$BOARD" =~ ":STM32F1:multistm32f103cb:debug_option=ftdi" ]] || [[ "$BOARD" =~ ":STM32F1:multistm32f103cb:debug_option=native" ]] || [[ "$BOARD" =~ ":STM32F1:multistm32f103c8" ]]; then
opt_disable $ALL_PROTOCOLS;
opt_enable FRSKYX_CC2500_INO AFHDS2A_A7105_INO MJXQ_NRF24L01_INO DSM_CYRF6936_INO;
fi
- name: Save default firmware configuration
run: |
cat Multiprotocol/_Config.h
cp Multiprotocol/_Config.h ./_Config.h.bak
- name: Build default configuration
run: |
# Skip the default build for boards where it's too large now
if [[ "$BOARD" =~ ":STM32F1:multistm32f103cb:debug_option=none" ]] || [[ "$BOARD" =~ ":STM32F1:multi5in1t18int" ]]; then
printf "Not testing default build for $BOARD.";
else
source ./buildroot/bin/buildFunctions;
buildMulti
fi
- name: Build serial only
run: |
# Skip the serial-only build for boards where it's too large now
if [[ "$BOARD" =~ ":STM32F1:multistm32f103cb:debug_option=none" ]] || [[ "$BOARD" =~ ":STM32F1:multi5in1t18int" ]]; then
printf "Not testing serial-only build for $BOARD.";
else
source ./buildroot/bin/buildFunctions;
cp ./_Config.h.bak Multiprotocol/_Config.h
opt_disable ENABLE_PPM;
buildMulti;
fi
- name: Build PPM only
run: |
# Skip the PPM-only build for boards where it's too large now
if [[ "$BOARD" =~ ":STM32F1:multistm32f103cb:debug_option=none" ]] || [[ "$BOARD" =~ ":STM32F1:multi5in1t18int" ]]; then
printf "Not testing PPM-only build for $BOARD.";
else
source ./buildroot/bin/buildFunctions;
cp ./_Config.h.bak Multiprotocol/_Config.h
opt_disable ENABLE_SERIAL;
buildMulti;
fi
- name: Build each RF module individually
run: |
# Skip the per-RF module builds for boards which have fixed modules
if [[ "$BOARD" =~ ":STM32F1:multi5in1t18int" ]]; then
printf "Not testing individual RF module builds for $BOARD.";
else
source ./buildroot/bin/buildFunctions;
cp ./_Config.h.bak Multiprotocol/_Config.h;
buildEachRFModule;
fi
- name: Build each protocol individually
run: |
source ./buildroot/bin/buildFunctions;
cp ./_Config.h.bak Multiprotocol/_Config.h;
buildEachProtocol;
build:
runs-on: ubuntu-latest
# Configure the board matrix
strategy:
fail-fast: false
matrix:
include:
- board: "multi4in1:avr:multiatmega328p:bootloader=none"
name: "ATmega328p"
release: "atmega328p"
- board: "multi4in1:avr:multiatmega328p:bootloader=optiboot"
name: "ATmega328p (Optiboot)"
release: "atmega328p-optiboot"
- board: "multi4in1:avr:multixmega32d4"
name: "OrangeRX"
release: "orangerx"
- board: "multi4in1:STM32F1:multistm32f103c8:debug_option=none"
name: "STM32F103 CC2500 (64KB)"
release: "stm32f103-cc2500-64k"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=none"
name: "STM32F103 CC2500 (128KB)"
release: "stm32f103-cc2500-128k"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=none"
name: "STM32F103 (128KB)"
release: "stm32f103-128k-4in1"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=native"
name: "STM32F103 (128KB, USB Debug)"
release: "stm32f103-128k-usb-debug"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=ftdi"
name: "STM32F103 (128KB, Serial Debug)"
release: "stm32f103-128k-serial-debug"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=none"
name: "STM32F103 5-in-1 (128KB)"
release: "stm32f103-128k-5in1"
- board: "multi4in1:STM32F1:multistm32f103cb:debug_option=none"
name: "T-Lite 5-in-1 (128KB)"
release: "tlite-5in1"
- board: "multi4in1:STM32F1:multi5in1t18int"
name: "T18 5-in-1 (128KB)"
release: "t18-5in1"
- board: "none"
name: "Scripts"
release: "scripts"
# Set the build name using the friendly board name
name: "[Build] ${{ matrix.name }}"
# Set the environment variables
env:
BOARD: ${{ matrix.board }}
RELEASE: ${{ matrix.release }}
steps:
- uses: actions/checkout@v4
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v2
with:
version: "0.32.2"
- name: Prepare build environment
run: |
echo "Github Ref: $GITHUB_REF"
echo "Event name: ${{ github.event_name }}"
echo "Event action: ${{ github.event.action }}"
echo "Tag name: ${{ github.event.release.tag_name }}"
arduino-cli config init --additional-urls https://raw.githubusercontent.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/master/package_multi_4in1_board_index.json,https://raw.githubusercontent.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/devel/source/package_multi_4in1_board_devel_index.json
arduino-cli core update-index
if [[ "$BOARD" =~ ":avr:" ]]; then
arduino-cli core install arduino:avr;
fi
if [[ "$BOARD" =~ "multi4in1-devel:avr" ]]; then
arduino-cli core install multi4in1-devel:avr
elif [[ "$BOARD" =~ "multi4in1:avr" ]]; then
arduino-cli core install multi4in1:avr
fi
if [[ "$BOARD" =~ "multi4in1-devel:STM32F1:" ]]; then
arduino-cli core install multi4in1-devel:STM32F1
elif [[ "$BOARD" =~ "multi4in1:STM32F1:" ]]; then
arduino-cli core install multi4in1:STM32F1
fi
chmod +x ${GITHUB_WORKSPACE}/buildroot/bin/*
echo "${GITHUB_WORKSPACE}/buildroot/bin" >> $GITHUB_PATH
mkdir ./build
mkdir ./binaries
- name: Configure MULTI-Module firmware options
run: |
# Load the build functions
source ./buildroot/bin/buildFunctions;
# Get the version
getMultiVersion
echo "MULTI_VERSION=$(echo $MULTI_VERSION)" >> $GITHUB_ENV
# Get all the protocols for this board
getAllProtocols
echo "A7105_PROTOCOLS=$(echo $A7105_PROTOCOLS)" >> $GITHUB_ENV
echo "CC2500_PROTOCOLS=$(echo $CC2500_PROTOCOLS)" >> $GITHUB_ENV
echo "CYRF6936_PROTOCOLS=$(echo $CYRF6936_PROTOCOLS)" >> $GITHUB_ENV
echo "NRF24L01_PROTOCOLS=$(echo $NRF24L01_PROTOCOLS)" >> $GITHUB_ENV
echo "SX1276_PROTOCOLS=$(echo $SX1276_PROTOCOLS)" >> $GITHUB_ENV
echo "CCNRF_INO_PROTOCOLS=$(echo $CCNRF_INO_PROTOCOLS)" >> $GITHUB_ENV
echo "ALL_PROTOCOLS=$(echo $ALL_PROTOCOLS)" >> $GITHUB_ENV
# Disable CHECK_FOR_BOOTLOADER when not needed
if [[ "$BOARD" =~ ":avr:multiatmega328p:bootloader=none" ]]; then
opt_disable CHECK_FOR_BOOTLOADER;
fi
- name: Save default firmware configuration
run: |
cat Multiprotocol/_Config.h
cp Multiprotocol/_Config.h ./_Config.h.bak
- name: Build release files
run: |
source ./buildroot/bin/buildFunctions;
cp ./_Config.h.bak Multiprotocol/_Config.h;
buildReleaseFiles;
ls -al ./binaries;
NUM_FILES=$(ls -l ./binaries | grep ^- | wc -l);
if [ $NUM_FILES -gt 0 ]; then
echo "HAVE_FILES=true" >> $GITHUB_ENV
else
echo "HAVE_FILES=false" >> $GITHUB_ENV
fi
- name: 'Upload Artifacts'
if: env.HAVE_FILES == 'true'
uses: actions/upload-artifact/@v4
with:
name: multi-${{ matrix.release }}
path: ./binaries/
deploy:
name: "[Deploy] Attach Build Artifacts"
runs-on: ubuntu-latest
needs: [test, build]
steps:
- name: Combine and upload build artifacts
uses: actions/upload-artifact/merge@v4
with:
name: multi-test-build
pattern: multi-*
delete-merged: true
retention-days: 90
release:
name: "[Release] Publish Files to Release"
if: github.event_name == 'release' && github.event.action == 'created'
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: multi-test-build
path: ./artifacts/
- name: Display downloaded artifacts
run: ls -R ./artifacts/
- name: Deploy artifacts to release
uses: AButler/upload-release-assets@v3.0
with:
files: './artifacts/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,2 @@
:02000000FFFF00
:00000001FF

View File

@ -0,0 +1,34 @@
:107E0000112484B714BE9FEF9BB99CE395B991E010
:107E100098B98370A9F08AEF80938500109284004E
:107E200085E08093810096BBB09BFECF10928100CD
:107E300093B186B181709C73892B8D3109F0B3D0D9
:107E400082E08093C00088E18093C10086E0809347
:107E5000C20081E28093C400259AC0E0D0E093E0A4
:107E6000F92EEE24E39425E0D22E31E1C32EA9D0E1
:107E7000813481F4A6D08EBBABD08EB3823811F49E
:107E800085E006C08EB3813811F484E001C083E040
:107E900091D086C0823411F484E103C0853419F492
:107EA00085E09DD07DC0853541F48BD0C82F89D029
:107EB000D0E0D82BCC0FDD1F72C0863521F484E0D2
:107EC0008ED080E0E5CF843609F03DC07AD079D0FD
:107ED000B82E77D0C11520E7D20718F000E011E0E6
:107EE00004C0FE01F7BEE895F9CF6BD0F80181938D
:107EF0008F01BE12FACFCE01905781159E4018F423
:107F0000FE01F7BEE89564D0C115FEE7DF0708F073
:107F100047C007B600FCFDCFFE01A0E0B1E08D91A7
:107F20009D910C01E7BEE89511243296A03821E01E
:107F3000B207A9F7FE01D7BEE89507B600FCFDCF52
:107F4000C7BEE8952DC08437B1F43BD03AD0B82EE7
:107F500038D03ED0FE01AC2EAB0C8F010F5F1F4F0F
:107F6000849128D0A01205C02196BA94CB0DD11DC2
:107F700017C0F801F2CF853739F42AD08EE11AD034
:107F800085E918D08FE084CF813549F421D080E194
:107F900011D08091C00086FFFCCF05D001C018D061
:107FA00080E108D064CFE0E0F0E084918F3F09F0F9
:107FB000099408959091C00095FFFCCF8093C6006E
:107FC00008958091C00087FFFCCF8091C60008957E
:107FD000F8DF803211F085E1EDDF84E1EBCFCF9364
:107FE000C82FEFDFC150E9F7CF91F2CFA8950895E0
:0C7FF000E0E6F0E098E1908380830895C3
:0400000300007E007B
:00000001FF

View File

@ -0,0 +1,504 @@
# Makefile for ATmegaBOOT
# E.Lins, 18.7.2005
# $Id$
#
# Instructions
#
# To make bootloader .hex file:
# make diecimila
# make lilypad
# make ng
# etc...
#
# To burn bootloader .hex file:
# make diecimila_isp
# make lilypad_isp
# make ng_isp
# etc...
# program name should not be changed...
PROGRAM = optiboot
# The default behavior is to build using tools that are in the users
# current path variables, but we can also build using an installed
# Arduino user IDE setup, or the Arduino source tree.
# Uncomment this next lines to build within the arduino environment,
# using the arduino-included avrgcc toolset (mac and pc)
# ENV ?= arduino
# ENV ?= arduinodev
# OS ?= macosx
# OS ?= windows
# enter the parameters for the avrdude isp tool -b19200
#
# These are the parameters for a usb-based STK500v2 programmer.
# Exact type unknown. (historical Makefile values.)
ISPTOOL = stk500v2
ISPPORT = usb
ISPSPEED = -b 57600
#
#
# These are parameters for using an Arduino with the ArduinoISP sketch
# as the programmer. On a mac, for a particular Uno as programmer.
#ISPTOOL = stk500v1 -C /Applications/arduino/arduino-0022/hardware/tools/avr/etc/avrdude.conf
#ISPPORT = /dev/tty.usbmodemfd3141
#ISPSPEED = -b19200
MCU_TARGET = atmega168
LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
# Build environments
# Start of some ugly makefile-isms to allow optiboot to be built
# in several different environments. See the README.TXT file for
# details.
# default
fixpath = $(1)
ifeq ($(ENV), arduino)
# For Arduino, we assume that we're connected to the optiboot directory
# included with the arduino distribution, which means that the full set
# of avr-tools are "right up there" in standard places.
TOOLROOT = ../../../tools
GCCROOT = $(TOOLROOT)/avr/bin/
AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
ifeq ($(OS), windows)
# On windows, SOME of the tool paths will need to have backslashes instead
# of forward slashes (because they use windows cmd.exe for execution instead
# of a unix/mingw shell?) We also have to ensure that a consistent shell
# is used even if a unix shell is installed (ie as part of WINAVR)
fixpath = $(subst /,\,$1)
SHELL = cmd.exe
endif
else ifeq ($(ENV), arduinodev)
# Arduino IDE source code environment. Use the unpacked compilers created
# by the build (you'll need to do "ant build" first.)
ifeq ($(OS), macosx)
TOOLROOT = ../../../../build/macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools
endif
ifeq ($(OS), windows)
TOOLROOT = ../../../../build/windows/work/hardware/tools
endif
GCCROOT = $(TOOLROOT)/avr/bin/
AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
else
GCCROOT =
AVRDUDE_CONF =
endif
#
# End of build environment code.
# the efuse should really be 0xf8; since, however, only the lower
# three bits of that byte are used on the atmega168, avrdude gets
# confused if you specify 1's for the higher bits, see:
# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
#
# similarly, the lock bits should be 0xff instead of 0x3f (to
# unlock the bootloader section) and 0xcf instead of 0x2f (to
# lock it), but since the high two bits of the lock byte are
# unused, avrdude would get confused.
ISPFUSES = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
-p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m \
-U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
ISPFLASH = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
-p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x2f:m
STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
-lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
OBJ = $(PROGRAM).o
OPTIMIZE = -Os -fno-inline-small-functions -fno-split-wide-types
# -mshort-calls
DEFS =
LIBS =
CC = $(GCCROOT)avr-gcc
# Override is only needed by avr-lib build system.
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
override LDFLAGS = $(LDSECTIONS) -Wl,--relax -Wl,--gc-sections -nostartfiles -nostdlib
OBJCOPY = $(GCCROOT)avr-objcopy
OBJDUMP = $(call fixpath,$(GCCROOT)avr-objdump)
SIZE = $(GCCROOT)avr-size
#Voice board test
# ATmega328
#
#atmega328: TARGET = atmega328p
#atmega328: MCU_TARGET = atmega328p
#atmega328: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=38400'
#atmega328: AVR_FREQ = 12000000L
#atmega328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
#atmega328: $(PROGRAM)_atmega328.hex
#atmega328: $(PROGRAM)_atmega328.lst
atmega328: TARGET = atmega328
atmega328: MCU_TARGET = atmega328p
atmega328: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=57600'
atmega328: AVR_FREQ = 16000000L
atmega328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
atmega328: $(PROGRAM)_atmega328_16.hex
atmega328: $(PROGRAM)_atmega328_16.lst
xmega32D4: TARGET = atxmega32d4
xmega32D4: MCU_TARGET = atxmega32d4
xmega32D4: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=57600'
xmega32D4: AVR_FREQ = 32000000L
xmega32D4: LDSECTIONS = -Wl,--section-start=.text=0x8000
xmega32D4: $(PROGRAM)_xmega32d4.hex
xmega32D4: $(PROGRAM)_xmega32d4.lst
# Test platforms
# Virtual boot block test
virboot328: TARGET = atmega328
virboot328: MCU_TARGET = atmega328p
virboot328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DVIRTUAL_BOOT'
virboot328: AVR_FREQ = 16000000L
virboot328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
virboot328: $(PROGRAM)_atmega328.hex
virboot328: $(PROGRAM)_atmega328.lst
# 20MHz clocked platforms
#
# These are capable of 230400 baud, or 38400 baud on PC (Arduino Avrdude issue)
#
pro20: TARGET = pro_20mhz
pro20: MCU_TARGET = atmega168
pro20: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
pro20: AVR_FREQ = 20000000L
pro20: $(PROGRAM)_pro_20mhz.hex
pro20: $(PROGRAM)_pro_20mhz.lst
pro20_isp: pro20
pro20_isp: TARGET = pro_20mhz
# 2.7V brownout
pro20_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
pro20_isp: LFUSE = C6
# 512 byte boot
pro20_isp: EFUSE = 04
pro20_isp: isp
# 16MHz clocked platforms
#
# These are capable of 230400 baud, or 38400 baud on PC (Arduino Avrdude issue)
#
pro16: TARGET = pro_16MHz
pro16: MCU_TARGET = atmega168
pro16: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
pro16: AVR_FREQ = 16000000L
pro16: $(PROGRAM)_pro_16MHz.hex
pro16: $(PROGRAM)_pro_16MHz.lst
pro16_isp: pro16
pro16_isp: TARGET = pro_16MHz
# 2.7V brownout
pro16_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
pro16_isp: LFUSE = C6
# 512 byte boot
pro16_isp: EFUSE = 04
pro16_isp: isp
# Diecimila, Duemilanove with m168, and NG use identical bootloaders
# Call it "atmega168" for generality and clarity, keep "diecimila" for
# backward compatibility of makefile
#
atmega168: TARGET = atmega168
atmega168: MCU_TARGET = atmega168
atmega168: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=38400'
atmega168: AVR_FREQ = 12000000L
atmega168: $(PROGRAM)_atmega168.hex
atmega168: $(PROGRAM)_atmega168.lst
atmega168_isp: atmega168
atmega168_isp: TARGET = atmega168
# 2.7V brownout
atmega168_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega168_isp: LFUSE = FF
# 512 byte boot
atmega168_isp: EFUSE = 04
atmega168_isp: isp
diecimila: TARGET = diecimila
diecimila: MCU_TARGET = atmega168
diecimila: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
diecimila: AVR_FREQ = 16000000L
diecimila: $(PROGRAM)_diecimila.hex
diecimila: $(PROGRAM)_diecimila.lst
diecimila_isp: diecimila
diecimila_isp: TARGET = diecimila
# 2.7V brownout
diecimila_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
diecimila_isp: LFUSE = FF
# 512 byte boot
diecimila_isp: EFUSE = 04
diecimila_isp: isp
atmega328_isp: atmega328
atmega328_isp: TARGET = atmega328
atmega328_isp: MCU_TARGET = atmega328p
# 512 byte boot, SPIEN
atmega328_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega328_isp: LFUSE = FF
# 2.7V brownout
atmega328_isp: EFUSE = FD
atmega328_isp: isp
atmega1284: TARGET = atmega1284p
atmega1284: MCU_TARGET = atmega1284p
atmega1284: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DBIGBOOT'
atmega1284: AVR_FREQ = 16000000L
atmega1284: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
atmega1284: $(PROGRAM)_atmega1284p.hex
atmega1284: $(PROGRAM)_atmega1284p.lst
atmega1284_isp: atmega1284
atmega1284_isp: TARGET = atmega1284p
atmega1284_isp: MCU_TARGET = atmega1284p
# 1024 byte boot
atmega1284_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega1284_isp: LFUSE = FF
# 2.7V brownout
atmega1284_isp: EFUSE = FD
atmega1284_isp: isp
# Sanguino has a minimum boot size of 1024 bytes, so enable extra functions
#
sanguino: TARGET = atmega644p
sanguino: MCU_TARGET = atmega644p
sanguino: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DBIGBOOT'
sanguino: AVR_FREQ = 16000000L
sanguino: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
sanguino: $(PROGRAM)_atmega644p.hex
sanguino: $(PROGRAM)_atmega644p.lst
sanguino_isp: sanguino
sanguino_isp: TARGET = atmega644p
sanguino_isp: MCU_TARGET = atmega644p
# 1024 byte boot
sanguino_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
sanguino_isp: LFUSE = FF
# 2.7V brownout
sanguino_isp: EFUSE = FD
sanguino_isp: isp
# Mega has a minimum boot size of 1024 bytes, so enable extra functions
#mega: TARGET = atmega1280
mega1280: MCU_TARGET = atmega1280
mega1280: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DBIGBOOT'
mega1280: AVR_FREQ = 16000000L
mega1280: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
mega1280: $(PROGRAM)_atmega1280.hex
mega1280: $(PROGRAM)_atmega1280.lst
mega1280_isp: mega
mega1280_isp: TARGET = atmega1280
mega1280_isp: MCU_TARGET = atmega1280
# 1024 byte boot
mega1280_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
mega1280_isp: LFUSE = FF
# 2.7V brownout
mega1280_isp: EFUSE = FD
mega1280_isp: isp
# ATmega8
#
atmega8: TARGET = atmega8
atmega8: MCU_TARGET = atmega8
atmega8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
atmega8: AVR_FREQ = 16000000L
atmega8: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
atmega8: $(PROGRAM)_atmega8.hex
atmega8: $(PROGRAM)_atmega8.lst
atmega8_isp: atmega8
atmega8_isp: TARGET = atmega8
atmega8_isp: MCU_TARGET = atmega8
# SPIEN, CKOPT, Bootsize=512B
atmega8_isp: HFUSE = CC
# 2.7V brownout, Low power xtal (16MHz) 16KCK/14CK+65ms
atmega8_isp: LFUSE = BF
atmega8_isp: isp
# ATmega88
#
atmega88: TARGET = atmega88
atmega88: MCU_TARGET = atmega88
atmega88: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=38400'
atmega88: AVR_FREQ = 12000000L
atmega88: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
atmega88: $(PROGRAM)_atmega88.hex
atmega88: $(PROGRAM)_atmega88.lst
atmega88_isp: atmega88
atmega88_isp: TARGET = atmega88
atmega88_isp: MCU_TARGET = atmega88
# 2.7V brownout
atmega88_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
atemga88_isp: LFUSE = FF
# 512 byte boot
atmega88_isp: EFUSE = 04
atmega88_isp: isp
# 8MHz clocked platforms
#
# These are capable of 38400 baud
#
lilypad: TARGET = lilypad
lilypad: MCU_TARGET = atmega168
lilypad: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
lilypad: AVR_FREQ = 8000000L
lilypad: $(PROGRAM)_lilypad.hex
lilypad: $(PROGRAM)_lilypad.lst
lilypad_isp: lilypad
lilypad_isp: TARGET = lilypad
# 2.7V brownout
lilypad_isp: HFUSE = DD
# Internal 8MHz osc (8MHz) Slow rising power
lilypad_isp: LFUSE = E2
# 512 byte boot
lilypad_isp: EFUSE = 04
lilypad_isp: isp
lilypad_resonator: TARGET = lilypad_resonator
lilypad_resonator: MCU_TARGET = atmega168
lilypad_resonator: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
lilypad_resonator: AVR_FREQ = 8000000L
lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
lilypad_resonator: $(PROGRAM)_lilypad_resonator.lst
lilypad_resonator_isp: lilypad_resonator
lilypad_resonator_isp: TARGET = lilypad_resonator
# 2.7V brownout
lilypad_resonator_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
lilypad_resonator_isp: LFUSE = C6
# 512 byte boot
lilypad_resonator_isp: EFUSE = 04
lilypad_resonator_isp: isp
pro8: TARGET = pro_8MHz
pro8: MCU_TARGET = atmega168
pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
pro8: AVR_FREQ = 8000000L
pro8: $(PROGRAM)_pro_8MHz.hex
pro8: $(PROGRAM)_pro_8MHz.lst
pro8_isp: pro8
pro8_isp: TARGET = pro_8MHz
# 2.7V brownout
pro8_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
pro8_isp: LFUSE = C6
# 512 byte boot
pro8_isp: EFUSE = 04
pro8_isp: isp
atmega328_pro8: TARGET = atmega328_pro_8MHz
atmega328_pro8: MCU_TARGET = atmega328p
atmega328_pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
atmega328_pro8: AVR_FREQ = 8000000L
atmega328_pro8: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.lst
atmega328_pro8_isp: atmega328_pro8
atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
atmega328_pro8_isp: MCU_TARGET = atmega328p
# 512 byte boot, SPIEN
atmega328_pro8_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega328_pro8_isp: LFUSE = FF
# 2.7V brownout
atmega328_pro8_isp: EFUSE = DE
atmega328_pro8_isp: isp
# 1MHz clocked platforms
#
# These are capable of 9600 baud
#
luminet: TARGET = luminet
luminet: MCU_TARGET = attiny84
luminet: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=9600'
luminet: CFLAGS += '-DVIRTUAL_BOOT_PARTITION'
luminet: AVR_FREQ = 1000000L
luminet: LDSECTIONS = -Wl,--section-start=.text=0x1d00 -Wl,--section-start=.version=0x1efe
luminet: $(PROGRAM)_luminet.hex
luminet: $(PROGRAM)_luminet.lst
luminet_isp: luminet
luminet_isp: TARGET = luminet
luminet_isp: MCU_TARGET = attiny84
# Brownout disabled
luminet_isp: HFUSE = DF
# 1MHz internal oscillator, slowly rising power
luminet_isp: LFUSE = 62
# Self-programming enable
luminet_isp: EFUSE = FE
luminet_isp: isp
#
# Generic build instructions
#
#
isp: $(TARGET)
$(ISPFUSES)
$(ISPFLASH)
isp-stk500: $(PROGRAM)_$(TARGET).hex
$(STK500-1)
$(STK500-2)
%.elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
$(SIZE) $@
clean:
rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
%.lst: %.elf
$(OBJDUMP) -h -S $< > $@
%.hex: %.elf
$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O ihex $< $@
%.srec: %.elf
$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O srec $< $@
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O binary $< $@

View File

@ -0,0 +1,848 @@
/* Modified to use out for SPM access
** Peter Knight, Optiboot project http://optiboot.googlecode.com
**
** Todo: Tidy up
**
** "_short" routines execute 1 cycle faster and use 1 less word of flash
** by using "out" instruction instead of "sts".
**
** Additional elpm variants that trust the value of RAMPZ
*/
/* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Eric B. Weddington
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id: boot.h,v 1.27.2.3 2008/09/30 13:58:48 arcanum Exp $ */
#ifndef _AVR_BOOT_H_
#define _AVR_BOOT_H_ 1
/** \file */
/** \defgroup avr_boot <avr/boot.h>: Bootloader Support Utilities
\code
#include <avr/io.h>
#include <avr/boot.h>
\endcode
The macros in this module provide a C language interface to the
bootloader support functionality of certain AVR processors. These
macros are designed to work with all sizes of flash memory.
Global interrupts are not automatically disabled for these macros. It
is left up to the programmer to do this. See the code example below.
Also see the processor datasheet for caveats on having global interrupts
enabled during writing of the Flash.
\note Not all AVR processors provide bootloader support. See your
processor datasheet to see if it provides bootloader support.
\todo From email with Marek: On smaller devices (all except ATmega64/128),
__SPM_REG is in the I/O space, accessible with the shorter "in" and "out"
instructions - since the boot loader has a limited size, this could be an
important optimization.
\par API Usage Example
The following code shows typical usage of the boot API.
\code
#include <inttypes.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
void boot_program_page (uint32_t page, uint8_t *buf)
{
uint16_t i;
uint8_t sreg;
// Disable interrupts.
sreg = SREG;
cli();
eeprom_busy_wait ();
boot_page_erase (page);
boot_spm_busy_wait (); // Wait until the memory is erased.
for (i=0; i<SPM_PAGESIZE; i+=2)
{
// Set up little-endian word.
uint16_t w = *buf++;
w += (*buf++) << 8;
boot_page_fill (page + i, w);
}
boot_page_write (page); // Store buffer in flash page.
boot_spm_busy_wait(); // Wait until the memory is written.
// Reenable RWW-section again. We need this if we want to jump back
// to the application after bootloading.
boot_rww_enable ();
// Re-enable interrupts (if they were ever enabled).
SREG = sreg;
}\endcode */
#include <avr/eeprom.h>
#include <avr/io.h>
#include <inttypes.h>
#include <limits.h>
/* Check for SPM Control Register in processor. */
#if defined (SPMCSR)
# define __SPM_REG SPMCSR
#elif defined (SPMCR)
# define __SPM_REG SPMCR
#else
# error AVR processor does not provide bootloader support!
#endif
/* Check for SPM Enable bit. */
#if defined(SPMEN)
# define __SPM_ENABLE SPMEN
#elif defined(SELFPRGEN)
# define __SPM_ENABLE SELFPRGEN
#else
# error Cannot find SPM Enable bit definition!
#endif
/** \ingroup avr_boot
\def BOOTLOADER_SECTION
Used to declare a function or variable to be placed into a
new section called .bootloader. This section and its contents
can then be relocated to any address (such as the bootloader
NRWW area) at link-time. */
#define BOOTLOADER_SECTION __attribute__ ((section (".bootloader")))
/* Create common bit definitions. */
#ifdef ASB
#define __COMMON_ASB ASB
#else
#define __COMMON_ASB RWWSB
#endif
#ifdef ASRE
#define __COMMON_ASRE ASRE
#else
#define __COMMON_ASRE RWWSRE
#endif
/* Define the bit positions of the Boot Lock Bits. */
#define BLB12 5
#define BLB11 4
#define BLB02 3
#define BLB01 2
/** \ingroup avr_boot
\def boot_spm_interrupt_enable()
Enable the SPM interrupt. */
#define boot_spm_interrupt_enable() (__SPM_REG |= (uint8_t)_BV(SPMIE))
/** \ingroup avr_boot
\def boot_spm_interrupt_disable()
Disable the SPM interrupt. */
#define boot_spm_interrupt_disable() (__SPM_REG &= (uint8_t)~_BV(SPMIE))
/** \ingroup avr_boot
\def boot_is_spm_interrupt()
Check if the SPM interrupt is enabled. */
#define boot_is_spm_interrupt() (__SPM_REG & (uint8_t)_BV(SPMIE))
/** \ingroup avr_boot
\def boot_rww_busy()
Check if the RWW section is busy. */
#define boot_rww_busy() (__SPM_REG & (uint8_t)_BV(__COMMON_ASB))
/** \ingroup avr_boot
\def boot_spm_busy()
Check if the SPM instruction is busy. */
#define boot_spm_busy() (__SPM_REG & (uint8_t)_BV(__SPM_ENABLE))
/** \ingroup avr_boot
\def boot_spm_busy_wait()
Wait while the SPM instruction is busy. */
#define boot_spm_busy_wait() do{}while(boot_spm_busy())
#define __BOOT_PAGE_ERASE (_BV(__SPM_ENABLE) | _BV(PGERS))
#define __BOOT_PAGE_WRITE (_BV(__SPM_ENABLE) | _BV(PGWRT))
#define __BOOT_PAGE_FILL _BV(__SPM_ENABLE)
#define __BOOT_RWW_ENABLE (_BV(__SPM_ENABLE) | _BV(__COMMON_ASRE))
#define __BOOT_LOCK_BITS_SET (_BV(__SPM_ENABLE) | _BV(BLBSET))
#define __boot_page_fill_short(address, data) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r0, %3\n\t" \
"out %0, %1\n\t" \
"spm\n\t" \
"clr r1\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_FILL), \
"z" ((uint16_t)address), \
"r" ((uint16_t)data) \
: "r0" \
); \
}))
#define __boot_page_fill_normal(address, data) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r0, %3\n\t" \
"sts %0, %1\n\t" \
"spm\n\t" \
"clr r1\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_FILL), \
"z" ((uint16_t)address), \
"r" ((uint16_t)data) \
: "r0" \
); \
}))
#define __boot_page_fill_alternate(address, data)\
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r0, %3\n\t" \
"sts %0, %1\n\t" \
"spm\n\t" \
".word 0xffff\n\t" \
"nop\n\t" \
"clr r1\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_FILL), \
"z" ((uint16_t)address), \
"r" ((uint16_t)data) \
: "r0" \
); \
}))
#define __boot_page_fill_extended(address, data) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r0, %4\n\t" \
"movw r30, %A3\n\t" \
"sts %1, %C3\n\t" \
"sts %0, %2\n\t" \
"spm\n\t" \
"clr r1\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"i" (_SFR_MEM_ADDR(RAMPZ)), \
"r" ((uint8_t)__BOOT_PAGE_FILL), \
"r" ((uint32_t)address), \
"r" ((uint16_t)data) \
: "r0", "r30", "r31" \
); \
}))
#define __boot_page_fill_extended_short(address, data) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r0, %4\n\t" \
"movw r30, %A3\n\t" \
"out %1, %C3\n\t" \
"out %0, %2\n\t" \
"spm\n\t" \
"clr r1\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"i" (_SFR_IO_ADDR(RAMPZ)), \
"r" ((uint8_t)__BOOT_PAGE_FILL), \
"r" ((uint32_t)address), \
"r" ((uint16_t)data) \
: "r0", "r30", "r31" \
); \
}))
#define __boot_page_erase_short(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"out %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_ERASE), \
"z" ((uint16_t)address) \
); \
}))
#define __boot_page_erase_normal(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"sts %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_ERASE), \
"z" ((uint16_t)address) \
); \
}))
#define __boot_page_erase_alternate(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"sts %0, %1\n\t" \
"spm\n\t" \
".word 0xffff\n\t" \
"nop\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_ERASE), \
"z" ((uint16_t)address) \
); \
}))
#define __boot_page_erase_extended(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r30, %A3\n\t" \
"sts %1, %C3\n\t" \
"sts %0, %2\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"i" (_SFR_MEM_ADDR(RAMPZ)), \
"r" ((uint8_t)__BOOT_PAGE_ERASE), \
"r" ((uint32_t)address) \
: "r30", "r31" \
); \
}))
#define __boot_page_erase_extended_short(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r30, %A3\n\t" \
"out %1, %C3\n\t" \
"out %0, %2\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"i" (_SFR_IO_ADDR(RAMPZ)), \
"r" ((uint8_t)__BOOT_PAGE_ERASE), \
"r" ((uint32_t)address) \
: "r30", "r31" \
); \
}))
#define __boot_page_write_short(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"out %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_WRITE), \
"z" ((uint16_t)address) \
); \
}))
#define __boot_page_write_normal(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"sts %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_WRITE), \
"z" ((uint16_t)address) \
); \
}))
#define __boot_page_write_alternate(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"sts %0, %1\n\t" \
"spm\n\t" \
".word 0xffff\n\t" \
"nop\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_PAGE_WRITE), \
"z" ((uint16_t)address) \
); \
}))
#define __boot_page_write_extended(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r30, %A3\n\t" \
"sts %1, %C3\n\t" \
"sts %0, %2\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"i" (_SFR_MEM_ADDR(RAMPZ)), \
"r" ((uint8_t)__BOOT_PAGE_WRITE), \
"r" ((uint32_t)address) \
: "r30", "r31" \
); \
}))
#define __boot_page_write_extended_short(address) \
(__extension__({ \
__asm__ __volatile__ \
( \
"movw r30, %A3\n\t" \
"out %1, %C3\n\t" \
"out %0, %2\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"i" (_SFR_IO_ADDR(RAMPZ)), \
"r" ((uint8_t)__BOOT_PAGE_WRITE), \
"r" ((uint32_t)address) \
: "r30", "r31" \
); \
}))
#define __boot_rww_enable_short() \
(__extension__({ \
__asm__ __volatile__ \
( \
"out %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_RWW_ENABLE) \
); \
}))
#define __boot_rww_enable() \
(__extension__({ \
__asm__ __volatile__ \
( \
"sts %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_RWW_ENABLE) \
); \
}))
#define __boot_rww_enable_alternate() \
(__extension__({ \
__asm__ __volatile__ \
( \
"sts %0, %1\n\t" \
"spm\n\t" \
".word 0xffff\n\t" \
"nop\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_RWW_ENABLE) \
); \
}))
/* From the mega16/mega128 data sheets (maybe others):
Bits by SPM To set the Boot Loader Lock bits, write the desired data to
R0, write "X0001001" to SPMCR and execute SPM within four clock cycles
after writing SPMCR. The only accessible Lock bits are the Boot Lock bits
that may prevent the Application and Boot Loader section from any
software update by the MCU.
If bits 5..2 in R0 are cleared (zero), the corresponding Boot Lock bit
will be programmed if an SPM instruction is executed within four cycles
after BLBSET and SPMEN (or SELFPRGEN) are set in SPMCR. The Z-pointer is
don't care during this operation, but for future compatibility it is
recommended to load the Z-pointer with $0001 (same as used for reading the
Lock bits). For future compatibility It is also recommended to set bits 7,
6, 1, and 0 in R0 to 1 when writing the Lock bits. When programming the
Lock bits the entire Flash can be read during the operation. */
#define __boot_lock_bits_set_short(lock_bits) \
(__extension__({ \
uint8_t value = (uint8_t)(~(lock_bits)); \
__asm__ __volatile__ \
( \
"ldi r30, 1\n\t" \
"ldi r31, 0\n\t" \
"mov r0, %2\n\t" \
"out %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
"r" (value) \
: "r0", "r30", "r31" \
); \
}))
#define __boot_lock_bits_set(lock_bits) \
(__extension__({ \
uint8_t value = (uint8_t)(~(lock_bits)); \
__asm__ __volatile__ \
( \
"ldi r30, 1\n\t" \
"ldi r31, 0\n\t" \
"mov r0, %2\n\t" \
"sts %0, %1\n\t" \
"spm\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
"r" (value) \
: "r0", "r30", "r31" \
); \
}))
#define __boot_lock_bits_set_alternate(lock_bits) \
(__extension__({ \
uint8_t value = (uint8_t)(~(lock_bits)); \
__asm__ __volatile__ \
( \
"ldi r30, 1\n\t" \
"ldi r31, 0\n\t" \
"mov r0, %2\n\t" \
"sts %0, %1\n\t" \
"spm\n\t" \
".word 0xffff\n\t" \
"nop\n\t" \
: \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
"r" (value) \
: "r0", "r30", "r31" \
); \
}))
/*
Reading lock and fuse bits:
Similarly to writing the lock bits above, set BLBSET and SPMEN (or
SELFPRGEN) bits in __SPMREG, and then (within four clock cycles) issue an
LPM instruction.
Z address: contents:
0x0000 low fuse bits
0x0001 lock bits
0x0002 extended fuse bits
0x0003 high fuse bits
Sounds confusing, doesn't it?
Unlike the macros in pgmspace.h, no need to care for non-enhanced
cores here as these old cores do not provide SPM support anyway.
*/
/** \ingroup avr_boot
\def GET_LOW_FUSE_BITS
address to read the low fuse bits, using boot_lock_fuse_bits_get
*/
#define GET_LOW_FUSE_BITS (0x0000)
/** \ingroup avr_boot
\def GET_LOCK_BITS
address to read the lock bits, using boot_lock_fuse_bits_get
*/
#define GET_LOCK_BITS (0x0001)
/** \ingroup avr_boot
\def GET_EXTENDED_FUSE_BITS
address to read the extended fuse bits, using boot_lock_fuse_bits_get
*/
#define GET_EXTENDED_FUSE_BITS (0x0002)
/** \ingroup avr_boot
\def GET_HIGH_FUSE_BITS
address to read the high fuse bits, using boot_lock_fuse_bits_get
*/
#define GET_HIGH_FUSE_BITS (0x0003)
/** \ingroup avr_boot
\def boot_lock_fuse_bits_get(address)
Read the lock or fuse bits at \c address.
Parameter \c address can be any of GET_LOW_FUSE_BITS,
GET_LOCK_BITS, GET_EXTENDED_FUSE_BITS, or GET_HIGH_FUSE_BITS.
\note The lock and fuse bits returned are the physical values,
i.e. a bit returned as 0 means the corresponding fuse or lock bit
is programmed.
*/
#define boot_lock_fuse_bits_get_short(address) \
(__extension__({ \
uint8_t __result; \
__asm__ __volatile__ \
( \
"ldi r30, %3\n\t" \
"ldi r31, 0\n\t" \
"out %1, %2\n\t" \
"lpm %0, Z\n\t" \
: "=r" (__result) \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
"M" (address) \
: "r0", "r30", "r31" \
); \
__result; \
}))
#define boot_lock_fuse_bits_get(address) \
(__extension__({ \
uint8_t __result; \
__asm__ __volatile__ \
( \
"ldi r30, %3\n\t" \
"ldi r31, 0\n\t" \
"sts %1, %2\n\t" \
"lpm %0, Z\n\t" \
: "=r" (__result) \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
"M" (address) \
: "r0", "r30", "r31" \
); \
__result; \
}))
/** \ingroup avr_boot
\def boot_signature_byte_get(address)
Read the Signature Row byte at \c address. For some MCU types,
this function can also retrieve the factory-stored oscillator
calibration bytes.
Parameter \c address can be 0-0x1f as documented by the datasheet.
\note The values are MCU type dependent.
*/
#define __BOOT_SIGROW_READ (_BV(__SPM_ENABLE) | _BV(SIGRD))
#define boot_signature_byte_get_short(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"out %1, %2\n\t" \
"lpm %0, Z" "\n\t" \
: "=r" (__result) \
: "i" (_SFR_IO_ADDR(__SPM_REG)), \
"r" ((uint8_t) __BOOT_SIGROW_READ), \
"z" (__addr16) \
); \
__result; \
}))
#define boot_signature_byte_get(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"sts %1, %2\n\t" \
"lpm %0, Z" "\n\t" \
: "=r" (__result) \
: "i" (_SFR_MEM_ADDR(__SPM_REG)), \
"r" ((uint8_t) __BOOT_SIGROW_READ), \
"z" (__addr16) \
); \
__result; \
}))
/** \ingroup avr_boot
\def boot_page_fill(address, data)
Fill the bootloader temporary page buffer for flash
address with data word.
\note The address is a byte address. The data is a word. The AVR
writes data to the buffer a word at a time, but addresses the buffer
per byte! So, increment your address by 2 between calls, and send 2
data bytes in a word format! The LSB of the data is written to the lower
address; the MSB of the data is written to the higher address.*/
/** \ingroup avr_boot
\def boot_page_erase(address)
Erase the flash page that contains address.
\note address is a byte address in flash, not a word address. */
/** \ingroup avr_boot
\def boot_page_write(address)
Write the bootloader temporary page buffer
to flash page that contains address.
\note address is a byte address in flash, not a word address. */
/** \ingroup avr_boot
\def boot_rww_enable()
Enable the Read-While-Write memory section. */
/** \ingroup avr_boot
\def boot_lock_bits_set(lock_bits)
Set the bootloader lock bits.
\param lock_bits A mask of which Boot Loader Lock Bits to set.
\note In this context, a 'set bit' will be written to a zero value.
Note also that only BLBxx bits can be programmed by this command.
For example, to disallow the SPM instruction from writing to the Boot
Loader memory section of flash, you would use this macro as such:
\code
boot_lock_bits_set (_BV (BLB11));
\endcode
\note Like any lock bits, the Boot Loader Lock Bits, once set,
cannot be cleared again except by a chip erase which will in turn
also erase the boot loader itself. */
/* Normal versions of the macros use 16-bit addresses.
Extended versions of the macros use 32-bit addresses.
Alternate versions of the macros use 16-bit addresses and require special
instruction sequences after LPM.
FLASHEND is defined in the ioXXXX.h file.
USHRT_MAX is defined in <limits.h>. */
#if defined(__AVR_ATmega161__) || defined(__AVR_ATmega163__) \
|| defined(__AVR_ATmega323__)
/* Alternate: ATmega161/163/323 and 16 bit address */
#define boot_page_fill(address, data) __boot_page_fill_alternate(address, data)
#define boot_page_erase(address) __boot_page_erase_alternate(address)
#define boot_page_write(address) __boot_page_write_alternate(address)
#define boot_rww_enable() __boot_rww_enable_alternate()
#define boot_lock_bits_set(lock_bits) __boot_lock_bits_set_alternate(lock_bits)
#elif (FLASHEND > USHRT_MAX)
/* Extended: >16 bit address */
#define boot_page_fill(address, data) __boot_page_fill_extended_short(address, data)
#define boot_page_erase(address) __boot_page_erase_extended_short(address)
#define boot_page_write(address) __boot_page_write_extended_short(address)
#define boot_rww_enable() __boot_rww_enable_short()
#define boot_lock_bits_set(lock_bits) __boot_lock_bits_set_short(lock_bits)
#else
/* Normal: 16 bit address */
#define boot_page_fill(address, data) __boot_page_fill_short(address, data)
#define boot_page_erase(address) __boot_page_erase_short(address)
#define boot_page_write(address) __boot_page_write_short(address)
#define boot_rww_enable() __boot_rww_enable_short()
#define boot_lock_bits_set(lock_bits) __boot_lock_bits_set_short(lock_bits)
#endif
/** \ingroup avr_boot
Same as boot_page_fill() except it waits for eeprom and spm operations to
complete before filling the page. */
#define boot_page_fill_safe(address, data) \
do { \
boot_spm_busy_wait(); \
eeprom_busy_wait(); \
boot_page_fill(address, data); \
} while (0)
/** \ingroup avr_boot
Same as boot_page_erase() except it waits for eeprom and spm operations to
complete before erasing the page. */
#define boot_page_erase_safe(address) \
do { \
boot_spm_busy_wait(); \
eeprom_busy_wait(); \
boot_page_erase (address); \
} while (0)
/** \ingroup avr_boot
Same as boot_page_write() except it waits for eeprom and spm operations to
complete before writing the page. */
#define boot_page_write_safe(address) \
do { \
boot_spm_busy_wait(); \
eeprom_busy_wait(); \
boot_page_write (address); \
} while (0)
/** \ingroup avr_boot
Same as boot_rww_enable() except waits for eeprom and spm operations to
complete before enabling the RWW mameory. */
#define boot_rww_enable_safe() \
do { \
boot_spm_busy_wait(); \
eeprom_busy_wait(); \
boot_rww_enable(); \
} while (0)
/** \ingroup avr_boot
Same as boot_lock_bits_set() except waits for eeprom and spm operations to
complete before setting the lock bits. */
#define boot_lock_bits_set_safe(lock_bits) \
do { \
boot_spm_busy_wait(); \
eeprom_busy_wait(); \
boot_lock_bits_set (lock_bits); \
} while (0)
#endif /* _AVR_BOOT_H_ */

View File

@ -0,0 +1,891 @@
/**********************************************************/
/* Optiboot bootloader for Arduino */
/* */
/* http://optiboot.googlecode.com */
/* */
/* Arduino-maintained version : See README.TXT */
/* http://code.google.com/p/arduino/ */
/* It is the intent that changes not relevant to the */
/* Arduino production envionment get moved from the */
/* optiboot project to the arduino project in "lumps." */
/* */
/* Heavily optimised bootloader that is faster and */
/* smaller than the Arduino standard bootloader */
/* */
/* Enhancements: */
/* Fits in 512 bytes, saving 1.5K of code space */
/* Background page erasing speeds up programming */
/* Higher baud rate speeds up programming */
/* Written almost entirely in C */
/* Customisable timeout with accurate timeconstant */
/* Optional virtual UART. No hardware UART required. */
/* Optional virtual boot partition for devices without. */
/* */
/* What you lose: */
/* Implements a skeleton STK500 protocol which is */
/* missing several features including EEPROM */
/* programming and non-page-aligned writes */
/* High baud rate breaks compatibility with standard */
/* Arduino flash settings */
/* */
/* Fully supported: */
/* ATmega168 based devices (Diecimila etc) */
/* ATmega328P based devices (Duemilanove etc) */
/* */
/* Beta test (believed working.) */
/* ATmega8 based devices (Arduino legacy) */
/* ATmega328 non-picopower devices */
/* ATmega644P based devices (Sanguino) */
/* ATmega1284P based devices */
/* */
/* Alpha test */
/* ATmega1280 based devices (Arduino Mega) */
/* */
/* Work in progress: */
/* ATtiny84 based devices (Luminet) */
/* */
/* Does not support: */
/* USB based devices (eg. Teensy) */
/* */
/* Assumptions: */
/* The code makes several assumptions that reduce the */
/* code size. They are all true after a hardware reset, */
/* but may not be true if the bootloader is called by */
/* other means or on other hardware. */
/* No interrupts can occur */
/* UART and Timer 1 are set to their reset state */
/* SP points to RAMEND */
/* */
/* Code builds on code, libraries and optimisations from: */
/* stk500boot.c by Jason P. Kyle */
/* Arduino bootloader http://arduino.cc */
/* Spiff's 1K bootloader http://spiffie.org/know/arduino_1k_bootloader/bootloader.shtml */
/* avr-libc project http://nongnu.org/avr-libc */
/* Adaboot http://www.ladyada.net/library/arduino/bootloader.html */
/* AVR305 Atmel Application Note */
/* */
/* This program is free software; you can redistribute it */
/* and/or modify it under the terms of the GNU General */
/* Public License as published by the Free Software */
/* Foundation; either version 2 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will */
/* be useful, but WITHOUT ANY WARRANTY; without even the */
/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
/* PARTICULAR PURPOSE. See the GNU General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU General */
/* Public License along with this program; if not, write */
/* to the Free Software Foundation, Inc., */
/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* */
/* Licence can be viewed at */
/* http://www.fsf.org/licenses/gpl.txt */
/* */
/**********************************************************/
/**********************************************************/
/* */
/* Optional defines: */
/* */
/**********************************************************/
/* */
/* BIG_BOOT: */
/* Build a 1k bootloader, not 512 bytes. This turns on */
/* extra functionality. */
/* */
/* BAUD_RATE: */
/* Set bootloader baud rate. */
/* */
/* LUDICROUS_SPEED: */
/* 230400 baud :-) */
/* */
/* SOFT_UART: */
/* Use AVR305 soft-UART instead of hardware UART. */
/* */
/* LED_START_FLASHES: */
/* Number of LED flashes on bootup. */
/* */
/* LED_DATA_FLASH: */
/* Flash LED when transferring data. For boards without */
/* TX or RX LEDs, or for people who like blinky lights. */
/* */
/* SUPPORT_EEPROM: */
/* Support reading and writing from EEPROM. This is not */
/* used by Arduino, so off by default. */
/* */
/* TIMEOUT_MS: */
/* Bootloader timeout period, in milliseconds. */
/* 500,1000,2000,4000,8000 supported. */
/* */
/* UART: */
/* UART number (0..n) for devices with more than */
/* one hardware uart (644P, 1284P, etc) */
/* */
/**********************************************************/
/**********************************************************/
/* Version Numbers! */
/* */
/* Arduino Optiboot now includes this Version number in */
/* the source and object code. */
/* */
/* Version 3 was released as zip from the optiboot */
/* repository and was distributed with Arduino 0022. */
/* Version 4 starts with the arduino repository commit */
/* that brought the arduino repository up-to-date with */
/* the optiboot source tree changes since v3. */
/* */
/**********************************************************/
/**********************************************************/
/* Edit History: */
/* */
/* Nov 2012 */
/* Specific version for 9x voice module */
/* by Mike Blandford */
/* Mar 2012 */
/* 4.5 WestfW: add infrastructure for non-zero UARTS. */
/* 4.5 WestfW: fix SIGNATURE_2 for m644 (bad in avr-libc) */
/* Jan 2012: */
/* 4.5 WestfW: fix NRWW value for m1284. */
/* 4.4 WestfW: use attribute OS_main instead of naked for */
/* main(). This allows optimizations that we */
/* count on, which are prohibited in naked */
/* functions due to PR42240. (keeps us less */
/* than 512 bytes when compiler is gcc4.5 */
/* (code from 4.3.2 remains the same.) */
/* 4.4 WestfW and Maniacbug: Add m1284 support. This */
/* does not change the 328 binary, so the */
/* version number didn't change either. (?) */
/* June 2011: */
/* 4.4 WestfW: remove automatic soft_uart detect (didn't */
/* know what it was doing or why.) Added a */
/* check of the calculated BRG value instead. */
/* Version stays 4.4; existing binaries are */
/* not changed. */
/* 4.4 WestfW: add initialization of address to keep */
/* the compiler happy. Change SC'ed targets. */
/* Return the SW version via READ PARAM */
/* 4.3 WestfW: catch framing errors in getch(), so that */
/* AVRISP works without HW kludges. */
/* http://code.google.com/p/arduino/issues/detail?id=368n*/
/* 4.2 WestfW: reduce code size, fix timeouts, change */
/* verifySpace to use WDT instead of appstart */
/* 4.1 WestfW: put version number in binary. */
/**********************************************************/
#define OPTIBOOT_MAJVER 4
#define OPTIBOOT_MINVER 5
#define MULTI_CALLED 1
#define MAKESTR(a) #a
#define MAKEVER(a, b) MAKESTR(a*256+b)
//asm(" .section .version\n"
// "optiboot_version: .word " MAKEVER(OPTIBOOT_MAJVER, OPTIBOOT_MINVER) "\n"
// " .section .text\n");
#include <inttypes.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
// <avr/boot.h> uses sts instructions, but this version uses out instructions
// This saves cycles and program memory.
#include "boot.h"
// We don't use <avr/wdt.h> as those routines have interrupt overhead we don't need.
#include "pin_defs.h"
#include "stk500.h"
#ifndef LED_START_FLASHES
#define LED_START_FLASHES 0
#endif
#ifdef LUDICROUS_SPEED
#define BAUD_RATE 230400L
#endif
/* set the UART baud rate defaults */
#ifndef BAUD_RATE
#if F_CPU >= 8000000L
#define BAUD_RATE 38400L // Highest rate Avrdude win32 will support
#elsif F_CPU >= 1000000L
#define BAUD_RATE 9600L // 19200 also supported, but with significant error
#elsif F_CPU >= 128000L
#define BAUD_RATE 4800L // Good for 128kHz internal RC
#else
#define BAUD_RATE 1200L // Good even at 32768Hz
#endif
#endif
#ifndef UART
#define UART 0
#endif
#if 0
/* Switch in soft UART for hard baud rates */
/*
* I don't understand what this was supposed to accomplish, where the
* constant "280" came from, or why automatically (and perhaps unexpectedly)
* switching to a soft uart is a good thing, so I'm undoing this in favor
* of a range check using the same calc used to config the BRG...
*/
#if (F_CPU/BAUD_RATE) > 280 // > 57600 for 16MHz
#ifndef SOFT_UART
#define SOFT_UART
#endif
#endif
#else // 0
#if (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 > 250
#error Unachievable baud rate (too slow) BAUD_RATE
#endif // baud rate slow check
#if (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 < 3
#error Unachievable baud rate (too fast) BAUD_RATE
#endif // baud rate fastn check
#endif
/* Watchdog settings */
#define WATCHDOG_OFF (0)
#define WATCHDOG_16MS (_BV(WDE))
#define WATCHDOG_32MS (_BV(WDP0) | _BV(WDE))
#define WATCHDOG_64MS (_BV(WDP1) | _BV(WDE))
#define WATCHDOG_125MS (_BV(WDP1) | _BV(WDP0) | _BV(WDE))
#define WATCHDOG_250MS (_BV(WDP2) | _BV(WDE))
#define WATCHDOG_500MS (_BV(WDP2) | _BV(WDP0) | _BV(WDE))
#define WATCHDOG_1S (_BV(WDP2) | _BV(WDP1) | _BV(WDE))
#define WATCHDOG_2S (_BV(WDP2) | _BV(WDP1) | _BV(WDP0) | _BV(WDE))
#ifndef __AVR_ATmega8__
#define WATCHDOG_4S (_BV(WDP3) | _BV(WDE))
#define WATCHDOG_8S (_BV(WDP3) | _BV(WDP0) | _BV(WDE))
#endif
/* Function Prototypes */
/* The main function is in init9, which removes the interrupt vector table */
/* we don't need. It is also 'naked', which means the compiler does not */
/* generate any entry or exit code itself. */
int main(void) __attribute__ ((OS_main)) __attribute__ ((noreturn)) __attribute__ ((section (".init9")));
void putch(char);
uint8_t getch(void);
static inline void getNch(uint8_t); /* "static inline" is a compiler hint to reduce code size */
void verifySpace();
#if LED_START_FLASHES > 0
static inline void flash_led(uint8_t);
#endif
uint8_t getLen();
//static inline void watchdogReset();
void watchdogConfig(uint8_t x);
#ifdef SOFT_UART
void uartDelay() __attribute__ ((naked));
#endif
static void appStart() ; // __attribute__ ((naked));
/*
* NRWW memory
* Addresses below NRWW (Non-Read-While-Write) can be programmed while
* continuing to run code from flash, slightly speeding up programming
* time. Beware that Atmel data sheets specify this as a WORD address,
* while optiboot will be comparing against a 16-bit byte address. This
* means that on a part with 128kB of memory, the upper part of the lower
* 64k will get NRWW processing as well, even though it doesn't need it.
* That's OK. In fact, you can disable the overlapping processing for
* a part entirely by setting NRWWSTART to zero. This reduces code
* space a bit, at the expense of being slightly slower, overall.
*
* RAMSTART should be self-explanatory. It's bigger on parts with a
* lot of peripheral registers.
*/
#if defined(__AVR_ATmega168__)
#define RAMSTART (0x100)
#define NRWWSTART (0x3800)
#elif defined(__AVR_ATmega328P__)
#define RAMSTART (0x100)
#define NRWWSTART (0x7000)
#elif defined(__AVR_ATmega328__)
#define RAMSTART (0x100)
#define NRWWSTART (0x7000)
#elif defined (__AVR_ATmega644P__)
#define RAMSTART (0x100)
#define NRWWSTART (0xE000)
// correct for a bug in avr-libc
#undef SIGNATURE_2
#define SIGNATURE_2 0x0A
#elif defined (__AVR_ATmega1284P__)
#define RAMSTART (0x100)
#define NRWWSTART (0xE000)
#elif defined(__AVR_ATtiny84__)
#define RAMSTART (0x100)
#define NRWWSTART (0x0000)
#elif defined(__AVR_ATmega1280__)
#define RAMSTART (0x200)
#define NRWWSTART (0xE000)
#elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)
#define RAMSTART (0x100)
#define NRWWSTART (0x1800)
#endif
/* C zero initialises all global variables. However, that requires */
/* These definitions are NOT zero initialised, but that doesn't matter */
/* This allows us to drop the zero init code, saving us memory */
#define buff ((uint8_t*)(RAMSTART))
#ifdef VIRTUAL_BOOT_PARTITION
#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
#endif
/*
* Handle devices with up to 4 uarts (eg m1280.) Rather inelegantly.
* Note that mega8 still needs special handling, because ubrr is handled
* differently.
*/
#if UART == 0
# define UART_SRA UCSR0A
# define UART_SRB UCSR0B
# define UART_SRC UCSR0C
# define UART_SRL UBRR0L
# define UART_UDR UDR0
#elif UART == 1
# define UART_SRA UCSR1A
# define UART_SRB UCSR1B
# define UART_SRC UCSR1C
# define UART_SRL UBRR1L
# define UART_UDR UDR1
#elif UART == 2
# define UART_SRA UCSR2A
# define UART_SRB UCSR2B
# define UART_SRC UCSR2C
# define UART_SRL UBRR2L
# define UART_UDR UDR2
#elif UART == 3
# define UART_SRA UCSR3A
# define UART_SRB UCSR3B
# define UART_SRC UCSR3C
# define UART_SRL UBRR3L
# define UART_UDR UDR3
#endif
/* main program starts here */
int main(void) {
uint8_t ch;
/*
* Making these local and in registers prevents the need for initializing
* them, and also saves space because code no longer stores to memory.
* (initializing address keeps the compiler happy, but isn't really
* necessary, and uses 4 bytes of flash.)
*/
register uint16_t address = 0;
// After the zero init loop, this is the first code to run.
//
// This code makes the following assumptions:
// No interrupts will execute
// SP points to RAMEND
// r1 contains zero
//
// If not, uncomment the following instructions:
// cli();
asm volatile ("clr __zero_reg__");
#ifdef __AVR_ATmega8__
SP=RAMEND; // This is done by hardware reset
#endif
// Adaboot no-wait mod
ch = MCUSR;
MCUSR = 0;
// Here, if power on, wait 0.5 secs, then check for
// serial Rx signal low, if so, stay in bootloader
// else go to application
PORTD = 0xFF ;
PORTB = 0x3C ;
PORTC = 1 ;
if (ch & (_BV(PORF) | (_BV(EXTRF)) ) )
{
#ifdef MULTI_CALLED
#if F_CPU == 12000000L
TCNT1H = 256 - 8 ;
#else
#if F_CPU == 16000000L
TCNT1H = 256 - 6 ;
#else
TCNT1H = 256 - 127 ;
#endif
TCNT1L = 0 ;
#endif
#else
#if F_CPU == 12000000L
TCNT1 = 65535-5859 ;
#else
#if F_CPU == 16000000L
TCNT1 = 65535-7813 ;
#else
TCNT1 = 65535-32767 ;
#endif
#endif
#endif
TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
TIFR1 = _BV(TOV1);
while(!(TIFR1 & _BV(TOV1)))
;
TCCR1B = 0 ; // Stop timer
uint8_t x ;
x = PINB & 0x3C ;
x |= PINC & 1 ;
if ( x != 0x1D )
{
appStart() ; // Power on, go to voice application
// if loaded
}
}
#if LED_START_FLASHES > 0
// Set up Timer 1 for timeout counter
TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
#endif
#ifndef SOFT_UART
UART_SRA = _BV(U2X0); //Double speed mode USART0
UART_SRB = _BV(RXEN0) | _BV(TXEN0);
UART_SRC = _BV(UCSZ00) | _BV(UCSZ01);
// UART_SRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
// Baudrate of 57600
#if F_CPU == 12000000L
UART_SRL = 25 ;
#else
#if F_CPU == 16000000L
UART_SRL = 33 ;
#else
#ERROR Baud rate not available
#endif
#endif
#endif
// Set up watchdog to trigger after 500ms
// watchdogConfig(WATCHDOG_1S);
/* Set LED pin as output */
LED_DDR |= _BV(LED);
#ifdef SOFT_UART
/* Set TX pin as output */
UART_DDR |= _BV(UART_TX_BIT);
#endif
#if LED_START_FLASHES > 0
/* Flash onboard LED to signal entering of bootloader */
flash_led(LED_START_FLASHES * 2);
#endif
/* Forever loop */
for (;;)
{
/* get character from UART */
ch = getch();
if(ch == STK_GET_PARAMETER)
{
GPIOR0 = getch();
verifySpace();
if (GPIOR0 == 0x82)
{
/*
* Send optiboot version as "minor SW version"
*/
putch(OPTIBOOT_MINVER);
}
else if (GPIOR0 == 0x81)
{
putch(OPTIBOOT_MAJVER);
}
else
{
/*
* GET PARAMETER returns a generic 0x03 reply for
* other parameters - enough to keep Avrdude happy
*/
putch(0x03);
}
}
else if(ch == STK_SET_DEVICE) {
// SET DEVICE is ignored
getNch(20);
}
else if(ch == STK_SET_DEVICE_EXT)
{
// SET DEVICE EXT is ignored
getNch(5);
}
else if(ch == STK_LOAD_ADDRESS)
{
// LOAD ADDRESS
uint16_t newAddress;
newAddress = getch() ;
newAddress = (newAddress & 0xff) | (getch() << 8);
#ifdef RAMPZ
// Transfer top bit to RAMPZ
RAMPZ = (newAddress & 0x8000) ? 1 : 0;
#endif
newAddress += newAddress; // Convert from word address to byte address
address = newAddress;
verifySpace();
}
else if(ch == STK_UNIVERSAL)
{
// UNIVERSAL command is ignored
getNch(4);
putch(0x00);
}
/* Write memory, length is big endian and is in bytes */
else if(ch == STK_PROG_PAGE)
{
// PROGRAM PAGE - we support flash programming only, not EEPROM
uint8_t *bufPtr;
uint16_t addrPtr;
register uint8_t length;
getch(); /* getlen() */
length = getch();
getch();
// If we are in RWW section, immediately start page erase
if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
// While that is going on, read in page contents
bufPtr = buff;
do *bufPtr++ = getch();
while (--length);
// If we are in NRWW section, page erase has to be delayed until now.
// Todo: Take RAMPZ into account
#ifdef MULTI_CALLED
if (address < 0x7E00)
#endif
{
if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
}
// Read command terminator, start reply
verifySpace();
// If only a partial page is to be programmed, the erase might not be complete.
// So check that here
#ifdef MULTI_CALLED
if (address < 0x7E00)
#endif
{
boot_spm_busy_wait();
#ifdef VIRTUAL_BOOT_PARTITION
if ((uint16_t)(void*)address == 0) {
// This is the reset vector page. We need to live-patch the code so the
// bootloader runs.
//
// Move RESET vector to WDT vector
uint16_t vect = buff[0] | (buff[1]<<8);
rstVect = vect;
wdtVect = buff[8] | (buff[9]<<8);
vect -= 4; // Instruction is a relative jump (rjmp), so recalculate.
buff[8] = vect & 0xff;
buff[9] = vect >> 8;
// Add jump to bootloader at RESET vector
buff[0] = 0x7f;
buff[1] = 0xce; // rjmp 0x1d00 instruction
}
#endif
// Copy buffer into programming buffer
bufPtr = buff;
addrPtr = (uint16_t)(void*)address;
ch = SPM_PAGESIZE / 2;
do {
uint16_t a;
// a = *bufPtr++;
// a |= (*bufPtr++) << 8;
a = *((uint16_t *)bufPtr) ;
bufPtr += 2 ;
__boot_page_fill_short((uint16_t)(void*)addrPtr,a);
addrPtr += 2;
} while (--ch);
// Write from programming buffer
__boot_page_write_short((uint16_t)(void*)address);
boot_spm_busy_wait();
#if defined(RWWSRE)
// Reenable read access to flash
boot_rww_enable();
#endif
}
}
/* Read memory block mode, length is big endian. */
else if(ch == STK_READ_PAGE)
{
register uint8_t length;
// READ PAGE - we only read flash
getch(); /* getlen() */
length = getch();
getch();
verifySpace();
#ifdef VIRTUAL_BOOT_PARTITION
do {
// Undo vector patch in bottom page so verify passes
if (address == 0) ch=rstVect & 0xff;
else if (address == 1) ch=rstVect >> 8;
else if (address == 8) ch=wdtVect & 0xff;
else if (address == 9) ch=wdtVect >> 8;
else ch = pgm_read_byte_near(address);
address++;
putch(ch);
} while (--length);
#else
#ifdef RAMPZ
// Since RAMPZ should already be set, we need to use EPLM directly.
// do putch(pgm_read_byte_near(address++));
// while (--length);
do {
uint8_t result;
__asm__ ("elpm %0,Z\n":"=r"(result):"z"(address));
putch(result);
address++;
}
while (--length);
#else
do putch(pgm_read_byte_near(address++));
while (--length);
#endif
#endif
}
/* Get device signature bytes */
else if(ch == STK_READ_SIGN)
{
// READ SIGN - return what Avrdude wants to hear
verifySpace();
putch(SIGNATURE_0);
putch(SIGNATURE_1);
putch(SIGNATURE_2);
}
else if (ch == STK_LEAVE_PROGMODE) { /* 'Q' */
// Adaboot no-wait mod
// watchdogConfig(WATCHDOG_16MS);
verifySpace();
#ifdef MULTI_CALLED
putch(STK_OK);
while (!(UART_SRA & _BV(TXC0)));
appStart() ;
#endif
}
else
{
// This covers the response to commands like STK_ENTER_PROGMODE
verifySpace();
}
putch(STK_OK);
}
}
void putch(char ch) {
#ifndef SOFT_UART
while (!(UART_SRA & _BV(UDRE0)));
UART_UDR = ch;
#else
__asm__ __volatile__ (
" com %[ch]\n" // ones complement, carry set
" sec\n"
"1: brcc 2f\n"
" cbi %[uartPort],%[uartBit]\n"
" rjmp 3f\n"
"2: sbi %[uartPort],%[uartBit]\n"
" nop\n"
"3: rcall uartDelay\n"
" rcall uartDelay\n"
" lsr %[ch]\n"
" dec %[bitcnt]\n"
" brne 1b\n"
:
:
[bitcnt] "d" (10),
[ch] "r" (ch),
[uartPort] "I" (_SFR_IO_ADDR(UART_PORT)),
[uartBit] "I" (UART_TX_BIT)
:
"r25"
);
#endif
}
uint8_t getch(void) {
uint8_t ch;
#ifdef LED_DATA_FLASH
#ifdef __AVR_ATmega8__
LED_PORT ^= _BV(LED);
#else
LED_PIN |= _BV(LED);
#endif
#endif
#ifdef SOFT_UART
__asm__ __volatile__ (
"1: sbic %[uartPin],%[uartBit]\n" // Wait for start edge
" rjmp 1b\n"
" rcall uartDelay\n" // Get to middle of start bit
"2: rcall uartDelay\n" // Wait 1 bit period
" rcall uartDelay\n" // Wait 1 bit period
" clc\n"
" sbic %[uartPin],%[uartBit]\n"
" sec\n"
" dec %[bitCnt]\n"
" breq 3f\n"
" ror %[ch]\n"
" rjmp 2b\n"
"3:\n"
:
[ch] "=r" (ch)
:
[bitCnt] "d" (9),
[uartPin] "I" (_SFR_IO_ADDR(UART_PIN)),
[uartBit] "I" (UART_RX_BIT)
:
"r25"
);
#else
while(!(UART_SRA & _BV(RXC0)))
// watchdogReset()
;
// if (!(UART_SRA & _BV(FE0))) {
/*
* A Framing Error indicates (probably) that something is talking
* to us at the wrong bit rate. Assume that this is because it
* expects to be talking to the application, and DON'T reset the
* watchdog. This should cause the bootloader to abort and run
* the application "soon", if it keeps happening. (Note that we
* don't care that an invalid char is returned...)
*/
// watchdogReset();
// }
ch = UART_UDR;
#endif
#ifdef LED_DATA_FLASH
#ifdef __AVR_ATmega8__
LED_PORT ^= _BV(LED);
#else
LED_PIN |= _BV(LED);
#endif
#endif
return ch;
}
#ifdef SOFT_UART
// AVR305 equation: #define UART_B_VALUE (((F_CPU/BAUD_RATE)-23)/6)
// Adding 3 to numerator simulates nearest rounding for more accurate baud rates
#define UART_B_VALUE (((F_CPU/BAUD_RATE)-20)/6)
#if UART_B_VALUE > 255
#error Baud rate too slow for soft UART
#endif
void uartDelay() {
__asm__ __volatile__ (
"ldi r25,%[count]\n"
"1:dec r25\n"
"brne 1b\n"
"ret\n"
::[count] "M" (UART_B_VALUE)
);
}
#endif
void getNch(uint8_t count) {
do getch(); while (--count);
verifySpace();
}
void verifySpace()
{
if ( getch() != CRC_EOP) {
putch(STK_NOSYNC);
// watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
//
// while (1) // and busy-loop so that WD causes
// ; // a reset and app start.
}
putch(STK_INSYNC);
}
#if LED_START_FLASHES > 0
void flash_led(uint8_t count) {
do {
TCNT1 = -(F_CPU/(1024*16));
TIFR1 = _BV(TOV1);
while(!(TIFR1 & _BV(TOV1)));
//#ifdef __AVR_ATmega8__
LED_PORT ^= _BV(LED);
//#else
// LED_PIN |= _BV(LED);
//#endif
watchdogReset();
} while (--count);
}
#endif
// Watchdog functions. These are only safe with interrupts turned off.
void watchdogReset() {
__asm__ __volatile__ (
"wdr\n"
);
}
void watchdogConfig(uint8_t x) {
WDTCSR = _BV(WDCE) | _BV(WDE);
WDTCSR = x;
}
void appStart()
{
// watchdogConfig(WATCHDOG_OFF);
// __asm__ __volatile__ (
//#ifdef VIRTUAL_BOOT_PARTITION
// // Jump to WDT vector
// "ldi r30,4\n"
// "clr r31\n"
//#else
// // Jump to RST vector
// "clr r30\n"
// "clr r31\n"
//#endif
// "ijmp\n"
// );
register void (*p)() ;
p = 0 ;
if ( pgm_read_byte( (uint16_t)p ) != 0xFF )
{
(*p)() ;
}
}

View File

@ -0,0 +1,80 @@
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)
/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB5
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTD
#define UART_PIN PIND
#define UART_DDR DDRD
#define UART_TX_BIT 1
#define UART_RX_BIT 0
#endif
#endif
#if defined(__AVR_ATmega8__)
//Name conversion R.Wiersma
#define UCSR0A UCSRA
#define UDR0 UDR
#define UDRE0 UDRE
#define RXC0 RXC
#define FE0 FE
#define TIFR1 TIFR
#define WDTCSR WDTCR
#endif
/* Luminet support */
#if defined(__AVR_ATtiny84__)
/* Red LED is connected to pin PA4 */
#define LED_DDR DDRA
#define LED_PORT PORTA
#define LED_PIN PINA
#define LED PINA4
/* Ports for soft UART - left port only for now. TX/RX on PA2/PA3 */
#ifdef SOFT_UART
#define UART_PORT PORTA
#define UART_PIN PINA
#define UART_DDR DDRA
#define UART_TX_BIT 2
#define UART_RX_BIT 3
#endif
#endif
/* Sanguino support */
#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
/* Onboard LED is connected to pin PB0 on Sanguino */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB0
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTD
#define UART_PIN PIND
#define UART_DDR DDRD
#define UART_TX_BIT 1
#define UART_RX_BIT 0
#endif
#endif
/* Mega support */
#if defined(__AVR_ATmega1280__)
/* Onboard LED is connected to pin PB7 on Arduino Mega */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB7
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTE
#define UART_PIN PINE
#define UART_DDR DDRE
#define UART_TX_BIT 1
#define UART_RX_BIT 0
#endif
#endif

View File

@ -0,0 +1,39 @@
/* STK500 constants list, from AVRDUDE */
#define STK_OK 0x10
#define STK_FAILED 0x11 // Not used
#define STK_UNKNOWN 0x12 // Not used
#define STK_NODEVICE 0x13 // Not used
#define STK_INSYNC 0x14 // ' '
#define STK_NOSYNC 0x15 // Not used
#define ADC_CHANNEL_ERROR 0x16 // Not used
#define ADC_MEASURE_OK 0x17 // Not used
#define PWM_CHANNEL_ERROR 0x18 // Not used
#define PWM_ADJUST_OK 0x19 // Not used
#define CRC_EOP 0x20 // 'SPACE'
#define STK_GET_SYNC 0x30 // '0'
#define STK_GET_SIGN_ON 0x31 // '1'
#define STK_SET_PARAMETER 0x40 // '@'
#define STK_GET_PARAMETER 0x41 // 'A'
#define STK_SET_DEVICE 0x42 // 'B'
#define STK_SET_DEVICE_EXT 0x45 // 'E'
#define STK_ENTER_PROGMODE 0x50 // 'P'
#define STK_LEAVE_PROGMODE 0x51 // 'Q'
#define STK_CHIP_ERASE 0x52 // 'R'
#define STK_CHECK_AUTOINC 0x53 // 'S'
#define STK_LOAD_ADDRESS 0x55 // 'U'
#define STK_UNIVERSAL 0x56 // 'V'
#define STK_PROG_FLASH 0x60 // '`'
#define STK_PROG_DATA 0x61 // 'a'
#define STK_PROG_FUSE 0x62 // 'b'
#define STK_PROG_LOCK 0x63 // 'c'
#define STK_PROG_PAGE 0x64 // 'd'
#define STK_PROG_FUSE_EXT 0x65 // 'e'
#define STK_READ_FLASH 0x70 // 'p'
#define STK_READ_DATA 0x71 // 'q'
#define STK_READ_FUSE 0x72 // 'r'
#define STK_READ_LOCK 0x73 // 's'
#define STK_READ_PAGE 0x74 // 't'
#define STK_READ_SIGN 0x75 // 'u'
#define STK_READ_OSCCAL 0x76 // 'v'
#define STK_READ_FUSE_EXT 0x77 // 'w'
#define STK_READ_OSCCAL_EXT 0x78 // 'x'

View File

@ -0,0 +1,5 @@
ATTRS{idProduct}=="1001", ATTRS{idVendor}=="0110", MODE="664", GROUP="plugdev"
ATTRS{idProduct}=="1002", ATTRS{idVendor}=="0110", MODE="664", GROUP="plugdev"
ATTRS{idProduct}=="0003", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idProduct}=="0004", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"

View File

@ -0,0 +1,11 @@
@echo off
echo Installing MULTI-Module DFU Bootloader Driver...
"%~dp0wdi-simple" --vid 0x1EAF --pid 0x0003 --type 2 --name "MULTI-Module DFU Bootloader" --dest "%~dp0MULTI-DFU-Bootloader" -b
echo.
echo Installing MULTI-Module USB Serial Driver...
"%~dp0wdi-simple" --vid 0x1EAF --pid 0x0004 --type 3 --name "MULTI-Module USB Serial" --dest "%~dp0MULTI-USB-Serial" -b
echo.
pause

Binary file not shown.

View File

@ -0,0 +1,47 @@
:108000001F92CDB7DEB7CFD01124809178009FEFBB
:1080100090937800837099F088EA91E680936808DD
:108020009093690880E180934C0880914C0884FF0C
:10803000FCCF109240088091680682FD8FD082E0CC
:1080400080936106C12CD12C97D0813479F494D0DF
:10805000898399D08981823811F485E005C08138FF
:1080600011F484E001C083E080D075C0823411F443
:1080700084E103C0853419F485E08CD06CC085356B
:1080800059F47AD0C82E78D0D12CD82A8D2D881FBB
:108090008827881F8BBF5EC0863521F484E07AD0A4
:1080A00080E0E2CF843641F567D066D0F82E64D008
:1080B000C601DCD000E010E25FD0F80181938F01AF
:1080C000FE12FACF60D0D7FC46C0CBD0C601DAD0C2
:1080D000760100E010E2F801619171918F01C70112
:1080E000DBD0F2E0EF0EF11C011581E2180799F7E1
:1080F000C601E0D0B6D02FC08437C1F43DD03CD00B
:10810000F82E3AD040D0F601EC2CEF0C8F010F5F27
:108110001F4F84912AD0E01207C0EFEFCE1ADE0A7B
:10812000FA94CF0CD11C17C0F801F0CF853739F481
:108130002AD08EE11AD085E918D082E495CF813516
:1081400049F421D080E111D08091A10886FFFCCFB5
:1081500005D001C018D080E108D076CFE0E0F0E093
:1081600084918F3F09F0099408959091A10895FF9B
:10817000FCCF8093A00808958091A10887FFFCCFD1
:108180008091A0080895F8DF803211F085E1EDDFDD
:1081900084E1EBCFCF93C82FEFDFC150E9F7CF9148
:1081A000F2CFA895089583EC8093520080915000FF
:1081B0008860809350008091510083FFFCCF82EC57
:1081C0008093550080915000806180935000809191
:1081D000510084FFFCCF88ED84BF1092400084BF23
:1081E00024E02093400087E08093A20087E88093FA
:1081F0008301109241081092420810924308109295
:10820000440810924608109247088FEF9FEF809322
:1082100066089093670810926008109261088BE0DE
:1082200080934008209365062093620688E180933E
:10823000720698E0909345069093410692E29093DF
:10824000A6081092A7088093A4088091A3088F7CA9
:1082500080618093A30883E08093A5088091A008A3
:1082600008958091CF0187FDFCCF08958F939F9350
:1082700082E2E0ECF1E08287FF91EF918DE984BF2B
:10828000E8950895FC0186E28093CA0188ED84BFD9
:1082900081E08093CB0108950F921F92FC01062E7E
:1082A000172E83E28093CA018DE984BFE8951F9061
:1082B0000F900895FC018EE28093CA018DE984BF7E
:0482C000E8950895A0
:040000030000800079
:00000001FF

View File

@ -0,0 +1,503 @@
# Makefile for ATmegaBOOT
# E.Lins, 18.7.2005
# $Id$
#
# Instructions
#
# To make bootloader .hex file:
# make diecimila
# make lilypad
# make ng
# etc...
#
# To burn bootloader .hex file:
# make diecimila_isp
# make lilypad_isp
# make ng_isp
# etc...
# program name should not be changed...
PROGRAM = optiboot
# The default behavior is to build using tools that are in the users
# current path variables, but we can also build using an installed
# Arduino user IDE setup, or the Arduino source tree.
# Uncomment this next lines to build within the arduino environment,
# using the arduino-included avrgcc toolset (mac and pc)
# ENV ?= arduino
# ENV ?= arduinodev
# OS ?= macosx
# OS ?= windows
# enter the parameters for the avrdude isp tool -b19200
#
# These are the parameters for a usb-based STK500v2 programmer.
# Exact type unknown. (historical Makefile values.)
ISPTOOL = stk500v2
ISPPORT = usb
ISPSPEED = -b 57600
#
#
# These are parameters for using an Arduino with the ArduinoISP sketch
# as the programmer. On a mac, for a particular Uno as programmer.
#ISPTOOL = stk500v1 -C /Applications/arduino/arduino-0022/hardware/tools/avr/etc/avrdude.conf
#ISPPORT = /dev/tty.usbmodemfd3141
#ISPSPEED = -b19200
MCU_TARGET = atmega168
LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
# Build environments
# Start of some ugly makefile-isms to allow optiboot to be built
# in several different environments. See the README.TXT file for
# details.
# default
fixpath = $(1)
ifeq ($(ENV), arduino)
# For Arduino, we assume that we're connected to the optiboot directory
# included with the arduino distribution, which means that the full set
# of avr-tools are "right up there" in standard places.
TOOLROOT = ../../../tools
GCCROOT = $(TOOLROOT)/avr/bin/
AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
ifeq ($(OS), windows)
# On windows, SOME of the tool paths will need to have backslashes instead
# of forward slashes (because they use windows cmd.exe for execution instead
# of a unix/mingw shell?) We also have to ensure that a consistent shell
# is used even if a unix shell is installed (ie as part of WINAVR)
fixpath = $(subst /,\,$1)
SHELL = cmd.exe
endif
else ifeq ($(ENV), arduinodev)
# Arduino IDE source code environment. Use the unpacked compilers created
# by the build (you'll need to do "ant build" first.)
ifeq ($(OS), macosx)
TOOLROOT = ../../../../build/macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools
endif
ifeq ($(OS), windows)
TOOLROOT = ../../../../build/windows/work/hardware/tools
endif
GCCROOT = $(TOOLROOT)/avr/bin/
AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
else
GCCROOT =
AVRDUDE_CONF =
endif
#
# End of build environment code.
# the efuse should really be 0xf8; since, however, only the lower
# three bits of that byte are used on the atmega168, avrdude gets
# confused if you specify 1's for the higher bits, see:
# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
#
# similarly, the lock bits should be 0xff instead of 0x3f (to
# unlock the bootloader section) and 0xcf instead of 0x2f (to
# lock it), but since the high two bits of the lock byte are
# unused, avrdude would get confused.
ISPFUSES = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
-p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m \
-U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
ISPFLASH = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
-p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x2f:m
STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
-lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
OBJ = $(PROGRAM).o
OPTIMIZE = -Os -fno-inline-small-functions -fno-split-wide-types
# -mshort-calls
DEFS =
LIBS =
CC = $(GCCROOT)avr-gcc
# Override is only needed by avr-lib build system.
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
override LDFLAGS = $(LDSECTIONS) -Wl,--relax -Wl,--gc-sections -nostartfiles -nostdlib
OBJCOPY = $(GCCROOT)avr-objcopy
OBJDUMP = $(call fixpath,$(GCCROOT)avr-objdump)
SIZE = $(GCCROOT)avr-size
#Voice board test
# ATmega328
#
#atmega328: TARGET = atmega328p
#atmega328: MCU_TARGET = atmega328p
#atmega328: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=38400'
#atmega328: AVR_FREQ = 12000000L
#atmega328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
#atmega328: $(PROGRAM)_atmega328.hex
#atmega328: $(PROGRAM)_atmega328.lst
xmega32D4: TARGET = atxmega32d4
xmega32D4: MCU_TARGET = atxmega32d4
xmega32D4: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=57600'
xmega32D4: AVR_FREQ = 32000000L
xmega32D4: LDSECTIONS = -Wl,--section-start=.text=0x8000
xmega32D4: $(PROGRAM)_xmega32d4.hex
xmega32D4: $(PROGRAM)_xmega32d4.lst
atmega328: TARGET = atmega328
atmega328: MCU_TARGET = atmega328p
atmega328: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=57600'
atmega328: AVR_FREQ = 16000000L
atmega328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
atmega328: $(PROGRAM)_atmega328_16.hex
atmega328: $(PROGRAM)_atmega328_16.lst
# Test platforms
# Virtual boot block test
virboot328: TARGET = atmega328
virboot328: MCU_TARGET = atmega328p
virboot328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DVIRTUAL_BOOT'
virboot328: AVR_FREQ = 16000000L
virboot328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
virboot328: $(PROGRAM)_atmega328.hex
virboot328: $(PROGRAM)_atmega328.lst
# 20MHz clocked platforms
#
# These are capable of 230400 baud, or 38400 baud on PC (Arduino Avrdude issue)
#
pro20: TARGET = pro_20mhz
pro20: MCU_TARGET = atmega168
pro20: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
pro20: AVR_FREQ = 20000000L
pro20: $(PROGRAM)_pro_20mhz.hex
pro20: $(PROGRAM)_pro_20mhz.lst
pro20_isp: pro20
pro20_isp: TARGET = pro_20mhz
# 2.7V brownout
pro20_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
pro20_isp: LFUSE = C6
# 512 byte boot
pro20_isp: EFUSE = 04
pro20_isp: isp
# 16MHz clocked platforms
#
# These are capable of 230400 baud, or 38400 baud on PC (Arduino Avrdude issue)
#
pro16: TARGET = pro_16MHz
pro16: MCU_TARGET = atmega168
pro16: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
pro16: AVR_FREQ = 16000000L
pro16: $(PROGRAM)_pro_16MHz.hex
pro16: $(PROGRAM)_pro_16MHz.lst
pro16_isp: pro16
pro16_isp: TARGET = pro_16MHz
# 2.7V brownout
pro16_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
pro16_isp: LFUSE = C6
# 512 byte boot
pro16_isp: EFUSE = 04
pro16_isp: isp
# Diecimila, Duemilanove with m168, and NG use identical bootloaders
# Call it "atmega168" for generality and clarity, keep "diecimila" for
# backward compatibility of makefile
#
atmega168: TARGET = atmega168
atmega168: MCU_TARGET = atmega168
atmega168: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=38400'
atmega168: AVR_FREQ = 12000000L
atmega168: $(PROGRAM)_atmega168.hex
atmega168: $(PROGRAM)_atmega168.lst
atmega168_isp: atmega168
atmega168_isp: TARGET = atmega168
# 2.7V brownout
atmega168_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega168_isp: LFUSE = FF
# 512 byte boot
atmega168_isp: EFUSE = 04
atmega168_isp: isp
diecimila: TARGET = diecimila
diecimila: MCU_TARGET = atmega168
diecimila: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
diecimila: AVR_FREQ = 16000000L
diecimila: $(PROGRAM)_diecimila.hex
diecimila: $(PROGRAM)_diecimila.lst
diecimila_isp: diecimila
diecimila_isp: TARGET = diecimila
# 2.7V brownout
diecimila_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
diecimila_isp: LFUSE = FF
# 512 byte boot
diecimila_isp: EFUSE = 04
diecimila_isp: isp
atmega328_isp: atmega328
atmega328_isp: TARGET = atmega328
atmega328_isp: MCU_TARGET = atmega328p
# 512 byte boot, SPIEN
atmega328_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega328_isp: LFUSE = FF
# 2.7V brownout
atmega328_isp: EFUSE = FD
atmega328_isp: isp
atmega1284: TARGET = atmega1284p
atmega1284: MCU_TARGET = atmega1284p
atmega1284: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DBIGBOOT'
atmega1284: AVR_FREQ = 16000000L
atmega1284: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
atmega1284: $(PROGRAM)_atmega1284p.hex
atmega1284: $(PROGRAM)_atmega1284p.lst
atmega1284_isp: atmega1284
atmega1284_isp: TARGET = atmega1284p
atmega1284_isp: MCU_TARGET = atmega1284p
# 1024 byte boot
atmega1284_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega1284_isp: LFUSE = FF
# 2.7V brownout
atmega1284_isp: EFUSE = FD
atmega1284_isp: isp
# Sanguino has a minimum boot size of 1024 bytes, so enable extra functions
#
sanguino: TARGET = atmega644p
sanguino: MCU_TARGET = atmega644p
sanguino: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DBIGBOOT'
sanguino: AVR_FREQ = 16000000L
sanguino: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
sanguino: $(PROGRAM)_atmega644p.hex
sanguino: $(PROGRAM)_atmega644p.lst
sanguino_isp: sanguino
sanguino_isp: TARGET = atmega644p
sanguino_isp: MCU_TARGET = atmega644p
# 1024 byte boot
sanguino_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
sanguino_isp: LFUSE = FF
# 2.7V brownout
sanguino_isp: EFUSE = FD
sanguino_isp: isp
# Mega has a minimum boot size of 1024 bytes, so enable extra functions
#mega: TARGET = atmega1280
mega1280: MCU_TARGET = atmega1280
mega1280: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400' '-DBIGBOOT'
mega1280: AVR_FREQ = 16000000L
mega1280: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
mega1280: $(PROGRAM)_atmega1280.hex
mega1280: $(PROGRAM)_atmega1280.lst
mega1280_isp: mega
mega1280_isp: TARGET = atmega1280
mega1280_isp: MCU_TARGET = atmega1280
# 1024 byte boot
mega1280_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
mega1280_isp: LFUSE = FF
# 2.7V brownout
mega1280_isp: EFUSE = FD
mega1280_isp: isp
# ATmega8
#
atmega8: TARGET = atmega8
atmega8: MCU_TARGET = atmega8
atmega8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
atmega8: AVR_FREQ = 16000000L
atmega8: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
atmega8: $(PROGRAM)_atmega8.hex
atmega8: $(PROGRAM)_atmega8.lst
atmega8_isp: atmega8
atmega8_isp: TARGET = atmega8
atmega8_isp: MCU_TARGET = atmega8
# SPIEN, CKOPT, Bootsize=512B
atmega8_isp: HFUSE = CC
# 2.7V brownout, Low power xtal (16MHz) 16KCK/14CK+65ms
atmega8_isp: LFUSE = BF
atmega8_isp: isp
# ATmega88
#
atmega88: TARGET = atmega88
atmega88: MCU_TARGET = atmega88
atmega88: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=38400'
atmega88: AVR_FREQ = 12000000L
atmega88: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
atmega88: $(PROGRAM)_atmega88.hex
atmega88: $(PROGRAM)_atmega88.lst
atmega88_isp: atmega88
atmega88_isp: TARGET = atmega88
atmega88_isp: MCU_TARGET = atmega88
# 2.7V brownout
atmega88_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
atemga88_isp: LFUSE = FF
# 512 byte boot
atmega88_isp: EFUSE = 04
atmega88_isp: isp
# 8MHz clocked platforms
#
# These are capable of 38400 baud
#
lilypad: TARGET = lilypad
lilypad: MCU_TARGET = atmega168
lilypad: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
lilypad: AVR_FREQ = 8000000L
lilypad: $(PROGRAM)_lilypad.hex
lilypad: $(PROGRAM)_lilypad.lst
lilypad_isp: lilypad
lilypad_isp: TARGET = lilypad
# 2.7V brownout
lilypad_isp: HFUSE = DD
# Internal 8MHz osc (8MHz) Slow rising power
lilypad_isp: LFUSE = E2
# 512 byte boot
lilypad_isp: EFUSE = 04
lilypad_isp: isp
lilypad_resonator: TARGET = lilypad_resonator
lilypad_resonator: MCU_TARGET = atmega168
lilypad_resonator: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
lilypad_resonator: AVR_FREQ = 8000000L
lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
lilypad_resonator: $(PROGRAM)_lilypad_resonator.lst
lilypad_resonator_isp: lilypad_resonator
lilypad_resonator_isp: TARGET = lilypad_resonator
# 2.7V brownout
lilypad_resonator_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
lilypad_resonator_isp: LFUSE = C6
# 512 byte boot
lilypad_resonator_isp: EFUSE = 04
lilypad_resonator_isp: isp
pro8: TARGET = pro_8MHz
pro8: MCU_TARGET = atmega168
pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
pro8: AVR_FREQ = 8000000L
pro8: $(PROGRAM)_pro_8MHz.hex
pro8: $(PROGRAM)_pro_8MHz.lst
pro8_isp: pro8
pro8_isp: TARGET = pro_8MHz
# 2.7V brownout
pro8_isp: HFUSE = DD
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
pro8_isp: LFUSE = C6
# 512 byte boot
pro8_isp: EFUSE = 04
pro8_isp: isp
atmega328_pro8: TARGET = atmega328_pro_8MHz
atmega328_pro8: MCU_TARGET = atmega328p
atmega328_pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=38400'
atmega328_pro8: AVR_FREQ = 8000000L
atmega328_pro8: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.lst
atmega328_pro8_isp: atmega328_pro8
atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
atmega328_pro8_isp: MCU_TARGET = atmega328p
# 512 byte boot, SPIEN
atmega328_pro8_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega328_pro8_isp: LFUSE = FF
# 2.7V brownout
atmega328_pro8_isp: EFUSE = DE
atmega328_pro8_isp: isp
# 1MHz clocked platforms
#
# These are capable of 9600 baud
#
luminet: TARGET = luminet
luminet: MCU_TARGET = attiny84
luminet: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=9600'
luminet: CFLAGS += '-DVIRTUAL_BOOT_PARTITION'
luminet: AVR_FREQ = 1000000L
luminet: LDSECTIONS = -Wl,--section-start=.text=0x1d00 -Wl,--section-start=.version=0x1efe
luminet: $(PROGRAM)_luminet.hex
luminet: $(PROGRAM)_luminet.lst
luminet_isp: luminet
luminet_isp: TARGET = luminet
luminet_isp: MCU_TARGET = attiny84
# Brownout disabled
luminet_isp: HFUSE = DF
# 1MHz internal oscillator, slowly rising power
luminet_isp: LFUSE = 62
# Self-programming enable
luminet_isp: EFUSE = FE
luminet_isp: isp
#
# Generic build instructions
#
#
isp: $(TARGET)
$(ISPFUSES)
$(ISPFLASH)
isp-stk500: $(PROGRAM)_$(TARGET).hex
$(STK500-1)
$(STK500-2)
%.elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
$(SIZE) $@
clean:
rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
%.lst: %.elf
$(OBJDUMP) -h -S $< > $@
%.hex: %.elf
$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O ihex $< $@
%.srec: %.elf
$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O srec $< $@
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O binary $< $@

View File

@ -0,0 +1,980 @@
/**********************************************************/
/* Optiboot bootloader for Xmega */
/* */
/* http://optiboot.googlecode.com */
/* */
/* Arduino-maintained version : See README.TXT */
/* http://code.google.com/p/arduino/ */
/* It is the intent that changes not relevant to the */
/* Arduino production envionment get moved from the */
/* optiboot project to the arduino project in "lumps." */
/* */
/* Heavily optimised bootloader that is faster and */
/* smaller than the Arduino standard bootloader */
/* */
/* Enhancements: */
/* Fits in 512 bytes, saving 1.5K of code space */
/* Background page erasing speeds up programming */
/* Higher baud rate speeds up programming */
/* Written almost entirely in C */
/* Customisable timeout with accurate timeconstant */
/* Optional virtual UART. No hardware UART required. */
/* Optional virtual boot partition for devices without. */
/* */
/* What you lose: */
/* Implements a skeleton STK500 protocol which is */
/* missing several features including EEPROM */
/* programming and non-page-aligned writes */
/* High baud rate breaks compatibility with standard */
/* Arduino flash settings */
/* */
/* Fully supported: */
/* ATmega168 based devices (Diecimila etc) */
/* ATmega328P based devices (Duemilanove etc) */
/* */
/* Beta test (believed working.) */
/* ATmega8 based devices (Arduino legacy) */
/* ATmega328 non-picopower devices */
/* ATmega644P based devices (Sanguino) */
/* ATmega1284P based devices */
/* */
/* Alpha test */
/* ATmega1280 based devices (Arduino Mega) */
/* */
/* Work in progress: */
/* ATtiny84 based devices (Luminet) */
/* */
/* Does not support: */
/* USB based devices (eg. Teensy) */
/* */
/* Assumptions: */
/* The code makes several assumptions that reduce the */
/* code size. They are all true after a hardware reset, */
/* but may not be true if the bootloader is called by */
/* other means or on other hardware. */
/* No interrupts can occur */
/* UART and Timer 1 are set to their reset state */
/* SP points to RAMEND */
/* */
/* Code builds on code, libraries and optimisations from: */
/* stk500boot.c by Jason P. Kyle */
/* Arduino bootloader http://arduino.cc */
/* Spiff's 1K bootloader http://spiffie.org/know/arduino_1k_bootloader/bootloader.shtml */
/* avr-libc project http://nongnu.org/avr-libc */
/* Adaboot http://www.ladyada.net/library/arduino/bootloader.html */
/* AVR305 Atmel Application Note */
/* */
/* This program is free software; you can redistribute it */
/* and/or modify it under the terms of the GNU General */
/* Public License as published by the Free Software */
/* Foundation; either version 2 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will */
/* be useful, but WITHOUT ANY WARRANTY; without even the */
/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
/* PARTICULAR PURPOSE. See the GNU General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU General */
/* Public License along with this program; if not, write */
/* to the Free Software Foundation, Inc., */
/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* */
/* Licence can be viewed at */
/* http://www.fsf.org/licenses/gpl.txt */
/* */
/**********************************************************/
/**********************************************************/
/* */
/* Optional defines: */
/* */
/**********************************************************/
/* */
/* BIG_BOOT: */
/* Build a 1k bootloader, not 512 bytes. This turns on */
/* extra functionality. */
/* */
/* BAUD_RATE: */
/* Set bootloader baud rate. */
/* */
/* LUDICROUS_SPEED: */
/* 230400 baud :-) */
/* */
/* SOFT_UART: */
/* Use AVR305 soft-UART instead of hardware UART. */
/* */
/* LED_START_FLASHES: */
/* Number of LED flashes on bootup. */
/* */
/* LED_DATA_FLASH: */
/* Flash LED when transferring data. For boards without */
/* TX or RX LEDs, or for people who like blinky lights. */
/* */
/* SUPPORT_EEPROM: */
/* Support reading and writing from EEPROM. This is not */
/* used by Arduino, so off by default. */
/* */
/* TIMEOUT_MS: */
/* Bootloader timeout period, in milliseconds. */
/* 500,1000,2000,4000,8000 supported. */
/* */
/* UART: */
/* UART number (0..n) for devices with more than */
/* one hardware uart (644P, 1284P, etc) */
/* */
/**********************************************************/
/**********************************************************/
/* Version Numbers! */
/* */
/* Arduino Optiboot now includes this Version number in */
/* the source and object code. */
/* */
/* Version 3 was released as zip from the optiboot */
/* repository and was distributed with Arduino 0022. */
/* Version 4 starts with the arduino repository commit */
/* that brought the arduino repository up-to-date with */
/* the optiboot source tree changes since v3. */
/* */
/**********************************************************/
/**********************************************************/
/* Edit History: */
/* */
/* Nov 2012 */
/* Specific version for 9x voice module */
/* by Mike Blandford */
/* Mar 2012 */
/* 4.5 WestfW: add infrastructure for non-zero UARTS. */
/* 4.5 WestfW: fix SIGNATURE_2 for m644 (bad in avr-libc) */
/* Jan 2012: */
/* 4.5 WestfW: fix NRWW value for m1284. */
/* 4.4 WestfW: use attribute OS_main instead of naked for */
/* main(). This allows optimizations that we */
/* count on, which are prohibited in naked */
/* functions due to PR42240. (keeps us less */
/* than 512 bytes when compiler is gcc4.5 */
/* (code from 4.3.2 remains the same.) */
/* 4.4 WestfW and Maniacbug: Add m1284 support. This */
/* does not change the 328 binary, so the */
/* version number didn't change either. (?) */
/* June 2011: */
/* 4.4 WestfW: remove automatic soft_uart detect (didn't */
/* know what it was doing or why.) Added a */
/* check of the calculated BRG value instead. */
/* Version stays 4.4; existing binaries are */
/* not changed. */
/* 4.4 WestfW: add initialization of address to keep */
/* the compiler happy. Change SC'ed targets. */
/* Return the SW version via READ PARAM */
/* 4.3 WestfW: catch framing errors in getch(), so that */
/* AVRISP works without HW kludges. */
/* http://code.google.com/p/arduino/issues/detail?id=368n*/
/* 4.2 WestfW: reduce code size, fix timeouts, change */
/* verifySpace to use WDT instead of appstart */
/* 4.1 WestfW: put version number in binary. */
/**********************************************************/
#define OPTIBOOT_MAJVER 4
#define OPTIBOOT_MINVER 5
#define MULTI_CALLED 1
#define MAKESTR(a) #a
#define MAKEVER(a, b) MAKESTR(a*256+b)
// Page Size is 128 words (256 bytes)
//asm(" .section .version\n"
// "optiboot_version: .word " MAKEVER(OPTIBOOT_MAJVER, OPTIBOOT_MINVER) "\n"
// " .section .text\n");
#include <inttypes.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
// <avr/boot.h> uses sts instructions, but this version uses out instructions
// This saves cycles and program memory.
//#include "boot.h"
// We don't use <avr/wdt.h> as those routines have interrupt overhead we don't need.
#include "pin_defs.h"
#include "stk500.h"
#define BIND_pin 2 //PD2
#define BIND_port PORTD
#define IS_BIND_BUTTON_on ( (BIND_port.IN & _BV(BIND_pin)) == 0x00 )
#ifndef LED_START_FLASHES
#define LED_START_FLASHES 0
#endif
#ifdef LUDICROUS_SPEED
#define BAUD_RATE 230400L
#endif
/* set the UART baud rate defaults */
#ifndef BAUD_RATE
#if F_CPU >= 8000000L
#define BAUD_RATE 38400L // Highest rate Avrdude win32 will support
#elsif F_CPU >= 1000000L
#define BAUD_RATE 9600L // 19200 also supported, but with significant error
#elsif F_CPU >= 128000L
#define BAUD_RATE 4800L // Good for 128kHz internal RC
#else
#define BAUD_RATE 1200L // Good even at 32768Hz
#endif
#endif
#ifndef UART
#define UART 0
#endif
#if 0
/* Switch in soft UART for hard baud rates */
/*
* I don't understand what this was supposed to accomplish, where the
* constant "280" came from, or why automatically (and perhaps unexpectedly)
* switching to a soft uart is a good thing, so I'm undoing this in favor
* of a range check using the same calc used to config the BRG...
*/
#if (F_CPU/BAUD_RATE) > 280 // > 57600 for 16MHz
#ifndef SOFT_UART
#define SOFT_UART
#endif
#endif
#else // 0
#if (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 > 250
#error Unachievable baud rate (too slow) BAUD_RATE
#endif // baud rate slow check
#if (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 < 3
#error Unachievable baud rate (too fast) BAUD_RATE
#endif // baud rate fastn check
#endif
/* Watchdog settings */
#define WATCHDOG_OFF (0)
#define WATCHDOG_16MS (_BV(WDE))
#define WATCHDOG_32MS (_BV(WDP0) | _BV(WDE))
#define WATCHDOG_64MS (_BV(WDP1) | _BV(WDE))
#define WATCHDOG_125MS (_BV(WDP1) | _BV(WDP0) | _BV(WDE))
#define WATCHDOG_250MS (_BV(WDP2) | _BV(WDE))
#define WATCHDOG_500MS (_BV(WDP2) | _BV(WDP0) | _BV(WDE))
#define WATCHDOG_1S (_BV(WDP2) | _BV(WDP1) | _BV(WDE))
#define WATCHDOG_2S (_BV(WDP2) | _BV(WDP1) | _BV(WDP0) | _BV(WDE))
#ifndef __AVR_ATmega8__
#define WATCHDOG_4S (_BV(WDP3) | _BV(WDE))
#define WATCHDOG_8S (_BV(WDP3) | _BV(WDP0) | _BV(WDE))
#endif
/* Function Prototypes */
/* The main function is in init9, which removes the interrupt vector table */
/* we don't need. It is also 'naked', which means the compiler does not */
/* generate any entry or exit code itself. */
int main(void) __attribute__ ((OS_main)) __attribute__ ((noreturn)) __attribute__ ((section (".init9")));
void putch(char);
uint8_t getch(void);
static inline void getNch(uint8_t); /* "static inline" is a compiler hint to reduce code size */
void verifySpace();
#if LED_START_FLASHES > 0
static inline void flash_led(uint8_t);
#endif
uint8_t getLen();
//static inline void watchdogReset();
void watchdogConfig(uint8_t x);
#ifdef SOFT_UART
void uartDelay() __attribute__ ((naked));
#endif
static void appStart() ; // __attribute__ ((naked));
void boot_spm_busy_wait() ;
void __boot_page_erase_short( uint16_t address ) ;
void __boot_page_fill_short( uint16_t address, uint16_t data) ;
void __boot_page_write_short( uint16_t address) ;
void __boot_erase_flash_buffer( uint16_t address ) ;
void init() ;
/*
* NRWW memory
* Addresses below NRWW (Non-Read-While-Write) can be programmed while
* continuing to run code from flash, slightly speeding up programming
* time. Beware that Atmel data sheets specify this as a WORD address,
* while optiboot will be comparing against a 16-bit byte address. This
* means that on a part with 128kB of memory, the upper part of the lower
* 64k will get NRWW processing as well, even though it doesn't need it.
* That's OK. In fact, you can disable the overlapping processing for
* a part entirely by setting NRWWSTART to zero. This reduces code
* space a bit, at the expense of being slightly slower, overall.
*
* RAMSTART should be self-explanatory. It's bigger on parts with a
* lot of peripheral registers.
*/
#if defined(__AVR_ATmega168__)
#define RAMSTART (0x100)
#define NRWWSTART (0x3800)
#elif defined(__AVR_ATmega328P__)
#define RAMSTART (0x100)
#define NRWWSTART (0x7000)
#elif defined(__AVR_ATmega328__)
#define RAMSTART (0x100)
#define NRWWSTART (0x7000)
#elif defined (__AVR_ATmega644P__)
#define RAMSTART (0x100)
#define NRWWSTART (0xE000)
// correct for a bug in avr-libc
#undef SIGNATURE_2
#define SIGNATURE_2 0x0A
#elif defined (__AVR_ATmega1284P__)
#define RAMSTART (0x100)
#define NRWWSTART (0xE000)
#elif defined(__AVR_ATtiny84__)
#define RAMSTART (0x100)
#define NRWWSTART (0x0000)
#elif defined(__AVR_ATmega1280__)
#define RAMSTART (0x200)
#define NRWWSTART (0xE000)
#elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)
#define RAMSTART (0x100)
#define NRWWSTART (0x1800)
#endif
/* C zero initialises all global variables. However, that requires */
/* These definitions are NOT zero initialised, but that doesn't matter */
/* This allows us to drop the zero init code, saving us memory */
#define buff ((uint8_t*)(RAMSTART))
#ifdef VIRTUAL_BOOT_PARTITION
#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
#endif
/*
* Handle devices with up to 4 uarts (eg m1280.) Rather inelegantly.
* Note that mega8 still needs special handling, because ubrr is handled
* differently.
*/
#if UART == 0
# define UART_SRA UCSR0A
# define UART_SRB UCSR0B
# define UART_SRC UCSR0C
# define UART_SRL UBRR0L
# define UART_UDR UDR0
#elif UART == 1
# define UART_SRA UCSR1A
# define UART_SRB UCSR1B
# define UART_SRC UCSR1C
# define UART_SRL UBRR1L
# define UART_UDR UDR1
#elif UART == 2
# define UART_SRA UCSR2A
# define UART_SRB UCSR2B
# define UART_SRC UCSR2C
# define UART_SRL UBRR2L
# define UART_UDR UDR2
#elif UART == 3
# define UART_SRA UCSR3A
# define UART_SRB UCSR3B
# define UART_SRC UCSR3C
# define UART_SRL UBRR3L
# define UART_UDR UDR3
#endif
/* main program starts here */
int main(void)
{
uint8_t ch;
uint8_t byte ;
/*
* Making these local and in registers prevents the need for initializing
* them, and also saves space because code no longer stores to memory.
* (initializing address keeps the compiler happy, but isn't really
* necessary, and uses 4 bytes of flash.)
*/
register uint16_t address = 0;
init() ;
// After the zero init loop, this is the first code to run.
//
// This code makes the following assumptions:
// No interrupts will execute
// SP points to RAMEND
// r1 contains zero
//
// If not, uncomment the following instructions:
// cli();
asm volatile ("clr __zero_reg__");
ch = RST.STATUS ;
RST.STATUS = 0xFF ; // Clear all flags
// Here, if power on, wait 0.1 secs, then check for
// serial Rx signal low, if so, stay in bootloader
// else go to application
if (ch & (RST_EXTRF_bm | RST_PORF_bm ) )
{
TCC1.CCA = 25000 ;
TCC1.INTFLAGS = TC1_CCAIF_bm ;
while(!(TCC1.INTFLAGS & TC1_CCAIF_bm))
;
TCC1.CTRLA = 0 ; // Stop timer
uint8_t x ;
x = PORTD.IN & 0x04 ;
if ( x != 0 )
{
appStart() ; // Power on, go to app if loaded
}
}
//#ifndef SOFT_UART
// UART_SRA = _BV(U2X0); //Double speed mode USART0
// UART_SRB = _BV(RXEN0) | _BV(TXEN0);
// UART_SRC = _BV(UCSZ00) | _BV(UCSZ01);
//// UART_SRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
//// Baudrate of 57600
//#if F_CPU == 12000000L
// UART_SRL = 25 ;
//#else
//#if F_CPU == 16000000L
// UART_SRL = 33 ;
//#else
//#ERROR Baud rate not available
//#endif
//#endif
//#endif
// Set up watchdog to trigger after 500ms
// watchdogConfig(WATCHDOG_1S);
/* Set LED pin as output */
#define LED_pin 1 //PD1
#define LED_port PORTD
LED_port.DIRSET = _BV(LED_pin) ;
//#ifdef SOFT_UART
// /* Set TX pin as output */
// UART_DDR |= _BV(UART_TX_BIT);
//#endif
//#if LED_START_FLASHES > 0
// /* Flash onboard LED to signal entering of bootloader */
// flash_led(LED_START_FLASHES * 2);
//#endif
/* Forever loop */
for (;;)
{
/* get character from UART */
ch = getch();
if(ch == STK_GET_PARAMETER)
{
byte = getch();
verifySpace();
if ( byte == 0x82)
{
/*
* Send optiboot version as "minor SW version"
*/
putch(OPTIBOOT_MINVER);
}
else if ( byte == 0x81)
{
putch(OPTIBOOT_MAJVER);
}
else
{
/*
* GET PARAMETER returns a generic 0x03 reply for
* other parameters - enough to keep Avrdude happy
*/
putch(0x03);
}
}
else if(ch == STK_SET_DEVICE) {
// SET DEVICE is ignored
getNch(20);
}
else if(ch == STK_SET_DEVICE_EXT)
{
// SET DEVICE EXT is ignored
getNch(5);
}
else if(ch == STK_LOAD_ADDRESS)
{
// LOAD ADDRESS
uint16_t newAddress;
newAddress = getch() ;
newAddress = (newAddress & 0xff) | (getch() << 8);
#ifdef RAMPZ
// Transfer top bit to RAMPZ
RAMPZ = (newAddress & 0x8000) ? 1 : 0;
#endif
// newAddress += newAddress; // Convert from word address to byte address
address = newAddress;
verifySpace();
}
else if(ch == STK_UNIVERSAL)
{
// UNIVERSAL command is ignored
getNch(4);
putch(0x00);
}
/* Write memory, length is big endian and is in bytes */
else if(ch == STK_PROG_PAGE)
{
// PROGRAM PAGE - we support flash programming only, not EEPROM
uint8_t *bufPtr;
uint16_t addrPtr;
register uint8_t length;
getch(); /* getlen() */
length = getch();
getch();
// If we are in RWW section, immediately start page erase
// if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
__boot_page_erase_short((uint16_t)(void*)address);
// While that is going on, read in page contents
bufPtr = buff;
do *bufPtr++ = getch();
while (--length);
// If we are in NRWW section, page erase has to be delayed until now.
// Todo: Take RAMPZ into account
//#ifdef MULTI_CALLED
// if (address < 0x7E00)
//#endif
// {
// if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
// }
// Read command terminator, start reply
verifySpace();
// If only a partial page is to be programmed, the erase might not be complete.
// So check that here
#ifdef MULTI_CALLED
if (address < 0x8000)
#endif
{
boot_spm_busy_wait();
#ifdef VIRTUAL_BOOT_PARTITION
if ((uint16_t)(void*)address == 0) {
// This is the reset vector page. We need to live-patch the code so the
// bootloader runs.
//
// Move RESET vector to WDT vector
uint16_t vect = buff[0] | (buff[1]<<8);
rstVect = vect;
wdtVect = buff[8] | (buff[9]<<8);
vect -= 4; // Instruction is a relative jump (rjmp), so recalculate.
buff[8] = vect & 0xff;
buff[9] = vect >> 8;
// Add jump to bootloader at RESET vector
buff[0] = 0x7f;
buff[1] = 0xce; // rjmp 0x1d00 instruction
}
#endif
// Copy buffer into programming buffer
bufPtr = buff;
addrPtr = (uint16_t)(void*)address;
ch = SPM_PAGESIZE / 2;
__boot_erase_flash_buffer((uint16_t)(void*)addrPtr ) ;
do {
uint16_t a;
// a = *bufPtr++;
// a |= (*bufPtr++) << 8;
a = *((uint16_t *)bufPtr) ;
bufPtr += 2 ;
__boot_page_fill_short((uint16_t)(void*)addrPtr,a);
addrPtr += 2;
} while (--ch);
// Write from programming buffer
__boot_page_write_short((uint16_t)(void*)address);
boot_spm_busy_wait();
#if defined(RWWSRE)
// Reenable read access to flash
boot_rww_enable();
#endif
}
}
/* Read memory block mode, length is big endian. */
else if(ch == STK_READ_PAGE)
{
register uint8_t length;
// READ PAGE - we only read flash
getch(); /* getlen() */
length = getch();
getch();
verifySpace();
//#ifdef VIRTUAL_BOOT_PARTITION
// do {
// // Undo vector patch in bottom page so verify passes
// if (address == 0) ch=rstVect & 0xff;
// else if (address == 1) ch=rstVect >> 8;
// else if (address == 8) ch=wdtVect & 0xff;
// else if (address == 9) ch=wdtVect >> 8;
// else ch = pgm_read_byte_near(address);
// address++;
// putch(ch);
// } while (--length);
//#else
//#ifdef RAMPZ
//// Since RAMPZ should already be set, we need to use EPLM directly.
//// do putch(pgm_read_byte_near(address++));
//// while (--length);
// do {
// uint8_t result;
// __asm__ ("elpm %0,Z\n":"=r"(result):"z"(address));
// putch(result);
// address++;
// }
// while (--length);
//#else
do putch(pgm_read_byte_near(address++));
while (--length);
//#endif
//#endif
}
/* Get device signature bytes */
else if(ch == STK_READ_SIGN)
{
// READ SIGN - return what Avrdude wants to hear
verifySpace();
putch(SIGNATURE_0);
putch(SIGNATURE_1);
putch(SIGNATURE_2);
}
else if (ch == STK_LEAVE_PROGMODE) { /* 'Q' */
// Adaboot no-wait mod
// watchdogConfig(WATCHDOG_16MS);
verifySpace();
#ifdef MULTI_CALLED
putch(STK_OK);
while(!(USARTC0.STATUS & USART_TXCIF_bm))
;
appStart() ;
#endif
}
else
{
// This covers the response to commands like STK_ENTER_PROGMODE
verifySpace();
}
putch(STK_OK);
}
}
void putch(char ch)
{
//#ifndef SOFT_UART
while(!(USARTC0.STATUS & USART_DREIF_bm))
;
USARTC0.DATA = ch ;
//#else
// __asm__ __volatile__ (
// " com %[ch]\n" // ones complement, carry set
// " sec\n"
// "1: brcc 2f\n"
// " cbi %[uartPort],%[uartBit]\n"
// " rjmp 3f\n"
// "2: sbi %[uartPort],%[uartBit]\n"
// " nop\n"
// "3: rcall uartDelay\n"
// " rcall uartDelay\n"
// " lsr %[ch]\n"
// " dec %[bitcnt]\n"
// " brne 1b\n"
// :
// :
// [bitcnt] "d" (10),
// [ch] "r" (ch),
// [uartPort] "I" (_SFR_IO_ADDR(UART_PORT)),
// [uartBit] "I" (UART_TX_BIT)
// :
// "r25"
// );
//#endif
}
uint8_t getch(void)
{
uint8_t ch;
//#ifdef LED_DATA_FLASH
//#ifdef __AVR_ATmega8__
// LED_PORT ^= _BV(LED);
//#else
// LED_PIN |= _BV(LED);
//#endif
//#endif
//#ifdef SOFT_UART
// __asm__ __volatile__ (
// "1: sbic %[uartPin],%[uartBit]\n" // Wait for start edge
// " rjmp 1b\n"
// " rcall uartDelay\n" // Get to middle of start bit
// "2: rcall uartDelay\n" // Wait 1 bit period
// " rcall uartDelay\n" // Wait 1 bit period
// " clc\n"
// " sbic %[uartPin],%[uartBit]\n"
// " sec\n"
// " dec %[bitCnt]\n"
// " breq 3f\n"
// " ror %[ch]\n"
// " rjmp 2b\n"
// "3:\n"
// :
// [ch] "=r" (ch)
// :
// [bitCnt] "d" (9),
// [uartPin] "I" (_SFR_IO_ADDR(UART_PIN)),
// [uartBit] "I" (UART_RX_BIT)
// :
// "r25"
//);
//#else
while(!(USARTC0.STATUS & USART_RXCIF_bm))
// watchdogReset()
;
// if (!(UART_SRA & _BV(FE0))) {
/*
* A Framing Error indicates (probably) that something is talking
* to us at the wrong bit rate. Assume that this is because it
* expects to be talking to the application, and DON'T reset the
* watchdog. This should cause the bootloader to abort and run
* the application "soon", if it keeps happening. (Note that we
* don't care that an invalid char is returned...)
*/
// watchdogReset();
// }
ch = USARTC0.DATA ;
//#endif
//#ifdef LED_DATA_FLASH
//#ifdef __AVR_ATmega8__
// LED_PORT ^= _BV(LED);
//#else
// LED_PIN |= _BV(LED);
//#endif
//#endif
return ch;
}
#ifdef SOFT_UART
// AVR305 equation: #define UART_B_VALUE (((F_CPU/BAUD_RATE)-23)/6)
// Adding 3 to numerator simulates nearest rounding for more accurate baud rates
#define UART_B_VALUE (((F_CPU/BAUD_RATE)-20)/6)
#if UART_B_VALUE > 255
#error Baud rate too slow for soft UART
#endif
void uartDelay() {
__asm__ __volatile__ (
"ldi r25,%[count]\n"
"1:dec r25\n"
"brne 1b\n"
"ret\n"
::[count] "M" (UART_B_VALUE)
);
}
#endif
void getNch(uint8_t count) {
do getch(); while (--count);
verifySpace();
}
void verifySpace()
{
if ( getch() != CRC_EOP) {
putch(STK_NOSYNC);
// watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
//
// while (1) // and busy-loop so that WD causes
// ; // a reset and app start.
}
putch(STK_INSYNC);
}
#if LED_START_FLASHES > 0
void flash_led(uint8_t count) {
do {
TCNT1 = -(F_CPU/(1024*16));
TIFR1 = _BV(TOV1);
while(!(TIFR1 & _BV(TOV1)));
//#ifdef __AVR_ATmega8__
LED_PORT ^= _BV(LED);
//#else
// LED_PIN |= _BV(LED);
//#endif
watchdogReset();
} while (--count);
}
#endif
// Watchdog functions. These are only safe with interrupts turned off.
void watchdogReset() {
__asm__ __volatile__ (
"wdr\n"
);
}
//void watchdogConfig(uint8_t x) {
// WDTCSR = _BV(WDCE) | _BV(WDE);
// WDTCSR = x;
//}
void init()
{
// Enable external oscillator (16MHz)
OSC.XOSCCTRL = OSC_FRQRANGE_12TO16_gc | OSC_XOSCSEL_XTAL_256CLK_gc ;
OSC.CTRL |= OSC_XOSCEN_bm ;
while( ( OSC.STATUS & OSC_XOSCRDY_bm ) == 0 )
/* wait */ ;
// Enable PLL (*2 = 32MHz)
OSC.PLLCTRL = OSC_PLLSRC_XOSC_gc | 2 ;
OSC.CTRL |= OSC_PLLEN_bm ;
while( ( OSC.STATUS & OSC_PLLRDY_bm ) == 0 )
/* wait */ ;
// Switch to PLL clock
CPU_CCP = 0xD8 ;
CLK.CTRL = CLK_SCLKSEL_RC2M_gc ;
CPU_CCP = 0xD8 ;
CLK.CTRL = CLK_SCLKSEL_PLL_gc ;
PMIC.CTRL = 7 ; // Enable all interrupt levels
// Timer1 config
// TCC1 16-bit timer, clocked at 0.5uS
EVSYS.CH3MUX = 0x80 + 0x07 ; // Prescaler of 128
TCC1.CTRLB = 0; TCC1.CTRLC = 0; TCC1.CTRLD = 0; TCC1.CTRLE = 0;
TCC1.INTCTRLA = 0 ;
TCC1.INTCTRLB = 0 ;
TCC1.PER = 0xFFFF ;
TCC1.CNT = 0 ;
TCC1.CTRLA = 0x0B ; // Event3 (prescale of 16)
PORTD.OUTSET = 0x04 ;
PORTD.DIRCLR = 0x04 ;
PORTD.PIN2CTRL = 0x18 ; // Pullup
PORTC.OUTSET = 0x08 ;
PORTC.DIRSET = 0x08 ;
USARTC0.BAUDCTRLA = 34 ; // 57600
USARTC0.BAUDCTRLB = 0 ;
USARTC0.CTRLB = 0x18 ; // Enable Tx and Rx
USARTC0.CTRLA = (USARTC0.CTRLA & 0xCF) ;
USARTC0.CTRLC = 0x03 ; // 8 bit, no parity, 1 stop
USARTC0.DATA ;
}
void boot_spm_busy_wait()
{
while(NVM.STATUS & NVM_NVMBUSY_bm)
;
}
#define A_NVM_CMD 0x1CA
void __boot_page_erase_short( uint16_t address )
{
asm( "push r24" ) ;
asm( "push r25" ) ;
NVM.CMD = NVM_CMD_ERASE_APP_PAGE_gc ;
asm( "pop r31" ) ;
asm( "pop r30" ) ;
CCP = CCP_SPM_gc ;
asm( "spm" ) ;
}
void __boot_erase_flash_buffer( uint16_t address )
{
asm( "movw r30,r24" ) ;
asm( "ldi r24,0x26" ) ;
asm("sts 0x1CA,r24");
CCP = CCP_IOREG_gc ;
asm( "ldi r24,1" ) ;
asm("sts 0x1CB,r24");
}
void __boot_page_fill_short( uint16_t address, uint16_t data)
{
asm( "push r0" ) ;
asm( "push r1" ) ;
asm( "movw r30,r24" ) ;
asm( "mov r0,r22" ) ;
asm( "mov r1,r23" ) ;
asm( "ldi r24,0x23" ) ;
asm("sts 0x1CA,r24");
CCP = CCP_SPM_gc ;
asm( "spm" ) ;
asm( "pop r1" ) ;
asm( "pop r0" ) ;
}
void __boot_page_write_short( uint16_t address)
{
asm( "movw r30,r24" ) ;
asm( "ldi r24,0x2E" ) ;
asm("sts 0x1CA,r24");
CCP = CCP_SPM_gc ;
asm( "spm" ) ;
}
void appStart()
{
// watchdogConfig(WATCHDOG_OFF);
// __asm__ __volatile__ (
//#ifdef VIRTUAL_BOOT_PARTITION
// // Jump to WDT vector
// "ldi r30,4\n"
// "clr r31\n"
//#else
// // Jump to RST vector
// "clr r30\n"
// "clr r31\n"
//#endif
// "ijmp\n"
// );
register void (*p)() ;
p = 0 ;
if ( pgm_read_byte( (uint16_t)p ) != 0xFF )
{
(*p)() ;
}
}

View File

@ -0,0 +1,80 @@
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)
/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB5
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTD
#define UART_PIN PIND
#define UART_DDR DDRD
#define UART_TX_BIT 1
#define UART_RX_BIT 0
#endif
#endif
#if defined(__AVR_ATmega8__)
//Name conversion R.Wiersma
#define UCSR0A UCSRA
#define UDR0 UDR
#define UDRE0 UDRE
#define RXC0 RXC
#define FE0 FE
#define TIFR1 TIFR
#define WDTCSR WDTCR
#endif
/* Luminet support */
#if defined(__AVR_ATtiny84__)
/* Red LED is connected to pin PA4 */
#define LED_DDR DDRA
#define LED_PORT PORTA
#define LED_PIN PINA
#define LED PINA4
/* Ports for soft UART - left port only for now. TX/RX on PA2/PA3 */
#ifdef SOFT_UART
#define UART_PORT PORTA
#define UART_PIN PINA
#define UART_DDR DDRA
#define UART_TX_BIT 2
#define UART_RX_BIT 3
#endif
#endif
/* Sanguino support */
#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
/* Onboard LED is connected to pin PB0 on Sanguino */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB0
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTD
#define UART_PIN PIND
#define UART_DDR DDRD
#define UART_TX_BIT 1
#define UART_RX_BIT 0
#endif
#endif
/* Mega support */
#if defined(__AVR_ATmega1280__)
/* Onboard LED is connected to pin PB7 on Arduino Mega */
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED PINB7
/* Ports for soft UART */
#ifdef SOFT_UART
#define UART_PORT PORTE
#define UART_PIN PINE
#define UART_DDR DDRE
#define UART_TX_BIT 1
#define UART_RX_BIT 0
#endif
#endif

View File

@ -0,0 +1,39 @@
/* STK500 constants list, from AVRDUDE */
#define STK_OK 0x10
#define STK_FAILED 0x11 // Not used
#define STK_UNKNOWN 0x12 // Not used
#define STK_NODEVICE 0x13 // Not used
#define STK_INSYNC 0x14 // ' '
#define STK_NOSYNC 0x15 // Not used
#define ADC_CHANNEL_ERROR 0x16 // Not used
#define ADC_MEASURE_OK 0x17 // Not used
#define PWM_CHANNEL_ERROR 0x18 // Not used
#define PWM_ADJUST_OK 0x19 // Not used
#define CRC_EOP 0x20 // 'SPACE'
#define STK_GET_SYNC 0x30 // '0'
#define STK_GET_SIGN_ON 0x31 // '1'
#define STK_SET_PARAMETER 0x40 // '@'
#define STK_GET_PARAMETER 0x41 // 'A'
#define STK_SET_DEVICE 0x42 // 'B'
#define STK_SET_DEVICE_EXT 0x45 // 'E'
#define STK_ENTER_PROGMODE 0x50 // 'P'
#define STK_LEAVE_PROGMODE 0x51 // 'Q'
#define STK_CHIP_ERASE 0x52 // 'R'
#define STK_CHECK_AUTOINC 0x53 // 'S'
#define STK_LOAD_ADDRESS 0x55 // 'U'
#define STK_UNIVERSAL 0x56 // 'V'
#define STK_PROG_FLASH 0x60 // '`'
#define STK_PROG_DATA 0x61 // 'a'
#define STK_PROG_FUSE 0x62 // 'b'
#define STK_PROG_LOCK 0x63 // 'c'
#define STK_PROG_PAGE 0x64 // 'd'
#define STK_PROG_FUSE_EXT 0x65 // 'e'
#define STK_READ_FLASH 0x70 // 'p'
#define STK_READ_DATA 0x71 // 'q'
#define STK_READ_FUSE 0x72 // 'r'
#define STK_READ_LOCK 0x73 // 's'
#define STK_READ_PAGE 0x74 // 't'
#define STK_READ_SIGN 0x75 // 'u'
#define STK_READ_OSCCAL 0x76 // 'v'
#define STK_READ_FUSE_EXT 0x77 // 'w'
#define STK_READ_OSCCAL_EXT 0x78 // 'x'

2
BootLoaders/README.md Normal file
View File

@ -0,0 +1,2 @@
## Page Moved
Moved to [/docs/Arduino_IDE_Boards.md](/docs/Arduino_IDE_Boards.md).

View File

@ -0,0 +1 @@
[Source for the StmMultiBooloader](https://github.com/MikeBland/StmMultiBoot)

Binary file not shown.

View File

@ -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.

Binary file not shown.

View File

@ -0,0 +1,657 @@
{
"packages": [{
"name": "multi4in1",
"maintainer": "Pascal Langer",
"websiteURL": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module",
"email": "pascal_langer@yahoo.fr",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"platforms": [
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.2",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.2.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.2.tar.gz",
"checksum": "SHA-256:b7e2fda37186bf696b7a769b12317737d513181096b33d9ad321ec2fd47f3f80",
"size": "164467",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.3",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.3.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.3.tar.gz",
"checksum": "SHA-256:7d4561eebe0d7f6422f06d5719a417e15fcc0aa9cdbfc1c48a57066ce768e33c",
"size": "164483",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.4",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.4.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.4.tar.gz",
"checksum": "SHA-256:6c51a4eb09bcd074cc651dab3f2356ea3afd358f6330aba0d8bdfaa75f718dbb",
"size": "167975",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.5",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.5.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.5.tar.gz",
"checksum": "SHA-256:0a4754d47cdbb49ca194b15835686331530ed9d36c0db093a29ae5f865e75421",
"size": "169830",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.6",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.6.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.6.tar.gz",
"checksum": "SHA-256:4f4cf8820e30bf6c88f280514c67ee67b9dc6649f439597cfb8d0be3a5b13bf5",
"size": "169819",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.7",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.7.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.7.tar.gz",
"checksum": "SHA-256:453c9999e433ed1bdda2ba2b12cb7cbba7b547591db969dc6b7efb941b61cf76",
"size": "169825",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.8",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.8.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.8.tar.gz",
"checksum": "SHA-256:8e58b8733220d56155e10bf5bec0bfe6bf96f8460b3fd49a4b45c7f9fad776cb",
"size": "293388",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.0.9",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.0.9.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.0.9.tar.gz",
"checksum": "SHA-256:269c4ddcb8018be2b31f5c9e9f0814d120af492e894b8d5098a814486d56faa5",
"size": "318437",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 AVR Boards",
"architecture": "avr",
"version": "1.1.0",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.1.0.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.1.0.tar.gz",
"checksum": "SHA-256:7bacf2db754ceb890a203de5ce89d97aa787a9e6462debeb44cf04830859687a",
"size": "326431",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "MULTI-Module AVR Boards",
"architecture": "avr",
"version": "1.1.1",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_avr_board_v1.1.1.tar.gz",
"archiveFileName": "package_multi_4in1_avr_board_v1.1.1.tar.gz",
"checksum": "SHA-256:02158258b4dbaca61bedbb6933336200d13b02ad0db981e2dda253682c482e99",
"size": "324512",
"boards": [
{"name": "Multi 4-in-1 (Atmega328p, 3.3V, 16MHz)"},
{"name": "Multi 4-in-1 (OrangeRX)"}
],
"toolsDependencies": []
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.1",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.1.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.1.tar.gz",
"checksum": "SHA-256:b522b5d3474308768c197a6897cad037fb54d6fac26c75678415a0908793bae3",
"size": "10332875",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.2",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.2.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.2.tar.gz",
"checksum": "SHA-256:26d21dbd2fe80680ac523b8bca24b3ecf2c2016bac626826d20b651e11278287",
"size": "10318646",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.3",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.3.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.3.tar.gz",
"checksum": "SHA-256:e48f1f30948b3f7be83e8b1fe2bb5c6b41be7c4d5da02503a0b4827c60926541",
"size": "10309833",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.4",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.4.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.4.tar.gz",
"checksum": "SHA-256:388a4dbcd567f9d41b82955e12e8a640d9696217081c0ee6ab8c58a25aedf70f",
"size": "10307581",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.5",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.5.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.5.tar.gz",
"checksum": "SHA-256:46d3b4e62fc46e6b8ca4f429974ffd2ee8cde9e29a6e0cda58f85044991a9c2b",
"size": "10313436",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.6",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.6.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.6.tar.gz",
"checksum": "SHA-256:ad7a330326069a5ffb2908495b288933f68517b1247cc6636b160eb483a58284",
"size": "10319669",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.7",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.7.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.7.tar.gz",
"checksum": "SHA-256:f73fded48beaee55e646a3cf36d24beeedc336873c7824683a4912f2aee9e350",
"size": "10322111",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.8",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.8.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.8.tar.gz",
"checksum": "SHA-256:f8100272ec615074cf7962c2c8331014ebda78f3e4c17172b88b6dd3d83c4331",
"size": "10319134",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.0.9",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.0.9.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.0.9.tar.gz",
"checksum": "SHA-256:c3621d1cf6580ca5c943a67dc14dc15a60e2797a4b985548abe1919486bf4a8b",
"size": "10324251",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.0",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.0.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.0.tar.gz",
"checksum": "SHA-256:919ece2021757686e6892679956dcb8a01c9308a152167d61d9204656b4ed7ee",
"size": "10333612",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.1",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.1.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.1.tar.gz",
"checksum": "SHA-256:549dbfa0f48f3e519a9efa96d03e8933cc72989c618826b2b570980d9c382979",
"size": "10331547",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.2",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.2.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.2.tar.gz",
"checksum": "SHA-256:debfdc14df3023045a2297bc99daf7104be75f21572fc5a4f57192ffae4028f0",
"size": "10322776",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.3",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.3.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.3.tar.gz",
"checksum": "SHA-256:6b9dceb033ccc31f37cebc4f025ddb862cd24a733e7c356ca2fa5719d595af89",
"size": "10322145",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.4",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.4.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.4.tar.gz",
"checksum": "SHA-256:16a83a3b4409cb55aead6593396979483996080634d214ae07c8a956db2480fb",
"size": "10322152",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.5",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.5.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.5.tar.gz",
"checksum": "SHA-256:2d45c95f59b4fb9fc7f7bf8caca2dd8c13b4258141c20db6169e0c7faf72e5e4",
"size": "7930904",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.6",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.6.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.6.tar.gz",
"checksum": "SHA-256:d2d1ef721bbcdc3c680c6f98b4b8ab394478ac0f82d67af2f6c389a4a30789f4",
"size": "7962942",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 STM32 Board",
"architecture": "STM32F1",
"version": "1.1.7",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.7.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.7.tar.gz",
"checksum": "SHA-256:37cccde7eafad3d0587d28d13d5f8b2b3244bf7c83e6819b6cb08f4f468815e2",
"size": "7966348",
"boards": [{
"name": "Multi 4-in-1 (STM32F103C)"
}],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi X-in-1 STM32 Boards",
"architecture": "STM32F1",
"version": "1.1.8",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.1.8.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.1.8.tar.gz",
"checksum": "SHA-256:e9ed8055ebf72abf37e60e1b8d1c6ee5472132ea7c0a3c4a63fbb8442613e4c2",
"size": "7481800",
"boards": [
{"name": "Multi 4-in-1 (STM32F103C)"},
{"name": "Multi 5-in-1 (Jumper T18 Internal)"}
],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi X-in-1 STM32 Boards",
"architecture": "STM32F1",
"version": "1.2.0",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.2.0.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.2.0.tar.gz",
"checksum": "SHA-256:754f08ca2a553701cc9112b645c079b6041107f1bf863648305e560c136a6ac5",
"size": "7496214",
"boards": [
{"name": "Multi 4-in-1 (STM32F103C)"},
{"name": "Multi 5-in-1 (Jumper T18 Internal)"}
],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi X-in-1 STM32 Boards",
"architecture": "STM32F1",
"version": "1.2.1",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.2.1.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.2.1.tar.gz",
"checksum": "SHA-256:c66d34afadc5b21e9e28c4d477fa03a6d55db0b74b59ff2dcb07b4d6ef06da1a",
"size": "7496448",
"boards": [
{"name": "Multi 4-in-1 (STM32F103C)"},
{"name": "Multi 5-in-1 (Jumper T18 Internal)"}
],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "MULTI-Module STM32 Boards",
"architecture": "STM32F1",
"version": "1.2.2",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_stm32_board_v1.2.2.tar.gz",
"archiveFileName": "package_multi_4in1_stm32_board_v1.2.2.tar.gz",
"checksum": "SHA-256:0fe4a8899438bbc31dc37714acca13968e43d75a47e59143343d83b634d2e47d",
"size": "7485662",
"boards": [
{"name": "Multi X-in-1 STM32F103CB (128KB)"},
{"name": "Multi X-in-1 STM32F103C8 (64KB)"},
{"name": "Multi 5-in-1 (Jumper T18 Internal)"}
],
"toolsDependencies": [{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
}]
},
{
"name": "Multi 4-in-1 OrangeRX Board - DEPRECATED, USE MULTI 4-IN-1 AVR BOARDS PACKAGE INSTEAD",
"architecture": "orangerx",
"version": "1.0.1",
"category": "Contributed",
"help": {
"online": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module"
},
"url": "https://github.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards/raw/master/archives/package_multi_4in1_orangerx_board_v1.0.1.tar.gz",
"archiveFileName": "package_multi_4in1_orangerx_board_v1.0.1.tar.gz",
"checksum": "SHA-256:7287ce61028b754bb8ff947317dd15773fc7eeecd752826c707fa356b9b36dc6",
"size": "161615",
"boards": [{
"name": "Multi 4-in-1 (OrangeRX)"
}],
"toolsDependencies": []
}
],
"tools": []
}]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,790 @@
local toolName = "TNS|DSM Forward Prog v0.56 (Color) |TNE"
local VERSION = "v0.56"
---- #########################################################################
---- # #
---- # Copyright (C) OpenTX #
-----# #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
------------------------------------------------------------------------------
-- This script library is a rewrite of the original DSM forward programming Lua
-- Script. The goal is to make it easier to understand, mantain, and to
-- separate the GUI from the DSM Forward programming engine/logic
-- in this way, GUIs can evolve independent. OpenTX Gui, EdgeTx GUI, Small Radios, etc.
-- Code is based on the code/work by: Pascal Langer (Author of the Multi-Module)
-- Rewrite/Enhancements By: Francisco Arzu
------------------------------------------------------------------------------
local SIMULATION_ON = true -- false: dont show simulation menu, TRUE: show simulation menu
local DEBUG_ON = 1 -- 0=NO DEBUG, 1=HIGH LEVEL 2=LOW LEVEL (Debug logged into the /LOGS/dsm.log)
local USE_SPECKTRUM_COLORS = true -- true: Use spectrum colors, false: use theme colors (default on OpenTX)
local DSMLIB_PATH = "/SCRIPTS/TOOLS/DSMLIB/"
local IMAGE_PATH = DSMLIB_PATH .. "img/"
local Log = assert(loadScript(DSMLIB_PATH.."DsmLogLib.lua"), "Not-Found: DSMLIB/DsmLogLib.lua")()
local menuLib = assert(loadScript(DSMLIB_PATH.."DsmMenuLib.lua"), "Not-Found: DSMLIB/DsmMenuLib.lua")(Log, DEBUG_ON)
local modelLib = assert(loadScript(DSMLIB_PATH.."DsmModelLib.lua"), "Not-Found: DSMLIB/DsmModelLib.lua")(Log, DEBUG_ON)
local menuProcessor = assert(loadScript(DSMLIB_PATH.."DsmMainMenuLib.lua"), "Not-Found: DSMLIB/DsmMainMenuLib.lua")(Log, menuLib, modelLib, DEBUG_ON, SIMULATION_ON)
local PHASE = menuLib.PHASE
local LINE_TYPE = menuLib.LINE_TYPE
local DISP_ATTR = menuLib.DISP_ATTR
local DSM_Context = menuLib.DSM_Context
local lastRefresh=0 -- Last time the screen was refreshed
local REFRESH_GUI_MS = 300/10 -- 300ms.. Screen Refresh Rate.. to not waste CPU time (in 10ms units to be compatible with getTime())
local originalValue = nil
local touchButtonArea = {}
local EDIT_BUTTON = { DEFAULT=1001, DEC_10=1002, DEC_1=1003, INC_1=1004, INC_10=5, OK=1006, ESC=1007 }
local IS_EDGETX = false -- DEFAULT until Init changed it
local LCD_Y_MENU_TITLE = 20
local LCD_W_MENU_TITLE = LCD_W-100
local LCD_X_LINE_MENU = 30
local LCD_W_LINE_MENU = 350
local LCD_X_LINE_TITLE = 30
local LCD_X_LINE_VALUE = 230
local LCD_X_LINE_DEBUG = 390
local LCD_Y_LINE_START = LCD_Y_MENU_TITLE + 30
local LCD_Y_LINE_HEIGHT = 27
local LCD_Y_LOWER_BUTTONS = LCD_Y_LINE_START + 3 + (7 * LCD_Y_LINE_HEIGHT)
-- TOOL BG COLOR
local LCD_TOOL_BGCOLOR = TEXT_BGCOLOR
-- TOOL HEADER
local LCD_TOOL_HDR_COLOR = MENU_TITLE_COLOR
local LCD_TOOL_HDR_BGCOLOR = TITLE_BGCOLOR
-- MENU HEADER
local LCD_MENU_COLOR = MENU_TITLE_COLOR
local LCD_MENU_BGCOLOR = MENU_TITLE_BGCOLOR
-- LINE SELECTED
local LCD_SELECTED_COLOR = TEXT_INVERTED_COLOR
local LCD_SELECTED_BGCOLOR = TEXT_INVERTED_BGCOLOR
local LCD_EDIT_BGCOLOR = MENU_TITLE_BGCOLOR -- WARNING_COLOR
-- NORMAL TEXT
local LCD_NORMAL_COLOR = TEXT_COLOR
local LCD_DISABLE_COLOR = TEXT_DISABLE_COLOR
local LCD_DEBUG_COLOR = LINE_COLOR
-- NORMAL BOX FRAME COLOR
local LCD_BOX_COLOR = TEXT_DISABLE_COLOR
local warningScreenON = true
--------------------- lcd.sizeText replacement -------------------------------------------------
-- EdgeTx dont have lcd.sizeText, so we do an equivalent one using the string length and 5px per character
local function my_lcd_sizeText(s)
if (s==nil) then return 20 end
-- return: If IS_EDGETX then lcd.sizeText() else string.len()
return (IS_EDGETX and lcd.sizeText(s)) or (string.len(s)*10)
end
local function GUI_SwitchToRX()
-- Force to refresh DSM Info in MODEL (dsmLib pointing to the setup Script)
-- local dsmChannelInfo, description = modelLib.CreateDSMPortChannelInfo()
menuProcessor.done()
Log.LOG_close() -- Reset the log
Log.LOG_open()
menuProcessor = nil
collectgarbage("collect")
modelLib.ReadTxModelData()
modelLib.ST_LoadFileData()
modelLib.CreateDSMPortChannelInfo()
local dsmLib = assert(loadScript(DSMLIB_PATH.."DsmFwPrgLib.lua"),"Not-Found: DSMLIB/DsmFwPrgLib.lua")
menuProcessor = dsmLib(Log, menuLib, modelLib, DEBUG_ON)
dsmLib = nil
collectgarbage("collect")
menuProcessor.init(toolName) -- Initialize Library
DSM_Context.Refresh_Display = true
end
local function GUI_SwitchToSIM()
menuProcessor.done()
Log.LOG_close()
menuProcessor = nil
collectgarbage("collect")
local simLib = assert(loadScript(DSMLIB_PATH.."DsmSimMenuLib.lua"), "Not-Found: DSMLIB/DsmSimMenuLib.lua")
menuProcessor = simLib(Log, menuLib, modelLib, DEBUG_ON)
simLib = nil
collectgarbage("collect")
menuProcessor.init(toolName) -- Initialize Library
DSM_Context.Refresh_Display = true
end
local function GUI_SwitchToSetupMenu()
menuProcessor.done()
menuProcessor = nil
collectgarbage("collect")
local setupLib = assert(loadScript(DSMLIB_PATH.."DsmSetupMenuLib.lua"), "Not-Found: DSMLIB/DsmSetupMenuLib.lua")
menuProcessor = setupLib(Log, menuLib, modelLib, DEBUG_ON, SIMULATION_ON)
setupLib = nil
collectgarbage("collect")
menuProcessor.init(toolName) -- Initialize Library
DSM_Context.Refresh_Display = true
end
local function GUI_SwitchToMainMenu()
print("SWITCHING TO MAIN MENU")
menuProcessor.done()
menuProcessor = nil
collectgarbage("collect")
local mainMenuLib = assert(loadScript(DSMLIB_PATH.."DsmMainMenuLib.lua"), "Not-Found: DSMLIB/DsmMainMenuLib.lua")
menuProcessor = mainMenuLib(Log, menuLib, modelLib, DEBUG_ON, SIMULATION_ON)
mainMenuLib = nil
collectgarbage("collect")
menuProcessor.init(toolName) -- Initialize Library
DSM_Context.Refresh_Display = true
end
--------------------- Toucch Button Helpers ------------------------------------------------------------
local function GUI_addTouchButton(x,y,w,h,line)
-- Add new button info to end of the array
touchButtonArea[#touchButtonArea+1] = {x=x, y=y, w=w, h=h, line=line}
end
local function GUI_getTouchButton(x,y)
for i = 1, #touchButtonArea do
local button = touchButtonArea[i]
-- is the coordinate inside the button area??
if (x >= button.x and x <= (button.x+button.w) and y >= button.y and (y <= button.y+button.h)) then
return button.line
end
end
return nil
end
local function GUI_clearTouchButtons()
touchButtonArea = {}
end
---------- Return Color to display Menu Lines ----------------------------------------------------------------
local function GUI_GetTextColor(lineNum)
local ctx = DSM_Context
local txtColor = LCD_NORMAL_COLOR
-- Gray Out any other line except the one been edited
if (ctx.isEditing() and ctx.EditLine~=lineNum) then txtColor=LCD_DISABLE_COLOR end
return txtColor
end
local function GUI_GetFrameColor(lineNum) -- Frame Color for Value/Menu Boxes
local ctx = DSM_Context
local txtColor = LCD_BOX_COLOR
-- Gray Out any other line except the one been edited
if (ctx.EditLine~=lineNum) then txtColor=LCD_DISABLE_COLOR end
return txtColor
end
--------------------------------------------------------------------------------------------------------
-- Display Text inside a Rectangle. Inv: true means solid rectangle, false=only perimeter
local function GUI_Display_Boxed_Text(lineNum,x,y,w,h,text,inv, isNumber)
local ctx = DSM_Context
local txtColor = GUI_GetTextColor(lineNum)
local frameColor = GUI_GetFrameColor(lineNum)
-- If editing this lineNum, chose EDIT Color, else SELECTED Color
local selectedBGColor = (ctx.EditLine==lineNum and LCD_EDIT_BGCOLOR) or LCD_SELECTED_BGCOLOR
if (inv) then
txtColor = LCD_SELECTED_COLOR
lcd.drawFilledRectangle(x-5, y-2, w, h, selectedBGColor)
else
lcd.drawRectangle(x-5, y-2, w, h, frameColor)
end
if (isNumber) then
lcd.drawNumber(x+w-10 , y, text, txtColor + RIGHT)
else
lcd.drawText(x , y, text, txtColor)
end
end
------ Display Pre/Next/Back buttons
local function GUI_Diplay_Button(x,y,w,h,text,selected)
GUI_Display_Boxed_Text(-1,x,y,w,h,text,selected, false)
end
------ Display MENU type of lines (Navigation, SubHeaders, and plain text comments)
local function GUI_Display_Line_Menu(lineNum,line,selected)
-- Menu Lines can be navidation to other Menus (if Selectable)
-- Or SubHeaders or Messages
local txtColor = GUI_GetTextColor(lineNum)
local y = LCD_Y_LINE_START+(LCD_Y_LINE_HEIGHT*lineNum)
local x = LCD_X_LINE_MENU
if menuLib.isSelectableLine(line) then -- Draw Selectable Menus in Boxes
GUI_Display_Boxed_Text(lineNum,x, y, LCD_W_LINE_MENU, LCD_Y_LINE_HEIGHT, line.Text,selected, false)
GUI_addTouchButton(x, y, LCD_W_LINE_MENU, LCD_Y_LINE_HEIGHT,lineNum)
else
-- Non Selectable Menu Lines, plain text
-- Can be use for sub headers or just regular text lines (like warnings)
local bold = (menuLib.isDisplayAttr(line.TextAttr,DISP_ATTR._BOLD) and BOLD) or 0
if menuLib.isDisplayAttr(line.TextAttr,DISP_ATTR._RIGHT) then -- Right Align???
local tw = my_lcd_sizeText(line.Text)+4
x = LCD_X_LINE_VALUE - tw -- Right
elseif menuLib.isDisplayAttr(line.TextAttr,DISP_ATTR._CENTER) then -- Center??
local tw = my_lcd_sizeText(line.Text)
x = x + (LCD_X_LINE_VALUE - LCD_X_LINE_MENU)/2 - tw/2 -- Center - 1/2 Text
end
lcd.drawText(x, y, line.Text, txtColor + bold)
end
end
------ Display NAME : VALUES type of lines
local function GUI_Display_Line_Value(lineNum, line, value, selected, editing)
-- This Displays Name and Value Pairs
local txtColor = GUI_GetTextColor(lineNum)
local bold = 0
local y = LCD_Y_LINE_START+(LCD_Y_LINE_HEIGHT*lineNum)
local x = LCD_X_LINE_TITLE
---------- NAME Part
local header = line.Text
-- ONLY do this for Flight Mode (Right Align or Centered)
if (menuLib.isFlightModeLine(line)) then
-- Display Header + Value together
header = menuLib.GetFlightModeValue(line)
-- Bold Text???
bold = (menuLib.isDisplayAttr(line.TextAttr,DISP_ATTR._BOLD) and BOLD) or 0
if menuLib.isDisplayAttr(line.TextAttr,DISP_ATTR._RIGHT) then -- Right Align
local tw = my_lcd_sizeText(header)+4
x = LCD_X_LINE_VALUE - tw -- Right
elseif menuLib.isDisplayAttr(line.TextAttr,DISP_ATTR._CENTER) then -- Centered
local tw = my_lcd_sizeText(header)
x = x + (LCD_X_LINE_VALUE - LCD_X_LINE_TITLE)/2 - tw/2 -- Center - 1/2 Text
end
else
-- No Flight Mode, no effects here
header = header .. ":"
end
lcd.drawText(x, y, header, txtColor + bold) -- display Line Header
--------- VALUE PART, Skip for Flight Mode since already show the value
if (value==nil) then return end
if not menuLib.isFlightModeLine(line) then
if menuLib.isSelectableLine(line) then
--if (editing) then -- Any Special color/effect when editing??
-- value = "["..value .. "]"
--end
-- Can select/edit value, Box it
local tw = math.max(my_lcd_sizeText(value)+10,45) -- Width of the Text in the lcd
GUI_Display_Boxed_Text(lineNum,LCD_X_LINE_VALUE,y,tw,LCD_Y_LINE_HEIGHT,value,selected, not menuLib.isListLine(line))
GUI_addTouchButton(LCD_X_LINE_VALUE,y,tw,LCD_Y_LINE_HEIGHT,lineNum)
lcd.drawText(LCD_X_LINE_VALUE+tw+5, y, (line.Format or ""), txtColor + bold)
else -- Not Editable, Plain Text
lcd.drawText(LCD_X_LINE_VALUE, y, value, txtColor)
end
end
end
local function GUI_Display_Menu(menu)
local ctx = DSM_Context
local w= LCD_W_MENU_TITLE
-- Center Header
local tw = my_lcd_sizeText(menu.Text)
local x = w/2 - tw/2 -- Center of Screen - Center of Text
lcd.drawFilledRectangle(0, LCD_Y_MENU_TITLE-2, w, LCD_Y_LINE_HEIGHT-2, LCD_MENU_BGCOLOR)
lcd.drawText(x,LCD_Y_MENU_TITLE,menu.Text, LCD_MENU_COLOR + BOLD)
-- Back Button
if menu.BackId ~= 0 then
GUI_Diplay_Button(437-5,LCD_Y_MENU_TITLE+3,47,LCD_Y_LINE_HEIGHT,"Back",ctx.SelLine == menuLib.BACK_BUTTON)
GUI_addTouchButton(437-5,LCD_Y_MENU_TITLE+3,47,LCD_Y_LINE_HEIGHT,menuLib.BACK_BUTTON)
end
-- Next Button
if menu.NextId ~= 0 then
GUI_Diplay_Button(437-5,LCD_Y_LOWER_BUTTONS,47,LCD_Y_LINE_HEIGHT,"Next",ctx.SelLine == menuLib.NEXT_BUTTON)
GUI_addTouchButton(437-5,LCD_Y_LOWER_BUTTONS,47,LCD_Y_LINE_HEIGHT,menuLib.NEXT_BUTTON)
end
-- Prev Button
if menu.PrevId ~= 0 then
GUI_Diplay_Button(10,LCD_Y_LOWER_BUTTONS,47,LCD_Y_LINE_HEIGHT,"Prev",ctx.SelLine == menuLib.PREV_BUTTON)
GUI_addTouchButton(10,LCD_Y_LOWER_BUTTONS,47,LCD_Y_LINE_HEIGHT,menuLib.PREV_BUTTON)
end
end
------------------------------------------------------------------------------------------------------------
-- Display the EDIT mode buttons when editing a value
local function GUI_Display_Edit_Buttons(line)
GUI_clearTouchButtons() -- Only this buttons can be touched
local x = 15 -- Inittial X position
local w = 55 -- Width of the buttons
local showPrev = line.Val > line.Min
local showNext = line.Val < line.Max
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,"ESC",true)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.ESC)
x=x+w+10
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT," Def",true)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.DEFAULT)
x=x+w+10
if (not menuLib.isListLine(line)) then
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT," << ",showPrev)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.DEC_10)
end
x=x+w+10
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT," <",showPrev)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.DEC_1)
x=x+w+10
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT," >",showNext)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.INC_1)
x=x+w+10
if (not menuLib.isListLine(line)) then
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT," >>",showNext)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.INC_10)
end
x=x+w+10
GUI_Diplay_Button(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT," OK",true)
GUI_addTouchButton(x,LCD_Y_LOWER_BUTTONS,w,LCD_Y_LINE_HEIGHT,EDIT_BUTTON.OK)
end
local function GUI_ShowBitmap(x,y,imgData)
-- imgData format "bitmap.png|alt message"
local f = string.gmatch(imgData, '([^%|]+)') -- Iterator over values split by '|'
local imgName, imgMsg = f(), f()
lcd.drawText(x, y, imgMsg or "") -- Alternate Image MSG
local imgPath = IMAGE_PATH .. (imgName or "")
local bitmap = Bitmap.open(imgPath)
if (bitmap~=nil) then
lcd.drawBitmap(bitmap, x,y+20)
end
end
------------------------------------------------------------------------------------------------------------
local function GUI_Display()
local ctx = DSM_Context
lcd.clear(LCD_TOOL_BGCOLOR)
GUI_clearTouchButtons()
if LCD_W ~= 480 then
-- Different Resolution.. Maybe just adjusting some of the constants will work, adjust it in DSM_Init??
-- LCD_X_LINE_TITLE, LCD_Y_LINE_START, etc
lcd.drawText(LCD_X_LINE_TITLE,100,"Only supported in Color Radios of 480 resolution", BLINK)
return
end
local header = "DSM Forward Programming "..VERSION.." "
if ctx.Phase ~= PHASE.RX_VERSION then
header = header .. ctx.RX.Name.." v"..ctx.RX.Version
end
--Draw title
lcd.drawFilledRectangle(0, 0, LCD_W, 17, LCD_TOOL_HDR_BGCOLOR)
lcd.drawText(5, 0, header, LCD_TOOL_HDR_COLOR + SMLSIZE)
-- Getting RX Version
if ctx.Phase == PHASE.RX_VERSION then
if (ctx.isReset) then
lcd.drawText(LCD_X_LINE_TITLE,100, menuLib.Get_Text(0x301), BLINK) -- Resetting...
else
lcd.drawText(LCD_X_LINE_TITLE,100,menuLib.Get_Text(0x300), BLINK) -- Not valid RX
end
return
end
local menu = ctx.Menu
if menu.Text == nil then return end
----- Draw RX Menu ---------
GUI_Display_Menu(menu)
-- Sending TX Information???
if (ctx.Phase==PHASE.MENU_REQ_TX_INFO) then
--lcd.drawFilledRectangle(x-5, y-2, w, h, selectedBGColor)
--lcd.drawRectangle(x-5, y-2, w, h, frameColor)
lcd.drawText(LCD_X_LINE_TITLE,100, "Sending CH"..(ctx.CurLine+1)) -- Channel Info
return
end
for i = 0, menuLib.MAX_MENU_LINES do
local line = ctx.MenuLines[i]
if line ~= nil and line.Type ~= 0 then
if line.Type == LINE_TYPE.MENU then
GUI_Display_Line_Menu(i, line, i == ctx.SelLine)
else
local value = nil
if line.Val ~= nil then
value = line.Val
if menuLib.isListLine(line) then -- for Lists of Strings, get the text
value = menuLib.Get_List_Text(line.Val + line.TextStart) -- TextStart is the initial offset for text
-- Complentary IMAGE for this value to Display??
local offset = 0
if (line.Type==LINE_TYPE.LIST_MENU_ORI) then offset = offset + 0x100 end --FH6250 hack
local imgData = menuLib.Get_List_Text_Img(line.Val + line.TextStart + offset)
if (imgData and i == ctx.SelLine) then -- Optional Image and Msg for selected value
GUI_ShowBitmap(LCD_X_LINE_TITLE,LCD_Y_LINE_START, imgData)
end
end
end -- if Line[i]~=nil
GUI_Display_Line_Value(i, line, value, i == ctx.SelLine, i == ctx.EditLine)
end
end -- if ~MENU
end -- for
if IS_EDGETX and ctx.isEditing() then
-- Display Touch button for Editing values
GUI_Display_Edit_Buttons(ctx.MenuLines[ctx.EditLine])
end
end
-------------------------------------------------------------------------------------------------------------
local function GUI_RotEncVal(line, dir) -- return encoder speed to inc or dec values
if menuLib.isListLine(line) then return dir end
local inc = 0
local Speed = getRotEncSpeed()
if Speed == ROTENC_MIDSPEED then inc = (5 * dir)
elseif Speed == ROTENC_HIGHSPEED then inc = (15 * dir)
else inc = dir end
return inc
end
------------------------------------------------------------------------------------
-- Translate Tap/Touch of EDIT buttons to equivalent Key events
local function GUI_Translate_Edit_Buttons(button)
local event = EVT_TOUCH_TAP
local editInc = nil
if (button==EDIT_BUTTON.ESC) then -- ESC
event = EVT_VIRTUAL_EXIT
elseif (button==EDIT_BUTTON.DEFAULT) then -- Default
event = EVT_VIRTUAL_ENTER_LONG
elseif (button==EDIT_BUTTON.DEC_10) then -- -10
event = EVT_VIRTUAL_PREV
editInc = -10
elseif (button==EDIT_BUTTON.DEC_1) then -- -1
event = EVT_VIRTUAL_PREV
editInc = -1
elseif (button==EDIT_BUTTON.INC_1) then -- +1
event = EVT_VIRTUAL_NEXT
editInc = 1
elseif (button==EDIT_BUTTON.INC_10) then -- + 10
event = EVT_VIRTUAL_NEXT
editInc = 10
elseif (button==EDIT_BUTTON.OK) then -- OK
event = EVT_VIRTUAL_ENTER
else
end
return event, editInc
end
------------------------------------------------------------------------------------------------------------
-- Handle Events comming from the GUI
local function GUI_HandleEvent(event, touchState)
local ctx = DSM_Context
local menu = ctx.Menu
local menuLines = ctx.MenuLines
local editInc = nil
if (IS_EDGETX) then
if (event == EVT_TOUCH_TAP and ctx.isEditing()) then -- Touch and Editing
local button = GUI_getTouchButton(touchState.x, touchState.y)
if (button) then
event, editInc = GUI_Translate_Edit_Buttons(button)
end
end
if (event == EVT_TOUCH_TAP or event == EVT_TOUCH_FIRST) and not ctx.isEditing() then -- Touch and NOT editing
if (DEBUG_ON) then Log.LOG_write("%s: EVT_TOUCH_TAP %d,%d\n",menuLib.phase2String(ctx.Phase),touchState.x, touchState.y) end
local button = GUI_getTouchButton(touchState.x, touchState.y)
if button then
-- Found a valid line
ctx.SelLine = button
ctx.Refresh_Display=true
if event == EVT_TOUCH_TAP then -- EVT_TOUCH_FIRST only move focus
event = EVT_VIRTUAL_ENTER
end
end
end
end -- IS_EDGETX
if event == EVT_VIRTUAL_EXIT then
ctx.Refresh_Display=true
if (DEBUG_ON) then Log.LOG_write("%s: EVT_VIRTUAL_EXIT\n",menuLib.phase2String(ctx.Phase)) end
if ctx.Phase == PHASE.RX_VERSION then
menuLib.ChangePhase(PHASE.EXIT_DONE) -- Just Exit the Script
else
if ctx.isEditing() then -- Editing a Line, need to restore original value
local line = ctx.MenuLines[ctx.EditLine]
line.Val = originalValue
menuLib.Value_Write_Validate(line)
elseif (menu.BackId > 0 ) then -- Back??
ctx.SelLine = menuLib.BACK_BUTTON
event = EVT_VIRTUAL_ENTER
else
menuLib.ChangePhase(PHASE.EXIT)
end
end
end
if ctx.Phase == PHASE.RX_VERSION then return end
if event == EVT_VIRTUAL_NEXT then
ctx.Refresh_Display=true
if (DEBUG_ON) then Log.LOG_write("%s: EVT_VIRTUAL_NEXT\n",menuLib.phase2String(ctx.Phase)) end
if ctx.isEditing() then -- Editing a Line, need to inc the value
local line=ctx.MenuLines[ctx.EditLine]
menuLib.Value_Add(line, editInc or GUI_RotEncVal(line, 1))
else -- not editing, move selected line to NEXT
menuLib.MoveSelectionLine(1)
end
return
end
if event == EVT_VIRTUAL_PREV then
ctx.Refresh_Display=true
if (DEBUG_ON) then Log.LOG_write("%s: EVT_VIRTUAL_PREV\n",menuLib.phase2String(ctx.Phase)) end
if ctx.isEditing() then -- Editiing a line, need to dec the value
local line=ctx.MenuLines[ctx.EditLine]
menuLib.Value_Add(line, editInc or GUI_RotEncVal(line, -1))
else -- not editing, move selected line to PREV
menuLib.MoveSelectionLine(-1)
end
return
end
if event == EVT_VIRTUAL_ENTER_LONG then
ctx.Refresh_Display=true
if (DEBUG_ON) then Log.LOG_write("%s: EVT_VIRTUAL_ENTER_LONG\n",menuLib.phase2String(ctx.Phase)) end
if ctx.isEditing() then
-- reset the value to default
menuLib.Value_Default(menuLines[ctx.EditLine]) -- Update value in RX if needed
end
return
end
if event == EVT_VIRTUAL_ENTER then
ctx.Refresh_Display=true
if (DEBUG_ON) then Log.LOG_write("%s: EVT_VIRTUAL_ENTER, SelLine=%d\n",menuLib.phase2String(ctx.Phase), ctx.SelLine) end
if ctx.SelLine == menuLib.BACK_BUTTON then -- Back
if (menu.BackId==0xFFF9) then
-- SPECIAL Main Menu
GUI_SwitchToMainMenu()
else
menuLib.GotoMenu(menu.BackId,0x80)
end
elseif ctx.SelLine == menuLib.NEXT_BUTTON then -- Next
menuLib.GotoMenu(menu.NextId,0x82)
elseif ctx.SelLine == menuLib.PREV_BUTTON then -- Prev
menuLib.GotoMenu(menu.PrevId,0x81)
elseif menuLines[ctx.SelLine].ValId ~= 0 then -- Menu or Value
if menuLines[ctx.SelLine].Type == LINE_TYPE.MENU then -- Navigate to Menu
if (menuLines[ctx.SelLine].ValId==0xFFF1) then
-- SPECIAL Simulation menu to Simulator
GUI_SwitchToSIM()
elseif (menuLines[ctx.SelLine].ValId==0xFFF2) then
-- SPECIAL Simulation menu to go to RX
GUI_SwitchToRX()
elseif (menuLines[ctx.SelLine].ValId==0xFFF3) then
-- SPECIAL Settup Menu
GUI_SwitchToSetupMenu()
elseif (menuLines[ctx.SelLine].ValId==0xFFF9) then
-- SPECIAL Settup Menu
GUI_SwitchToMainMenu()
else
menuLib.GotoMenu(menuLines[ctx.SelLine].ValId, ctx.SelLine) -- ValId is the MenuId to navigate to
end
else -- Enter on a Value
if ctx.isEditing() then -- already editing a Line????
menuLib.Value_Write_Validate(menuLines[ctx.SelLine])
else -- Edit the current value
ctx.EditLine = ctx.SelLine
originalValue = menuLines[ctx.SelLine].Val
menuLib.ChangePhase(PHASE.VALUE_CHANGING_WAIT)
end
end
end
end
end
local function init_colors()
-- osName in OpenTX is nil, otherwise is EDGETX
local ver, radio, maj, minor, rev, osname = getVersion()
if (osname==nil) then osname = "OpenTX" end -- OTX 2.3.14 and below returns nil
IS_EDGETX = string.sub(osname,1,1) == 'E'
if (IS_EDGETX and USE_SPECKTRUM_COLORS) then
-- SPECKTRUM COLORS (only works on EDGETX)
LCD_TOOL_BGCOLOR = LIGHTWHITE
-- TOOL HEADER
LCD_TOOL_HDR_COLOR = WHITE
LCD_TOOL_HDR_BGCOLOR = DARKBLUE
-- MENU HEADER
LCD_MENU_COLOR = WHITE
LCD_MENU_BGCOLOR = DARKGREY
-- LINE SELECTED
LCD_SELECTED_COLOR = WHITE
LCD_SELECTED_BGCOLOR = ORANGE
LCD_EDIT_BGCOLOR = RED
-- NORMAL TEXT
LCD_NORMAL_COLOR = BLACK
LCD_DISABLE_COLOR = LIGHTGREY
LCD_DEBUG_COLOR = BLUE
-- NORMAL BOX FRAME COLOR
LCD_BOX_COLOR = LIGHTGREY
end
end
local function GUI_Warning(event,touchState)
lcd.clear(LCD_TOOL_BGCOLOR)
local header = "DSM Forward Programming "..VERSION.." "
--Draw title
lcd.drawFilledRectangle(0, 0, LCD_W, 17, LCD_TOOL_HDR_BGCOLOR)
lcd.drawText(5, 0, header, LCD_TOOL_HDR_COLOR + SMLSIZE)
lcd.drawText(100,20,"INFO", BOLD)
lcd.drawText(5,40,"DSM Forward programing shares TX Servo/Output settings", 0)
lcd.drawText(5,60,"with the RX. Make sure you setup your plane first in ", 0)
lcd.drawText(5,80,"the TX before your start Fwrd programming your RX.", 0)
lcd.drawText(5,100,"Wing & Tail type can be configured using this tool.", 0)
lcd.drawText(5,150,"TX Gyro Servo settings are sent to the RX during 'Initial Setup'", 0)
lcd.drawText(5,170,"as well as when using RX 'Relearn Servo Settings'", 0)
lcd.drawText(5,200,"ALWAYS TEST Gyro reactions after this conditions before flying.", BOLD)
lcd.drawText(100,250," OK ", INVERS + BOLD)
if event == EVT_VIRTUAL_EXIT or event == EVT_VIRTUAL_ENTER or event == EVT_TOUCH_TAP then
warningScreenON = false
end
return 0
end
------------------------------------------------------------------------------------------------------------
-- Init
local function DSM_Init()
Log.LOG_open()
init_colors()
modelLib.ReadTxModelData()
modelLib.ST_LoadFileData()
modelLib.CreateDSMPortChannelInfo()
menuLib.Init()
menuProcessor.init()
return 0
end
------------------------------------------------------------------------------------------------------------
-- Main
local function DSM_Run(event,touchState)
local ctx = DSM_Context
if event == nil then
error("Cannot be run as a model script!")
Log.LOG_close()
return 2
end
if (warningScreenON) then
return GUI_Warning(event,touchState)
end
GUI_HandleEvent(event,touchState)
local ret = menuProcessor.run() -- Handle Send and Receive DSM Forward Programming Messages
if ctx.Phase == PHASE.INIT then return 0 end
local refreshInterval = REFRESH_GUI_MS
-- When using LCD BLINK attribute, we need faster refresh for BLINK to SHOW on LCD
if (ctx.Phase == PHASE.RX_VERSION or ctx.Phase==PHASE.MENU_REQ_TX_INFO) then -- Requesting RX Message Version usea BLINK?
ctx.Refresh_Display=true
refreshInterval = 20 -- 200ms
end
if (not IS_EDGETX) then -- OPENTX NEEDS REFRESH ON EVERY CYCLE
GUI_Display()
-- Refresh display only if needed and no faster than 300ms, utilize more CPU to speedup DSM communications
elseif (ctx.Refresh_Display and (getTime()-lastRefresh) > refreshInterval) then --300ms from last refresh
GUI_Display()
ctx.Refresh_Display=false
lastRefresh=getTime()
end
if ctx.Phase == PHASE.EXIT_DONE then
Log.LOG_close()
return 2
else
return 0
end
end
return { init=DSM_Init, run=DSM_Run }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,951 @@
local toolName = "TNS|DSM Frwd Prog v0.56a (MIN-SETUP)|TNE"
---- #########################################################################
---- # #
---- # Copyright (C) OpenTX #
-----# #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
local VERSION = "v0.56"
local DSMLIB_PATH = "/SCRIPTS/TOOLS/DSMLIB/"
local DATA_PATH = "/MODELS/DSMDATA"
local LOG_FILE = "/LOGS/dsm_min_log.txt"
-- Phase
local PH_INIT = 0
local PH_RX_VER, PH_TITLE = 1, 2
local PH_VAL_CHANGING, PH_VAL_EDITING, PH_VAL_EDIT_END = 6, 7, 8
local PH_WAIT_CMD, PH_EXIT_REQ, PH_EXIT_DONE = 9, 10, 11
-- Line Types
local LT_MENU, LT_LIST_NC = 0x1C, 0x6C
local Phase = PH_INIT
local Text = {}
local List_Text = {}
local List_Text_Img = {}
local originalValue = 0
local ctx_SelLine = 0 -- Current Selected Line
local ctx_EditLine = nil -- Current Editing Line
local Menu = { MenuId = 0, Text = "", TextId = 0, PrevId = 0, NextId = 0, BackId = 0 }
local MenuLines = {}
local logFile = nil
local LCD_W_BUTTONS = 19
local LCD_H_BUTTONS = 10
local LCD_X_MAX = 128
local LCD_X_RIGHT_BUTTONS = LCD_X_MAX - LCD_W_BUTTONS - 1
local LCD_Y_LINE_HEIGHT = 7
local LCD_Y_LOWER_BUTTONS = (8 * LCD_Y_LINE_HEIGHT) + 2
local TEXT_ATTR = SMLSIZE
local TX_CHANNELS = 12
local AT_PLANE = 0
local aircraft_type_text = {[0]="Plane","Heli","Glider","Drone"}
local WT_A1 = 0
local WT_A2 = 1
local WT_FLPR = 2
local WT_A1_F1 = 3
local WT_A2_F1 = 4
local WT_A2_F2 = 5
local WT_ELEVON_A = 6
local WT_ELEVON_B = 7
local wing_type_text = {[0]="Normal","Dual Ail","Flapperon", "Ail + Flp","Dual Ail + Flp","Dual Ail/Flp","Elevon A","Elevon B"}
local TT_R1 = 0
local TT_R1_E1 = 1
local TT_R1_E2 = 2
local TT_R2_E1 = 3
local TT_R2_E2 = 4
local TT_VT_A = 5
local TT_VT_B = 6
local TT_TLRN_A = 7
local TT_TLRN_B = 8
local TT_TLRN_A_R2 = 9
local TT_TLRN_B_R2 = 10
local tail_type_text = {[0]="Rud Only","Normal","Rud + Dual Ele","Dual Rud + Elv","Dual Rud/Ele",
"VTail A","VTail B","Taileron A","Taileron B",
"Taileron A + Dual Rud","Taileron B + Dual Rud"
}
local MT_NORMAL = 0
local MT_REVERSE = 1
local P1 = 0
local P2 = 1
local P3 = 2
local P4 = 3
local P5 = 4
local P6 = 5
local P7 = 6
local P8 = 7
--local P9 = 8
--local P10 = 9
local MV_AIRCRAFT_TYPE = 1001
local MV_WING_TYPE = 1002
local MV_TAIL_TYPE = 1003
local MV_CH_BASE = 1010
local MV_CH_THR = 1010
local MV_CH_L_AIL = 1011
local MV_CH_R_AIL = 1012
local MV_CH_L_FLP = 1013
local MV_CH_R_FLP = 1014
local MV_CH_L_RUD = 1015
local MV_CH_R_RUD = 1016
local MV_CH_L_ELE = 1017
local MV_CH_R_ELE = 1018
local MV_PORT_BASE = 1020
local MV_P1_MODE = 1020
--local MV_P2_MODE = 1021
--local MV_P3_MODE = 1022
--local MV_P4_MODE = 1023
--local MV_P5_MODE = 1024
local MV_P6_MODE = 1025
--local MV_P7_MODE = 1026
--local MV_P8_MODE = 1027
--local MV_P9_MODE = 1028
--local MV_P10_MODE = 1029
local MV_DATA_END = 1040
-- MENU DATA Management
local M_DB = {} -- Store the variables used in the Menus.
local lastGoodMenu=0
local currATyp = -1
local currTTyp = -1
local currWTyp = -1
local menuDataChanged = false
local MODEL = {
modelName = "", -- The name of the model comming from OTX/ETX
hashName = nil,
modelOutputChannel = {}, -- Output information from OTX/ETX
TX_CH_TEXT= { },
PORT_TEXT = { },
DSM_ChannelInfo = {} -- Data Created by DSM Configuration Script
}
local function gc()
collectgarbage("collect")
end
--[[
local function gcTable(t)
if type(t)=="table" then
for i,v in pairs(t) do
if type(v) == "table" then
gcTable(v)
end
t[i] = nil
end
end
gc()
return t
end
--]]
local function LOG_open()
logFile = io.open(LOG_FILE, "w") -- Truncate Log File
end
local function LOG_write(...)
if (logFile == nil) then LOG_open() end
local str = string.format(...)
io.write(logFile, str)
end
local function LOG_close()
if (logFile ~= nil) then io.close(logFile) end
end
-- Saves MENU_DATA to a file
local function ST_SaveFileData()
local fname = MODEL.hashName
print("Saving File:"..fname)
local dataFile = assert(io.open(DATA_PATH .. "/" .. fname, "w"),"Please create "..DATA_PATH.." folder") -- write File
-- Foreach MENU_DATA with a value write Var_Id:Value into file
for i = 0, MV_DATA_END do
if (M_DB[i]~=nil) then
io.write(dataFile,string.format("%s:%s\n",i,M_DB[i]))
end
end
io.close(dataFile)
end
local function tailTypeCompatible(a,b)
local function normalize(tt)
if (tt==TT_TLRN_A or tt==TT_TLRN_B) then
return TT_TLRN_A
elseif (tt==TT_TLRN_A_R2 or tt==TT_TLRN_B_R2) then
return TT_TLRN_A_R2
elseif (tt==TT_VT_A or tt==TT_VT_B) then
return TT_VT_A
else
return tt
end
end
return (normalize(a)==normalize(b))
end
local function ST_PlaneWingInit(wingType)
--print("Change Plane WingType:"..wing_type_text[wingType])
M_DB[MV_WING_TYPE] = wingType
-- Clear all Wing Data
M_DB[MV_CH_L_AIL] = nil
M_DB[MV_CH_R_AIL] = nil
M_DB[MV_CH_L_FLP] = nil
M_DB[MV_CH_R_FLP] = nil
M_DB[MV_CH_THR] = P1
-- Default Channel Assisgments for each Wing type
if (wingType==WT_A1) then
M_DB[MV_CH_L_AIL] = P2
elseif (wingType==WT_A2 or wingType==WT_FLPR) then
M_DB[MV_CH_L_AIL] = P6
M_DB[MV_CH_R_AIL] = P2
elseif (wingType==WT_A1_F1) then
M_DB[MV_CH_L_AIL] = P2
M_DB[MV_CH_L_FLP] = P6
elseif (wingType==WT_A2_F1) then
M_DB[MV_CH_L_AIL] = P6
M_DB[MV_CH_R_AIL] = P2
M_DB[MV_CH_L_FLP] = P5
elseif (wingType==WT_A2_F2) then
M_DB[MV_CH_L_AIL] = P6
M_DB[MV_CH_R_AIL] = P2
M_DB[MV_CH_R_FLP] = P5
M_DB[MV_CH_L_FLP] = P7
elseif (wingType==WT_ELEVON_A) then
M_DB[MV_CH_L_AIL] = P2
M_DB[MV_CH_R_AIL] = P3
elseif (wingType==WT_ELEVON_B) then
M_DB[MV_CH_L_AIL] = P3
M_DB[MV_CH_R_AIL] = P2
else -- Assume normal
print("ERROR: Invalid Wing Type")
end
end
local function ST_PlaneTailInit(tailType)
if (M_DB[MV_WING_TYPE]==WT_ELEVON_A or
M_DB[MV_WING_TYPE]==WT_ELEVON_B) then
tailType = TT_R1 -- Delta only have ruder
end
--print("Change Plane Tail Type:"..tail_type_text[tailType])
-- Clear all data for Tail
M_DB[MV_TAIL_TYPE] = tailType
M_DB[MV_CH_L_ELE] = nil
M_DB[MV_CH_R_ELE] = nil
M_DB[MV_CH_L_RUD] = nil
M_DB[MV_CH_R_RUD] = nil
-- Setup Channels for different Tail types
if (tailType == TT_R1) then
M_DB[MV_CH_L_RUD] = P4
elseif (tailType == TT_R1_E1) then
M_DB[MV_CH_L_ELE] = P3
M_DB[MV_CH_L_RUD] = P4
elseif (tailType == TT_R1_E2) then
M_DB[MV_CH_L_ELE] = P5
M_DB[MV_CH_R_ELE] = P3
M_DB[MV_CH_L_RUD] = P4
elseif (tailType == TT_R2_E1) then
M_DB[MV_CH_L_ELE] = P3
M_DB[MV_CH_L_RUD] = P4
M_DB[MV_CH_R_RUD] = P5
elseif (tailType == TT_R2_E2) then
M_DB[MV_CH_L_ELE] = P5
M_DB[MV_CH_R_ELE] = P3
M_DB[MV_CH_L_RUD] = P4
M_DB[MV_CH_R_RUD] = P6
elseif (tailType == TT_VT_A or tailType == TT_VT_B) then
M_DB[MV_CH_L_ELE] = P3
M_DB[MV_CH_R_ELE] = P4
elseif (tailType == TT_TLRN_A or tailType == TT_TLRN_B or
tailType == TT_TLRN_A_R2 or tailType == TT_TLRN_B_R2) then
M_DB[MV_CH_L_RUD] = P4
M_DB[MV_CH_L_ELE] = P5
M_DB[MV_CH_R_ELE] = P3
else -- Assume Normal
print("ERROR:invalid Tail Type")
end
if (tailType == TT_TLRN_A_R2 or tailType == TT_TLRN_B_R2) then
M_DB[MV_CH_R_RUD] = P8
end
end
local function ST_AircraftInit(aircraftType)
M_DB[MV_AIRCRAFT_TYPE] = aircraftType
ST_PlaneWingInit(WT_A1)
ST_PlaneTailInit(TT_R1_E1)
end
-- Setup Initial Default Data for the Menus
local function ST_Default_Data()
ST_AircraftInit(AT_PLANE)
for i=0,9 do
M_DB[MV_P1_MODE+i] = MT_NORMAL + MODEL.modelOutputChannel[P1+i].revert
end
end
local function MenuLinePostProcessing(line)
line.MenuId = Menu.MenuId
if line.Type == LT_MENU then
-- nothing to do on menu entries
line.Val=nil
elseif line.Type == LT_LIST_NC then
-- Normalize Min/Max to be relative to Zero
line.TextStart = line.Min
line.Def = line.Def - line.Min -- normalize default value
line.Max = line.Max - line.Min -- normalize max index
line.Min = 0 -- min index
end
end
local function portUse(p)
local out = nil
if p==M_DB[MV_CH_THR] then out = "Thr"
elseif p == M_DB[MV_CH_L_AIL] then
out=(M_DB[MV_CH_R_AIL] and "Ail_L") or "Ail"
elseif p == M_DB[MV_CH_R_AIL] then out="Ail_R"
elseif p == M_DB[MV_CH_L_ELE] then
out=(M_DB[MV_CH_R_ELE] and "Ele_L") or "Ele"
elseif p == M_DB[MV_CH_R_ELE] then out="Ele_R"
elseif p == M_DB[MV_CH_L_RUD] then
out=(M_DB[MV_CH_R_RUD] and "Rud_L") or "Rud"
elseif p == M_DB[MV_CH_R_RUD] then out="Rud-R"
elseif p == M_DB[MV_CH_L_FLP] then
out=(M_DB[MV_CH_R_FLP] and "Flp_L") or "Flp"
elseif p == M_DB[MV_CH_R_FLP] then out="Flp_R"
else
out = ""
end
return out
end
-- Creates the menus to Render with the GUI
local function ST_LoadMenu(menuId)
local function Header(p)
return MODEL.PORT_TEXT[p].." "..portUse(p)
end
local function generateGyroReverse(menuId, P_BASE, V_BASE)
for i=0,4 do
MenuLines[i] = { Type = LT_LIST_NC, Text=Header(P_BASE+i), TextId = 0, ValId = V_BASE+i, Min=45, Max=46, Def=45, Val=M_DB[V_BASE+i] }
end
MenuLines[5] = { Type = LT_MENU, Text="Only TAER affects AS3X/SAFE react dir", TextId = 0, ValId = menuId }
MenuLines[6] = { Type = LT_MENU, Text="If changes, RX 'Relearn Servo'", TextId = 0, ValId = menuId }
ctx_SelLine = 0
end
-- Begin
for i = 0, 6 do -- clear menu
MenuLines[i] = { MenuId = 0, lineNum = 0, Type = 0 }
end
if (menuId==0x1000) then -- MAIN MENU
Menu = { MenuId = 0x1000, Text = "Save-Exit ("..MODEL.modelName..")", PrevId = 0, NextId = 0, BackId = 0, TextId=0 }
if (true) then
MenuLines[4] = { Type = LT_MENU, Text="Save Changes", TextId = 0, ValId = 0x1005 }
MenuLines[5] = { Type = LT_MENU, Text="Discard Changes", TextId = 0, ValId = 0xFFF9 }
ctx_SelLine = 4
end
lastGoodMenu = menuId
elseif (menuId==0x1001) then -- MODEL SETUP
local backId = 0xFFF9 -- No changes, just exit
local title = "Setup ("..MODEL.modelName..")"
if (menuDataChanged) then
backId = 0x1000 -- Go to Save menu
title = title.." *"
end
Menu = { MenuId = 0x1001, Text = title, PrevId = 0, NextId = 0, BackId = backId, TextId=0 }
MenuLines[0] = { Type = LT_MENU, Text = "Aircraft Setup", ValId = 0x1010,TextId=0 }
MenuLines[1] = { Type = LT_MENU, Text = "Wing & Tail Channels ", ValId = 0x1020, TextId=0 }
MenuLines[3] = { Type = LT_MENU, Text = "Gyro Channel Reverse", ValId = 0x1030, TextId=0 }
MenuLines[5] = { Type = LT_MENU, Text = "WARNING: Changing of Aircraft", ValId = 0x1001, TextId=0 }
MenuLines[6] = { Type = LT_MENU, Text = "deletes prev Ch/Port assgmt.", ValId = 0x1001, TextId=0 }
ctx_SelLine = 0
lastGoodMenu = menuId
elseif (menuId==0x1005) then
ST_SaveFileData()
menuDataChanged = false
local msg1 = "Data saved to: "
local msg2 = " ../DSMLIB/"..MODEL.hashName
Menu = { MenuId = 0x1005, Text = "Config Saved", PrevId = 0, NextId = 0, BackId = 0, TextId=0 }
MenuLines[2] = { Type = LT_MENU, Text=msg1, TextId = 0, ValId = 0x1005 }
MenuLines[3] = { Type = LT_MENU, Text=msg2, TextId = 0, ValId = 0x1005 }
MenuLines[6] = { Type = LT_MENU, Text="Complete", TextId = 0, ValId = 0xFFF9 }
ctx_SelLine = 6
lastGoodMenu = menuId
elseif (menuId==0x1010) then
Menu = { MenuId = 0x1010, Text = "Aircraft", PrevId = 0, NextId = 0x1011, BackId = 0x1001, TextId=0 }
MenuLines[5] = { Type = LT_LIST_NC, Text="Aircraft Type", TextId = 0, ValId = MV_AIRCRAFT_TYPE, Min=15, Max=15, Def=15, Val=M_DB[MV_AIRCRAFT_TYPE] }
ctx_SelLine = 5
lastGoodMenu = menuId
elseif (menuId==0x1011) then
Menu = { MenuId = 0x1011, Text = "Model Type: "..aircraft_type_text[currATyp], PrevId = 0, NextId = 0x1020, BackId = 0x1010, TextId=0 }
MenuLines[5] = { Type = LT_LIST_NC, Text="Wing Type", TextId = 0, ValId = MV_WING_TYPE, Min=20, Max=27, Def=20, Val=M_DB[MV_WING_TYPE] }
MenuLines[6] = { Type = LT_LIST_NC, Text="Tail Type", TextId = 0, ValId = MV_TAIL_TYPE, Min=30, Max=40, Def=30, Val=M_DB[MV_TAIL_TYPE] }
ctx_SelLine = 5
lastGoodMenu = menuId
elseif (menuId==0x1020) then
------ WING SETUP -------
local thr = M_DB[MV_CH_THR]
local leftAil = M_DB[MV_CH_L_AIL]
local rightAil = M_DB[MV_CH_R_AIL]
local leftFlap = M_DB[MV_CH_L_FLP]
local rightFlap = M_DB[MV_CH_R_FLP]
local thrText = "Thr"
local leftAilText = "Left Ail"
local rightAilText = "Right Ail"
local leftFlapText = "Left Flap"
local rightFlapText = "Right Flap"
if (rightAil==nil) then leftAilText = "Aileron" end
if (rightFlap==nil) then leftFlapText = "Flap" end
local title = aircraft_type_text[currATyp].." Wing:"..wing_type_text[currWTyp]
Menu = { MenuId = 0x1020, Text = title, PrevId = 0, NextId = 0x1021, BackId = 0x1011, TextId=0 }
MenuLines[0] = { Type = LT_LIST_NC, Text=thrText, TextId = 0, ValId = MV_CH_THR, Min=0, Max=10, Def=0, Val= thr }
MenuLines[2] = { Type = LT_LIST_NC, Text=leftAilText, TextId = 0, ValId = MV_CH_L_AIL, Min=0, Max=9, Def=0, Val= leftAil }
if (rightAil) then
MenuLines[3] = { Type = LT_LIST_NC, Text=rightAilText, TextId = 0, ValId = MV_CH_R_AIL, Min=0, Max=9, Def=0, Val= rightAil }
end
if (leftFlap) then
MenuLines[4] = { Type = LT_LIST_NC, Text=leftFlapText, TextId = 0, ValId = MV_CH_L_FLP, Min=0, Max=9, Def=0, Val= leftFlap }
end
if (rightFlap) then
MenuLines[5] = { Type = LT_LIST_NC, Text=rightFlapText, TextId = 0, ValId = MV_CH_R_FLP, Min=0, Max=9, Def=0, Val= rightFlap }
end
ctx_SelLine = 0
lastGoodMenu = menuId
elseif (menuId==0x1021) then
------ TAIL SETUP -------
local leftRud = M_DB[MV_CH_L_RUD]
local rightRud = M_DB[MV_CH_R_RUD]
local leftEle = M_DB[MV_CH_L_ELE]
local rightEle = M_DB[MV_CH_R_ELE]
local leftRudText = "Left Rud"
local rightRudText = "Right Rud"
local leftElvText = "Left Ele"
local rightElvText = "Right Ele"
if (rightRud==nil) then leftRudText = "Rud" end
if (rightEle==nil) then leftElvText = "Ele" end
local title = aircraft_type_text[currATyp].." Tail:"..tail_type_text[currTTyp]
Menu = { MenuId = 0x1021, Text = title, PrevId = 0, NextId = 0x1001, BackId = 0x1020, TextId=0 }
if (leftRud) then
MenuLines[1] = { Type = LT_LIST_NC, Text=leftRudText, TextId = 0, ValId = MV_CH_L_RUD, Min=0, Max=9, Def=0, Val= leftRud}
end
if (rightRud) then
MenuLines[2] = { Type = LT_LIST_NC, Text=rightRudText, TextId = 0, ValId = MV_CH_R_RUD, Min=0, Max=9, Def=0, Val=rightRud }
end
if (leftEle) then
MenuLines[4] = { Type = LT_LIST_NC, Text=leftElvText, TextId = 0, ValId = MV_CH_L_ELE, Min=0, Max=9, Def=0, Val=leftEle }
end
if (rightEle) then
MenuLines[5] = { Type = LT_LIST_NC, Text=rightElvText, TextId = 0, ValId = MV_CH_R_ELE, Min=0, Max=9, Def=0, Val=rightEle }
end
ctx_SelLine = 1
lastGoodMenu = menuId
elseif (menuId==0x1030) then
Menu = { MenuId = 0x1030, Text = "Gyro Reverse (Port 1-5)", PrevId = 0, NextId = 0x1031, BackId = 0x1001, TextId=0 }
generateGyroReverse(menuId,P1,MV_P1_MODE)
lastGoodMenu = menuId
elseif (menuId==0x1031) then
Menu = { MenuId = 0x1031, Text = "Gyro Reverse (Port 6-10)", PrevId = 0x1030, NextId = 0, BackId = 0x1001, TextId=0 }
generateGyroReverse(menuId,P6,MV_P6_MODE)
lastGoodMenu = menuId
elseif (menuId==0xFFF9) then
ChangePhase(PH_EXIT_DONE)
return
else
Menu = { MenuId = 0x0002, Text = "NOT IMPLEMENTED", TextId = 0, PrevId = 0, NextId = 0, BackId = lastGoodMenu }
ctx_SelLine = -1 -- BACK BUTTON
end
for i = 0, 6 do
if (MenuLines[i].Type > 0) then
MenuLinePostProcessing(MenuLines[i])
end
end
gc()
end
-- Inital List and Image Text for this menus
local function ST_Init_Text(rxId)
-- Channel Names use the Port Text Retrived from OTX/ETX
local p = 0
for i = 0, 9 do List_Text[i] = MODEL.PORT_TEXT[i] end
List_Text[10] = "--"
-- Aircraft Type
List_Text[15+AT_PLANE] = "Airplane";
-- Wing Types
p = 20+WT_A1; List_Text[p] = "Single Ail"; --List_Text_Img[p] = "x.png|Single Aileron"
p = 20+WT_A2; List_Text[p] = "Dual Ail"; --List_Text_Img[p] = "x.png|Dual Aileron"
p = 20+WT_FLPR; List_Text[p] = "Flaperon"; --List_Text_Img[p] = "x.png|Flaperon"
p = 20+WT_A1_F1; List_Text[p] = "Ail + Flap"; --List_Text_Img[p] = "x.png|Aileron + Flap"
p = 20+WT_A2_F1; List_Text[p] = "Dual Ail + Flap"; --List_Text_Img[p] = "x.png|Dual Aileron + Flap"
p = 20+WT_A2_F2; List_Text[p] = "Dual Ail + Dual Flap"; --List_Text_Img[p] = "x.png|Dual Aileron + Dual Flap"
p = 20+WT_ELEVON_A; List_Text[p] = "Delta A"; --List_Text_Img[p] = "x.png|Delta/Elevon A"
p = 20+WT_ELEVON_B; List_Text[p] = "Delta B"; --List_Text_Img[p] = "x.png|Delta/Elevon B"
-- Tail Types
p = 30+TT_R1; List_Text[p] = "Rudder Only"; --List_Text_Img[p] = "x.png|Rudder Only"
p = 30+TT_R1_E1; List_Text[p] = "Rud + Ele"; --List_Text_Img[p] = "x.png|Tail Normal"
p = 30+TT_R1_E2; List_Text[p] = "Rud + Dual Ele"; --List_Text_Img[p] = "x.png|Rud + Dual Ele"
p = 30+TT_R2_E1; List_Text[p] = "Dual Rud + Ele"; --List_Text_Img[p] = "x.png|Dual Rud + Ele"
p = 30+TT_R2_E2; List_Text[p] = "Dual Rud + Dual Ele"; --List_Text_Img[p] = "x.png|Dual Rud + Dual Elev"
p = 30+TT_VT_A; List_Text[p] = "V-Tail A"; --List_Text_Img[p] = "x.png|V-Tail A"
p = 30+TT_VT_B; List_Text[p] = "V-Tail B"; --List_Text_Img[p] = "x.png|V-Tail B"
p = 30+TT_TLRN_A; List_Text[p] = "Taileron A"; --List_Text_Img[p] = "x.png|Taileron A"
p = 30+TT_TLRN_B; List_Text[p] = "Taileron B"; --List_Text_Img[p] = "x.png|Taileron B"
p = 30+TT_TLRN_A_R2; List_Text[p] = "Taileron A + 2x Rud"; --List_Text_Img[p] = "x.png|Taileron A + Dual Rud"
p = 30+TT_TLRN_B_R2; List_Text[p] = "Taileron B + 2x Rud"; --List_Text_Img[p] = "x.png|Taileron B + Dual Rud"
-- Servo Reverse
List_Text[45+MT_NORMAL] = "Normal"
List_Text[45+MT_REVERSE] = "Reverse"
end
-- Initial Setup
local function ST_Init()
ST_Init_Text(0)
gc()
-- Setup default Data if no data loaded
menuDataChanged = false
if (M_DB[MV_AIRCRAFT_TYPE]==nil) then
ST_Default_Data()
menuDataChanged = true
end
currATyp = M_DB[MV_AIRCRAFT_TYPE]
currWTyp = M_DB[MV_WING_TYPE]
currTTyp = M_DB[MV_TAIL_TYPE]
Phase = PH_RX_VER
end
----- Line Type
local function isSelectable(line)
if (line.Type == LT_MENU and line.ValId == line.MenuId) then return false end -- Menu to same page
if (line.Type ~= LT_MENU and line.Max == 0) then return false end -- Read only data line
if (line.Type ~= 0 and line.TextId < 0x8000) then return true end -- Not Flight Mode
return false;
end
local function isListLine(line)
return line.Type==LT_LIST_NC
end
local function isEditing()
return ctx_EditLine ~= nil
end
-----------------------
local function Get_Text(index)
local out = Text[index] or string.format("Unknown_%X", index)
return out
end
local function Get_Text_Value(index)
local out = List_Text[index] or Get_Text(index)
return out
end
function ChangePhase(newPhase)
Phase = newPhase
end
local function Value_Add(dir)
local line = MenuLines[ctx_SelLine]
local inc = dir
line.Val = line.Val + inc
if line.Val > line.Max then
line.Val = line.Max
elseif line.Val < line.Min then
line.Val = line.Min
end
end
--------------
local function GotoMenu(menuId, lastSelectedLine)
Menu.MenuId = menuId
ctx_SelLine = lastSelectedLine
ChangePhase(PH_TITLE)
end
local function DSM_HandleEvent(event)
if event == EVT_VIRTUAL_EXIT then
if Phase == PH_RX_VER then
Phase = PH_EXIT_DONE -- Exit program
else
if isEditing() then -- Editing a Line, need to restore original value
MenuLines[ctx_EditLine].Val = originalValue
event = EVT_VIRTUAL_ENTER
else
if (Menu.BackId > 0 ) then -- Back??
ctx_SelLine = -1 --Back Button
event = EVT_VIRTUAL_ENTER
else
ChangePhase(PH_EXIT_REQ)
end
end
end
end -- Exit
if Phase == PH_RX_VER then return end -- nothing else to do
if event == EVT_VIRTUAL_NEXT then
if isEditing() then -- Editting?
Value_Add(1)
else
if ctx_SelLine < 7 then -- On a regular line
local num = ctx_SelLine -- Find the prev selectable
for i = ctx_SelLine + 1, 6, 1 do
local line = MenuLines[i]
if isSelectable(line) then
ctx_SelLine = i
break
end
end
if num == ctx_SelLine then -- No Selectable Line
if Menu.NextId ~= 0 then
ctx_SelLine = 7 -- Next
elseif Menu.PrevId ~= 0 then
ctx_SelLine = 8 -- Prev
end
end
elseif Menu.PrevId ~= 0 then
ctx_SelLine = 8 -- Prev
end
end
return
end
if event == EVT_VIRTUAL_PREV then
if isEditing() then -- In Edit Mode
Value_Add(-1)
else
if ctx_SelLine == 8 and Menu.NextId ~= 0 then
ctx_SelLine = 7 -- Next
elseif ctx_SelLine > 0 then
if ctx_SelLine > 6 then
ctx_SelLine = 7 --NEXT
end
local num = ctx_SelLine -- Find Prev Selectable line
for i = ctx_SelLine - 1, 0, -1 do
local line = MenuLines[i]
if isSelectable(line) then
ctx_SelLine = i
break
end
end
if num == ctx_SelLine then -- No Selectable Line
if (Menu.BackId > 0) then
ctx_SelLine = -1 -- Back
end
end
else
ctx_SelLine = -1 -- Back
end
end
return
end
if event == EVT_VIRTUAL_ENTER then
if ctx_SelLine == -1 then -- Back
GotoMenu(Menu.BackId, 0x80)
elseif ctx_SelLine == 7 then -- Next
GotoMenu(Menu.NextId, 0x82)
elseif ctx_SelLine == 8 then -- Prev
GotoMenu(Menu.PrevId, 0x81)
elseif ctx_SelLine >= 0 and MenuLines[ctx_SelLine].Type == LT_MENU then
GotoMenu(MenuLines[ctx_SelLine].ValId, ctx_SelLine) -- ValId is the next menu
else
-- value entry
if isEditing() then
ctx_EditLine = nil -- Done Editting
ChangePhase(PH_VAL_EDIT_END)
else -- Start Editing
ctx_EditLine = ctx_SelLine
originalValue = MenuLines[ctx_SelLine].Val
ChangePhase(PH_VAL_EDITING)
end
end
end
end
local function DSM_Send_Receive()
if Phase == PH_RX_VER then -- request RX version
Phase = PH_TITLE
Menu.MenuId = 0x01001
Refresh_Display = true
elseif Phase == PH_WAIT_CMD then
elseif Phase == PH_TITLE then -- request menu title
ST_LoadMenu(Menu.MenuId)
if (Phase~=PH_EXIT_DONE) then
Phase = PH_WAIT_CMD
end
Refresh_Display = true
elseif Phase == PH_VAL_EDIT_END then -- send value
local line = MenuLines[ctx_SelLine] -- Updated Value of SELECTED line
-- Update the menu data from the line
if (M_DB[line.ValId] ~= line.Val ) then
M_DB[line.ValId] = line.Val
print(string.format("MENU_DATA[%d/%s]=%d",line.ValId,line.Text, line.Val))
menuDataChanged=true
end
-- Did the Wing type change?
local wt = M_DB[MV_WING_TYPE]
if (currWTyp ~= wt) then
currWTyp = wt
ST_PlaneWingInit(currWTyp)
-- DELTA has only RUDER
if (currWTyp==WT_ELEVON_A or currWTyp==WT_ELEVON_B) then
M_DB[MV_TAIL_TYPE] = TT_R1
end
end
--- Did the tail changed?
local tt = M_DB[MV_TAIL_TYPE]
if (currTTyp ~= tt) then
if (not tailTypeCompatible(currTTyp,tt)) then
ST_PlaneTailInit(tt)
end
currTTyp = tt
end
Phase = PH_WAIT_CMD
elseif Phase == PH_EXIT_REQ then
Phase=PH_EXIT_DONE
end
end
-----
local function showBitmap(x, y, imgDesc)
local f = string.gmatch(imgDesc, '([^%|]+)') -- Iterator over values split by '|'
local imgName, imgMsg = f(), f()
f = string.gmatch(imgMsg or "", '([^%:]+)') -- Iterator over values split by ':'
local p1, p2 = f(), f()
lcd.drawText(x, y, p1 or "", TEXT_ATTR) -- Alternate Image MSG
lcd.drawText(x, y + LCD_Y_LINE_HEIGHT, p2 or "", TEXT_ATTR) -- Alternate Image MSG
gc()
end
local function drawButton(x, y, text, active)
local attr = TEXT_ATTR
if (active) then attr = attr + INVERS end
lcd.drawText(x, y, text, attr)
end
local function DSM_Display()
lcd.clear()
--Draw RX Menu
if Phase == PH_RX_VER then
return
end
-- display Program version or RX version
local msg = "FProg "..VERSION
lcd.drawText(40, LCD_Y_LOWER_BUTTONS, msg, TEXT_ATTR)
if Menu.MenuId == 0 then return end; -- No Title yet
-- Got a Menu
lcd.drawText(1, 0, Menu.Text, TEXT_ATTR + INVERS)
local y = LCD_Y_LINE_HEIGHT + 2
for i = 0, 6 do
local attrib = TEXT_ATTR
if (i == ctx_SelLine) then attrib = attrib + INVERS end -- Selected Line
local line = MenuLines[i]
if line ~= nil and line.Type ~= 0 then
local heading = line.Text
local text = nil
if line.Type ~= LT_MENU then -- list/value
if line.Val ~= nil then
if isListLine(line) then
local textId = line.Val + line.TextStart
text = Get_Text_Value(textId)
--local imgDesc = List_Text_Img[textId]
--if (imgDesc and i == ctx_SelLine) then -- Optional Image and Msg for selected value
-- showBitmap(1, 20, imgDesc)
--end
else
text = line.Val
end
end -- if is Value
if (ctx_EditLine == i) then -- Editing a Line
attrib = BLINK + INVERS + TEXT_ATTR
end
lcd.drawText(LCD_X_MAX, y, text or "--", attrib + RIGHT) -- display value
--lcd.drawText(LCD_X_MAX, y, line.Format or "", TEXT_ATTR + RIGHT) -- display Format
attrib = TEXT_ATTR
end
lcd.drawText(1, y, heading, attrib) -- display text
end
y = y + LCD_Y_LINE_HEIGHT
end -- for
if Menu.BackId~=0 then
drawButton(LCD_X_RIGHT_BUTTONS, 0, "Back", ctx_SelLine == -1)
end
if Menu.NextId~=0 then
drawButton(LCD_X_RIGHT_BUTTONS, LCD_Y_LOWER_BUTTONS, "Next", ctx_SelLine == 7)
end
if Menu.PrevId~=0 then
drawButton(1, LCD_Y_LOWER_BUTTONS, "Prev", ctx_SelLine == 8)
end
end
------------------------------------------------------------------------------------------------------------
-- Init
local function DSM_Init()
--LOG_open()
ST_Init()
gc()
if (LCD_W > 128) then
TEXT_ATTR = 0
LCD_Y_LINE_HEIGHT = 25
LCD_X_MAX = 300
LCD_X_RIGHT_BUTTONS = LCD_X_MAX - 30
LCD_Y_LOWER_BUTTONS = (8 * LCD_Y_LINE_HEIGHT) + 2
end
Phase = PH_RX_VER
end
-- Main
local function DSM_Run(event)
if event == nil then
error("Cannot be run as a model script!")
return 2
end
DSM_Display()
DSM_HandleEvent(event)
DSM_Send_Receive()
gc()
if Phase == PH_EXIT_DONE then
LOG_close()
return 2
else
return 0
end
end
---
-- Load Model Config
gc()
local r = assert(loadScript(DSMLIB_PATH.."DsmMIN_P1.lua"), "Not-Found: DSMLIB/DsmMIN_P1.lua")
(MODEL,M_DB, LOG_write)
gc()
----
return { init = DSM_Init, run = DSM_Run }

View File

@ -0,0 +1,813 @@
---- #########################################################################
---- # #
---- # Copyright (C) OpenTX/EdgeTx #
-----# #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
------------------------------------------------------------------------------
-- This script library is a rewrite of the original DSM forward programming Lua
-- Script. The goal is to make it easier to understand, mantain, and to
-- separate the GUI from the DSM Forward programming engine/logic
-- in this way, GUIs can evolve independent. OpenTX Gui, EdgeTx GUI, Small Radios, etc.
-- Code is based on the code/work by: Pascal Langer (Author of the Multi-Module)
-- Rewrite/Enhancements By: Francisco Arzu
--
------------------------------------------------------------------------------
--###############################################################################
-- Multi buffer for DSM description
-- Multi_Buffer[0..2]=="DSM" -> Lua script is running
-- Multi_Buffer[3]==0x70+len -> TX to RX data ready to be sent
-- Multi_Buffer[4..9]=6 bytes of TX to RX data
-- Multi_Buffer[10..25]=16 bytes of RX to TX data
--
-- To start operation:
-- Write 0x00 at address 3
-- Write 0x00 at address 10
-- Write "DSM" at address 0..2
--###############################################################################
local Log, menuLib, modelLib, DEBUG_ON = ... -- Get Debug_ON from parameters. -- 0=NO DEBUG, 1=HIGH LEVEL 2=MORE DETAILS
local LIB_VERSION = "0.55"
local MSG_FILE = "/SCRIPTS/TOOLS/DSMLIB/msg_fwdp_en.txt"
local PHASE = menuLib.PHASE
local LINE_TYPE = menuLib.LINE_TYPE
local CH_TYPE = modelLib.CH_TYPE
local CH_MIX_TYPE = modelLib.CH_MIX_TYPE
local DISP_ATTR = menuLib.DISP_ATTR
local DSM_Context = menuLib.DSM_Context
local MODEL = modelLib.MODEL
local MAX_MENU_LINES = menuLib.MAX_MENU_LINES
local BACK_BUTTON = menuLib.BACK_BUTTON
local NEXT_BUTTON = menuLib.NEXT_BUTTON
local PREV_BUTTON = menuLib.PREV_BUTTON
local SEND_TIMEOUT = 2000 / 10 -- Home many 10ms intervals to wait on sending data to tx to keep connection open (2s)
local TXInactivityTime = 0 -- Next time to do heartbeat after inactivity
local RXInactivityTime = 0 -- To check RX disconnection
local TxInfo_Type = 0
local TxInfo_Step = 0
local Change_Step = 0
local IS_EDGETX = false
------------------------------------------------------------------------------------------------------------
local function multiBuffer2String() -- used for debug
local i
local rxAnswer = "RX:"
for i = 10, 25 do
rxAnswer = rxAnswer .. string.format(" %02X", multiBuffer(i))
end
return rxAnswer
end
---------------- DSM Values <-> Int16 Manipulation --------------------------------------------------------
local function int16_LSB(number) -- Less Significat byte
local r,x = bit32.band(number, 0xFF)
return r
end
local function int16_MSB(number) -- Most signifcant byte
return bit32.rshift(number, 8)
end
local function Dsm_to_Int16(lsb, msb) -- Componse an Int16 value
return bit32.lshift(msb, 8) + lsb
end
local function Dsm_to_SInt16(lsb,msb) -- Componse a SIGNED Int16 value
local value = bit32.lshift(msb, 8) + lsb
if value >= 0x8000 then -- Negative value??
return value - 0x10000
end
return value
end
local function sInt16ToDsm(value) -- Convent to SIGNED DSM Value
if value < 0 then
value = 0x10000 + value
end
return value
end
------------------------------------------------------------------------------------------------------------
local function DSM_send(...)
local arg = { ... }
for i = 1, #arg do
multiBuffer(3 + i, arg[i])
end
multiBuffer(3, 0x70 + #arg)
if (DEBUG_ON > 1) then
local str = ""
for i = 1, #arg do
str = str .. string.format("%02X ", arg[i])
end
LOG_write("DSM_SEND: [%s]\n", str)
end
end
-------------------------------------------------------------------------------------------------
local function DSM_StartConnection()
if (DEBUG_ON) then Log.LOG_write("DSM_StartConnection()\n") end
--Set protocol to talk to
multiBuffer( 0, string.byte('D') )
--test if value has been written
if multiBuffer( 0 ) ~= string.byte('D') then
if (DEBUG_ON) then Log.LOG_write("Not Enouth memory\n") end
error("Not enough memory!")
return 2
end
--Init TX buffer
multiBuffer( 3, 0x00 )
--Init RX buffer
multiBuffer( 10, 0x00 )
--Init telemetry
multiBuffer( 0, string.byte('D') )
multiBuffer( 1, string.byte('S') )
multiBuffer( 2, string.byte('M') )
return 0
end
local function DSM_ReleaseConnection()
if (DEBUG_ON) then Log.LOG_write("DSM_ReleaseConnection()\n") end
multiBuffer(0, 0)
end
--------------------------------------------------------------------------------------------------------
-- REEQUEST Messages to RX
local function DSM_sendHeartbeat()
-- keep connection open
if (DEBUG_ON) then Log.LOG_write("SEND DSM_sendHeartbeat()\n") end
DSM_send(0x00, 0x04, 0x00, 0x00)
end
local function DSM_getRxVerson()
local TX_CAP=0x14 -- Capabilities??
local TX_MAX_CH = modelLib.TX_CHANNELS - 6 --number of channels after 6 (6Ch=0, 10ch=4, etc)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_getRxVersion(Ch:0x%X,Cap:0x%X)\n",TX_MAX_CH,TX_CAP) end
DSM_send(0x11, 0x06, TX_MAX_CH, TX_CAP, 0x00, 0x00)
end
local function DSM_getMainMenu()
local TX_CAP=0x14 -- Capabilities??
local TX_MAX_CH = modelLib.TX_CHANNELS - 6 --number of channels after 6 (6Ch=0, 10ch=4, etc)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_getMainMenu(Ch:0x%X,Cap:0x%X) -- TX_Channels=%d\n",TX_MAX_CH,TX_CAP,TX_MAX_CH+6) end
DSM_send(0x12, 0x06, TX_MAX_CH, TX_CAP, 0x00, 0x00) -- first menu only
end
local function DSM_getMenu(menuId, latSelLine)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_getMenu(MenuId=0x%X LastSelectedLine=%s)\n", menuId, latSelLine) end
DSM_send(0x16, 0x06, int16_MSB(menuId), int16_LSB(menuId), 0x00, latSelLine)
end
local function DSM_getFirstMenuLine(menuId)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_getFirstMenuLine(MenuId=0x%X)\n", menuId) end
DSM_send(0x13, 0x04, int16_MSB(menuId), int16_LSB(menuId)) -- line 0
end
local function DSM_getNextMenuLine(menuId, curLine)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_getNextLine(MenuId=0x%X,LastLine=%s)\n", menuId, curLine) end
DSM_send(0x14, 0x06, int16_MSB(menuId), int16_LSB(menuId), 0x00, curLine) -- line X
end
local function DSM_getNextMenuValue(menuId, valId, text)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_getNextMenuValue(MenuId=0x%X, LastValueId=0x%X) Extra: Text=\"%s\"\n", menuId, valId,
text)
end
DSM_send(0x15, 0x06, int16_MSB(menuId), int16_LSB(menuId), int16_MSB(valId), int16_LSB(valId)) -- line X
end
local function DSM_updateMenuValue(valId, val, text, line)
local value = sInt16ToDsm(val)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_updateValue(ValueId=0x%X,val=%d) Extra: Text=\"%s\" Value=%s\n", valId, val, text, menuLib.lineValue2String(line)) end
DSM_send(0x18, 0x06, int16_MSB(valId), int16_LSB(valId), int16_MSB(value), int16_LSB(value)) -- send current value
end
local function DSM_validateMenuValue(valId, text, line)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_validateValue(ValueId=0x%X) Extra: Text=\"%s\" Value=%s\n", valId, text, menuLib.lineValue2String(line)) end
DSM_send(0x19, 0x04, int16_MSB(valId), int16_LSB(valId))
end
local function DSM_editingValue(lineNum, text, line)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_editingValue(lineNo=0x%X) Extra: Text=\"%s\" Val=%s\n", lineNum, text, menuLib.lineValue2String(line)) end
DSM_send(0x1A, 0x04, int16_MSB(lineNum), int16_LSB(lineNum))
end
local function DSM_editingValueEnd(lineNum, text, line)
if (DEBUG_ON) then Log.LOG_write("SEND DSM_editingValueEnd(lineNo=0x%X) Extra: Text=\"%s\" Value=%s\n", lineNum, text, menuLib.lineValue2String(line)) end
DSM_send(0x1B, 0x04, int16_MSB(lineNum), int16_LSB(lineNum))
end
-- Send the functionality of the RX channel Port (channel)
local function DSM_sendTxChInfo_20(portNo)
local b1,b2 = MODEL.DSM_ChannelInfo[portNo][0] or 0, MODEL.DSM_ChannelInfo[portNo][1] or 0
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TxChInfo(#%d DATA= %02X %02X %02X %02X) %s\n", portNo,
portNo, portNo, b1, b2, modelLib.channelType2String(b1,b2)) -- DATA part
end
DSM_send(0x20, 0x06, portNo, portNo, b1, b2)
end
local function DSM_sendTxSubtrim_21(portNo)
local usage = MODEL.DSM_ChannelInfo[portNo][1] or 0
local leftTravel = math.abs(math.floor(MODEL.modelOutputChannel[portNo].min/10))
local rightTravel = math.abs(math.floor(MODEL.modelOutputChannel[portNo].max/10))
local subTrim = math.floor(MODEL.modelOutputChannel[portNo].offset/10)
-- Center at 100%: 142-1906 (0 8E 07 72)
local left = 142
local right = 1906
if (bit32.band(usage,CH_TYPE.THR)>0) then
left = 0
right = 2047
end
left = math.floor (left - (leftTravel -100) *8.8 + subTrim*2)
right = math.floor (right + (rightTravel -100) *8.8 + subTrim*2)
if (left<0) then left=0 end
if (right>2027) then right=2047 end
local b1,b2,b3,b4 = int16_MSB(left), int16_LSB(left), int16_MSB(right), int16_LSB(right)
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TxSubtrim(#%d DATA=%02X %02X %02X %02X) Range(%d - %d) ER L/R:(%d - %d)x8 ST:(%d)x2\n", portNo,
b1,b2,b3,b4, left, right, leftTravel-100, rightTravel-100, subTrim) -- DATA part
end
DSM_send(0x21, 0x06, b1,b2,b3,b4) -- Port is not send anywhere, since the previous 0x20 type message have it.
end
local function DSM_sendTxServoTravel_23(portNo)
local leftTravel = math.abs(math.floor(MODEL.modelOutputChannel[portNo].min/10))
local rightTravel = math.abs(math.floor(MODEL.modelOutputChannel[portNo].max/10))
local debugInfo = string.format("Travel L/R (%d - %d)",leftTravel,rightTravel)
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TxServoTravel(#%d DATA= %02X %02X %02X %02X) %s\n", portNo,
0x00, leftTravel, 0x00, rightTravel, debugInfo) -- DATA part
end
DSM_send(0x23, 0x06, 0x00, leftTravel, 0x00, rightTravel)
end
local function DSM_sentTxInfo(menuId,portNo)
-- TxInfo_Type=0 : AR636B Main Menu (Send port/Channel info + SubTrim + Travel)
-- TxInfo_Type=1 : AR630-637 Famly Main Menu (Only Send Port/Channel usage Msg 0x20)
-- TxInfo_Type=1F : AR630-637 Initial Setup/Relearn Servo Settings (Send port/Channel info + SubTrim + Travel +0x24/Unknown)
if (TxInfo_Step == 0) then
-- AR630 family: Both TxInfo_Type (ManinMenu=0x1, Other First Time Configuration = 0x1F)
DSM_sendTxChInfo_20(portNo)
if (TxInfo_Type == 0x1F) then
TxInfo_Step = 1
end
if (TxInfo_Type == 0x00) then
TxInfo_Step = 2
end
elseif (TxInfo_Step == 1) then
DSM_sendTxServoTravel_23(portNo)
TxInfo_Step = 2
elseif (TxInfo_Step == 2) then
DSM_sendTxSubtrim_21(portNo)
if (TxInfo_Type == 0x00) then
TxInfo_Step = 5 -- End Step
else
TxInfo_Step = 3
end
elseif (TxInfo_Step == 3) then
-- 24,6: 0 83 5A B5
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TxInfo24(#%d DATA=0x24 0x06 %02X %02X %02X %02X)\n", portNo,
0x00, 0x83, 0x5A, 0xB5) -- DATA part
end
DSM_send(0x24, 0x06, 0x00, 0x83, 0x5A, 0xB5) -- Still Uknown
TxInfo_Step = 4
elseif (TxInfo_Step == 4) then
-- 24,6: 6 80 25 4B
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TxInfo24(#%d DATA=0x24 0x06 %02X %02X %02X %02X)\n", portNo,
0x06, 0x80, 0x25, 0x4B) -- DATA part
end
DSM_send(0x24, 0x06, 0x06, 0x80, 0x25, 0x4B) -- Still Uknown
TxInfo_Step = 5
elseif (TxInfo_Step == 5) then
-- 22,4: 0 0
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TxInfo_End(#%d)\n", portNo)
end
DSM_send(0x22, 0x04, 0x00, 0x00)
TxInfo_Step = 0
end
if (TxInfo_Step > 0) then
DSM_Context.SendDataToRX = 1 -- keep Transmitig
end
end
-----------------------------------------------------------------------------------------------------------
local function DSM_sendRequest()
-- Send the proper Request message depending on the Phase
local ctx = DSM_Context
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: ", menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase)) end
if ctx.Phase == PHASE.RX_VERSION then -- request RX version
DSM_getRxVerson()
elseif ctx.Phase == PHASE.WAIT_CMD then -- keep connection open
DSM_sendHeartbeat()
elseif ctx.Phase == PHASE.MENU_TITLE then -- request menu title
if ctx.Menu.MenuId == 0 then -- First time loading a menu ?
DSM_getMainMenu()
else
DSM_getMenu(ctx.Menu.MenuId, ctx.SelLine)
if (ctx.Menu.MenuId == 0x0001) then -- Executed the Reset Menu??
if (DEBUG_ON) then Log.LOG_write("RX Reset!!!\n") end
-- Start again retriving RX info
ctx.Menu.MenuId = 0
ctx.isReset = true
ctx.Phase = PHASE.RX_VERSION
end
end
elseif ctx.Phase == PHASE.MENU_REQ_TX_INFO then
DSM_sentTxInfo(ctx.Menu.MenuId, ctx.CurLine)
elseif ctx.Phase == PHASE.MENU_LINES then -- request next menu lines
if ctx.CurLine == -1 then -- No previous menu line loaded ?
DSM_getFirstMenuLine(ctx.Menu.MenuId)
else
DSM_getNextMenuLine(ctx.Menu.MenuId, ctx.CurLine)
end
elseif ctx.Phase == PHASE.MENU_VALUES then -- request menu values
local line = ctx.MenuLines[ctx.CurLine]
DSM_getNextMenuValue(ctx.Menu.MenuId, line.ValId, line.Text)
elseif ctx.Phase == PHASE.VALUE_CHANGING then -- send value
local line = ctx.MenuLines[ctx.SelLine] -- Updated Value of SELECTED line
if (Change_Step==0) then
DSM_updateMenuValue(line.ValId, line.Val, line.Text, line)
if line.Type == menuLib.LINE_TYPE.LIST_MENU then -- Validation on every Step??
Change_Step=1; ctx.SendDataToRX=1 -- Send inmediatly after
else
ctx.Phase = PHASE.VALUE_CHANGING_WAIT
end
else
DSM_validateMenuValue(line.ValId, line.Text, line)
Change_Step=0
ctx.Phase = PHASE.VALUE_CHANGING_WAIT
end
elseif ctx.Phase == PHASE.VALUE_CHANGING_WAIT then
local line = ctx.MenuLines[ctx.SelLine]
DSM_editingValue(line.lineNum, line.Text, line)
elseif ctx.Phase == PHASE.VALUE_CHANGE_END then -- send value
local line = ctx.MenuLines[ctx.SelLine] -- Update Value of SELECTED line
if (Change_Step==0) then
DSM_updateMenuValue(line.ValId, line.Val, line.Text, line)
Change_Step=1; ctx.SendDataToRX=1 -- Send inmediatly after
elseif (Change_Step==1) then
DSM_validateMenuValue(line.ValId, line.Text, line)
Change_Step=2; ctx.SendDataToRX=1 -- Send inmediatly after
else
DSM_editingValueEnd(line.lineNum, line.Text, line)
Change_Step=0
ctx.Phase = PHASE.WAIT_CMD
end
elseif ctx.Phase == PHASE.EXIT then
if (DEBUG_ON) then Log.LOG_write("CALL DSM_TX_Exit()\n") end
DSM_send(0x1F, 0x02, 0xFF, 0xFF) -- 0xAA
end
end
-----------------------------------------------------------------------------------------------------------
-- Parsing Responses
local function DSM_parseRxVersion()
--ex: 0x09 0x01 0x00 0x15 0x02 0x22 0x01 0x00 0x14 v2.22.1 00 14?? 8ch SAFE
-- 0x09 0x01 0x00 0x18 0x05 0x06 0x34 0x00 0x12 v5.6.52 00 12??? 6ch FC6250
local rxId = multiBuffer(13)
DSM_Context.RX.Id = rxId
DSM_Context.RX.Name = menuLib.Get_RxName(rxId)
DSM_Context.RX.Version = multiBuffer(14) .. "." .. multiBuffer(15) .. "." .. multiBuffer(16)
if (DEBUG_ON) then Log.LOG_write("RESPONSE Receiver=%s Version %s Cap:0x%02X\n",
DSM_Context.RX.Name, DSM_Context.RX.Version, multiBuffer(18)) end
end
local function DSM_parseMenu()
--ex: 0x09 0x02 0x4F 0x10 0xA5 0x00 0x00 0x00 0x50 0x10 0x10 0x10 0x00 0x00 0x00 0x00
-- MenuID TextID PrevID NextID BackID
local ctx = DSM_Context
local menu = ctx.Menu
menu.MenuId = Dsm_to_Int16(multiBuffer(12), multiBuffer(13))
menu.TextId = Dsm_to_Int16(multiBuffer(14), multiBuffer(15))
menu.Text = menuLib.Get_Text(menu.TextId)
menu.PrevId = Dsm_to_Int16(multiBuffer(16), multiBuffer(17))
menu.NextId = Dsm_to_Int16(multiBuffer(18), multiBuffer(19))
menu.BackId = Dsm_to_Int16(multiBuffer(20), multiBuffer(21))
for i = 0, MAX_MENU_LINES do -- clear menu
ctx.MenuLines[i] = { MenuId = 0, lineNum = 0, Type = 0, Text = "", TextId = 0, ValId = 0, Min=0, Max=0, Def=0, Val=nil }
end
ctx.CurLine = -1
menuLib.MenuPostProcessing(menu)
if (DEBUG_ON) then Log.LOG_write("RESPONSE Menu: %s\n", menuLib.menu2String(menu)) end
return menu
end
local function DSM_parseMenuLine()
--ex: 0x09 0x03 0x00 0x10 0x00 0x1C 0xF9 0x00 0x10 0x10 0x00 0x00 0x00 0x00 0x03 0x00
--ex: 0x09 0x03 0x61 0x10 0x00 0x6C 0x50 0x00 0x00 0x10 0x36 0x00 0x49 0x00 0x36 0x00
--ex: 0x09 0x03 0x65 0x10 0x00 0x0C 0x51 0x00 0x00 0x10 0x00 0x00 0xF4 0x00 0x2E 0x00
-- MenuLSB MenuMSB line Type TextID NextLSB NextMSB Val_Min Val_Max Val_Def
local ctx = DSM_Context
local i = multiBuffer(14)
local type = multiBuffer(15)
local line = ctx.MenuLines[i]
-- are we trying to override existing line
if (line.Type > 0 and type == 0) then
if (DEBUG_ON) then Log.LOG_write("RESPONSE MenuLine: ERROR. Trying to ZERO Override: %s\n", menuLib.menuLine2String(line)) end
return ctx.MenuLines[ctx.CurLine]
end
ctx.CurLine = i
line.lineNum = i
line.MenuId = Dsm_to_Int16(multiBuffer(12), multiBuffer(13))
line.Type = type
line.TextId = Dsm_to_Int16(multiBuffer(16), multiBuffer(17))
line.Text = nil -- Fill at Post processing
line.ValId = Dsm_to_Int16(multiBuffer(18), multiBuffer(19))
-- Singed int values
line.Min = Dsm_to_SInt16(multiBuffer(20), multiBuffer(21))
line.Max = Dsm_to_SInt16(multiBuffer(22), multiBuffer(23))
line.Def = Dsm_to_SInt16(multiBuffer(24), multiBuffer(25))
line.Val=nil
menuLib.MenuLinePostProcessing(line)
if (DEBUG_ON) then Log.LOG_write("RESPONSE MenuLine: %s\n", menuLib.menuLine2String(line)) end
if (line.MenuId~=ctx.Menu.MenuId) then
-- Going Back too fast: Stil receiving lines from previous menu
ctx.Menu.MenuId = line.MenuId
Log.LOG_write("WARNING: Overriding current Menu from Line\n")
end
return line
end
local function DSM_parseMenuValue()
--ex: 0x09 0x04 0x53 0x10 0x00 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
--ex: 0x09 0x04 0x61 0x10 0x02 0x10 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
-- MenuLSB MenuMSB ValLSB ValMSB V_LSB V_MSB
-- Identify the line and update the value
local ctx = DSM_Context
local menuId = Dsm_to_Int16(multiBuffer(12), multiBuffer(13))
local valId = Dsm_to_Int16(multiBuffer(14), multiBuffer(15))
local value = Dsm_to_SInt16(multiBuffer(16), multiBuffer(17)) --Signed int
local updatedLine = nil
for i = 0, MAX_MENU_LINES do -- Find the menu line for this value
local line = ctx.MenuLines[i]
if line ~= nil and line.Type ~= 0 then
if line.Type ~= LINE_TYPE.MENU and line.ValId == valId then -- identifier of ValueId stored in the line
line.Val = value
ctx.CurLine = i
updatedLine = line
break
end
end
end
if (updatedLine == nil) then
if (DEBUG_ON) then Log.LOG_write("RESPONSE MenuValue: ERROR, Cant find Menu Line with MenuId=%X, ValID=%X to update\n", menuId, valId) end
else
if (DEBUG_ON) then Log.LOG_write("RESPONSE MenuValue: UPDATED: %s\n", menuLib.menuLine2String(updatedLine))
end
end
return updatedLine ~= nil
end
local function DSM_parseReqTxInfo()
local portNo = multiBuffer(12)
TxInfo_Type = multiBuffer(13)
if (DEBUG_ON) then Log.LOG_write("RESPONSE ReqTXChannelInfo(#%d %s InfoType=0x%0X)\n",
portNo, MODEL.PORT_TEXT[portNo], TxInfo_Type) end
TxInfo_Step = 0
return portNo
end
------------------------------------------------------------------------------------------------------------
local function DSM_processResponse()
local ctx = DSM_Context
local cmd = multiBuffer(11) -- Response Command
if (DEBUG_ON > 1) then Log.LOG_write("%s: RESPONSE %s \n", menuLib.phase2String(ctx.Phase), multiBuffer2String()) end
if (DEBUG_ON and cmd > 0x00) then Log.LOG_write("%3.3f %s: ", menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase)) end
if cmd == 0x01 then -- read version
DSM_parseRxVersion()
--Lib.Init_Text(DSM_Context.RX.Id)
ctx.isReset = false -- no longer resetting
ctx.Phase = PHASE.MENU_TITLE
ctx.Menu.MenuId = 0
elseif cmd == 0x02 then -- read menu title
local menu = DSM_parseMenu()
-- Update Selected Line navigation
if menu.NextId ~= 0 then
ctx.SelLine = NEXT_BUTTON -- highlight Next
else
ctx.SelLine = BACK_BUTTON -- highlight Back
end
if (ctx.Menu.MenuId == 0x0001) then -- Still in RESETTING MENU???
-- Star from Start
if (DEBUG_ON) then Log.LOG_write("RX Reset: Still not done, restart again!!!\n") end
ctx.Menu.MenuId = 0
ctx.Phase = PHASE.RX_VERSION
else
ctx.Phase = PHASE.MENU_LINES
end
elseif cmd == 0x03 then -- menu lines
local line = DSM_parseMenuLine()
-- Update Selected line navigation
if (ctx.SelLine == BACK_BUTTON or ctx.SelLine == NEXT_BUTTON or ctx.SelLine == PREV_BUTTON)
and menuLib.isSelectableLine(line) then -- Auto select the current line
ctx.SelLine = line.lineNum
end
ctx.Phase = PHASE.MENU_LINES
elseif cmd == 0x04 then -- read menu values
if DSM_parseMenuValue() then
ctx.Phase = PHASE.MENU_VALUES
else
ctx.Phase = PHASE.WAIT_CMD
end
elseif cmd == 0x05 then -- Request TX Info
local portNo = DSM_parseReqTxInfo()
ctx.CurLine = portNo
ctx.Phase = PHASE.MENU_REQ_TX_INFO
elseif cmd == 0xA7 then -- answer to EXIT command
if (DEBUG_ON) then Log.LOG_write("RESPONSE RX Exit\n") end
if (ctx.Phase==PHASE.EXIT) then -- Expected RX Exit
ctx.Phase = PHASE.EXIT_DONE
else -- UnExpected RX Exit
DSM_ReleaseConnection()
error("RX Connection Drop")
end
elseif cmd == 0x00 then -- NULL response (or RX heartbeat)
-- 09 00 01 00 00 00 00 00 00 00 00 00 00 00 00
-- 09 00 7E 00 20 9E 28 00 20 9E 28 00 20 8D 7E : After TX Heartbeat one of this (FC6250)
-- 09 00 18 00 20 08 00 00 00 08 00 00 00 98 AE AR8360T
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: RESPONSE RX Heartbeat --Context: 0x%02X\n",
menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase), multiBuffer(12)) end
else
if (DEBUG_ON) then Log.LOG_write("RESPONSE Unknown Command (0x%X) DATA=%s\n", cmd, multiBuffer2String()) end
end
return cmd
end
------------------------------------------------------------------------------------------------------------
local function DSM_Send_Receive()
local ctx = DSM_Context
-- Receive part: Process incoming messages if there is nothing to send
if ctx.SendDataToRX == 0 and multiBuffer(10) == 0x09 then
local cmd = DSM_processResponse()
multiBuffer(10, 0x00) -- Clear Response Buffer to know that we are done with the response
RXInactivityTime = getTime() + SEND_TIMEOUT*4 -- Reset RX Inactivity timeout
if (cmd > 0x00) then -- RX HeartBeat ??
-- Only change to SEND mode if we received a valid response (Ignore heartbeat)
ctx.SendDataToRX = 1
ctx.Refresh_Display = true
end
else
if (getTime() > RXInactivityTime and ctx.Phase ~= PHASE.RX_VERSION and ctx.Phase ~= PHASE.EXIT_DONE) then
if (ctx.isEditing()) then -- If Editing, Extend Timeout
RXInactivityTime = getTime() + SEND_TIMEOUT*4
else
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: RX INACTIVITY TIMEOUT\n", menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase)) end
DSM_ReleaseConnection()
error("RX Disconnected")
end
end
end
-----TX Part --------------------------------------
if ctx.SendDataToRX == 1 then -- Need to send a request
ctx.SendDataToRX = 0
DSM_sendRequest()
TXInactivityTime = getTime() + SEND_TIMEOUT -- Reset Inactivity timeout
else
-- Check if enouth time has passed from last transmit/receive activity
if getTime() > TXInactivityTime then
ctx.SendDataToRX = 1 -- Switch to Send mode to send heartbeat
ctx.Refresh_Display = true
-- Only change to WAIT_CMD if we are NOT wating for RX version
if ctx.Phase ~= PHASE.RX_VERSION then
-- Phase = If IsEditing then VALUE_CHANGING_WAIT else WAIT_CMD
ctx.Phase = (ctx.isEditing() and PHASE.VALUE_CHANGING_WAIT) or PHASE.WAIT_CMD
end
end
end
end
-- Init
local function DSM_Init(toolName)
local dateTime = getDateTime()
local dateStr = dateTime.year.."-"..dateTime.mon.."-"..dateTime.day.." "..dateTime.hour..":"..dateTime.min
local ver, radio, maj, minor, rev, osname = getVersion()
if (osname==nil) then osname = "OpenTX" end -- OTX 2.3.14 and below returns nil
IS_EDGETX = string.sub(osname,1,1) == 'E'
if (DEBUG_ON) then
Log.LOG_write("---------------DSM New Session %s ----------------\n", toolName, dateStr)
Log.LOG_write("Radio Info: %s\n", radio .. " " .. (osname or "OpenTx") .. " " .. ver)
Log.LOG_write("Date : %s\n", dateStr)
Log.LOG_write("DsmLib Version : %s\n", LIB_VERSION)
end
end
local function DSM_Init_Text_Exceptions()
-- Apply special restrictions to some Values
local function getTxChText(ch)
return " ("..(MODEL.TX_CH_TEXT[ch] or "--")..")"
end
local List_Values = menuLib.List_Values
local List_Text = menuLib.List_Text
local Text = menuLib.Text
Log.LOG_write("Initializing TEXT Exception\n")
-- Channel selection for SAFE MODE and GAINS on FC6250HX
--List_Text[0x000C] = "Inhibit?" --?
for i = 0, 7 do
List_Text[0x000D + i] = "Ch"..(i+5) ..getTxChText(i+4)
end -- Aux channels (Ch5 and Greater)
-- Servo Output values..
local servoOutputValues = {0x0003,0x002D,0x002E,0x002F} --Inh (GAP), 5.5ms, 11ms, 22ms. Fixing L_m1 with 0..244 range!
--List_Text[0x002D] = "5.5ms"
--[0x002E] = "11ms"
--List_Text[0x002F] = "22ms"
-- Gain Values
local gainValues = {0x0032,0x0033,0x0034} -- 1X, 2X, 4X -- Fixing L_m1 with 0..244 range!
--List_Text[0x0032] = "1 X"
--[0x0033] = "2 X"
-- List_Text[0x0034] = "4 X"
-- List of Channels for Safe, Gains, Panic, except FC6250HX that uses other range (0x00C..0x015)
-- the valid range Starts with GEAR if enabled (Thr,Ail,Ele,Rud are not valid, the RX reject them )
-- Valid Values: Inhibit? (GAP), Gear,Aux1..Aux7,X-Plus-1..XPlus-8
local channelValues = {0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049}
--List_Text[0x0035] = "Inhibit?"
for i = 0, 11 do
List_Text[0x0036 + i] = "Ch"..(i+1) .. getTxChText(i)
end -- Channels on AR637T
for i = 1, 8 do -- 41..49
List_Text[0x0041 + i] = "Ch"..(i+12)
end
-- Flight mode channel selection
--Text[0x0078] = "FM Channel"
List_Values[0x0078]=channelValues
-- Gain channel selection
--Text[0x0089] = "Gain Channel"
List_Values[0x0089]=channelValues
-- Gain Sensitivity selection
--Text[0x008A] = "Gain Sensitivity/r";
List_Values[0x008A]=gainValues -- Right Alight, (L_M1 was wide open range 0->244)
-- Safe mode options, Ihnibit + this values
local safeModeOptions = {0x0003,0x00B0,0x00B1} -- inh (gap), "Self-Level/Angle Dem, Envelope
--List_Text[0x00B0] = "Self-Level/Angle Dem"
--List_Text[0x00B1] = "Envelope"
--Text[0x00D2] = "Panic Channel"
List_Values[0x00D2]=channelValues
--Inh, Self-Level/Angle Dem, Envelope -- (L_M was wide open range 0->244)
--Text[0x01F8] = "Safe Mode";
List_Values[0x01F8]=safeModeOptions
end
-- Initial Setup
local function FP_Init(toolname)
DSM_Context.Phase = PHASE.INIT
DSM_Init(toolname)
menuLib.clearAllText()
end
local initStep=0
local FileState = {}
local function Message_Init()
lcd.clear()
if (initStep == 0) then
if (IS_EDGETX) then
-- Load all messages at once
menuLib.LoadTextFromFile(MSG_FILE,13)
initStep=1
else
-- load messages incrementally to avoid "CPU Limit"
lcd.drawText(30, 50, "Loading Msg file: "..(FileState.lineNo or 0))
if (menuLib.INC_LoadTextFromFile(MSG_FILE, FileState)==1) then
initStep=1
end
end
elseif (initStep == 1) then
DSM_Init_Text_Exceptions()
DSM_Context.Phase = PHASE.RX_VERSION
DSM_StartConnection()
end
end
local function FP_Run()
if (DSM_Context.Phase==PHASE.INIT) then
Message_Init()
return 0
end
return DSM_Send_Receive()
end
local function FP_Done()
local ctx = menuLib.DSM_Context
ctx.Phase = PHASE.EXIT_DONE
DSM_ReleaseConnection()
end
return { init=FP_Init, run=FP_Run, done=FP_Done }

View File

@ -0,0 +1,33 @@
local LogLib = { }
local LOG_FILE = "/LOGS/dsm_log.txt"
local logFile = nil
local logCount=0
function LogLib.LOG_open()
logFile = io.open(LOG_FILE, "w") -- Truncate Log File
end
function LogLib.LOG_write(...)
if (logFile==nil) then LogLib.LOG_open() end
local str = string.format(...)
if (str==nil) then return end
io.write(logFile, str)
str = string.gsub(str,"\n"," ") -- Elimitate return from line, since print will do it
print(str)
if (logCount > 10) then -- Close an re-open the file
io.close(logFile)
logFile = io.open(LOG_FILE, "a")
logCount =0
end
end
function LogLib.LOG_close()
if (logFile~=nil) then io.close(logFile) end
end
return LogLib

View File

@ -0,0 +1,167 @@
local MODEL, M_DATA, LOG_write = ...
--[[
local MODEL = {
modelName = "", -- The name of the model comming from OTX/ETX
hashName = "",
modelOutputChannel = {}, -- Output information from OTX/ETX
TX_CH_TEXT= { [0]=""},
PORT_TEXT = { [0]=""},
DSM_ChannelInfo = {} -- Data Created by DSM Configuration Script
}
-- MENU DATA Management
local M_DATA = {} -- Store the variables used in the Menus.
--]]
local DATA_PATH = "/MODELS/DSMDATA"
local TX_CHANNELS = 12
local MV_DATA_END = 1040
local function hashName(mName)
local c=10000;
local prefix = string.gsub(mName,"%.","_") -- Change any "." to "_"
prefix = string.gsub(prefix,"% ","_") -- Change any space to "_"
prefix = string.sub(prefix,1,5) -- Take the first 5 characters
-- Simple Hash of the Model Name adding each character
for i = 1, #mName do
local ch = string.byte(mName,i,i)
c=c+ch
end
return (prefix .. c) -- Return Prefix + Hash
end
-- Load Menu Data from a file
local function ST_LoadFileData()
local fname = hashName(MODEL.modelName)..".txt"
MODEL.hashName = fname
-- Clear Menu Data
for i = 0, MV_DATA_END do
M_DATA[i]=nil
end
print("Loading File:"..fname)
local dataFile = io.open(DATA_PATH .. "/".. fname, "r") -- read File
-- cannot read file???
if (dataFile==nil) then return 0 end
local line = io.read(dataFile, 5000)
io.close(dataFile)
if #line == 0 then return 0 end -- No data??
-- Process the input, each line is "Var_Id : Value" format
-- Store it into MANU_DATA
local i=0
for k, v in string.gmatch(line, "(%d+):(%d+)") do
M_DATA[k+0]=v+0 -- do aritmentic to convert string to number
i=i+1
end
-- Return 0 if no lines processed, 1 otherwise
if (i > 0) then return 1 else return 0 end
end
local function getModuleChannelOrder(num)
--Determine fist 4 channels order
local ch_n={}
local st_n = {[0]= "R", "E", "T", "A" }
local c_ord=num -- ch order
if (c_ord == -1) then
ch_n[0] = st_n[3]
ch_n[1] = st_n[1]
ch_n[2] = st_n[2]
ch_n[3] = st_n[0]
else
ch_n[bit32.band(c_ord,3)] = st_n[3]
c_ord = math.floor(c_ord/4)
ch_n[bit32.band(c_ord,3)] = st_n[1]
c_ord = math.floor(c_ord/4)
ch_n[bit32.band(c_ord,3)] = st_n[2]
c_ord = math.floor(c_ord/4)
ch_n[bit32.band(c_ord,3)] = st_n[0]
end
local s = ""
for i=0,3 do
s=s..ch_n[i]
end
return s
end
local function ReadTxModelData()
local TRANSLATE_AETR_TO_TAER=false
local table = model.getInfo() -- Get the model name
MODEL.modelName = table.name
local module = model.getModule(0) -- Internal
if (module==nil or module.Type~=6) then module = model.getModule(1) end -- External
if (module~=nil) then
if (module.Type==6 ) then -- MULTI-MODULE
local chOrder = module.channelsOrder
local s = getModuleChannelOrder(chOrder)
LOG_write("MultiChannel Ch Order: [%s] %s\n",chOrder,s)
if (s=="AETR") then TRANSLATE_AETR_TO_TAER=true
else TRANSLATE_AETR_TO_TAER=false
end
end
end
-- Read Ch1 to Ch10
local i= 0
for i = 0, TX_CHANNELS-1 do
local ch = model.getOutput(i) -- Zero base
if (ch~=nil) then
MODEL.modelOutputChannel[i] = ch
if (string.len(ch.name)==0) then
ch.formatCh = string.format("TX:Ch%i",i+1)
else
ch.formatCh = string.format("TX:Ch%i/%s",i+1,ch.name or "--")
end
end
end
-- Translate AETR to TAER
if (TRANSLATE_AETR_TO_TAER) then
LOG_write("Applying AETR -> TAER translation\n")
local ail = MODEL.modelOutputChannel[0]
local elv = MODEL.modelOutputChannel[1]
local thr = MODEL.modelOutputChannel[2]
MODEL.modelOutputChannel[0] = thr
MODEL.modelOutputChannel[1] = ail
MODEL.modelOutputChannel[2] = elv
end
-- Create the Port Text to be used
LOG_write("Ports/Channels:\n")
for i = 0, TX_CHANNELS-1 do
local ch = MODEL.modelOutputChannel[i]
if (ch~=nil) then
MODEL.TX_CH_TEXT[i] = ch.formatCh
MODEL.PORT_TEXT[i] = string.format("P%i (%s) ",i+1,MODEL.TX_CH_TEXT[i])
LOG_write("Port%d %s [%d,%d] Rev=%d, Off=%d, ppmC=%d, syn=%d\n",i+1,MODEL.TX_CH_TEXT[i],math.floor(ch.min/10),math.floor(ch.max/10), ch.revert, ch.offset, ch.ppmCenter, ch.symetrical)
end
end
end
-- Main Program
LOG_write("Reading Model Info\n")
ReadTxModelData()
local r = ST_LoadFileData()
return r

View File

@ -0,0 +1,282 @@
local MODEL, M_DATA, LOG_write = ...
--[[
local MODEL = {
modelName = "", -- The name of the model comming from OTX/ETX
hashName = "",
modelOutputChannel = {}, -- Output information from OTX/ETX
TX_CH_TEXT= { [0]=""},
PORT_TEXT = { [0]=""},
DSM_ChannelInfo = {} -- Data Created by DSM Configuration Script
}
-- MENU DATA Management
local M_DATA = {} -- Store the variables used in the Menus.
--]]
local TX_CHANNELS = 12
local AT_PLANE = 0
local aircraft_type_text = {[0]="Plane","Heli","Glider","Drone"}
--[[
local WT_A1 = 0
local WT_A2 = 1
local WT_FLPR = 2
local WT_A1_F1 = 3
local WT_A2_F1 = 4
local WT_A2_F2 = 5
--]]
local WT_ELEVON_A = 6
local WT_ELEVON_B = 7
local wing_type_text = {[0]="Normal","Dual Ail","Flapperon", "Ail + Flp","Dual Ail + Flp","Dual Ail/Flp","Elevon A","Elevon B"}
--[[
local TT_R1 = 0
local TT_R1_E1 = 1
local TT_R1_E2 = 2
local TT_R2_E1 = 3
local TT_R2_E2 = 4
--]]
local TT_VT_A = 5
local TT_VT_B = 6
local TT_TLRN_A = 7
local TT_TLRN_B = 8
local TT_TLRN_A_R2 = 9
local TT_TLRN_B_R2 = 10
local tail_type_text = {[0]="Rud Only","Normal","Rud + Dual Ele","Dual Rud + Elv","Dual Rud/Ele",
"VTail A","VTail B","Taileron A","Taileron B","Taileron A + Dual Rud","Taileron B + Dual Rud"}
local MV_AIRCRAFT_TYPE = 1001
local MV_WING_TYPE = 1002
local MV_TAIL_TYPE = 1003
local MV_CH_BASE = 1010
local MV_CH_THR = 1010
local MV_CH_L_AIL = 1011
local MV_CH_R_AIL = 1012
local MV_CH_L_FLP = 1013
local MV_CH_R_FLP = 1014
local MV_CH_L_RUD = 1015
local MV_CH_R_RUD = 1016
local MV_CH_L_ELE = 1017
local MV_CH_R_ELE = 1018
local MV_PORT_BASE = 1020
local MV_DATA_END = 1040
--Channel Types --
local CT_NONE = 0x00
local CT_AIL = 0x01
local CT_ELE = 0x02
local CT_RUD = 0x04
local CT_REVERSE = 0x20
local CT_THR = 0x40
local CT_SLAVE = 0x80
-- Seems like Reverse Mix is complement of the 3 bits
local CMT_NORM = 0x00 -- 0000
local CMT_AIL = 0x10 -- 0001 Taileron
local CMT_ELE = 0x20 -- 0010 For VTIAL and Delta-ELEVON
local CMT_RUD = 0x30 -- 0011 For VTIAL
local CMT_RUD_REV = 0x40 -- 0100 For VTIAL
local CMT_ELE_REV = 0x50 -- 0101 For VTIAL and Delta-ELEVON A
local CMT_AIL_REV = 0x60 -- 0110 Taileron
local CMT_NORM_REV = 0x70 -- 0111
local MT_NORMAL = 0
local MT_REVERSE = 1
local function channelType2String(byte1, byte2)
local s = ""
if (byte2==0) then return s end;
if (bit32.band(byte2,CT_AIL)>0) then s=s.."Ail" end
if (bit32.band(byte2,CT_ELE)>0) then s=s.."Ele" end
if (bit32.band(byte2,CT_RUD)>0) then s=s.."Rud" end
if (bit32.band(byte2,CT_THR)>0) then s=s.."Thr" end
if (bit32.band(byte2,CT_REVERSE)>0) then s=s.."-" end
if (bit32.band(byte2,CT_SLAVE)>0) then s=s.." Slv" end
if (byte1==CMT_NORM) then s=s.." "
elseif (byte1==CMT_AIL) then s=s.." M_Ail"
elseif (byte1==CMT_ELE) then s=s.." M_Ele"
elseif (byte1==CMT_RUD) then s=s.." M_Rud"
elseif (byte1==CMT_RUD_REV) then s=s.." M_Rud-"
elseif (byte1==CMT_ELE_REV) then s=s.." M_Ele-"
elseif (byte1==CMT_AIL_REV) then s=s.." M_Ail-"
elseif (byte1==CMT_NORM_REV) then s=s.." M-"
end
return s;
end
-- This Creates the Servo Settings that will be used to pass to
-- Forward programming
local function CreateDSMPortChannelInfo()
local function ApplyWingMixA(b2)
-- ELEVON
if (b2==CT_AIL+CT_ELE) then return CMT_ELE end; -- 0x03
if (b2==CT_AIL+CT_ELE+CT_SLAVE) then return CMT_NORM end; -- 0x83
end
local function ApplyWingMixB(b2)
-- ELEVON
if (b2==CT_AIL+CT_ELE) then return CMT_NORM end; -- 0x03
if (b2==CT_AIL+CT_ELE+CT_SLAVE) then return CMT_ELE end; -- 0x83
end
local function ApplyTailMixA(b2)
-- VTAIL
-- Default normal/reverse behaviour
if (b2==CT_RUD+CT_ELE) then return CMT_NORM end; -- 0x06
if (b2==CT_RUD+CT_ELE+CT_SLAVE) then return CMT_ELE end; -- 0x86
--TAILERON
-- Default normal/reverse behaviour
if (b2==CT_AIL+CT_ELE) then return CMT_NORM end; -- 0x03
if (b2==CT_AIL+CT_ELE+CT_SLAVE) then return CMT_AIL end; -- 0x83
end
local function ApplyTailMixB(b2)
-- VTAIL
-- Default normal/reverse behaviour
if (b2==CT_RUD+CT_ELE) then return CMT_NORM end; -- 0x06
if (b2==CT_RUD+CT_ELE+CT_SLAVE) then return CMT_RUD end; -- 0x86
--TAILERON
if (b2==CT_AIL+CT_ELE) then return CMT_AIL end; -- 0x03
if (b2==CT_AIL+CT_ELE+CT_SLAVE) then return CMT_NORM end; -- 0x83
end
local function reverseMix(b)
if (b==CMT_NORM) then return CMT_NORM_REV end;
if (b==CMT_AIL) then return CMT_AIL_REV end;
if (b==CMT_ELE) then return CMT_ELE_REV end;
if (b==CMT_RUD) then return CMT_RUD_REV end;
return b
end
local DSM_Ch = MODEL.DSM_ChannelInfo
for i=0, TX_CHANNELS-1 do
DSM_Ch[i] = {[0]= CMT_NORM, CT_NONE, nil} -- Initialize with no special function
end
--local aircraftType = M_DATA[MV_AIRCRAFT_TYPE]
local wingType = M_DATA[MV_WING_TYPE]
local tailType = M_DATA[MV_TAIL_TYPE]
local thrCh = M_DATA[MV_CH_THR]
local lAilCh = M_DATA[MV_CH_L_AIL]
local rAilCh = M_DATA[MV_CH_R_AIL]
local lElevCh = M_DATA[MV_CH_L_ELE]
local rElevCh = M_DATA[MV_CH_R_ELE]
local lRudCh = M_DATA[MV_CH_L_RUD]
local rRudCh = M_DATA[MV_CH_R_RUD]
-- Channels in menu vars are Zero base, Channel info is 1 based
-- THR
if (thrCh~=nil and thrCh < 10) then DSM_Ch[thrCh][1]= CT_THR end
-- AIL (Left and Right)
if (lAilCh~=nil) then DSM_Ch[lAilCh][1] = CT_AIL end
if (rAilCh~=nil) then DSM_Ch[rAilCh][1] = CT_AIL+CT_SLAVE end
-- ELE (Left and Right)
if (lElevCh~=nil) then DSM_Ch[lElevCh][1] = CT_ELE end
if (rElevCh~=nil) then DSM_Ch[rElevCh][1] = CT_ELE+CT_SLAVE end
-- RUD (Left and Right)
if (lRudCh~=nil) then DSM_Ch[lRudCh][1] = CT_RUD end
if (rRudCh~=nil) then DSM_Ch[rRudCh][1] = CT_RUD+CT_SLAVE end
-- VTAIL: RUD + ELE
if (tailType==TT_VT_A) then
DSM_Ch[lElevCh][1] = CT_RUD+CT_ELE
DSM_Ch[rElevCh][1] = CT_RUD+CT_ELE+CT_SLAVE
elseif (tailType==TT_VT_B) then
DSM_Ch[lElevCh][1] = CT_RUD+CT_ELE+CT_SLAVE
DSM_Ch[rElevCh][1] = CT_RUD+CT_ELE
end
-- TAILERRON: 2-ELE + AIL
if (tailType==TT_TLRN_A or tailType==TT_TLRN_A_R2) then
DSM_Ch[lElevCh][1] = CT_AIL+CT_ELE
DSM_Ch[rElevCh][1] = CT_AIL+CT_ELE+CT_SLAVE
elseif (tailType==TT_TLRN_B or tailType==TT_TLRN_B_R2) then
DSM_Ch[lElevCh][1] = CT_AIL+CT_ELE+CT_SLAVE
DSM_Ch[rElevCh][1] = CT_AIL+CT_ELE
end
---- ELEVON : AIL + ELE
if (wingType==WT_ELEVON_A) then
DSM_Ch[lAilCh][1] = CT_AIL+CT_ELE
DSM_Ch[rAilCh][1] = CT_AIL+CT_ELE+CT_SLAVE
elseif (wingType==WT_ELEVON_B) then
DSM_Ch[lAilCh][1] = CT_AIL+CT_ELE+CT_SLAVE
DSM_Ch[rAilCh][1] = CT_AIL+CT_ELE
end
------MIXES ---------
-- TAIL Mixes (Elevator and VTail)
if (tailType==TT_VT_A or tailType==TT_TLRN_A or tailType==TT_TLRN_A_R2) then
DSM_Ch[lElevCh][0] = ApplyTailMixA(DSM_Ch[lElevCh][1])
DSM_Ch[rElevCh][0] = ApplyTailMixA(DSM_Ch[rElevCh][1])
elseif (tailType==TT_VT_B or tailType==TT_TLRN_B or tailType==TT_TLRN_B_R2) then
DSM_Ch[lElevCh][0] = ApplyTailMixB(DSM_Ch[lElevCh][1])
DSM_Ch[rElevCh][0] = ApplyTailMixB(DSM_Ch[rElevCh][1])
end
---- ELEVON : AIL + ELE
if (wingType==WT_ELEVON_A) then
DSM_Ch[lAilCh][0] = ApplyWingMixA(DSM_Ch[lAilCh][1])
DSM_Ch[rAilCh][0] = ApplyWingMixA(DSM_Ch[rAilCh][1])
elseif (wingType==WT_ELEVON_B) then
DSM_Ch[lAilCh][0] = ApplyWingMixB(DSM_Ch[lAilCh][1])
DSM_Ch[rAilCh][0] = ApplyWingMixB(DSM_Ch[rAilCh][1])
end
-- Apply Gyro Reverse as needed for each channel as long as it is used
for i=0, TX_CHANNELS-1 do
if (M_DATA[MV_PORT_BASE+i]==MT_REVERSE and DSM_Ch[i][1]>0) then
DSM_Ch[i][0]=reverseMix(DSM_Ch[i][0])
DSM_Ch[i][1]=DSM_Ch[i][1]+CT_REVERSE
end
end
-- Show how it looks
for i=0, 9 do
local b1,b2 = DSM_Ch[i][0], DSM_Ch[i][1]
local s1 = channelType2String(b1,b2)
local s = string.format("%s (%02X %02X) %s\n", MODEL.PORT_TEXT[i],
b1, b2,s1)
DSM_Ch[i][2]=s1
LOG_write(s)
end
--MODEL.AirWingTailDesc = string.format("Aircraft(%s) Wing(%s) Tail(%s)",aircraft_type_text[aircraftType],wing_type_text[wingType],tail_type_text[tailType])
end
-- Main Program
LOG_write("Creating DSMPort Info\n")
CreateDSMPortChannelInfo()

View File

@ -0,0 +1,90 @@
local Log, menuLib, modelLib, DEBUG_ON, SIMULATION_ON = ... -- Get DebugON from parameters
local MAIN_MENU_LIB_VERSION = "0.56"
local MODEL = modelLib.MODEL
local PHASE = menuLib.PHASE
local LINE_TYPE = menuLib.LINE_TYPE
local lastGoodMenu=0
-- Creates the menus to Render with the GUI
local function ST_LoadMenu(menuId)
local ctx = menuLib.DSM_Context
menuLib.clearMenuLines()
if (menuId==0x1000) then -- MAIN MENU
ctx.Menu = { MenuId = 0x1000, Text = "Main Menu ("..MODEL.modelName..")", PrevId = 0, NextId = 0, BackId = 0, TextId=0 }
ctx.MenuLines[0] = { Type = LINE_TYPE.MENU, Text = "Model Setup", ValId = 0xFFF3,TextId=0 }
if (SIMULATION_ON) then
ctx.MenuLines[4] = { Type = LINE_TYPE.MENU, Text = "RX Simulator (GUI dev only)", ValId = 0xFFF1, TextId=0 } -- Menu 0xFFF2 to SIMULATOR
end
ctx.MenuLines[6] = { Type = LINE_TYPE.MENU, Text = "Forward Programming RX", ValId = 0xFFF2, TextId=0 } -- Menu 0xFFF2 to Real RX
ctx.SelLine = 6
lastGoodMenu = menuId
else
--print("NOT IMPLEMENTED")
ctx.Menu = { MenuId = 0x0002, Text = "NOT IMPLEMENTED", TextId = 0, PrevId = 0, NextId = 0, BackId = lastGoodMenu }
ctx.SelLine = menuLib.BACK_BUTTON
end
menuLib.PostProcessMenu()
end
local function Main_Send_Receive()
local ctx = menuLib.DSM_Context
if ctx.Phase == PHASE.RX_VERSION then -- Just Init RX Version
ctx.RX.Name = "Main Menu"
ctx.RX.Version = MAIN_MENU_LIB_VERSION
ctx.Phase = PHASE.MENU_TITLE
ctx.Menu.MenuId = 0
ctx.Refresh_Display = true
elseif ctx.Phase == PHASE.WAIT_CMD then
elseif ctx.Phase == PHASE.MENU_TITLE then -- request menu title
if ctx.Menu.MenuId == 0 then -- First time loading a menu ?
ST_LoadMenu(0x01000)
else
ST_LoadMenu(ctx.Menu.MenuId)
end
ctx.Phase = PHASE.WAIT_CMD
ctx.Refresh_Display = true
elseif ctx.Phase == PHASE.VALUE_CHANGING then -- send value
local line = ctx.MenuLines[ctx.SelLine] -- Updated Value of SELECTED line
--if (DEBUG_ON) then Log.LOG_write("%3.3f %s: ", menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase)) end
--if (DEBUG_ON) then Log.LOG_write("SEND SIM_updateMenuValue(ValueId=0x%X Text=\"%s\" Value=%s)\n", line.ValId, line.Text, menuLib.lineValue2String(line)) end
ctx.Phase = PHASE.VALUE_CHANGING_WAIT
elseif ctx.Phase == PHASE.VALUE_CHANGING_WAIT then
local line = ctx.MenuLines[ctx.SelLine]
elseif ctx.Phase == PHASE.VALUE_CHANGE_END then -- send value
local line = ctx.MenuLines[ctx.SelLine] -- Updated Value of SELECTED line
--if (DEBUG_ON) then Log.LOG_write("%3.3f %s: ", menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase)) end
--if (DEBUG_ON) then Log.LOG_write("SEND SIM_updateMenuValue(ValueId=0x%X Text=\"%s\" Value=%s)\n", line.ValId, line.Text, menuLib.lineValue2String(line)) end
--if (DEBUG_ON) then Log.LOG_write("SEND SIM_validateMenuValue(ValueId=0x%X Text=\"%s\" Value=%s)\n", line.ValId, line.Text, menuLib.lineValue2String(line)) end
ctx.Phase = PHASE.WAIT_CMD
elseif ctx.Phase == PHASE.EXIT then
ctx.Phase=PHASE.EXIT_DONE
return 1
end
return 0
end
local function Main_Init()
local ctx = menuLib.DSM_Context
ctx.Phase = PHASE.RX_VERSION
end
local function Main_Done()
local ctx = menuLib.DSM_Context
ctx.Phase = PHASE.EXIT_DONE
end
return { init=Main_Init, run=Main_Send_Receive, done=Main_Done }

View File

@ -0,0 +1,788 @@
--- #########################################################################
---- # #
---- # Copyright (C) OpenTX/EdgeTx #
-----# #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
------------------------------------------------------------------------------
-- This script library is a rewrite of the original DSM forward programming Lua
-- Script. The goal is to make it easier to understand, mantain, and to
-- separate the GUI from the DSM Forward programming engine/logic
-- in this way, GUIs can evolve independent. OpenTX Gui, EdgeTx GUI, Small Radios, etc.
-- Code is based on the code/work by: Pascal Langer (Author of the Multi-Module)
-- Rewrite/Enhancements By: Francisco Arzu
local Log, DEBUG_ON = ... -- Parameters
local MenuLib = { }
local PHASE = {
INIT = 0,
RX_VERSION = 1,
WAIT_CMD = 2,
MENU_TITLE = 3,
MENU_REQ_TX_INFO = 4,
MENU_LINES = 5,
MENU_VALUES = 6,
VALUE_CHANGING = 7,
VALUE_CHANGING_WAIT = 8,
VALUE_CHANGE_END = 9,
EXIT = 10,
EXIT_DONE = 11
}
local LINE_TYPE = {
MENU = 0x1C,
LIST_MENU = 0x0C, -- List: INC Change + Validate
LIST_MENU_NC = 0x6C, -- List: No Incremental Change
LIST_MENU_NC2 = 0x6D, -- List: No Incremental Change (Frame Rate Herz)
LIST_MENU_TOG = 0x4C, -- List: Incremental Change, sometimes bolean/Toggle menu (if only 2 values)
LIST_MENU_ORI = 0xCC, -- List: Incremental Change, Orientation Heli
VALUE_NUM_I8_NC = 0x60, -- 8 bit number, no incremental change
VALUE_PERCENT = 0xC0, -- 8 bit number, Signed, percent
VALUE_DEGREES = 0xE0, -- 8 bit number, Signed, Degress
VALUE_NUM_I8 = 0x40, -- 8 bit number
VALUE_NUM_I16 = 0x41, -- 16 Bit number
VALUE_NUM_SI16 = 0xC1, -- 16 bit number, Signed
LT_EMPTY = 0x00
}
-- Bug in Lua compiler, confusing with global BOLD and RIGHT
local DISP_ATTR = {
_BOLD = 0x01, _RIGHT=0x02, _CENTER=0x04, PERCENT = 0x10, DEGREES=0x20, FORCED_MENU = 0x40
}
--RX IDs--
local RX = {
AR636B = 0x0001,
SPM4651T = 0x0014,
AR637T = 0x0015,
AR637TA = 0x0016,
FC6250HX = 0x0018,
AR630 = 0x0019,
AR8360T = 0x001A,
AR10360T = 0x001C,
AR631 = 0x001E
}
local DSM_Context = {
Phase = PHASE.INIT,
Menu = { MenuId = 0, Text = "", TextId = 0, PrevId = 0, NextId = 0, BackId = 0 },
MenuLines = {},
RX = { Id=0, Name = "", Version = "" },
Refresh_Display = true,
SendDataToRX = 1,
SelLine = 0, -- Current Selected Line
EditLine = nil, -- Current Editing Line
CurLine = -1, -- Current Line Requested/Parsed via h message protocol
isReset = false -- false when starting from scracts, true when starting from Reset
}
function DSM_Context.isEditing() return DSM_Context.EditLine~=nil end
local MAX_MENU_LINES = 6
local BACK_BUTTON = -1 -- Tread it as a display line #-1
local NEXT_BUTTON = MAX_MENU_LINES + 1 -- Tread it as a display line #7
local PREV_BUTTON = MAX_MENU_LINES + 2 -- Tread it as a display line #7
-- Text Arrays for Display Text and Debuging
local PhaseText = {}
local LineTypeText = {}
local Text = {} -- Text for Menu and Menu Lines (Headers only)
local List_Text = {} -- Messages for List Options (values only)
local List_Text_Img = {} -- If the Text has Attached Images
local List_Values = {} -- Additiona restrictions on List Values when non contiguos (L_M1 lines has this problem)
local Flight_Mode = {[0]="Fligh Mode"}
local RxName = {}
local StartTime = 0
------------------------------------------------------------------------------------------------------------
-- Get Elapsed Time since we started running the Script. Return a float in format: Seconds.Milliseconds
function MenuLib.getElapsedTime()
local t = getTime()
if (StartTime == 0) then StartTime = t end
return ((t - StartTime) * 10) / 1000
end
------------- Line Type helper functions ------------------------------------------------------------------
-- Check if the text are Flight modes, who will be treated different for Display
function MenuLib.isFlightModeLine(line)
return (line.TextId >= 0x8000 and line.TextId <= 0x8003)
end
function MenuLib.isSelectableLine(line) -- is the display line Selectable??
-- values who are not selectable
if (line.Type == 0) then return false end -- Empty Line
if (line.Type == LINE_TYPE.MENU and line.ValId == line.MenuId and bit32.band(line.TextAttr, DISP_ATTR.FORCED_MENU)==0) then return false end -- Menu that navigates to Itself?
if (line.Min==0 and line.Max==0 and line.Def==0) then return false end -- Values with no Range are only for display
if (line.Type == LINE_TYPE.VALUE_NUM_I8_NC and MenuLib.isFlightModeLine(line)) then return false end -- Flight mode is not Selectable
return true
end
function MenuLib.isEditableLine(line) -- is the display line editable??
-- values who are not editable
if (line.Type == 0 or line.Type == LINE_TYPE.MENU) then return false end -- Menus are not editable
if (line.Min==0 and line.Max==0 and line.Def==0) then return false end -- Values with no Range are only for display
if (line.Type == LINE_TYPE.VALUE_NUM_I8_NC and MenuLib.isFlightModeLine(line)) then return false end -- Flight mode is not Editable
-- any other is Editable
return true
end
function MenuLib.isListLine(line) -- is it a List of options??
if (line.Type == LINE_TYPE.LIST_MENU_NC or line.Type == LINE_TYPE.LIST_MENU or
line.Type == LINE_TYPE.LIST_MENU_TOG or line.Type == LINE_TYPE.LIST_MENU_NC2 or
line.Type == LINE_TYPE.LIST_MENU_ORI) then return true end
return false
end
function MenuLib.isPercentValueLineByMinMax(line)
return
(line.Min == 0 and line.Max == 100) or ( line.Min == -100 and line.Max == 100) or
( line.Min == 0 and line.Max == 150) or ( line.Min == -150 and line.Max == 150)
end
function MenuLib.isPercentValueLine(line) -- is it a Percent value??
if (line.Type == LINE_TYPE.VALUE_PERCENT) then return true end
return false
end
function MenuLib.isNumberValueLine(line) -- is it a number ??
if (MenuLib.isListLine(line) or line.Type == LINE_TYPE.MENU or line.Type == 0) then return false
else return true end
end
function MenuLib.isIncrementalValueUpdate(line)
if (line.Type == LINE_TYPE.LIST_MENU_NC or line.Type == LINE_TYPE.LIST_MENU_NC2 or
line.Type == LINE_TYPE.VALUE_NUM_I8_NC or line.Type == LINE_TYPE.VALUE_DEGREES) then return false end
return true
end
------------------------------------------------------------------------------------------------------------
function MenuLib.Get_Text(index)
if (index >= 0x8000) then
return Flight_Mode[0]
end
local out = Text[index] -- Find in regular header first
if out== nil then
out = List_Text[index] -- Try list values, don't think is necesary, but just playing Safe
end
if out == nil then -- unknown...
out = "Unknown_" .. string.format("%X", index)
end
return out
end
function MenuLib.Get_List_Text(index)
local out = List_Text[index] -- Try to find the message in List_Text
if out == nil then
out = Text[index] -- Try list headers, don't think is necesary, but just playing Safe
end
if out == nil then -- unknown...
out = "UnknownLT_" .. string.format("%X", index)
end
return out
end
function MenuLib.Get_List_Text_Img(index)
local out = List_Text_Img[index]
return out
end
function MenuLib.Get_List_Values(index)
local out = List_Values[index]
return out
end
function MenuLib.Get_RxName(index)
local out = RxName[index]
return out or ("RX_" .. string.format("%X", index))
end
----------- Debugging 2-String functions -------------------------------------------------------------------
function MenuLib.phase2String(index)
local out = PhaseText[index]
return out or ("Phase_" .. string.format("%X", index))
end
function MenuLib.lineType2String(index)
local out = LineTypeText[index]
return out or ("LT_" .. string.format("%X", index or 0xFF))
end
function MenuLib.lineValue2String(l)
if (DEBUG_ON == 0) then
return ""
end
if (l ~= nil and l.Val ~= nil) then
local value = l.Val
if MenuLib.isListLine(l) then
value = value .. "|\"" .. MenuLib.Get_List_Text(l.Val + l.TextStart) .. "\""
else
value = value..(l.Format or "")
end
return value
end
return "nil"
end
function MenuLib.menu2String(m)
local txt = "Menu[]"
if (m ~= nil) then
txt = string.format("M[Id=0x%X P=0x%X N=0x%X B=0x%X Text=\"%s\"[0x%X]]",
m.MenuId, m.PrevId, m.NextId, m.BackId, m.Text, m.TextId)
end
return txt
end
function MenuLib.menuLine2String(l)
local txt = "Line[]"
if (l ~= nil) then
local value = ""
local range = ""
if l.Type~=LINE_TYPE.MENU then
value = "Val="..MenuLib.lineValue2String(l)
if MenuLib.isListLine(l) then
range = string.format("NL=(%s->%s,%s,S=%s) ",l.Min, l.Max, l.Def, l.TextStart )
range = range .. (l.MinMaxOrig or "")
else
range = string.format("[%s->%s,%s]",l.Min, l.Max, l.Def)
end
end
txt = string.format("L[#%s T=%s VId=0x%X Text=\"%s\"[0x%X] %s %s MId=0x%X A=0x%X]",
l.lineNum, MenuLib.lineType2String(l.Type), l.ValId,
l.Text, l.TextId,
value,
range,
l.MenuId,
l.TextAttr
)
end
return txt
end
-----------------------------------------------------------------------------------------------------------
-- Post Procssing Line from Raw values receive by RX or Simulation
function MenuLib.isDisplayAttr(attr, bit)
return (bit32.band(attr,bit)>0)
end
function MenuLib.ExtractDisplayAttr(text1, attr)
local text = text1, pos;
for i=1,2 do
text, pos = string.gsub(text, "/c$", "")
if (pos>0) then -- CENTER
attr = bit32.bor(attr, DISP_ATTR._CENTER)
end
text, pos = string.gsub(text, "/r$", "")
if (pos>0) then -- RIGHT
attr = bit32.bor(attr, DISP_ATTR._RIGHT)
end
text, pos = string.gsub(text, "/p$", "")
if (pos>0) then -- Percent TEXT
attr = bit32.bor(attr, DISP_ATTR.PERCENT)
end
text, pos = string.gsub(text, "/b$", "")
if (pos>0) then -- BOLD TEXT
attr = bit32.bor(attr, DISP_ATTR._BOLD)
end
text, pos = string.gsub(text, "/m$", "")
if (pos>0) then -- FORCED MENU Button
attr = bit32.bor(attr, DISP_ATTR.FORCED_MENU)
end
end
return text, attr
end
function MenuLib.MenuPostProcessing(menu)
menu.Text, menu.TextAttr = MenuLib.ExtractDisplayAttr(menu.Text,menu.TextAttr or 0)
end
function MenuLib.MenuLinePostProcessing(line)
if (line.Text==nil) then
line.Text = MenuLib.Get_Text(line.TextId) -- Get Textual Line headeing text
end
-- Text formatting options
line.Text, line.TextAttr = MenuLib.ExtractDisplayAttr(line.Text,line.TextAttr or 0)
if line.Type == LINE_TYPE.MENU then
-- nothing to do on menu entries
line.Val=nil
elseif MenuLib.isListLine(line) then
-- Original Range for Debugging
line.MinMaxOrig = "[" .. line.Min .. "->" .. line.Max .. "," .. line.Def .. "]"
-- Normalize Min/Max to be relative to Zero
line.TextStart = line.Min
line.Def = line.Def - line.Min -- normalize default value
line.Max = line.Max - line.Min -- normalize max index
line.Min = 0 -- min index
else -- default to numerical value
if MenuLib.isPercentValueLine(line) or MenuLib.isPercentValueLineByMinMax(line) then
-- either explicit Percent or NO-Change value, but range is %Percent
line.Format ="%"
line.TextAttr = bit32.bor(line.TextAttr,DISP_ATTR.PERCENT)
elseif (line.Type == LINE_TYPE.VALUE_DEGREES) then
line.Format ="o"
line.TextAttr = bit32.bor(line.TextAttr,DISP_ATTR.DEGREES)
end
end
line.MinMaxDebug = MenuLib.lineType2String(line.Type).." "..(line.MinMaxOrig or "")
end
function MenuLib.ChangePhase(newPhase)
DSM_Context.Phase = newPhase
DSM_Context.SendDataToRX = 1
end
function MenuLib.Value_Add(line, inc)
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: DSM_Value_Add(%s,%s)\n",
MenuLib.getElapsedTime(), MenuLib.phase2String(DSM_Context.Phase), inc, MenuLib.menuLine2String(line)) end
local skipIncrement = false
local values = nil
local origVal = line.Val
-- Use local validation for LIST_MENU1 when the range is wide open
-- Also use if for some LIST_MENU0 that the Range seems incorrect
if (MenuLib.isListLine(line)) then -- and line.Type==LINE_TYPE.LIST_MENU1 and line.Min==0 and line.Max==244) then
values = MenuLib.Get_List_Values(line.TextId)
end
if (values~=nil) then -- Inc/Dec based on a list of predefined Values Local to Script (values not contiguous),
-- locate current value in values array
-- Values are Zero normalized to the Start of the List (line.TextStart)
for i = 1, #values do
if ((values[i]-line.TextStart)==origVal) then
skipIncrement = true
if (inc==-1 and i > 1) then -- PREV
line.Val = values[i-1]-line.TextStart
elseif (inc==1 and i < #values) then -- NEXT
line.Val = values[i+1]-line.TextStart
end
break
end
end
end
if not skipIncrement then
-- Do it Sequentially
line.Val = line.Val + inc
if line.Val > line.Max then
line.Val = line.Max
elseif line.Val < line.Min then
line.Val = line.Min
end
end
if (origVal~=line.Val and MenuLib.isIncrementalValueUpdate(line)) then
-- Update RX value on every change
MenuLib.ChangePhase(PHASE.VALUE_CHANGING)
end
end
function MenuLib.Value_Default(line)
local origVal = line.Val
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: DSM_Value_Default(%s)\n",
MenuLib.getElapsedTime(), MenuLib.phase2String(DSM_Context.Phase), MenuLib.menuLine2String(line)) end
line.Val = line.Def
if (origVal~=line.Val and MenuLib.isIncrementalValueUpdate(line)) then
-- Update RX value on every change
MenuLib.ChangePhase(PHASE.VALUE_CHANGING)
end
end
function MenuLib.Value_Write_Validate(line)
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: DSM_Value_Write_Validate(%s)\n",
MenuLib.getElapsedTime(), MenuLib.phase2String(DSM_Context.Phase), MenuLib.menuLine2String(line)) end
MenuLib.ChangePhase(PHASE.VALUE_CHANGE_END) -- Update + Validate value in RX
DSM_Context.EditLine = nil -- Exit Edit Mode (By clearing the line editing)
end
function MenuLib.GotoMenu(menuId, lastSelectedLine)
if (DEBUG_ON) then Log.LOG_write("%3.3f %s: DSM_GotoMenu(0x%X,LastSelectedLine=%d)\n",
MenuLib.getElapsedTime(), MenuLib.phase2String(DSM_Context.Phase), menuId, lastSelectedLine) end
DSM_Context.Menu.MenuId = menuId
DSM_Context.SelLine = lastSelectedLine
-- Request to load the menu Again
MenuLib.ChangePhase(PHASE.MENU_TITLE)
end
function MenuLib.MoveSelectionLine(dir)
local ctx = DSM_Context
local menu = ctx.Menu
local menuLines = ctx.MenuLines
if (dir == 1) then -- NEXT
if ctx.SelLine <= MAX_MENU_LINES then
local num = ctx.SelLine
for i = ctx.SelLine + 1, MAX_MENU_LINES, 1 do
if MenuLib.isSelectableLine(menuLines[i]) then
ctx.SelLine = i
break
end
end
if num == ctx.SelLine then
if menu.NextId ~= 0 then -- Next
ctx.SelLine = NEXT_BUTTON
elseif menu.PrevId ~= 0 then -- Prev
ctx.SelLine = PREV_BUTTON
end
end
elseif menu.PrevId ~= 0 then -- Prev
ctx.SelLine = PREV_BUTTON
end
return
end
if (dir == -1) then -- PREV
if ctx.SelLine == PREV_BUTTON and menu.NextId ~= 0 then
ctx.SelLine = NEXT_BUTTON
elseif ctx.SelLine > 0 then
if ctx.SelLine > MAX_MENU_LINES then
ctx.SelLine = NEXT_BUTTON
end
local num = ctx.SelLine
for i = ctx.SelLine - 1, 0, -1 do
if MenuLib.isSelectableLine(menuLines[i]) then
ctx.SelLine = i
break
end
end
if num == ctx.SelLine then -- can't find previous selectable line, then SELECT Back
if (menu.BackId ~= 0) then ctx.SelLine = BACK_BUTTON end
end
else
if (menu.BackId ~= 0) then ctx.SelLine = BACK_BUTTON end -- Back
end
end
end
-- Clear each line of the menu
function MenuLib.clearMenuLines()
local ctx = DSM_Context
for i = 0, MAX_MENU_LINES do -- clear menu
ctx.MenuLines[i] = { MenuId = 0, lineNum = 0, Type = 0, Text = "", TextId = 0, ValId = 0, Min=0, Max=0, Def=0, TextStart=0, Val=nil }
end
end
-- Post processing needed for each menu
function MenuLib.PostProcessMenu()
local ctx = DSM_Context
if (ctx.Menu.Text==nil) then
ctx.Menu.Text = MenuLib.Get_Text(ctx.Menu.TextId)
MenuLib.MenuPostProcessing (ctx.Menu)
end
--if (DEBUG_ON) then Log.LOG_write("SIM RESPONSE Menu: %s\n", MenuLib.menu2String(ctx.Menu)) end
for i = 0, MenuLib.MAX_MENU_LINES do -- clear menu
local line = ctx.MenuLines[i]
if (line.Type~=0) then
line.MenuId = ctx.Menu.MenuId
line.lineNum = i
MenuLib.MenuLinePostProcessing(line) -- Do the same post processing as if they come from the RX
--if (DEBUG_ON) then Log.LOG_write("SIM RESPONSE MenuLine: %s\n", MenuLib.menuLine2String(line)) end
end
end
end
function MenuLib.GetFlightModeValue(line)
local ret = line.Text.." "
local val = line.Val
if (val==nil) then return ret.."--" end
-- Adjust the displayed value for Flight mode line as needed
if (DSM_Context.RX.Id == RX.FC6250HX) then
-- Helicopter Flights modes
if (val==0) then ret = ret .. "1 / HOLD"
elseif (val==1) then ret = ret .. "2 / Normal"
elseif (val==2) then ret = ret .. "3 / Stunt 1"
elseif (val==3) then ret = ret .. "4 / Stunt 2"
elseif (val==4) then ret = ret .. "5 / Panic"
else
ret = ret .. " " .. (val + 1)
end
else
-- No adjustment needed
if (val==190) then
ret=ret.."Err:Out of Range"
else
ret=ret..(val + 1)
end
end
return ret
end
function MenuLib.Init()
print("MenuLib.Init()")
-- Phase Names
PhaseText[PHASE.INIT] = "INIT"
PhaseText[PHASE.RX_VERSION] = "RX_VERSION"
PhaseText[PHASE.WAIT_CMD] = "WAIT_CMD"
PhaseText[PHASE.MENU_TITLE] = "MENU_TITLE"
PhaseText[PHASE.MENU_REQ_TX_INFO] = "MENU_REQ_TX_INFO"
PhaseText[PHASE.MENU_LINES] = "MENU_LINES"
PhaseText[PHASE.MENU_VALUES] = "MENU_VALUES"
PhaseText[PHASE.VALUE_CHANGING] = "VALUE_CHANGING"
PhaseText[PHASE.VALUE_CHANGING_WAIT] = "VALUE_EDITING"
PhaseText[PHASE.VALUE_CHANGE_END] = "VALUE_CHANGE_END"
PhaseText[PHASE.EXIT] = "EXIT"
PhaseText[PHASE.EXIT_DONE] = "EXIT_DONE"
-- Line Types
LineTypeText[LINE_TYPE.MENU] = "M"
LineTypeText[LINE_TYPE.LIST_MENU_NC] = "LM_nc"
LineTypeText[LINE_TYPE.LIST_MENU] = "LM"
LineTypeText[LINE_TYPE.LIST_MENU_TOG] = "LM_tog"
LineTypeText[LINE_TYPE.LIST_MENU_NC2] = "LM_nc2"
LineTypeText[LINE_TYPE.LIST_MENU_ORI] = "LM_ori"
LineTypeText[LINE_TYPE.VALUE_NUM_I8_NC] = "V_nc"
LineTypeText[LINE_TYPE.VALUE_PERCENT] = "V_%"
LineTypeText[LINE_TYPE.VALUE_DEGREES] = "V_de"
LineTypeText[LINE_TYPE.VALUE_NUM_I8] = "V_i8"
LineTypeText[LINE_TYPE.VALUE_NUM_I16] = "V_i16"
LineTypeText[LINE_TYPE.VALUE_NUM_SI16] = "V_s16"
LineTypeText[LINE_TYPE.LT_EMPTY] = "Z"
DSM_Context.Phase = PHASE.RX_VERSION
end
function MenuLib.clearAllText()
local function clearTable(t)
for i, v in ipairs(t) do t[i] = nil end
end
clearTable(Text)
clearTable(List_Text)
clearTable(List_Text_Img)
clearTable(List_Values)
end
function MenuLib.LoadTextFromFile(fileName, mem)
local function rtrim(s)
local n = string.len(s)
while n > 0 and string.find(s, "^%s", n) do n = n - 1 end
return string.sub(s, 1, n)
end
--print(string.format("Loading messages from [%s]",fileName))
local dataFile = io.open(fileName, "r") -- read File
-- cannot read file???
assert(dataFile, "Cannot load Message file:" .. fileName)
local data = io.read(dataFile, mem * 1024) -- read up to 10k characters (newline char also counts!)
io.close(dataFile)
collectgarbage("collect")
local lineNo = 0
for line in string.gmatch(data, "[^\r\n]+") do
lineNo = lineNo + 1
--print(string.format("Line [%d]: %s",lineNo,line))
-- Remove Comments
local s = string.find(line, "--", 1, true)
if (s ~= nil) then
line = string.sub(line, 1, s - 1)
end
line = rtrim(line)
if (string.len(line) > 0) then
local a, b, c = string.match(line, "%s*(%a*)%s*|%s*(%w*)%s*|(.*)%s*")
--print(string.format("[%s] [%s] [%s]",a,b,c))
if (a ~= nil) then
local index = tonumber(b)
if (index == nil) then
assert(false, string.format("%s:%d: Invalid Hex num [%s]", fileName, lineNo, b))
elseif (a == "T") then
Text[index] = c
elseif (a == "LT") then
List_Text[index] = c
elseif (a == "LI") then
List_Text_Img[index] = c
elseif (a == "FM") then
Flight_Mode[0] = c
elseif (a == "RX") then
RxName[index] = c
else
assert(false, string.format("%s:%d: Invalid Line Type [%s]", fileName, lineNo, a))
end
end
end
if (lineNo % 50 == 0) then
collectgarbage("collect")
end
end -- For
--print(string.format("Loaded [%d] messages",lineNo))
data = nil
end
function MenuLib.INC_LoadTextFromFile(fileName, FileState)
-----------------------
local function rtrim(s)
local n = string.len(s)
while n > 0 and string.find(s, "^%s", n) do n = n - 1 end
return string.sub(s, 1, n)
end
local function GetTextInfoFromFile(pos)
local dataFile = io.open(fileName, "r")
io.seek(dataFile,pos)
local buff = io.read(dataFile, 100)
io.close(dataFile)
local line=""
local index=""
local type=""
local pipe=0
local comment=0
local newPos = pos
-- Parse the line:
-- Format: TT|0x999|Text -- Comment
for i=1,#buff do
newPos=newPos+1
local ch = string.sub(buff,i,i)
if (pipe < 2 and ch=="|") then pipe=pipe+1 -- Count pipes pos (Type | Index | .....)
elseif (ch=="\r") then -- Ignore CR
elseif (ch=="\n") then break -- LF, end of line
elseif (ch=="-") then -- March comments
comment=comment+1
if (comment==2) then pipe=6 end -- Comment part of line
else
-- regular char
comment=0
if (pipe==0) then type=type..ch -- in TT (Type)
elseif (pipe==1) then index=index..ch -- in Index
elseif (pipe<6) then line=line..ch end -- in Text
end -- Regular char
end -- For
return type, index, rtrim(line), newPos
end
-----------------------------------------------------------
if (FileState.state==nil) then -- Initial State
FileState.state=1
FileState.lineNo=0
FileState.filePos=0
end
if FileState.state==1 then
for l=1,10 do -- do 10 lines at a time
local type, sIndex, text
local lineStart = FileState.filePos
type, sIndex, text, FileState.filePos = GetTextInfoFromFile(FileState.filePos)
--print(string.format("T=%s, I=%s, T=%s LS=%d, FP=%d",type,sIndex,text,lineStart, FileState.filePos))
if (lineStart==FileState.filePos) then -- EOF
FileState.state=2 --EOF State
return 1
end
FileState.lineNo = FileState.lineNo + 1
type = rtrim(type)
if (string.len(type) > 0 and string.len(sIndex) > 0) then
local index = tonumber(sIndex)
if (index == nil) then
assert(false, string.format("%s:%d: Invalid Hex num [%s]", fileName, FileState.lineNo, sIndex))
elseif (type == "T") then
Text[index] = text
elseif (type == "LT") then
List_Text[index] = text
elseif (type == "LI") then
List_Text_Img[index] = text
elseif (type == "FM") then
Flight_Mode[0] = text
elseif (type == "RX") then
RxName[index] = text
else
assert(false, string.format("%s:%d: Invalid Line Type [%s]", fileName, FileState.lineNo, type))
end
end
end -- for
end -- if
return 0
end
-- Export some Constants and Variables
MenuLib.PHASE = PHASE
MenuLib.LINE_TYPE = LINE_TYPE
MenuLib.DISP_ATTR = DISP_ATTR
MenuLib.RX = RX
MenuLib.MAX_MENU_LINES = MAX_MENU_LINES
MenuLib.BACK_BUTTON = BACK_BUTTON
MenuLib.NEXT_BUTTON = NEXT_BUTTON
MenuLib.PREV_BUTTON = PREV_BUTTON
MenuLib.DSM_Context = DSM_Context
MenuLib.Text = Text
MenuLib.List_Text = List_Text
MenuLib.List_Text_Img = List_Text_Img
MenuLib.List_Values = List_Values
MenuLib.LOG_open = Log.LOG_open
MenuLib.LOG_write = Log.LOG_write
MenuLib.LOG_Close = Log.LOG_close
return MenuLib

View File

@ -0,0 +1,789 @@
local Log, DEBUG_ON = ...
local DATA_PATH = "/MODELS/DSMDATA" -- Path to store model settings files
local TX_CHANNELS = 12
-- MODEL information from ETX/OTX
local ModelLib = {}
local MODEL = {
modelName = "", -- The name of the model comming from OTX/ETX
modelOutputChannel = {}, -- Output information from OTX/ETX
AirWingTailDesc = "",
TX_CH_TEXT = {},
PORT_TEXT = {},
DSM_ChannelInfo = {} -- Data Created by DSM Configuration Script
}
--Channel Types --
local CH_TYPE = {
NONE = 0x00,
AIL = 0x01,
ELE = 0x02,
RUD = 0x04,
REVERSE = 0x20,
THR = 0x40,
SLAVE = 0x80,
}
-- Seems like Reverse Mix is complement of the 3 bits
local CH_MIX_TYPE = {
MIX_NORM = 0x00, -- 0000
MIX_AIL = 0x10, -- 0001 Taileron
MIX_ELE = 0x20, -- 0010 For VTIAL and Delta-ELEVON
MIX_RUD = 0x30, -- 0011 For VTIAL
MIX_RUD_REV = 0x40, -- 0100 For VTIAL
MIX_ELE_REV = 0x50, -- 0101 For VTIAL and Delta-ELEVON A
MIX_AIL_REV = 0x60, -- 0110 Taileron
MIX_NORM_REV = 0x70 -- 0111
}
local AIRCRAFT_TYPE = {
PLANE = 0,
HELI = 1,
GLIDER = 2,
DRONE = 3
}
local aircraft_type_text = {[0]="Plane","Heli","Glider","Drone"}
local WING_TYPE = {
AIL_1 = 0, --1
AIL_2 = 1, --2
FLAPERON = 2, --2
AIL_1_FLP_1 = 3, --2
AIL_2_FLP_1 = 4, --3
AIL_2_FLP_2 = 5, --4
ELEVON_A = 6, --2
ELEVON_B = 7 --2
}
local wing_type_text = {[0]="Normal","Dual Ail","Flapperon", "Ail + Flp","Dual Ail + Flp","Dual Ail/Flp","Elevon A","Elevon B"}
local TAIL_TYPE = {
RUD_1 = 0, -- 1
RUD_1_ELEV_1 = 1, -- 2
RUD_1_ELEV_2 = 2, -- 3
RUD_2_ELEV_1 = 3, -- 3
RUD_2_ELEV_2 = 4, -- 4
VTAIL_A = 5, -- 2
VTAIL_B = 6, -- 2
TRAILERON_A = 7, -- 3
TRAILERON_B = 8, -- 3
TRAILERON_A_R2 = 9, -- 3
TRAILERON_B_R2 = 10 -- 3
}
local tail_type_text = {[0]="Rud Only","Normal","Rud + Dual Ele","Dual Rud + Elv","Dual Rud/Ele",
"VTail A","VTail B","Taileron A","Taileron B","Taileron A + 2x Rud","Taileron B + 2x Rud"}
local CH_MODE_TYPE = {
NORMAL = 0,
REVERSE = 1,
USE_TX = 3
}
local PORT = {
PORT1 = 0,
PORT2 = 1,
PORT3 = 2,
PORT4 = 3,
PORT5 = 4,
PORT6 = 5,
PORT7 = 6,
PORT8 = 7,
PORT9 = 8,
PORT10 = 9,
PORT11 = 10,
PORT12 = 11
}
local MEMU_VAR = {
AIRCRAFT_TYPE = 1001,
WING_TYPE = 1002,
TAIL_TYPE = 1003,
CH_BASE = 1010,
CH_THR = 1010,
CH_L_AIL = 1011,
CH_R_AIL = 1012,
CH_L_FLP = 1013,
CH_R_FLP = 1014,
CH_L_RUD = 1015,
CH_R_RUD = 1016,
CH_L_ELE = 1017,
CH_R_ELE = 1018,
PORT_BASE = 1020,
PORT1_MODE = 1020,
PORT2_MODE = 1021,
PORT3_MODE = 1022,
PORT4_MODE = 1023,
PORT5_MODE = 1024,
PORT6_MODE = 1025,
PORT7_MODE = 1026,
PORT8_MODE = 1027,
PORT9_MODE = 1028,
PORT10_MODE = 1029,
PORT11_MODE = 1030,
PORT12_MODE = 1031,
DATA_END = 1040
}
-- MENU DATA Management
local MENU_DATA = {} -- Store the variables used in the Menus.
---- DSM_ChannelInfo ---------------------------------
-- First byte describe Special Mixing (Vtail/Elevon = 0x20)
--VTAIL
--(0x00 0x06) CH_TYPE.ELE+CH_TYPE.RUD (0x02+0x04 = 0x06)
--(0x20 0x86) CH_TYPE.ELE+CH_TYPE.RUD+CH_TYPE.SLAVE (0x02+0x04+0x80 = 0x86)
-- The 2nd byte describes the functionality of the port
--
-- Single Example: CH_TYPE.AIL (0x01) Aileron
-- Reverse Example: CH_TYPE.AIL+CH_TYPE.REVERSE (0x01+0x20=0x21) Reverse Aileron
-- Slave Example: CH_TYPE.AIL+CH_TYPE.SLAVE (0x01+0x80) -- 2nd servo Aileron
-- Elevon Example: CH_TYPE.AIL+CH_TYPE.ELE (0x01+0x02 = 0x03) -- Elevon
-- Elevon Example: CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE (0x01+0x02+0x80 = 0x83) -- Slave Elevon
-- RudElv (VTail) Example: CH_TYPE.ELE+CH_TYPE.RUD (0x02+0x04 = 0x06) -- Rudevator
-- RudElv (VTail) Example: CH_TYPE.ELE+CH_TYPE.RUD+CH_TYPE.SLAVE (0x02+0x04+0x80 = 0x86) -- Rudevator Slave
-- DEFAULT Simple Plane Port configuration (The Configuration tool will overrride this)
MODEL.DSM_ChannelInfo= {[0]= -- Start array at position 0
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.THR}, -- Ch1 Thr (0x40)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.AIL}, -- Ch2 Ail (0x01)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.ELE}, -- Ch2 ElE (0x02)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.RUD}, -- Ch4 Rud (0x04)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch5 Gear (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch6 Aux1 (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch7 Aux2 (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch8 Aux3 (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch9 Aux4 (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch10 Aux5 (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE}, -- Ch11 Aux6 (0x00)
{[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE} -- Ch12 Aux7 (0x00)
}
function ModelLib.printChannelSummary(a,w,t)
-- Summary
print("CHANNEL INFORMATION")
print("Aircraft:".. (aircraft_type_text[MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]] or "--"))
print("Wing Type:".. (wing_type_text[MENU_DATA[MEMU_VAR.WING_TYPE]] or "--"))
print("Tail Type:".. (tail_type_text[MENU_DATA[MEMU_VAR.TAIL_TYPE]] or "--"))
print("Thr:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_THR] or 30)] or "--")) -- use fake ch30 for non existing channels
print("LAil:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_L_AIL] or 30)] or "--"))
print("RAil:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_R_AIL] or 30)] or "--"))
print("LFlp:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_L_FLP] or 30)] or "--"))
print("RFlp:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_R_FLP] or 30)] or "--"))
print("LEle:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_L_ELE] or 30)] or "--"))
print("REle:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_R_ELE] or 30)] or "--"))
print("LRud:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_L_RUD] or 30)] or "--"))
print("RRud:".. (MODEL.PORT_TEXT[(MENU_DATA[MEMU_VAR.CH_R_RUD] or 30)] or "--"))
end
function ModelLib.printServoReverseInfo()
print("SERVO Normal/Reverse INFORMATION")
for i=0, TX_CHANNELS-1 do
local s="--"
if (MENU_DATA[MEMU_VAR.PORT1_MODE+i] or 0) == 0 then s="NORMAL" else s="REVERSE" end
print(string.format("Port%d: %s", i+1, s))
end
end
function ModelLib.channelType2String(byte1, byte2)
local s = ""
if (byte2==0) then return s end;
if (bit32.band(byte2,CH_TYPE.AIL)>0) then s=s.."Ail" end
if (bit32.band(byte2,CH_TYPE.ELE)>0) then s=s.."Ele" end
if (bit32.band(byte2,CH_TYPE.RUD)>0) then s=s.."Rud" end
if (bit32.band(byte2,CH_TYPE.THR)>0) then s=s.."Thr" end
if (bit32.band(byte2,CH_TYPE.REVERSE)>0) then s=s.."-" end
if (bit32.band(byte2,CH_TYPE.SLAVE)>0) then s=s.." Slv" end
if (byte1==CH_MIX_TYPE.MIX_NORM) then s=s.." "
elseif (byte1==CH_MIX_TYPE.MIX_AIL) then s=s.." M_Ail"
elseif (byte1==CH_MIX_TYPE.MIX_ELE) then s=s.." M_Ele"
elseif (byte1==CH_MIX_TYPE.MIX_RUD) then s=s.." M_Rud"
elseif (byte1==CH_MIX_TYPE.MIX_RUD_REV) then s=s.." M_Rud-"
elseif (byte1==CH_MIX_TYPE.MIX_ELE_REV) then s=s.." M_Ele-"
elseif (byte1==CH_MIX_TYPE.MIX_AIL_REV) then s=s.." M_Ail-"
elseif (byte1==CH_MIX_TYPE.MIX_NORM_REV) then s=s.." M-"
end
return s;
end
-------------------------------------------------------------------------------------------------
-- Read the model information from OTX/ETX
local function getModuleChannelOrder(num)
--Determine fist 4 channels order
local channel_names={}
local stick_names = {[0]= "R", "E", "T", "A" }
local ch_order=num
if (ch_order == -1) then
channel_names[0] = stick_names[3]
channel_names[1] = stick_names[1]
channel_names[2] = stick_names[2]
channel_names[3] = stick_names[0]
else
channel_names[bit32.band(ch_order,3)] = stick_names[3]
ch_order = math.floor(ch_order/4)
channel_names[bit32.band(ch_order,3)] = stick_names[1]
ch_order = math.floor(ch_order/4)
channel_names[bit32.band(ch_order,3)] = stick_names[2]
ch_order = math.floor(ch_order/4)
channel_names[bit32.band(ch_order,3)] = stick_names[0]
end
local s = ""
for i=0,3 do
s=s..channel_names[i]
end
return s
end
function ModelLib.ReadTxModelData()
local TRANSLATE_AETR_TO_TAER=false
local table = model.getInfo() -- Get the model name
MODEL.modelName = table.name
local module = model.getModule(0) -- Internal
if (module==nil or module.Type~=6) then module = model.getModule(1) end -- External
if (module~=nil) then
if (module.Type==6 ) then -- MULTI-MODULE
local chOrder = module.channelsOrder
local s = getModuleChannelOrder(chOrder)
Log.LOG_write("MultiChannel Ch Order: [%s] %s\n",chOrder,s)
if (s=="AETR") then TRANSLATE_AETR_TO_TAER=true
else TRANSLATE_AETR_TO_TAER=false
end
end
end
Log.LOG_write("MODEL NAME = %s\n",MODEL.modelName)
-- Read Ch1 to Ch10
local i= 0
for i = 0, TX_CHANNELS-1 do
local ch = model.getOutput(i) -- Zero base
if (ch~=nil) then
MODEL.modelOutputChannel[i] = ch
if (string.len(ch.name)==0) then
ch.formatCh = string.format("TX:Ch%i",i+1)
else
ch.formatCh = string.format("TX:Ch%i/%s",i+1,ch.name or "--")
end
end
end
-- Translate AETR to TAER
-- TODO: Check if there is a way to know how to the TX is configured, since if it is
-- already TAER, is not needed
if (TRANSLATE_AETR_TO_TAER) then
Log.LOG_write("Applying AETR -> TAER translation\n")
local ail = MODEL.modelOutputChannel[0]
local elv = MODEL.modelOutputChannel[1]
local thr = MODEL.modelOutputChannel[2]
MODEL.modelOutputChannel[0] = thr
MODEL.modelOutputChannel[1] = ail
MODEL.modelOutputChannel[2] = elv
end
-- Create the Port Text to be used
Log.LOG_write("Ports/Channels:\n")
for i = 0, TX_CHANNELS-1 do
local ch = MODEL.modelOutputChannel[i]
if (ch~=nil) then
MODEL.TX_CH_TEXT[i] = ch.formatCh
MODEL.PORT_TEXT[i] = string.format("P%i (%s) ",i+1,MODEL.TX_CH_TEXT[i])
Log.LOG_write("Port%d %s [%d,%d] Rev=%d, Off=%d, ppmC=%d, syn=%d\n",i+1,MODEL.TX_CH_TEXT[i],math.floor(ch.min/10),math.floor(ch.max/10), ch.revert, ch.offset, ch.ppmCenter, ch.symetrical)
end
end
end
----------------------- FILE MANAGEMENT ---------------------------------------------
-- Create a fairly unique name for a model..combination of name and a hash
-- TODO: Check with ETX why we can't get the filename used to store the model info
-- Improvement request??
function ModelLib.hashName(mName)
local c=10000;
local prefix = string.gsub(mName,"%.","_") -- Change any "." to "_"
prefix = string.gsub(prefix,"% ","_") -- Change any space to "_"
prefix = string.sub(prefix,1,5) -- Take the first 5 characters
-- Simple Hash of the Model Name adding each character
for i = 1, #mName do
local ch = string.byte(mName,i,i)
c=c+ch
end
return (prefix .. c) -- Return Prefix + Hash
end
-- Load Menu Data from a file
function ModelLib.ST_LoadFileData()
local fname = ModelLib.hashName(MODEL.modelName)..".txt"
-- Clear Menu Data
for i = 0, MEMU_VAR.DATA_END do
MENU_DATA[i]=nil
end
print("Loading File:"..fname)
local dataFile = io.open(DATA_PATH .. "/".. fname, "r") -- read File
-- cannot read file???
if (dataFile==nil) then return 0 end
local line = io.read(dataFile, 5000)
io.close(dataFile)
if #line == 0 then return 0 end -- No data??
-- Process the input, each line is "Var_Id : Value" format
-- Store it into MANU_DATA
local i=0
for k, v in string.gmatch(line, "(%d+):(%d+)") do
--print(string.format("Read MENU_DATA[%d]:[%d]",k, v))
MENU_DATA[k+0]=v+0 -- do aritmentic to convert string to number
i=i+1
end
local currAircraftType = MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]
local currWingType = MENU_DATA[MEMU_VAR.WING_TYPE]
local currTailType = MENU_DATA[MEMU_VAR.TAIL_TYPE]
print("Validation")
print(string.format("AIRCRAFT_TYPE(%d)=%s", MEMU_VAR.AIRCRAFT_TYPE,aircraft_type_text[currAircraftType]))
print(string.format("WING_TYPE(%d)=%s", MEMU_VAR.WING_TYPE, wing_type_text[currWingType]))
print(string.format("TAIL_TYPE(%d)=%s", MEMU_VAR.TAIL_TYPE, tail_type_text[currTailType]))
ModelLib.printChannelSummary()
ModelLib.printServoReverseInfo()
-- Return 0 if no lines processed, 1 otherwise
if (i > 0) then return 1 else return 0 end
end
-- Saves MENU_DATA to a file
function ModelLib.ST_SaveFileData()
local fname = ModelLib.hashName(MODEL.modelName)..".txt"
print("Saving File:"..fname)
local dataFile = assert(io.open(DATA_PATH .. "/" .. fname, "w"),"Please create "..DATA_PATH.." folder") -- write File
-- Foreach MENU_DATA with a value write Var_Id:Value into file
for i = 0, MEMU_VAR.DATA_END do
if (MENU_DATA[i]~=nil) then
--print(string.format("Write MENU_DATA[%s] : %s",i,MENU_DATA[i]))
io.write(dataFile,string.format("%s:%s\n",i,MENU_DATA[i]))
end
end
io.close(dataFile)
end
-- This Creates the Servo Settings that will be used to pass to
-- Forward programming
function ModelLib.CreateDSMPortChannelInfo()
local function ApplyWingMixA(b2)
-- ELEVON
if (b2==CH_TYPE.AIL+CH_TYPE.ELE) then return CH_MIX_TYPE.MIX_ELE end; -- 0x03
if (b2==CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE) then return CH_MIX_TYPE.MIX_NORM end; -- 0x83
end
local function ApplyWingMixB(b2)
-- ELEVON
if (b2==CH_TYPE.AIL+CH_TYPE.ELE) then return CH_MIX_TYPE.MIX_NORM end; -- 0x03
if (b2==CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE) then return CH_MIX_TYPE.MIX_ELE end; -- 0x83
end
local function ApplyTailMixA(b2)
-- VTAIL
-- Default normal/reverse behaviour
if (b2==CH_TYPE.RUD+CH_TYPE.ELE) then return CH_MIX_TYPE.MIX_NORM end; -- 0x06
if (b2==CH_TYPE.RUD+CH_TYPE.ELE+CH_TYPE.SLAVE) then return CH_MIX_TYPE.MIX_ELE end; -- 0x86
--TAILERON
-- Default normal/reverse behaviour
if (b2==CH_TYPE.AIL+CH_TYPE.ELE) then return CH_MIX_TYPE.MIX_NORM end; -- 0x03
if (b2==CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE) then return CH_MIX_TYPE.MIX_AIL end; -- 0x83
end
local function ApplyTailMixB(b2)
-- VTAIL
-- Default normal/reverse behaviour
if (b2==CH_TYPE.RUD+CH_TYPE.ELE) then return CH_MIX_TYPE.MIX_NORM end; -- 0x06
if (b2==CH_TYPE.RUD+CH_TYPE.ELE+CH_TYPE.SLAVE) then return CH_MIX_TYPE.MIX_RUD end; -- 0x86
--TAILERON
if (b2==CH_TYPE.AIL+CH_TYPE.ELE) then return CH_MIX_TYPE.MIX_AIL end; -- 0x03
if (b2==CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE) then return CH_MIX_TYPE.MIX_NORM end; -- 0x83
end
local function reverseMix(b)
if (b==CH_MIX_TYPE.MIX_NORM) then return CH_MIX_TYPE.MIX_NORM_REV end;
if (b==CH_MIX_TYPE.MIX_AIL) then return CH_MIX_TYPE.MIX_AIL_REV end;
if (b==CH_MIX_TYPE.MIX_ELE) then return CH_MIX_TYPE.MIX_ELE_REV end;
if (b==CH_MIX_TYPE.MIX_RUD) then return CH_MIX_TYPE.MIX_RUD_REV end;
return b
end
local DSM_ChannelInfo = MODEL.DSM_ChannelInfo
for i=0, TX_CHANNELS-1 do
DSM_ChannelInfo[i] = {[0]= CH_MIX_TYPE.MIX_NORM, CH_TYPE.NONE} -- Initialize with no special function
end
local aircraftType = MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]
local wingType = MENU_DATA[MEMU_VAR.WING_TYPE]
local tailType = MENU_DATA[MEMU_VAR.TAIL_TYPE]
local thrCh = MENU_DATA[MEMU_VAR.CH_THR]
local lAilCh = MENU_DATA[MEMU_VAR.CH_L_AIL]
local rAilCh = MENU_DATA[MEMU_VAR.CH_R_AIL]
local lflapCh = MENU_DATA[MEMU_VAR.CH_L_FLP]
local rflapCh = MENU_DATA[MEMU_VAR.CH_R_FLP]
local lElevCh = MENU_DATA[MEMU_VAR.CH_L_ELE]
local rElevCh = MENU_DATA[MEMU_VAR.CH_R_ELE]
local lRudCh = MENU_DATA[MEMU_VAR.CH_L_RUD]
local rRudCh = MENU_DATA[MEMU_VAR.CH_R_RUD]
-- Channels in menu vars are Zero base, Channel info is 1 based
-- THR
if (thrCh~=nil and thrCh < 10) then DSM_ChannelInfo[thrCh][1]= CH_TYPE.THR end
-- AIL (Left and Right)
if (lAilCh~=nil) then DSM_ChannelInfo[lAilCh][1] = CH_TYPE.AIL end
if (rAilCh~=nil) then DSM_ChannelInfo[rAilCh][1] = CH_TYPE.AIL+CH_TYPE.SLAVE end
-- ELE (Left and Right)
if (lElevCh~=nil) then DSM_ChannelInfo[lElevCh][1] = CH_TYPE.ELE end
if (rElevCh~=nil) then DSM_ChannelInfo[rElevCh][1] = CH_TYPE.ELE+CH_TYPE.SLAVE end
-- RUD (Left and Right)
if (lRudCh~=nil) then DSM_ChannelInfo[lRudCh][1] = CH_TYPE.RUD end
if (rRudCh~=nil) then DSM_ChannelInfo[rRudCh][1] = CH_TYPE.RUD+CH_TYPE.SLAVE end
-- VTAIL: RUD + ELE
if (tailType==TAIL_TYPE.VTAIL_A or tailType==TAIL_TYPE.VTAIL_B) then
DSM_ChannelInfo[lElevCh][1] = CH_TYPE.RUD+CH_TYPE.ELE
DSM_ChannelInfo[rElevCh][1] = CH_TYPE.RUD+CH_TYPE.ELE+CH_TYPE.SLAVE
end
-- TAILERRON: 2-ELE + AIL
if (tailType==TAIL_TYPE.TRAILERON_A or tailType==TAIL_TYPE.TRAILERON_A_R2 or
tailType==TAIL_TYPE.TRAILERON_B or tailType==TAIL_TYPE.TRAILERON_B_R2) then
DSM_ChannelInfo[lElevCh][1] = CH_TYPE.AIL+CH_TYPE.ELE
DSM_ChannelInfo[rElevCh][1] = CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE
end
---- ELEVON : AIL + ELE
if (wingType==WING_TYPE.ELEVON_A or wingType==WING_TYPE.ELEVON_B) then
DSM_ChannelInfo[lAilCh][1] = CH_TYPE.AIL+CH_TYPE.ELE
DSM_ChannelInfo[rAilCh][1] = CH_TYPE.AIL+CH_TYPE.ELE+CH_TYPE.SLAVE
end
------MIXES ---------
-- TAIL Mixes (Elevator and VTail)
if (tailType==TAIL_TYPE.VTAIL_A or tailType==TAIL_TYPE.TRAILERON_A or tailType==TAIL_TYPE.TRAILERON_A_R2) then
DSM_ChannelInfo[lElevCh][0] = ApplyTailMixA(DSM_ChannelInfo[lElevCh][1])
DSM_ChannelInfo[rElevCh][0] = ApplyTailMixA(DSM_ChannelInfo[rElevCh][1])
elseif (tailType==TAIL_TYPE.VTAIL_B or tailType==TAIL_TYPE.TRAILERON_B or tailType==TAIL_TYPE.TRAILERON_B_R2) then
DSM_ChannelInfo[lElevCh][0] = ApplyTailMixA(DSM_ChannelInfo[lElevCh][1])
DSM_ChannelInfo[rElevCh][0] = ApplyTailMixA(DSM_ChannelInfo[rElevCh][1])
end
---- Wing Mixes
if (wingType==WING_TYPE.ELEVON_A) then
DSM_ChannelInfo[lAilCh][0] = ApplyWingMixA(DSM_ChannelInfo[lAilCh][1])
DSM_ChannelInfo[rAilCh][0] = ApplyWingMixA(DSM_ChannelInfo[rAilCh][1])
elseif (wingType==WING_TYPE.ELEVON_B) then
DSM_ChannelInfo[lAilCh][0] = ApplyWingMixB(DSM_ChannelInfo[lAilCh][1])
DSM_ChannelInfo[rAilCh][0] = ApplyWingMixB(DSM_ChannelInfo[rAilCh][1])
end
-- Apply Gyro Reverse as needed for each channel as long as it is used
for i=0, TX_CHANNELS-1 do
if (MENU_DATA[MEMU_VAR.PORT_BASE+i]==CH_MODE_TYPE.REVERSE and DSM_ChannelInfo[i][1]>0) then
DSM_ChannelInfo[i][0]=reverseMix(DSM_ChannelInfo[i][0])
DSM_ChannelInfo[i][1]=DSM_ChannelInfo[i][1]+CH_TYPE.REVERSE
end
end
-- Show how it looks
for i=0, 9 do
local b1,b2 = DSM_ChannelInfo[i][0], DSM_ChannelInfo[i][1]
print(string.format("%s (%02X %02X) %s", MODEL.PORT_TEXT[i],
b1, b2, ModelLib.channelType2String(b1,b2)))
end
MODEL.AirWingTailDesc = string.format("Aircraft(%s) Wing(%s) Tail(%s)",aircraft_type_text[aircraftType],wing_type_text[wingType],tail_type_text[tailType])
end
function ModelLib.ST_PlaneWingInit(wingType)
print("Change Plane WingType:"..wing_type_text[wingType])
MENU_DATA[MEMU_VAR.WING_TYPE] = wingType
-- Clear all Wing Data
MENU_DATA[MEMU_VAR.CH_L_AIL] = nil
MENU_DATA[MEMU_VAR.CH_R_AIL] = nil
MENU_DATA[MEMU_VAR.CH_L_FLP] = nil
MENU_DATA[MEMU_VAR.CH_R_FLP] = nil
MENU_DATA[MEMU_VAR.CH_THR] = PORT.PORT1
-- Default Channel Assisgments for each Wing type
if (wingType==WING_TYPE.AIL_1) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT2
elseif (wingType==WING_TYPE.AIL_2) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT6
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
elseif (wingType==WING_TYPE.FLAPERON) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT6
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
elseif (wingType==WING_TYPE.AIL_1_FLP_1) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_L_FLP] = PORT.PORT6
elseif (wingType==WING_TYPE.AIL_2_FLP_1) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT6
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_L_FLP] = PORT.PORT5
elseif (wingType==WING_TYPE.AIL_2_FLP_2) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT6
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_R_FLP] = PORT.PORT5
MENU_DATA[MEMU_VAR.CH_L_FLP] = PORT.PORT7
elseif (wingType==WING_TYPE.ELEVON_A) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT3
elseif (wingType==WING_TYPE.ELEVON_B) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
else -- Assume normal
print("ERROR: Invalid Wing Type")
end
ModelLib.printChannelSummary()
end
function ModelLib.ST_PlaneTailInit(tailType)
if (MENU_DATA[MEMU_VAR.WING_TYPE]==WING_TYPE.ELEVON_A or
MENU_DATA[MEMU_VAR.WING_TYPE]==WING_TYPE.ELEVON_B) then
tailType = TAIL_TYPE.RUD_1 -- Delta only have ruder
end
print("Change Plane Tail Type:"..tail_type_text[tailType])
-- Clear all data for Tail
MENU_DATA[MEMU_VAR.TAIL_TYPE] = tailType
MENU_DATA[MEMU_VAR.CH_L_ELE] = nil
MENU_DATA[MEMU_VAR.CH_R_ELE] = nil
MENU_DATA[MEMU_VAR.CH_L_RUD] = nil
MENU_DATA[MEMU_VAR.CH_R_RUD] = nil
-- Setup Channels for different Tail types
if (tailType == TAIL_TYPE.RUD_1) then
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
elseif (tailType == TAIL_TYPE.RUD_1_ELEV_1) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
elseif (tailType == TAIL_TYPE.RUD_1_ELEV_2) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT5
MENU_DATA[MEMU_VAR.CH_R_ELE] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
elseif (tailType == TAIL_TYPE.RUD_2_ELEV_1) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
MENU_DATA[MEMU_VAR.CH_R_RUD] = PORT.PORT5
elseif (tailType == TAIL_TYPE.RUD_2_ELEV_2) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT5
MENU_DATA[MEMU_VAR.CH_R_ELE] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
MENU_DATA[MEMU_VAR.CH_R_RUD] = PORT.PORT6
elseif (tailType == TAIL_TYPE.VTAIL_A or tailType == TAIL_TYPE.VTAIL_B) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT4
MENU_DATA[MEMU_VAR.CH_R_ELE] = PORT.PORT3
elseif (tailType == TAIL_TYPE.TRAILERON_A or tailType==TAIL_TYPE.TRAILERON_A_R2 or
tailType == TAIL_TYPE.TRAILERON_B or tailType==TAIL_TYPE.TRAILERON_B_R2) then
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT5
MENU_DATA[MEMU_VAR.CH_R_ELE] = PORT.PORT3
else -- Assume Normal
print("ERROR:invalid Tail Type")
end
if (tailType == TAIL_TYPE.TRAILERON_A_R2 or tailType==TAIL_TYPE.TRAILERON_B_R2) then
MENU_DATA[MEMU_VAR.CH_R_RUD] = PORT.PORT7
end
ModelLib.printChannelSummary()
end
function ModelLib.ST_GliderWingInit(wingType)
print("Change Glider WingType:"..wing_type_text[wingType])
MENU_DATA[MEMU_VAR.WING_TYPE] = wingType
-- Clear all Wing Data
MENU_DATA[MEMU_VAR.CH_L_AIL] = nil
MENU_DATA[MEMU_VAR.CH_R_AIL] = nil
MENU_DATA[MEMU_VAR.CH_L_FLP] = nil
MENU_DATA[MEMU_VAR.CH_R_FLP] = nil
MENU_DATA[MEMU_VAR.CH_THR] = PORT.PORT6
-- Default Channel Assisgments for each Wing type
if (wingType==WING_TYPE.AIL_1) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT1
elseif (wingType==WING_TYPE.AIL_2) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT1
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
elseif (wingType==WING_TYPE.AIL_2_FLP_1) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT1
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_L_FLP] = PORT.PORT5
elseif (wingType==WING_TYPE.AIL_2_FLP_2) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT1
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_L_FLP] = PORT.PORT5
MENU_DATA[MEMU_VAR.CH_R_FLP] = PORT.PORT6
MENU_DATA[MEMU_VAR.CH_THR] = PORT.PORT7
elseif (wingType==WING_TYPE.ELEVON_A) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT1
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT2
elseif (wingType==WING_TYPE.ELEVON_B) then
MENU_DATA[MEMU_VAR.CH_L_AIL] = PORT.PORT2
MENU_DATA[MEMU_VAR.CH_R_AIL] = PORT.PORT1
else -- Assume normal
print("ERROR: Invalid Wing Type")
end
ModelLib.printChannelSummary()
end
function ModelLib.ST_GliderTailInit(tailType)
if (MENU_DATA[MEMU_VAR.WING_TYPE]==WING_TYPE.ELEVON_A) then
tailType = TAIL_TYPE.RUD_1 -- Delta only have ruder
end
print("Change Glider Tail Type:"..tail_type_text[tailType])
-- Clear all data for Tail
MENU_DATA[MEMU_VAR.TAIL_TYPE] = tailType
MENU_DATA[MEMU_VAR.CH_L_ELE] = nil
MENU_DATA[MEMU_VAR.CH_R_ELE] = nil
MENU_DATA[MEMU_VAR.CH_L_RUD] = nil
MENU_DATA[MEMU_VAR.CH_R_RUD] = nil
-- Setup Channels for different Tail types
if (tailType == TAIL_TYPE.RUD_1) then
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
elseif (tailType == TAIL_TYPE.RUD_1_ELEV_1) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_L_RUD] = PORT.PORT4
elseif (tailType == TAIL_TYPE.VTAIL_A) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT4
MENU_DATA[MEMU_VAR.CH_R_ELE] = PORT.PORT3
elseif (tailType == TAIL_TYPE.VTAIL_B) then
MENU_DATA[MEMU_VAR.CH_L_ELE] = PORT.PORT3
MENU_DATA[MEMU_VAR.CH_R_ELE] = PORT.PORT4
else -- Assume Normal
print("ERROR: Invalid Tail Type")
end
ModelLib.printChannelSummary()
end
function ModelLib.ST_AircraftInit(aircraftType)
MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE] = aircraftType
print("Change Aircraft:".. aircraft_type_text[aircraftType])
-- Setup Default Aircraft Wing/Tail
if (aircraftType==AIRCRAFT_TYPE.PLANE) then
ModelLib.ST_PlaneWingInit(WING_TYPE.AIL_1)
ModelLib.ST_PlaneTailInit(TAIL_TYPE.RUD_1_ELEV_1)
elseif (aircraftType==AIRCRAFT_TYPE.GLIDER) then
ModelLib.ST_GliderWingInit(WING_TYPE.AIL_1)
ModelLib.ST_GliderTailInit(TAIL_TYPE.RUD_1_ELEV_1)
else
ModelLib.ST_PlaneWingInit(WING_TYPE.AIL_1)
ModelLib.ST_PlaneTailInit(TAIL_TYPE.RUD_1_ELEV_1)
end
end
-- Setup Initial Default Data for the Menus
function ModelLib.ST_Default_Data()
print("Initializing Menu DATA")
ModelLib.ST_AircraftInit(AIRCRAFT_TYPE.PLANE)
print("Initializing Servo Reverse from TX output settings")
MENU_DATA[MEMU_VAR.PORT1_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT1].revert
MENU_DATA[MEMU_VAR.PORT2_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT2].revert
MENU_DATA[MEMU_VAR.PORT3_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT3].revert
MENU_DATA[MEMU_VAR.PORT4_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT4].revert
MENU_DATA[MEMU_VAR.PORT5_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT5].revert
MENU_DATA[MEMU_VAR.PORT6_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT6].revert
MENU_DATA[MEMU_VAR.PORT7_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT7].revert
MENU_DATA[MEMU_VAR.PORT8_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT8].revert
MENU_DATA[MEMU_VAR.PORT9_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT9].revert
MENU_DATA[MEMU_VAR.PORT10_MODE] = CH_MODE_TYPE.NORMAL + MODEL.modelOutputChannel[PORT.PORT10].revert
ModelLib.printServoReverseInfo()
end
ModelLib.TX_CHANNELS = TX_CHANNELS
ModelLib.MODEL = MODEL
ModelLib.CH_TYPE = CH_TYPE
ModelLib.CH_MODE_TYPE = CH_MODE_TYPE
ModelLib.AIRCRAFT_TYPE = AIRCRAFT_TYPE
ModelLib.WING_TYPE = WING_TYPE
ModelLib.TAIL_TYPE = TAIL_TYPE
ModelLib.MENU_DATA = MENU_DATA
ModelLib.MEMU_VAR = MEMU_VAR
ModelLib.PORT = PORT
ModelLib.DATA_PATH = DATA_PATH
ModelLib.aircraft_type_text = aircraft_type_text
ModelLib.wing_type_text = wing_type_text
ModelLib.tail_type_text = tail_type_text
return ModelLib

View File

@ -0,0 +1,467 @@
---- #########################################################################
---- # #
---- # Copyright (C) OpenTX #
-----# #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
------------------------------------------------------------------------------
-- This scrip does the airplane Setup similar to how a a Spektrum radio does
-- it. You can select the plane type, the Wing type, etc.
-- This settings are needed for ForwardProgramming to send the TX aircraft
-- configuration to the RX when in Initial Setup
-- Author: Francisco Arzu
------------------------------------------------------------------------------
local Log, menuLib, modelLib, DEBUG_ON, SIMULATION_ON = ... -- Get DebugON from parameters
local SETUP_LIB_VERSION = "0.56"
local DATA_PATH = modelLib.DATA_PATH
local PHASE = menuLib.PHASE
local LINE_TYPE = menuLib.LINE_TYPE
local MODEL = modelLib.MODEL
local AIRCRAFT_TYPE = modelLib.AIRCRAFT_TYPE
local WING_TYPE = modelLib.WING_TYPE
local TAIL_TYPE = modelLib.TAIL_TYPE
local CH_MODE_TYPE = modelLib.CH_MODE_TYPE
local PORT = modelLib.PORT
local MEMU_VAR = modelLib.MEMU_VAR
local MENU_DATA = modelLib.MENU_DATA
local SetupLib = {}
local lastGoodMenu=0
------------------- Model Setup Helper functions ----------------------
local currAircraftType = -1 -- Current AircraftType selected, and to detect change
local currTailType = -1 -- Current WingType selected, and to detect change
local currWingType = -1 -- Current TailType selected, and to detect change
local menuDataChanged = false -- Flag to notify if any data has changed
local function tailTypeCompatible(a,b)
local function normalize(tt)
if (tt==TAIL_TYPE.TRAILERON_A or tt==TAIL_TYPE.TRAILERON_B) then
return TAIL_TYPE.TRAILERON_A
elseif (tt==TAIL_TYPE.TRAILERON_A_R2 or tt==TAIL_TYPE.TRAILERON_B_R2) then
return TAIL_TYPE.TRAILERON_A_R2
elseif (tt==TAIL_TYPE.VTAIL_A or tt==TAIL_TYPE.VTAIL_B) then
return TAIL_TYPE.VTAIL_A
else
return tt
end
end
return (normalize(a)==normalize(b))
end
-- Creates the menus to Render with the GUI
local function ST_LoadMenu(menuId)
local ctx = menuLib.DSM_Context
local function portUse(p)
local out = ""
if p==MENU_DATA[MEMU_VAR.CH_THR] then out = "Thr"
elseif p == MENU_DATA[MEMU_VAR.CH_L_AIL] then
out=(MENU_DATA[MEMU_VAR.CH_R_AIL] and "Ail_L") or "Ail"
elseif p == MENU_DATA[MEMU_VAR.CH_R_AIL] then out="Ail_R"
elseif p == MENU_DATA[MEMU_VAR.CH_L_ELE] then
out=(MENU_DATA[MEMU_VAR.CH_R_ELE] and "Ele_L") or "Ele"
elseif p == MENU_DATA[MEMU_VAR.CH_R_ELE] then out="Ele_R"
elseif p == MENU_DATA[MEMU_VAR.CH_L_RUD] then
out=(MENU_DATA[MEMU_VAR.CH_R_RUD] and "Rud_L") or "Rud"
elseif p == MENU_DATA[MEMU_VAR.CH_R_RUD] then out="Rud_R"
elseif p == MENU_DATA[MEMU_VAR.CH_L_FLP] then
out=(MENU_DATA[MEMU_VAR.CH_R_FLP] and "Flp_L") or "Flp"
elseif p == MENU_DATA[MEMU_VAR.CH_R_FLP] then out="Flp_R"
end
return out
end
local function formatTXRevert(port)
local out = " " .. modelLib.channelType2String(MODEL.DSM_ChannelInfo[port][0], MODEL.DSM_ChannelInfo[port][1]);
return out
end
local function Header(p)
return MODEL.PORT_TEXT[p].." "..portUse(p)
end
menuLib.clearMenuLines()
if (menuId==0x1000) then -- MAIN MENU
ctx.Menu = { MenuId = 0x1000, Text = "Save-Exit ("..MODEL.modelName..")", PrevId = 0, NextId = 0, BackId = 0, TextId=0 }
if (true) then
ctx.MenuLines[4] = { Type = LINE_TYPE.MENU, Text="Save Changes", TextId = 0, ValId = 0x1005 }
ctx.MenuLines[5] = { Type = LINE_TYPE.MENU, Text="Discard Changes", TextId = 0, ValId = 0x1006 }
ctx.SelLine = 4
end
lastGoodMenu = menuId
elseif (menuId==0x1001) then -- MODEL SETUP
local backId = 0xFFF9 -- No changes, just exit
local title = "Model Setup ("..MODEL.modelName..")"
if (menuDataChanged) then
backId = 0x1000 -- Go to Save menu
title = title.." *"
end
ctx.Menu = { MenuId = 0x1001, Text = title, PrevId = 0, NextId = 0, BackId = backId, TextId=0 }
ctx.MenuLines[0] = { Type = LINE_TYPE.MENU, Text = "Aircraft Type Setup", ValId = 0x1010,TextId=0 }
ctx.MenuLines[1] = { Type = LINE_TYPE.MENU, Text = "Wing & Tail Channels ", ValId = 0x1020, TextId=0 }
ctx.MenuLines[3] = { Type = LINE_TYPE.MENU, Text = "Gyro Channel Reverse", ValId = 0x1030, TextId=0 }
ctx.MenuLines[5] = { Type = LINE_TYPE.MENU, Text = "WARNING: Changing of Aircraft or Wing will", ValId = 0x1001, TextId=0 }
ctx.MenuLines[6] = { Type = LINE_TYPE.MENU, Text = "delete previous Channel/Port assigments.", ValId = 0x1001, TextId=0 }
ctx.SelLine = 0
lastGoodMenu = menuId
elseif (menuId==0x1005) then
modelLib.printChannelSummary()
modelLib.ST_SaveFileData()
menuDataChanged = false
local msg1 = "Data saved to: "
local msg2 = " "..DATA_PATH.."/"..modelLib.hashName(MODEL.modelName)..".txt"
ctx.Menu = { MenuId = 0x1005, Text = "Config Saved", PrevId = 0, NextId = 0, BackId = 0, TextId=0 }
ctx.MenuLines[2] = { Type = LINE_TYPE.MENU, Text=msg1, TextId = 0, ValId = 0x1005 }
ctx.MenuLines[3] = { Type = LINE_TYPE.MENU, Text=msg2, TextId = 0, ValId = 0x1005 }
ctx.MenuLines[6] = { Type = LINE_TYPE.MENU, Text="Complete", TextId = 0, ValId = 0xFFF9 }
ctx.SelLine = 6
lastGoodMenu = menuId
elseif (menuId==0x1006) then
modelLib.ST_LoadFileData()
menuDataChanged = false
currAircraftType = MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]
currWingType = MENU_DATA[MEMU_VAR.WING_TYPE]
currTailType = MENU_DATA[MEMU_VAR.TAIL_TYPE]
local msg1 = "Data restored from: "
local msg2 = " "..DATA_PATH.."/"..modelLib.hashName(MODEL.modelName)..".txt"
ctx.Menu = { MenuId = 0x1006, Text = "Discart Changes", PrevId = 0, NextId = 0, BackId = 0, TextId=0 }
ctx.MenuLines[2] = { Type = LINE_TYPE.MENU, Text=msg1, TextId = 0, ValId = 0x1006 }
ctx.MenuLines[3] = { Type = LINE_TYPE.MENU, Text=msg2, TextId = 0, ValId = 0x1006 }
ctx.MenuLines[6] = { Type = LINE_TYPE.MENU, Text="Complete", TextId = 0, ValId = 0xFFF9 }
ctx.SelLine = 6
lastGoodMenu = menuId
elseif (menuId==0x1010) then
modelLib.printChannelSummary()
ctx.Menu = { MenuId = 0x1010, Text = "Aircraft Type", PrevId = 0, NextId = 0x1011, BackId = 0x1001, TextId=0 }
ctx.MenuLines[5] = { Type = LINE_TYPE.LIST_MENU_NC, Text="Aircraft Type", TextId = 0, ValId = MEMU_VAR.AIRCRAFT_TYPE, Min=50, Max=53, Def=50, Val=MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE] }
ctx.SelLine = 5
lastGoodMenu = menuId
elseif (menuId==0x1011) then
ctx.Menu = { MenuId = 0x1011, Text = "Model Type:"..modelLib.aircraft_type_text[currAircraftType], PrevId = 0, NextId = 0x1020, BackId = 0x1010, TextId=0 }
ctx.MenuLines[5] = { Type = LINE_TYPE.LIST_MENU_NC, Text="Wing Type", TextId = 0, ValId = MEMU_VAR.WING_TYPE, Min=100, Max=107, Def=100, Val=MENU_DATA[MEMU_VAR.WING_TYPE] }
ctx.MenuLines[6] = { Type = LINE_TYPE.LIST_MENU_NC, Text="Tail Type", TextId = 0, ValId = MEMU_VAR.TAIL_TYPE, Min=200, Max=210, Def=200, Val=MENU_DATA[MEMU_VAR.TAIL_TYPE] }
ctx.SelLine = 5
lastGoodMenu = menuId
elseif (menuId==0x1020) then
------ WING SETUP -------
local thr = MENU_DATA[MEMU_VAR.CH_THR]
local leftAil = MENU_DATA[MEMU_VAR.CH_L_AIL]
local rightAil = MENU_DATA[MEMU_VAR.CH_R_AIL]
local leftFlap = MENU_DATA[MEMU_VAR.CH_L_FLP]
local rightFlap = MENU_DATA[MEMU_VAR.CH_R_FLP]
local thrText = "Thr"
local leftAilText = "Left Aileron"
local rightAilText = "Right Aileron"
local leftFlapText = "Left Flap"
local rightFlapText = "Right Flap"
if (rightAil==nil) then leftAilText = "Aileron" end
if (rightFlap==nil) then leftFlapText = "Flap" end
local title = modelLib.aircraft_type_text[currAircraftType].." Wing:"..modelLib.wing_type_text[currWingType]
ctx.Menu = { MenuId = 0x1020, Text = title, PrevId = 0, NextId = 0x1021, BackId = 0x1011, TextId=0 }
ctx.MenuLines[0] = { Type = LINE_TYPE.LIST_MENU_NC, Text=thrText, TextId = 0, ValId = MEMU_VAR.CH_THR, Min=0, Max=10, Def=0, Val= thr }
ctx.MenuLines[2] = { Type = LINE_TYPE.LIST_MENU_NC, Text=leftAilText, TextId = 0, ValId = MEMU_VAR.CH_L_AIL, Min=0, Max=9, Def=0, Val= leftAil }
if (rightAil~=nil) then
ctx.MenuLines[3] = { Type = LINE_TYPE.LIST_MENU_NC, Text=rightAilText, TextId = 0, ValId = MEMU_VAR.CH_R_AIL, Min=0, Max=9, Def=0, Val= rightAil }
end
if (leftFlap~=nil) then
ctx.MenuLines[4] = { Type = LINE_TYPE.LIST_MENU_NC, Text=leftFlapText, TextId = 0, ValId = MEMU_VAR.CH_L_FLP, Min=0, Max=9, Def=0, Val= leftFlap }
end
if (rightFlap~=nil) then
ctx.MenuLines[5] = { Type = LINE_TYPE.LIST_MENU_NC, Text=rightFlapText, TextId = 0, ValId = MEMU_VAR.CH_R_FLP, Min=0, Max=9, Def=0, Val= rightFlap }
end
ctx.SelLine = 0
lastGoodMenu = menuId
elseif (menuId==0x1021) then
------ TAIL SETUP -------
local leftRud = MENU_DATA[MEMU_VAR.CH_L_RUD]
local rightRud = MENU_DATA[MEMU_VAR.CH_R_RUD]
local leftEle = MENU_DATA[MEMU_VAR.CH_L_ELE]
local rightEle = MENU_DATA[MEMU_VAR.CH_R_ELE]
local leftRudText = "Left Rudder"
local rightRudText = "Right Rudder"
local leftElvText = "Left Elevator"
local rightElvText = "Right Elevator"
if (rightRud==nil) then leftRudText = "Rudder" end
if (rightEle==nil) then leftElvText = "Elevator" end
local title = modelLib.aircraft_type_text[currAircraftType].." Tail:"..modelLib.tail_type_text[currTailType]
ctx.Menu = { MenuId = 0x1021, Text = title, PrevId = 0, NextId = 0x1001, BackId = 0x1020, TextId=0 }
if (leftRud~=nil) then
ctx.MenuLines[1] = { Type = LINE_TYPE.LIST_MENU_NC, Text=leftRudText, TextId = 0, ValId = MEMU_VAR.CH_L_RUD, Min=0, Max=9, Def=0, Val= leftRud}
end
if (rightRud~=nil) then
ctx.MenuLines[2] = { Type = LINE_TYPE.LIST_MENU_NC, Text=rightRudText, TextId = 0, ValId = MEMU_VAR.CH_R_RUD, Min=0, Max=9, Def=0, Val=rightRud }
end
if (leftEle~=nil) then
ctx.MenuLines[4] = { Type = LINE_TYPE.LIST_MENU_NC, Text=leftElvText, TextId = 0, ValId = MEMU_VAR.CH_L_ELE, Min=0, Max=9, Def=0, Val=leftEle }
end
if (rightEle~=nil) then
ctx.MenuLines[5] = { Type = LINE_TYPE.LIST_MENU_NC, Text=rightElvText, TextId = 0, ValId = MEMU_VAR.CH_R_ELE, Min=0, Max=9, Def=0, Val=rightEle }
end
ctx.SelLine = 1
lastGoodMenu = menuId
elseif (menuId==0x1030) then
modelLib.CreateDSMPortChannelInfo()
modelLib.printChannelSummary()
ctx.Menu = { MenuId = 0x1030, Text = "Gyro Channel Reverse (Port 1-5)", PrevId = 0, NextId = 0x1031, BackId = 0x1001, TextId=0 }
ctx.MenuLines[0] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT1), TextId = 0, ValId = MEMU_VAR.PORT1_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT1_MODE], Format = formatTXRevert(PORT.PORT1) }
ctx.MenuLines[1] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT2), TextId = 0, ValId = MEMU_VAR.PORT2_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT2_MODE], Format = formatTXRevert(PORT.PORT2) }
ctx.MenuLines[2] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT3), TextId = 0, ValId = MEMU_VAR.PORT3_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT3_MODE], Format = formatTXRevert(PORT.PORT3) }
ctx.MenuLines[3] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT4), TextId = 0, ValId = MEMU_VAR.PORT4_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT4_MODE], Format = formatTXRevert(PORT.PORT4) }
ctx.MenuLines[4] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT5), TextId = 0, ValId = MEMU_VAR.PORT5_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT5_MODE], Format = formatTXRevert(PORT.PORT5) }
ctx.MenuLines[5] = { Type = LINE_TYPE.MENU, Text="Only Thr/Ail/Rud/Ele. This affects AS3X/SAFE reaction dir./b", TextId = 0, ValId = 0x1030 }
ctx.MenuLines[6] = { Type = LINE_TYPE.MENU, Text="Any changes, use RX 'Relearn Servo Settings'/b", TextId = 0, ValId = 0x1030 }
ctx.SelLine = 0
lastGoodMenu = menuId
elseif (menuId==0x1031) then
modelLib.CreateDSMPortChannelInfo()
modelLib.printChannelSummary()
ctx.Menu = { MenuId = 0x1031, Text = "Gyro Channel Reverse (Port 6-10)", PrevId = 0x1030, NextId = 0, BackId = 0x1001, TextId=0 }
ctx.MenuLines[0] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT6), TextId = 0, ValId = MEMU_VAR.PORT6_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT6_MODE], Format = formatTXRevert(PORT.PORT6) }
ctx.MenuLines[1] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT7), TextId = 0, ValId = MEMU_VAR.PORT7_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT7_MODE], Format = formatTXRevert(PORT.PORT7) }
ctx.MenuLines[2] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT8), TextId = 0, ValId = MEMU_VAR.PORT8_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT8_MODE], Format = formatTXRevert(PORT.PORT8) }
ctx.MenuLines[3] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT9), TextId = 0, ValId = MEMU_VAR.PORT9_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT9_MODE], Format = formatTXRevert(PORT.PORT9) }
ctx.MenuLines[4] = { Type = LINE_TYPE.LIST_MENU_NC, Text=Header(PORT.PORT10), TextId = 0, ValId = MEMU_VAR.PORT10_MODE, Min=300, Max=301, Def=300, Val=MENU_DATA[MEMU_VAR.PORT10_MODE], Format = formatTXRevert(PORT.PORT10) }
ctx.MenuLines[5] = { Type = LINE_TYPE.MENU, Text="Only Thr/Ail/Rud/Ele. This affects AS3X/SAFE reaction dir./b", TextId = 0, ValId = 0x1031 }
ctx.MenuLines[6] = { Type = LINE_TYPE.MENU, Text="Any changes, use RX 'Relearn Servo Settings'/b", TextId = 0, ValId = 0x1031 }
ctx.SelLine = 0
lastGoodMenu = menuId
else
print("NOT IMPLEMENTED")
ctx.Menu = { MenuId = 0x0002, Text = "NOT IMPLEMENTED", TextId = 0, PrevId = 0, NextId = 0, BackId = lastGoodMenu }
ctx.SelLine = menuLib.BACK_BUTTON
end
menuLib.PostProcessMenu()
end
-- ST_SendReceive
-- Main state machine for the Setup menu
local function ST_SendReceive()
local ctx = menuLib.DSM_Context
--if (DEBUG_ON>1) then Log.LOG_write("%3.3f %s: ", menuLib.getElapsedTime(), menuLib.phase2String(ctx.Phase)) end
if ctx.Phase == PHASE.RX_VERSION then -- request RX version
ctx.RX.Name = "MODEL SETUP"
ctx.RX.Version = SETUP_LIB_VERSION
ctx.Phase = PHASE.MENU_TITLE
ctx.Menu.MenuId = 0x01001
ctx.Refresh_Display = true
elseif ctx.Phase == PHASE.WAIT_CMD then
elseif ctx.Phase == PHASE.MENU_TITLE then -- request menu title
ST_LoadMenu(ctx.Menu.MenuId)
ctx.Phase = PHASE.WAIT_CMD
ctx.Refresh_Display = true
elseif ctx.Phase == PHASE.VALUE_CHANGING then -- send value
local line = ctx.MenuLines[ctx.SelLine] -- Updated Value of SELECTED line
if (MENU_DATA[line.ValId] ~= line.Val ) then
MENU_DATA[line.ValId] = line.Val
print(string.format("MENU_DATA[%d/%s]=%d",line.ValId,line.Text, line.Val))
menuDataChanged=true
end
ctx.Phase = PHASE.VALUE_CHANGING_WAIT
elseif ctx.Phase == PHASE.VALUE_CHANGING_WAIT then
local line = ctx.MenuLines[ctx.SelLine]
elseif ctx.Phase == PHASE.VALUE_CHANGE_END then -- send value
local line = ctx.MenuLines[ctx.SelLine] -- Updated Value of SELECTED line
-- Update the menu data from the line
if (MENU_DATA[line.ValId] ~= line.Val ) then
MENU_DATA[line.ValId] = line.Val
print(string.format("MENU_DATA[%d/%s]=%d",line.ValId,line.Text, line.Val))
menuDataChanged=true
end
-- Did the aircraft type change?
if (currAircraftType ~= MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]) then
currAircraftType = MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]
modelLib.ST_AircraftInit(currAircraftType)
currWingType = MENU_DATA[MEMU_VAR.WING_TYPE]
currTailType = MENU_DATA[MEMU_VAR.TAIL_TYPE]
end
-- Did the Wing type change?
if (currWingType ~= MENU_DATA[MEMU_VAR.WING_TYPE]) then
if (currAircraftType==AIRCRAFT_TYPE.GLIDER) then
currWingType = MENU_DATA[MEMU_VAR.WING_TYPE]
modelLib.ST_GliderWingInit(currWingType)
else
currWingType = MENU_DATA[MEMU_VAR.WING_TYPE]
modelLib.ST_PlaneWingInit(currWingType)
end
-- DELTA has only RUDER
if ((currWingType==WING_TYPE.ELEVON_A or currWingType==WING_TYPE.ELEVON_B) and TAIL_TYPE~=TAIL_TYPE.RUD_1) then
MENU_DATA[MEMU_VAR.TAIL_TYPE] = TAIL_TYPE.RUD_1
end
end
--- Did the tail changed?
local ntt = MENU_DATA[MEMU_VAR.TAIL_TYPE]
if (currTailType ~= ntt) then
if (currAircraftType==AIRCRAFT_TYPE.GLIDER) then
currTailType = ntt
modelLib.ST_GliderTailInit(currTailType)
else
if (not tailTypeCompatible(currTailType,ntt)) then
modelLib.ST_PlaneTailInit(ntt)
end
currTailType = ntt
end
end
ctx.Phase = PHASE.WAIT_CMD
elseif ctx.Phase == PHASE.EXIT then
ctx.Phase=PHASE.EXIT_DONE
end
end
------------------------------------------------------------------------------------------------------------
-- Inital List and Image Text for this menus
local function ST_Init_Text(rxId)
menuLib.clearAllText()
local List_Values = menuLib.List_Values
local List_Text = menuLib.List_Text
local Text = menuLib.Text
local List_Text_Img = menuLib.List_Text_Img
-- Channel Names use the Port Text Retrived from OTX/ETX
for i = 0, 9 do List_Text[i] = MODEL.PORT_TEXT[i] end
List_Text[10]="--"
-- Aircraft Type
List_Text[50+AIRCRAFT_TYPE.PLANE] = "Airplane"; --List_Text_Img[50+AIRCRAFT_TYPE.PLANE] = "at_plane.png|Airplane"
List_Text[50+AIRCRAFT_TYPE.GLIDER] = "Glider (Partial work)"; --List_Text_Img[50+AIRCRAFT_TYPE.GLIDER] = "at_glider.png|Glider"
List_Text[50+AIRCRAFT_TYPE.HELI] = "Helicopter (Not done)"; --List_Text_Img[50+AIRCRAFT_TYPE.HELI] = "at_heli.png|Helicopter"
List_Text[50+AIRCRAFT_TYPE.DRONE] = "Drone (not done)"; --List_Text_Img[50+AIRCRAFT_TYPE.DRONE] = "at_drone.png|Drone"
-- Wing Types
List_Text[100+WING_TYPE.AIL_1] = "Single Ail"; List_Text_Img[100+WING_TYPE.AIL_1] = "wt_1ail.png|Single Aileron"
List_Text[100+WING_TYPE.AIL_2] = "Dual Ail"; List_Text_Img[100+WING_TYPE.AIL_2] = "wt_2ail.png|Dual Aileron"
List_Text[100+WING_TYPE.FLAPERON] = "Flaperon"; List_Text_Img[100+WING_TYPE.FLAPERON] = "wt_flaperon.png|Flaperon"
List_Text[100+WING_TYPE.AIL_1_FLP_1] = "Ail + Flap"; List_Text_Img[100+WING_TYPE.AIL_1_FLP_1] = "wt_1ail_1flp.png|Aileron + Flap"
List_Text[100+WING_TYPE.AIL_2_FLP_1] = "Dual Ail + Flap"; List_Text_Img[100+WING_TYPE.AIL_2_FLP_1] = "wt_2ail_1flp.png|Dual Aileron + Flap"
List_Text[100+WING_TYPE.AIL_2_FLP_2] = "Dual Ail + Dual Flap"; List_Text_Img[100+WING_TYPE.AIL_2_FLP_2] = "wt_2ail_2flp.png|Dual Aileron + Dual Flap"
List_Text[100+WING_TYPE.ELEVON_A] = "Delta/Elevon A"; List_Text_Img[100+WING_TYPE.ELEVON_A] = "wt_elevon.png|Delta/Elevon A"
List_Text[100+WING_TYPE.ELEVON_B] = "Delta/Elevon B"; List_Text_Img[100+WING_TYPE.ELEVON_B] = "wt_elevon.png|Delta/Elevon B"
-- Tail Types
List_Text[200+TAIL_TYPE.RUD_1] = "Rudder Only"; List_Text_Img[200+TAIL_TYPE.RUD_1] = "tt_1rud.png|Rudder Only"
List_Text[200+TAIL_TYPE.RUD_1_ELEV_1] = "Rud + Ele"; List_Text_Img[200+TAIL_TYPE.RUD_1_ELEV_1] = "tt_1rud_1ele.png|Tail Normal"
List_Text[200+TAIL_TYPE.RUD_1_ELEV_2] = "Rud + Dual Ele"; List_Text_Img[200+TAIL_TYPE.RUD_1_ELEV_2] = "tt_1rud_2ele.png|Rud + Dual Elev"
List_Text[200+TAIL_TYPE.RUD_2_ELEV_1] = "Dual Rud + Ele"; List_Text_Img[200+TAIL_TYPE.RUD_2_ELEV_1] = "tt_2rud_1ele.png|Dual Rud + Elev"
List_Text[200+TAIL_TYPE.RUD_2_ELEV_2] = "Dual Rud + Dual Ele"; List_Text_Img[200+TAIL_TYPE.RUD_2_ELEV_2] = "tt_2rud_2ele.png|Dual Rud + Dual Elev"
List_Text[200+TAIL_TYPE.VTAIL_A] = "V-Tail A"; List_Text_Img[200+TAIL_TYPE.VTAIL_A] = "tt_vtail.png|V-Tail A"
List_Text[200+TAIL_TYPE.VTAIL_B] = "V-Tail B"; List_Text_Img[200+TAIL_TYPE.VTAIL_B] = "tt_vtail.png|V-Tail B"
List_Text[200+TAIL_TYPE.TRAILERON_A] = "Taileron A"; List_Text_Img[200+TAIL_TYPE.TRAILERON_A] = "tt_taileron.png|Taileron A"
List_Text[200+TAIL_TYPE.TRAILERON_B] = "Taileron B"; List_Text_Img[200+TAIL_TYPE.TRAILERON_B] = "tt_taileron.png|Taileron B"
List_Text[200+TAIL_TYPE.TRAILERON_A_R2] = "Taileron A + 2x Rud"; List_Text_Img[200+TAIL_TYPE.TRAILERON_A_R2] = "tt_taileron2.png|Taileron A + Dual Rud"
List_Text[200+TAIL_TYPE.TRAILERON_B_R2] = "Taileron B + 2x Rud"; List_Text_Img[200+TAIL_TYPE.TRAILERON_B_R2] = "tt_taileron2.png|Taileron B + Dual Rud"
-- Servo Reverse
if (LCD_W > 128) then
List_Text[300+CH_MODE_TYPE.NORMAL] = "Normal "
List_Text[300+CH_MODE_TYPE.REVERSE] = "Reverse"
else
List_Text[300+CH_MODE_TYPE.NORMAL] = "Nor"
List_Text[300+CH_MODE_TYPE.REVERSE] = "Rev"
end
end
-- Initial Setup
local function ST_Init()
-- Initialize text (use RX_ID 0)
ST_Init_Text(0)
-- Setup default Data, and load a file if exist
--modelLib.ST_Default_Data()
if (modelLib.ST_LoadFileData()==0) then -- Did not load a file
modelLib.ST_Default_Data()
modelLib.ST_SaveFileData() -- Save Defaults
end
menuDataChanged = false
currAircraftType = MENU_DATA[MEMU_VAR.AIRCRAFT_TYPE]
currWingType = MENU_DATA[MEMU_VAR.WING_TYPE]
currTailType = MENU_DATA[MEMU_VAR.TAIL_TYPE]
local ctx = menuLib.DSM_Context
ctx.Phase = PHASE.RX_VERSION
end
local function ST_Done()
local ctx = menuLib.DSM_Context
ctx.Phase = PHASE.EXIT_DONE
end
return { init=ST_Init, run=ST_SendReceive, done=ST_Done }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
-- OVERRIDES Messges for MIN 128x64 screns
-- FORMAT <LineType>|<Msg#>|<Text>
-- Line Type: Text for Menus (T), List_Text Options (LT), List_Text_Image (LI), Flight Mode (FM), RX Name (RX)
-- IMPORTANT: NO EMPTY LINES
--
T |0x0097|DONT USE: Factory Reset
T |0x0098|DONT USE: Factory Reset
T |0x00A5|DONT USE: First Time Setup
T |0x0190|DONT USE: Relearn Servo Settings
T |0x020D|DONT USE: First Time SAFE Setup

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

View File

@ -0,0 +1,437 @@
-- FORMAT <LineType>|<Msg#>|<Text>
-- Line Type: Text for Menus (T), List_Text Options (LT), List_Text_Image (LI), Flight Mode (FM), RX Name (RX)
-- NO EMPTY LINES
-- Formmatting at end of line: /c=Center, /r=Right, /b=Bold, /m=menu
LT|0x0001|Off
LT|0x0002|On
-- Ihn/Act List Options
LT|0x0003|Inh
LT|0x0004|Act
--
-- Channel selection for SAFE MODE and GAINS on FC6250HX
LT|0x000C|Inh
LT|0x000D|Ch5
LT|0x000E|Ch6
LT|0x000F|Ch7
LT|0x0010|Ch8
LT|0x0011|Ch9
LT|0x0012|Ch10
LT|0x0013|Ch11
LT|0x0014|Ch12
--
-- Servo Output values
LT|0x002D|5.5ms
LT|0x002E|11ms
LT|0x002F|22ms
--
-- Gain Multiplier Values
LT|0x0032|1 X
LT|0x0033|2 X
LT|0x0034|4 X
--
LT|0x0035|Inh
LT|0x0036|Thr
LT|0x0037|Ail
LT|0x0038|Ele
LT|0x0039|Rud
LT|0x003A|Ch5
LT|0x003B|Ch6
LT|0x003C|Ch7
LT|0x003D|Ch8
LT|0x003E|Ch9
LT|0x003F|Ch10
LT|0x0040|Ch11
LT|0x0041|Ch12
LT|0x0042|Ch13
LT|0x0043|Ch14
LT|0x0044|Ch15
LT|0x0045|Ch16
LT|0x0046|Ch17
LT|0x0047|Ch18
LT|0x0048|Ch19
LT|0x0049|Ch20
--
T |0x0040|Roll
T |0x0041|Pitch
T |0x0042|Yaw
T |0x0043|Gain/c/b
T |0x0045|Differential
T |0x0046|Priority
T |0x0049|Output Setup
T |0x004A|Failsafe
T |0x004B|Main Menu
T |0x004E|Position
--
T |0x0050|Outputs
T |0x0051|Output Channel 1
T |0x0052|Output Channel 2
T |0x0053|Output Channel 3
T |0x0054|Output Channel 4
T |0x0055|Output Channel 5
T |0x0056|Output Channel 6
T |0x0057|Output Channel 7
T |0x0058|Output Channel 8
T |0x0059|Output Channel 9
T |0x005A|Output Channel 10
--
-- FailSafe Options
--LT|0x005E|Inh
LT|0x005F|Hold Last
LT|0x0060|Preset
--LT|0x0061|Custom
--
T |0x0071|Proportional
T |0x0072|Integral
T |0x0073|Derivate
T |0x0078|FM Channel
T |0x007F|Attitude Gain
--
T |0x0080|Orientation
T |0x0082|Heading
T |0x0085|Frame Rate
T |0x0086|System Setup
T |0x0087|F-Mode Setup
T |0x0088|Enabled F-Modes
T |0x0089|Gain Channel
T |0x008A|Gain Sensitivity/r -- Right Align
T |0x008B|Panic
T |0x008E|Panic Delay
--
LT|0x0187|No Freq --???? unset Freq
LT|0x0088|70hz
LT|0x0089|90hz
LT|0x008A|200hz
LT|0x008B|333hz
LT|0x008C|490hz
LT|0x008D|560hz
LT|0x008E|Normal
LT|0x008F|Reversed
-- FC6250HX: Callibration
T |0x0090|Apply
T |0x0091|Begin
T |0x0092|Start
T |0x0093|Complete
T |0x0094|Done
--
-- FC6250HX: Swashplate Type
--
LT|0x0090|Normal
LI|0x0090|h_swp_norm.png|Normal
LT|0x0091|3 Servos 120 Y
LI|0x0091|h_swp_3_120.png|3 Servos 120 Y
LT|0x0092|3 Servos 120 Y-Inv
LI|0x0092|h_swp_3_120inv.png|3 Servos 120 Y-Inv
LT|0x0093|3 Servos 135 Y
LI|0x0093|h_swp_3_135.png|3 Servos 135 Y
LT|0x0094|3 Servos 135 Y-Inv
LI|0x0094|h_swp_3_135inv.png|3 Servos 135 Y-Inv
LT|0x0095|3 Servos 140 Y
LI|0x0095|h_swp_3_140.png|3 Servos 140 Y
LT|0x0096|3 Servos 140 Y-Inv
LI|0x0096|h_swp_3_140inv.png|3 Servos 140 Y-Inv
LT|0x0097|3 Servos 90 T
LI|0x0097|h_swp_3_90.png|3 Servos 90 T
LT|0x0098|3 Servos 90 T-Inv
LI|0x0098|h_swp_3_90inv.png|3 Servos 90 T-Inv
--
T |0x0097|Factory Reset
T |0x0098|Factory Reset
T |0x0099|Advanced Setup
T |0x009A|Capture Failsafe Positions
T |0x009C|Custom Failsafe
--
T |0x009F|Save Settings -- Save & Reboot RX
--
T |0x00A5|First Time Setup
T |0x00AA|Capture Gyro Gains
T |0x00AD|Gain Channel Select
T |0x00AF|Dynamic
LT|0x00B0|Self-Level
LT|0x00B1|Envelope
--
-- Flight Modes List Options
LT|0x00B5|Inh
LT|0x00B6|FM1
LT|0x00B7|FM2
LT|0x00B8|FM3
LT|0x00B9|FM4
LT|0x00BA|FM5
LT|0x00BB|FM6
LT|0x00BC|FM7
LT|0x00BD|FM8
LT|0x00BE|FM9
LT|0x00BF|FM10
--
T |0x00BE|Unknown_BE -- Used in Reset menu (0x0001) while the RX is rebooting
--
T |0x00C7|Calibrate Sensor
T |0x00C8|Sensor is Calibrating.. Wait
T |0x00CA|SAFE & Panic Mode Setup
--
T |0x00CD|Level model & capt attitude/m -- SPECIAL MENU to itself who is not a comment
T |0x00CE|Error TX Conf
T |0x00CF|Invalid TX Ch Conf 1
T |0x00D0|Invalid TX Ch Conf 2
--
-- RX Orientations for AR631/AR637, Optionally attach an Image + Alt Text to display
LT|0x00CB|Pos 1
LI|0x00CB|rx_pos_1.png|Pilot View: RX Label Up, Pins Back
LT|0x00CC|Pos 2
LI|0x00CC|rx_pos_2.png|Pilot View: RX Label Left, Pins Back
LT|0x00CD|Pos 3
LI|0x00CD|rx_pos_3.png|Pilot View: RX Label Down, Pins Back
LT|0x00CE|Pos 4
LI|0x00CE|rx_pos_4.png|Pilot View: RX Label Right, Pins Back
LT|0x00CF|Pos 5
LI|0x00CF|rx_pos_5.png|Pilot View: RX Label UP, Pins to Front
LT|0x00D0|Pos 6
LI|0x00D0|rx_pos_6.png|Pilot View: RX Label Left, Pins Front
LT|0x00D1|Pos 7
LI|0x00D1|rx_pos_7.png|Pilot View: RX Label Down, Pins Front
LT|0x00D2|Pos 8
LI|0x00D2|rx_pos_8.png|Pilot View: RX Label Right, Pins Front
LT|0x00D3|Pos 9
LI|0x00D3|rx_pos_9.png|Pilot View: RX Label Up, Pins Left
LT|0x00D4|Pos 10
LI|0x00D4|rx_pos_10.png|Pilot View: RX Label Back, Pins Left
LT|0x00D5|Pos 11
LI|0x00D5|rx_pos_11.png|Pilot View: RX Label Down, Pins Left
LT|0x00D6|Pos 12
LI|0x00D6|rx_pos_12.png|Pilot View: RX Label Front, Pins Left
LT|0x00D7|Pos 13
LI|0x00D7|rx_pos_13.png|Pilot View: RX Label Up, Pins Right
LT|0x00D8|Pos 14
LI|0x00D8|rx_pos_14.png|Pilot View: RX Label Back, Pins Right
LT|0x00D9|Pos 15
LI|0x00D9|rx_pos_15.png|Pilot View: RX Label Down, Pins Right
LT|0x00DA|Pos 16
LI|0x00DA|rx_pos_16.png|Pilot View: RX Label Front, Pins Right
LT|0x00DB|Pos 17
LI|0x00DB|rx_pos_17.png|Pilot View: RX Label Back, Pins Down
LT|0x00DC|Pos 18
LI|0x00DC|rx_pos_18.png|Pilot View: RX Label Left, Pins Down
LT|0x00DD|Pos 19
LI|0x00DD|rx_pos_19.png|Pilot View: RX Label Front, Pins Down
LT|0x00DE|Pos 20
LI|0x00DE|rx_pos_20.png|Pilot View: RX Label Right, Pins Down
LT|0x00DF|Pos 21
LI|0x00DF|rx_pos_21.png|Pilot View: RX Label Back, Pins Up
LT|0x00E0|Pos 22
LI|0x00E0|rx_pos_22.png|Pilot View: RX Label Left, Pins Up
LT|0x00E1|Pos 23
LI|0x00E1|rx_pos_23.png|Pilot View: RX Label Front, Pins Up
LT|0x00E2|Pos 24
LI|0x00E2|rx_pos_24.png|Pilot View: RX Label Right, Pins Up
LT|0x00E3|Pos Invalid
LI|0x00E3|rx_pos_25.png|Cannot detect orientation of RX
--
-- RX Orientations images for FC5250 (HACK add 0x100 internally to differenciate for helis)
LI|0x01CB|h_rx_pos_1.png|Pilot View: RX Label Up, Pins Front
LI|0x01CC|h_rx_pos_2.png|Pilot View: RX Label Left, Pins Front
LI|0x01CD|h_rx_pos_3.png|Pilot View: RX Label Down, Pins Front
LI|0x01CE|h_rx_pos_4.png|Pilot View: RX Label Right, Pins Front
LI|0x01CF|h_rx_pos_5.png|Pilot View: RX Label UP, Pins to Back
LI|0x01D0|h_rx_pos_6.png|Pilot View: RX Label Left, Pins Back
LI|0x01D1|h_rx_pos_7.png|Pilot View: RX Label Down, Pins Back
LI|0x01D2|h_rx_pos_8.png|Pilot View: RX Label Right, Pins Back
--
T |0x00D1|Receiver will Reboot/b
T |0x00D2|Panic Channel
T |0x00D3|Swashplate
T |0x00D5|Agility
T |0x00D8|Stop
T |0x00DA|SAFE/c/b -- Center + Bold
T |0x00DB|Stability
T |0x00DC|@ per sec
T |0x00DD|Tail rotor
T |0x00DE|Setup
T |0x00DF|AFR
T |0x00E0|Collective
T |0x00E1|Subtrim
T |0x00E2|Phasing
T |0x00E3|Pre-Comp
T |0x00E4|E-Ring
T |0x00E5|Swash Type
T |0x00E6|Travel
T |0x00E7|Left
T |0x00E8|Right
T |0x00EA|Low Throttle
--
T |0x00F2|Governor
T |0x00F4|Soft Start
--
LT|0x00F2|Fixed
LT|0x00F3|Adjustable
LT|0x00F4|Inh
LT|0x00F5|Nitro
--
T |0x00F6|Direction
T |0x00F8|Settings -- ?? validate on a Spektrum radio
T |0x00F9|Gyro settings
T |0x00FE|Stick Priority/c/b
--
T |0x0100|Make sure the model has been
T |0x0101|configured, including wing type,
T |0x0102|reversing, travel, trimmed, etc.
T |0x0103|before continuing setup.
T |0x0104|
T |0x0105| -- Blank
--
T |0x0106|Any wing type, channel assignment,
T |0x0107|subtrim, or servo reversing changes
T |0x0108|require running through initial
T |0x0109|setup again.
T |0x010A|
T |0x010B|
--
T |0x0190|Relearn Servo Settings
T |0x019C|Enter Receiver Bind Mode
T |0x01AA|Offset
T |0x01D7|SAFE Select Channel
T |0x01DC|AS3X/c/b -- Center + Bold
T |0x01DD|AS3X Settings
T |0x01DE|AS3X Gains
T |0x01E0|Rate Gains/c/b
T |0x01E2|SAFE Settings
T |0x01E3|SAFE Gains
T |0x01E6|Attitude Trim/c/b
T |0x01E7|Envelope
T |0x01E9|Roll Right
T |0x01EA|Roll Left
T |0x01EB|Pitch Down
T |0x01EC|Pitch Up
T |0x01EE|Thr to Pitch
T |0x01EF|Low Thr to Pitch/c/b
T |0x01F0|High Thr to Pitch/c/b
T |0x01F1|Filter
T |0x01F3|Threshold
T |0x01F4|Angle
T |0x01F6|Failsafe Angles/c/b
T |0x01F8|Safe Mode
T |0x01F9|SAFE Select
T |0x01FC|Panic F-Mode
T |0x01FD|FailSafe Flight Mode -- Safe Flight Mode
T |0x0201|Throttle
T |0x0204|Hover
T |0x0208|Decay
T |0x0209|Save to Backup
T |0x020A|Restore from Backup
T |0x020D|First Time SAFE Setup
--
-- First time safe setup Page 3 :
T |0x020E|AS3X gains must be tuned
T |0x020F|and active in SAFE Flight Modes
T |0x0210|to help reduce wobble.
T |0x0211|
T |0x0212|
T |0x0213| -- Blank
--
-- AS3X orientation Setting menu (Level)
T |0x021A|Set the model level,
T |0x021B|and press Continue.
T |0x021C|
T |0x021D| -- Blank
--
-- AS3X orientation Setting menu (Nose down)
T |0x021F|Set the model on its nose,
T |0x0220|and press Continue. If the
T |0x0221|orientation on the next
T |0x0222|screen is wrong go back
T |0x0223|and try again.
T |0x0224|Continue
--
T |0x0226|Angle Limits/c/b
T |0x0227|Other settings
T |0x0229|Set Orientation Manually
--
-- Factory Default Warning
T |0x022B|WARNING!
T |0x022C|This will reset the
T |0x022D|configuration to factory
T |0x022E|defaults. This does not
T |0x022F|affect the backup config.
T |0x0230| -- Blank
--
-- Backup Warning
T |0x0231|This will overwrite the
T |0x0232|backup memory with your
T |0x0233|current configuartion.
T |0x0234|
T |0x0235| -- Blank
--
-- Restore from Backup Warning
T |0x0236|This will overwrite the
T |0x0237|current config with
T |0x0238|that which is in
T |0x0239|the backup memory.
T |0x023A| -- Blank
--
-- Utilities Copy flight modes
T |0x023D|Copy F-Mode Settings
T |0x023E|Source F-Mode
T |0x023F|Target F-Mode
--
T |0x0240|Utilities
--
-- Gain Capture Page
T |0x024C|Gains will be captured on
T |0x024D|Captured gains will be
T |0x024E|Gains on
T |0x024F|were captured and changed
T |0x0250|from Adjustable to Fixed
--
-- Utilities, Copy flight mode (Copy Confirmation, oveerriding FM)
T |0x0251|Are you sure you want to ovewrite the "Target"
T |0x0252|with the "Source" ?
T |0x0253| -- Blank
--
T |0x0254|Pos = Up, Neg = Down
--
-- First time safe setup Page 1 (maybe ask to select Flight Mode cannel)
T |0x0255|Before setting up SAFE
T |0x0256|a Flight Mode channel
T |0x0257|most be configured.
--
-- First time safe setup Page 2 (something related for flight mode)
T |0x025A|Select the desired flight mode
T |0x025B|switch position to adjust settings
T |0x025C|for each flight mode
T |0x025D|
T |0x025E| -- Blank
--
-- Utilities, Copy flight mode (Confirm)
T |0x0259|YES
T |0x0260|WARNING: "Target"
T |0x0261|F-Mode will be overwritten
T |0x0262|by "Source"
--
T |0x0263|Fixed/Adjustable Gains/c/b
T |0x0266|Heading Gain/c/b
T |0x0267|Pos = Nose Up/Roll Right
T |0x0268|Neg = Nose Down/Roll Left
T |0x0269|SAFE - Thr to Pitch
T |0x026A|Use CAUTION for Yaw gain!/b
--
T |0x026B|Head Speed
T |0x026C|Pinion
T |0x026D|Main Gear
T |0x026F|RPM Sensor
T |0x0272|Show Advanced Menus
--
T |0x0300|No compatible DSM RX...
T |0x0301|Waiting for RX to Restart
--
FM|0x8000|Flight Mode/c/b
--
RX|0x0001|AR636
RX|0x0014|SPM4651T
RX|0x0015|AR637T
RX|0x0016|AR637TA
RX|0x0018|FC6250HX
RX|0x0019|AR630
RX|0x001A|AR8360T
RX|0x001B|AR8020T
RX|0x001C|AR10360T
RX|0x001E|AR631

View File

@ -0,0 +1,22 @@
# Credits
Code is based on the code/work by: Pascal Langer (Author of the Multi-Module)
Rewrite/Enhancements by: Francisco Arzu
Thanks to all the people volunteered to test it.
Release Notes for
## COLOR Radios
Read more [Color radios](./readme_color.md)
![main-menu](https://user-images.githubusercontent.com/32604366/230751340-dd118f36-1884-405b-b12b-81cba16c7321.png)
![flight-mode-setup](https://user-images.githubusercontent.com/32604366/230751281-0c71ff4a-179f-41fd-9290-302a6e0fe821.png)
## Black & White Radios (Small Screens)
Read more [black & whire radios](./readme_bw.md)
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/be03ad40-3e2f-45e1-8f50-d231c3931169)
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/5010a361-1234-4c83-97b2-2eb6ae0d1061)
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/0d4e04dc-90d7-4322-9ad1-f57cbde49029)
![IMG_3024](https://user-images.githubusercontent.com/32604366/230123260-614f4e5e-9546-4439-9196-db885894083f.jpg)

View File

@ -0,0 +1,181 @@
# Credits
Code is based on the code/work by: Pascal Langer (Author of the Multi-Module)
Rewrite/Enhancements by: Francisco Arzu
Thanks to all the people volunteered to test it.
# Introduction (v0.56 Black & White Small Radios)
!!!!!NEW!!!!!!: Finally was able to create the Plane Setup for Smaller Radios
There is still significant memory limitations in some of this radios, so the Setup and FP was split in two files.
The file 'DSM FwdPrg_56_STUP.lua' is the new one to create the planes setup that works together with 'DSM FwdPrg_56_MIN.lua'
# How to Use it
Step #1: Make sure that the /MODELS/DSMDATA folder exist.
Step #2: Run the "DSM FwdPrg_56_STUP" first to setup the plane wing, tail and channels to use for each surface. At the end it will ask you to "save" the configuration. That saves a file in the /MODELS/DSMDATA folder.
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/be03ad40-3e2f-45e1-8f50-d231c3931169)
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/5010a361-1234-4c83-97b2-2eb6ae0d1061)
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/0d4e04dc-90d7-4322-9ad1-f57cbde49029)
Why the RX needs to know the Plane Setup?? The AS3X/Gyro and SAFE needs to know what surfaces to move to do the proper correction in flight. It needs to know what channels are you using for ailerons, elevarors and rudders (could be 1 or 2 of each). Also if you have special Wing like a delta wing, the elevator and aileron functions are on the same channels.. same with V-Trails, Ruder/Elevator are combined. All this information is shared with the RX during "First Time Setup" as well as "Relearn Servo Setting". Older version of 0.55 MIN hardcoded this info to be a plain 4-ch regular plane, thats why we discourage to use those function.
Step #3: Run the "DSM FwdPrg_56_MIN". It uses the model configuration created in step #2 to properly tell the receiver the plane configuration for initial setup. If you get "Cannot load model config", that means that the file was not created on step #2. Once it shows the intial forward programming page for your receiver, usuall "Gyro Settings and Other Settings". You can properly setup the a plane from initial setup... if you are not familiar with this step, view some of the videos. There are already multiple videos showing how to do it EdgeTX color version, or the Spektrum official videos, the menus are the same.
## Dealing with Low memory
On my FrSky QX7 (Probably the one with the lower memory compared to Radiomaster Boxter and maybe Zorro), it will give you "not enouth memory"
the very first time you try to run it since is compiling + running. Try to run them at least 2 times again, this times wll just run (not compile).
In some ocations that keeps giving memory problems, i have to restart the radio, and try to run it right after restart.
After it runs fine, and you try to run it the 2nd time and gives "not enouth memory", you have restart the radio.. for me this is random..
sometimes i can run it many times consecutively.. but once it gives memory error, have to restart to be able to run again.
Once it starts, it should work find after... is the statup who loads what it needs to memory.
I am running EdgeTX 2.9.2 (there was some memory cleanup in 2.9.0, and 2.9.1 to get a bit more memory)
I left version 0.55 in the files, since it uses less memory, it can change the mayority of FP parameters, but cannot setup plane or Relearn Servo Settings
(don't execute the menus who say 'DON'T USE!!').. v0.55 and v0.56 MINs can co-exist.
Video of how to deal with memory:
https://www.youtube.com/watch?v=kG3RfVa_brU
# Deployment
Uncompress the Zip file (ZIP version) into your local computer.
In another window, open your TX SDCard and go to `/SCRIPTS/TOOLS`.
When upgrading from a previous version of this tool, delete your `/SCRIPTS/TOOLS/DSMLIB` before copying the new one (if you customized the menu messages, inside `DSMLIB` do a backup of the message files first)
1. The zip file has the same structure as your SDCard. If you want to copy all the content of the zip file into your SDCard, it will create all the directories and files in the right place.
For the MINimalistic version, Your TX SDCard should looks like this:
/SCRIPTS/TOOLS
DSM FwdPrg_56_MIN.lua -- Minimalistic version for radios with LOW memory (Can setup planes)
DSM FwdPrg_56_STUP.lua -- `NEW!` Setup plane for minimalistic version (LOW Memory radios)
DSM FwdPrg_55_MIN.lua -- Uses less memory than v56, but cannot do initial setup of the plane
/SCRIPTS/TOOLS/DSMLIB/ -- (ALL CAPITALS) Libraries ane extra files
DsmFwPrgMIN_P1.lua -- Part1 of extra files for Min
DsmFwPrgMIN_P2.lua -- Part2 of extra files for Min
msg_fwdp_en.txt -- Menu messages in English (common for all radios)
MIN_msg_fwdp_en.txt -- Menu messages in English (overrides for 128x164 resolution)
### Other Directories/Files
/LOGS/dsm_log.txt --Readable log of the last RX/TX session, usefull for debugging problems
# NOTE for FC6250HX FC+RX version
For the full size FC6250HX, Only use V0.55 or newer.
DO NOT use previous versions to do the Setup -> Gyro Settings -> Orientation. The problem was that it did not have the orientation messages.. and you are were choosing blind. The calibration will never stop until you place the RX in the right orientation, even after restarting the RX (if flashing red, is not in the right orientation.. if flashshing white is in the right orientation). If you run into this problem, and lights are blinking red, rotate the FC on the longer axis until you get white blinking.. keep it stable, will blink white faster andlet calibration finishes.. after that is back to normal.
OpenTX: When you enter "forward programming" you will hear "Telemetry lost" and "Telemetry recovered".. The FC led will blink white, but when exit FP, will blink red...is not problem.. but will need to be power cycled to get blinking green again.. i think is something related to temporarilly loosing the connection with the radio..researching the OpenTX code since it only happens with this helis FC.
# Common Questions
1. `RX not accepting channels higher than Ch6 for Flight-mode o Gains:`
- All Spektrum RX are 20 channels internally, even if it only has 6 external Ch/Ports to connect servos.
- Make sure that when you bind your RX, you select the proper range of channels to use.. By default, ch1-ch8.
- You have to mapped a Switch/Slider to the channel, togling/moving will select the channel on the menu field.
- The RX validates the channels, and it does not detect signal on a channel, it will not allow to select it..that is why is important to move the switch/slider, so that the RX knows that is a valid channel.
# Changes and fixes
v0.56:
1. Fix Tail-Type "Taileron" functionality that was not working. Also validated V-Tail and Delta wings.
2. Added Taileron and two Rudder config (Many Freewing Jets like F18,F16, etc)
3. Gyro-Reverse Screen now shows what is the channel/port used for (Ail, Ele, Rud, etc)
4. COLOR ONLY: Gyro-Reverse Screen now shows what information that shared with the RX about each channel (Role, Slave, Reverse).
5. NEW!! Initial version of Plane Setup for B&W radios
V0.55:
1. Finally found where the TX reports to the RX how many channels is transmiting. The TX now reports itself as a 12ch radio instead of 6h. (DSM Multi-Module limit). This fixes a few things:
a. Many places where you have to select channels > CH6 for Flight-Mode, Gains, Panic now works properly with the scroller. The radio is still validating that you are not selecting an invalid channel. For example, if you have an additional AIL on CH6, it will not allow you to use CH6 for FM or Gains.. it just move to the next valid one.
b. When setting up AIL/ELE on channels greater than CH6, on previous versions SAFE/AS3X was not moving them.. now they work up correctly. Set them up in the first in CH1-CH10. Why CH10?? Thats what fits on the reverse screen, otherwise, have to add more screens.
c. Some individual Gain channels was not allowing to setup on CH greater than CH6. Now is fixed.
2. User Interface:
a. `RTN` Key now works as `Back` when the screen has a `Back`. Makes it easy for navigation.. Presing `RTN` on the main screen exists the tool.
b. Much faster refresh of the menus. Optimize the process of send/recive menu data from the RX.
3. Support for FC6250HX (the one with separate RX).. Setup Swashplate type, RX orientation works properly.. This are menu options that the smaller version that comes in the
Blade 230S did not have.
V0.54 Beta:
- First version for the small screens, and limited memory. Only can change existing values, it cannot setup a brand new plane or new RX from Zero
- Fix problem on editing the SAFE Mode Attitude Trim
- First version with externalize merges, so that it can be translated to other languages
# Tested Radios and RXs
- Radio: FrSky QX7: Due to limited memory, could be that the first time is does not start (not enouth memory to compile+run), but try again after a fresh TX restart.
- AR631/AR637xx
- FC6250HX (Blade 230S V2 Helicopter)
- FC6250HX (Separate RX.. use only V55 or newer of this tool)
- AR636 (Blade 230S V1 Heli firmware 4.40)
Please report if you have tested it with other receivers to allow us to update the documentation. Code should work up to 10 channels for the main surfaces (Ail/Ele/etc). All Spektrum RX are internally 20 channels, so you can use Ch7 for Flight Mode even if your RX is only 6 channels (See common Questions)
# Messages Displayed in the GUI
If in a screen you get text that looks like `Unknown_XX` (ex: Unknown_D3), that message has not been setup in the script in english. If you can determine what the proper message is, you can send us a message to be added to the library.
The `XX` represents a Hex Number (0..9,A..F) message ID.
If you want to fix it in your local copy, all messages are in the file `SCRIPT\TOOS\DSMLIB\msg_fwdp_en.txt`. (english version)
Example::
T |0x0080|Orientation
T |0x0082|Heading
T |0x0085|Frame Rate
T |0x0086|System Setup
T |0x0087|F-Mode Setup
T |0x0088|Enabled F-Modes
T |0x0089|Gain Channel
T |0x008A|Gain Sensitivity/r -- Right Align
T |0x008B|Panic
T |0x008E|Panic Delay
For example, if you get `Unknown_9D` in the GUI and your now that it should say **NEW Text**, you can edit the lua script to look like this:
T |0x009D|NEW Text -- NEW Text added for AR98xx
# Local Language Support
Some settings that can change (top of Lua file):
`local LANGUAGE = "en"`
If you want to translate the menu messages to another language (like french), copy the file `msg_fwdp_en.txt` into `msg_fwdp_fr.txt`, translate it, and change the language in the lua file to `"fr"`.
# LOG File
The log file of the last use of the script is located at `/LOGS/dsm_log.txt`. **It is overridden on every start to avoid filling up the SD card**. So if you want to keep it, copy or rename it before starting the script again. (it can be renamed in the TX by browsing the SD card)
The log is human readable, and can help use debug problems remotrly
# Validation of data by the RX
When you change a value in the GUI, the RX validates that the value is valid. This applies to channels as well as values.
---
# Version 0.54
First version for Small Radios
### Known Problems:
- Currently cannot setup a plane from scratch.. (Working on it).
- The first time you run it, it will give you "not enouth memory", but should work the 2nd time after the first compilation (creation of .luac). After that, it should start right away.
# Version 0.2
Original Version from Pascal Langer

View File

@ -0,0 +1,284 @@
# Credits
Code is based on the code/work by: Pascal Langer (Author of the Multi-Module)
Rewrite/Enhancements by: Francisco Arzu
Thanks to all the people volunteered to test it.
# Introduction (v0.56)
NOTE: Unless you use special tail types, probably not worth the upgrade. The changes are mostly cosmetic on the Gyro Reverse page to show extra information.
In 0.56, focused on validating and fixing the Wing and Tail type special mixing. Vtail/Delta was working but Taileron was not. The Gyro Reverse screen now show what type of servo information is sharing with the TX. This affects the Gyro AS3X and SAFE behaviour, you still needs to set your TX with the proper mixes to do V-Tail/Taileron/etc.
- The first is the "Role" of the port (`Ail/Ele/Rud/Thr`). Combination is posible for for special types of wing/tails: Vtail:`EleRud`, Delta & Taileron: `AilEle`.
- The `-` (Minus) is Reverse.
- Information is if it the Master or Slave (Master is implicit)
- The type of mix applied: for V-Tail, the left/right Elevators (`EleRud`) uses `M_Rud` (Mix Rudder), For Delta, the left/right Ailerons (`AilEle`) uses `M_Ele` (Mix Elevator), and finally the Tailerons, the the left/right Elevators (`AilEle`) uses `M_Ail` (Mix Aileron). Looks like the Mixes are for the entire RX and only needs to be set in one of the ports, The difference between the "A" and "B" configuration is just if the mix is set on the Master or Slave port (like Taileron_A or Taileron_B) and affects the direction.. sometimes you have to try both. Start by setting the right direction for the primary roll, and then use the A/B configurations. For exmaple, in Taileron, the primary roll is Elevators, the secondary roll is Aileron (Mix Aileron). Below is a Taileron example: Two independent Elevators and 2 independent ailerons.
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/4bbeb234-c92c-4663-b464-549df1c134a0)
![image](https://github.com/frankiearzu/DSMTools/assets/32604366/f8fa62b4-9843-4d81-9c67-7c8bfcf252f2)
With spektrum constantly updating its firmware, you only need to update the message file if you see in the screen any message "Unknown_xyz".
This script library enhances the original DSM Forward Programming tool. DSM Forward Programming is needed to setup many of the new Spektrum Receivers with Gyro AS3X/SAFE features. For the Gyro (/Safe) to correct the plane in flight, it needs to move the right surfaces therefore the RX needs to know the configuration of the plane (Wing Type, Tail Type, Mixers, Servo Assignments, Servo Reverse). That info tells the RX where the aileron(s) are (one or two), where the elevator(s) are (one or two), V-Tail, Delta Wing, etc.
Since EdgeTx/OpenTx doesnt have an equivalent setup that is stored in the radio, we have to create our own version. This info is stored inside the `/MODELS/DSMDATA` directory/folder (which needs to be created by manually).
During `"Gyro Settings->initial setup"`, the RX asks the TX for model information behind the scenes. After setup, `"Gyro Settings->System Tools-> Relearn Servo Settings"` requests the TX servo configuration and stores it in the RX.
# Deployment
When upgrading from a previous version of this tool, delete your /SCRIPTS/TOOLS/DSMLIB before copying the new one (if you customized your images, inside "DSMLIB/img" do a backup first). Also you can delete the previous DSM_FwdProg*.* from /SCRIPTS/TOOLS.
Uncompress the Zip file (ZIP version) into your local computer.
In another window, open your TX SDCard.
1. The zip file has the same structure as your SDCard. If you want to copy all the content of the zip file into your SDCard top level folder, it will create all the directories and files in the right place.
2. Make sure to check that `/MODELS/DSMDATA` is there. The script will complain at startup if it does not exist. Here the script saves the Spektrun settings for each of your models.
Your TX SDCard should looks like this:
/SCRIPTS/TOOLS/ -- you only need one of the 3 to save some space in your TOOLS screen
DSM FwdPrg_56_Color.lua -- Color and touch radios
/SCRIPTS/TOOLS/DSMLIB/ -- (ALL CAPITALS) Libraries ane extra files
DsmFwPrgLib.lua -- DSM Protocol Message and Menu engine
DsmFwPrgSIMLib.lua -- Simulation of AR631, FC6250HX (For GUI development)
SetupLib.lua -- Model Setup Screens
msg_fwdp_en.txt -- `NEW!` Messages for forward programing externalized. To support other langs (english)
... a few other files
/SCRIPTS/TOOLS/DSMLIB/img -- Images for RX orientations
Other Directories
/MODELS/DSMDATA --(ALL CAPITALS) Data of model config (Wing Type, Servo Assignments)
/LOGS/dsm_log.txt --Readable log of the last RX/TX session, usefull for debugging problems
# NOTE for FC6250HX FC+RX version
For the full size FC6250HX, Only use V0.55 or newer.
DO NOT use previous versions to do the Setup -> Gyro Settings -> Orientation. The problem was that it did not have the orientation messages.. and you are were choosing blind. The calibration will never stop until you place the RX in the right orientation, even after restarting the RX (if flashing red, is not in the right orientation.. if flashshing white is in the right orientation). If you run into this problem, and lights are blinking red, rotate the FC on the longer axis until you get white blinking.. keep it stable, will blink white faster andlet calibration finishes.. after that is back to normal.
OpenTX: When you enter "forward programming" you will hear "Telemetry lost" and "Telemetry recovered".. The FC led will blink white, but when exit FP, will blink red...is not problem.. but will need to be power cycled to get blinking green again.. i think is something related to temporarilly loosing the connection with the radio..researching the OpenTX code since it only happens with this helis FC.
# Common Questions
1. `RX not accepting channels higher than Ch6 for Flight-mode o Gains:`
- V0.55 and newer: Problem solved.. Should allow you to select up to 12ch with the switch technique or with the scroller.
- V0.53/0.54: The RX is listening to channel changes for this options. Configure the Switch to the channel, togling once the switch will select the channel on the menu field.
2. `Only able to switch to Fligh-mode 2 and 3, but not 1:`
Check that the module "Enable max throw" is OFF in you Multi-Module settings (where you do BIND), otherwise the TX signals will be out of range.
The multi-module is already adjusting the TX/FrSky servo range internally to match Spektrum.
3. `Why Ch1 says Ch1 (TX:Ch3/Thr)?`:
Radios with Multi-Module are usually configured to work the standard AETR convention. Spektrum uses TAER. The multi-module does the conversion when transmitting the signals. So `Spektrum Ch1 (Throttle)` really comes from the `TX Ch3`. We show both information (+name from the TX output). If your multi-module/radio is setup as TAER, the script will not do the re-arrangement.
4. `If i change the model name, the original model settings are lost.` This is correct, the model name is used to generate the file name (inside /MODEL/DSMDATA) who stores the model configuration. Currently EdgeTx and OpenTX has differt features where i could get either the Model Name or the YAML file where the EdgeTX model configuration is stored.. to keep the code compatible, the model name is used.
5. `Reversing a channel in my TX do not reverse the AS3X/SAFE reaction.` Correct, the chanel stick direction and the Gyro direction are two separate things.
5.1: First, you have setup your model so that the sticks and switches moves the surfaces in the right direction.
5.2: Go to the script, `Model Setup` and setup your wing type, tail type, and select the channel assigment for each surface. Leave the servo settings the same as the values in the TX to start.
5.3: Go to `Forward programming->Gyro Setting->Initial Setup` (New/factory reset), or `Forward programming->Gyro Setting->System Setup->Relearn Servo Settings` (not new). This will load your current Gyro servo settings into the plane's RX. This moves the current servo TX settings to the RX, so it is now in a known state.
5.4: Verify that the AS3X and SAFE reacts in the proper direction. You can use the Flight mode configured as "Safe Mode: Auto-Level" to see if it moves the surfaces in the right direction.
5.5: If a surface don't move in the right direction, go to the `Model Setup->Gyro Channel Reverse` to reverse the Gyro on the channels needed, and do again the `Forward programming->Gyro Setting->System Setup->Relearn Servo Settings` to tranfer the new settings to the RX.
5.6: Specktrum TX always passes the TX servo reverse as the Gyro Reverse, but on many OpenTX/EdgeTX radios, the Rud/Ail are usually reversed by default compared to Specktrum. So far i don't think that i can use this as a rule, that is why the `Gyro Channel Reverse` page exist.
---
---
# Changes and fixes
V0.56:
1. Fix Tail-Type "Taileron" functionality that was not working. Also validated V-Tail and Delta wings.
2. Added Taileron and two Rudder config (Many Freewing Jets like F18,F16, etc)
3. Gyro-Reverse Screen now shows what is the channel/port used for (Ail, Ele, Rud, etc)
4. COLOR ONLY: Gyro-Reverse Screen now shows what information that shared with the RX about each channel (Role, Slave, Reverse).
5. NEW!! Initial version of Plane Setup for B&W radios
V0.55a:
1. Fix loading external messages file for OpenTX.
V0.55:
1. Finally found where the TX reports to the RX how many channels is transmiting. The TX now reports itself as a 12ch radio instead of 6h. (DSM Multi-Module limit). This fixes a few things:
a. Many places where you have to select channels > CH6 for Flight-Mode, Gains, Panic now works properly with the scroller. The radio is still validating that you are not selecting an invalid channel. For example, if you have an additional AIL on CH6, it will not allow you to use CH6 for FM or Gains.. it just move to the next valid one.
b. When setting up AIL/ELE on channels greater than CH6, on previous versions SAFE/AS3X was not moving them.. now they work up correctly. Set them up in the first in CH1-CH10. Why CH10?? Thats what fits on the reverse screen, otherwise, have to add more screens.
c. Some individual Gain channels was not allowing to setup on CH greater than CH6. Now is fixed.
2. User Interface:
a. `RTN` Key now works as `Back` when the screen has a `Back`. Makes it easy for navigation.. Presing `RTN` on the main screen exists the tool.
b. Much faster refresh of the menus. Optimize the process of send/recive menu data from the RX.
3. The TX now comunicates the SubTrim positions to the RX during `Relearn Servo Setting`. This changes the center of movement to one side or another. Really not much difference with small amounts of subtrim, previous versions where asuming subtrim of 0. When you have an extreame subtrim to one side, it was not moving simetrically.
4. Support for FC6250HX (the one with separate RX).. Setup Swashplate type, RX orientation works properly.. This are menu options that the smaller version that comes in the
Blade 230S did not have.
V0.54:
1. Fix a problem in the Attitude Trim page (`Gyro Settings->System Setup->SAFE/Panic Setup->Attitude Trim`). It was not saving the values after exiting the menu. This is to change what SAFE considers "Level" flying.
2. Wings 2-Ail 2-Flaps had a bug on the 2nd flap.
3. New Minimalistic script (`DsmFwdPrg_05_MIN.lua`): For radios with very low memory (FrSky QX7, RM Zorro, others). It can only change existing settings, but does not have the Plane Setup menus to setup a completly new plane. In some radios, the very first time it runs (compile + run), it might give you a `not enouth memory` error.. try to run it again.
4. External menu message file (DSMLIB/msg_fwdp_en.txt and MIN_msg_fwdp_en.txt). Intial work to do localization and different languages.
V0.53:
1. Improved channel selection (Flight mode, Panic Channel, Gains Channel). Now during editing a channel, you can select any channel (>Ch4). Also, of you toggle the switch/channel it will populate the screen.
2. Support for smaller screens (128x64) in B&W. The problem with this older radios is memory. In some, it does not have enouth memory to load the additional DSMLIB libraries.
3. Fix formatting problem with some TX channel names who could affect the screen.. for example, rud channel should show "Ch4/rud", but shows "Ch4ud" because /r is for right justify formatting on messages. Now the formatting is only if it appears at the end of the message.
V0.52:
1. Menus to be able to configure Plane in a similar way as Spektrum Radio (v0.52)
2. Make "Gyro Settings"->"Initial Setup" works (Tested on AR631,AR637xx with PLANE type of aircraft)
3. Properly reset and restart after initial configuration and SAFE changes.
4. Write Log of the conversation between RX/TX. To be used for debugging a problem is reported.
5. Provide a simulation of RX to do GUI development in Companion, and understand patterns of how the data is organized.
# Tested Hardware
- AR631/AR637xx
- FC6250HX (Blade 230S V2 Helicopter; FC+RX in one, mini version)
- FC6250HX (Separate RX.. use only V55 or newer of this tool)
- AR636 (Blade 230S V1 Heli firmware 4.40)
- Radiomaster TX16S (All versions)
Please report if you have tested it with other receivers to allow us to update the documentation. Code should work up to 10 channels for the main surfaces (Ail/Ele/etc). All Spektrum RX are internally 20 channels, so you can use Ch7 for Flight Mode even if your RX is only 6 channels (See common Questions)
# Messages Displayed in the GUI
If in a screen you get text that looks like `Unknown_XX` (ex: Unknown_D3), that message has not been setup in the script in english. If you can determine what the proper message is, you can send us a message to be added to the library.
The `XX` represents a Hex Number (0..9,A..F) message ID.
### Version 0.53 and older:
If you want to fix it in your local copy, all messages are towards the end in the file `SCRIPT\TOOS\DSMLIB\DsmFwPrgLib.lua`. Messages for Headers are stored in `Text` and messages for Options are stored in `List_Text`. Lua scripts are text files, and can be edited with Notepad or equivalent.
Portion of DsmFwPrgLib.lua:
Text[0x0097] = "Factory Reset"
Text[0x0098] = "Factory Reset" -- FC6250HX: Title
Text[0x0099] = "Advanced Setup"
Text[0x009A] = "Capture Failsafe Positions"
Text[0x009C] = "Custom Failsafe"
Text[0x009F] = "Save & Reset RX" -- TODO: Find the Proper Spektrum Value ??
Text[0x00A5] = "First Time Setup"
Text[0x00AA] = "Capture Gyro Gains"
Text[0x00AD] = "Gain Channel Select"
-- Safe mode options, Inhibit + the values
local safeModeOptions = {0x0003,0x00B0,0x00B1} -- inh (gap), "Self-Level/Angle Dem, Envelope
List_Text[0x00B0] = "Self-Level/Angle Dem"
List_Text[0x00B1] = "Envelope"
For example, if you get `Unknown_9D` in the GUI and your now that it should say **NEW Text**, you can edit the lua script to look like this:
Text[0x009A] = "Capture Failsafe Positions"
Text[0x009C] = "Custom Failsafe"
Text[0x009D] = "NEW Text" -- NEW Text added for AR98xx
Text[0x009F] = "Save & Reset RX" -- TODO: Find the proper Spektrum text
### Version 0.54 and newer:
The menu messages are stored in DSMLIB/msg_fwdp_en.txt (For english). Just add the message there. MIN_msg_fwdp_en.txt has shorter messages overrides for screens who are smaller (for minimalistic 128x64 version). The reference to the message file is at the file `/DSMLIB/DsmFwPrgLib.lua` if you want to change to use another language.
T |0x0097|Factory Reset
LT|0x00B0|Self-Level/Angle Dem
LT|0x00B1|Envelope
# LOG File
The log file of the last use of the script is located at `/LOGS/dsm_log.txt`. **It is overridden on every start to avoid filling up the SD card**. So if you want to keep it, copy or rename it before starting the script again. (it can be renamed in the TX by browsing the SD card)
The log is human readable. The first number is the number of seconds since the start, and then what is the current state of the Library, and what has been sent and received. The info in the log can be easily used to create a new simulation for that RX in the future.
Example Log:
5.340 WAIT_CMD: DSM_GotoMenu(0x1010,LastSelectedLine=0)
5.350 MENU_TITLE: SEND DSM_getMenu(MenuId=0x1010 LastSelectedLine=0)
5.440 MENU_TITLE: RESPONSE Menu: M[Id=0x1010 P=0x0 N=0x0 B=0x1000 Text="Gyro settings"[0xF9]]
5.490 MENU_LINES: SEND DSM_getFirstMenuLine(MenuId=0x1010)
5.590 MENU_LINES: RESPONSE MenuLine: L[#0 T=M VId=0x1011 Text="AS3X Settings"[0x1DD] MId=0x1010 ]
5.640 MENU_LINES: SEND DSM_getNextLine(MenuId=0x1010,LastLine=0)
5.740 MENU_LINES: RESPONSE MenuLine: L[#1 T=M VId=0x1019 Text="SAFE Settings"[0x1E2] MId=0x1010 ]
5.790 MENU_LINES: SEND DSM_getNextLine(MenuId=0x1010,LastLine=1)
5.850 MENU_LINES: RESPONSE MenuLine: L[#2 T=M VId=0x1021 Text="F-Mode Setup"[0x87] MId=0x1010 ]
5.910 MENU_LINES: SEND DSM_getNextLine(MenuId=0x1010,LastLine=2)
5.970 MENU_LINES: RESPONSE MenuLine: L[#3 T=M VId=0x1022 Text="System Setup"[0x86] MId=0x1010 ]
6.020 MENU_LINES: SEND DSM_getNextLine(MenuId=0x1010,LastLine=3
# Validation of data by the RX
The RX validates the data. if you change to an invalid channel or do a invalid number range, the RX will change it at the end of editing the field.
---
# Version 0.53
- Improve Channel selection in menus
- Support smaller screens 128x64 in the black/white mode.
# Version 0.52
- Fix Reversing of Servos
- Properly detect Multimodule Ch settings AETR
---
# Version 0.51 (volunteer testing version, not for production)
- New Screens to Configure Model (Wing Type/Tail Tail, etc)
- Finally got understanding that the previous unknown 0x05 lines are to send Model/Servo data to RX.
- Fix use of AR636B (Firmware version 4.40.0 for Blade 230 heli, is the only one with Forward Programming)
- Aircraft types: Tested With Plane type only.. Glider and other in progress
### Known Problems:
- 4-Servo Wing type (Dual Ail/Tail) in planes give conflicting servo assignments by defaults.. Solution choose your own Ch.
- Glider, Heli, Drone: Still in development. In glider, only a few wing type works.. needs to restrict menu options for the only valid one.
# Version 0.5
- Make the code more readable and understandable
- Separate the DSM Forwards Programming logic from the GUI
- Log the communication with the RX on a /LOGS/dsm_log.txt to allow to debug it easier
and see the exchange of data between the RX/TX
- Created a black/white Text only version with only Key/Roller Inputs
- Created a nicer GUI for EdgeTX touch screen color Radios
- RX simulation for GUI development: turn on `SIMULATION_ON=true` in the beginning of the lua file
- Test it on AR631, AR637xx, FC6250HX (Helicopter)
### Some settings that can change (top of Lua file):
SIMULATION_ON = false -- FALSE: hide similation menu (DEFAULT), TRUE: show RX simulation menu
DEBUG_ON = 1 -- 0=NO DEBUG, 1=HIGH LEVEL 2=LOW LEVEL (Debug logged into the /LOGS/dsm_log.txt)
USE_SPECKTRUM_COLORS = true -- true: Use spectrum colors, false: use theme colors (default on OpenTX, OpenTX handle colors different)
### Known Problems:
1. **Incorrect List Value Options:** Some Menu List line (`LINE_TYPE.LIST_MENU1` or `L_m1` in logs), the range (min/max) of valid values seems to be incorrect, but the RX corrects the values.
in the MINimalistic version, the RX is doing all the range validation, and will show invalid options temporarilly. In an Spektrum radio, it happens so fast, that you don't notice it, but in LUA scripts who are slower, you can see it in the screen.
In the COLOR version, The code has hardcoded the valid ranges to avoid this problem.
2. Glider/Heli/Drone wing types not ready.
For Helicopter, use airplane normal wing and normal tail
# Version 0.2
Original Version from Pascal Langer

View File

@ -0,0 +1,683 @@
local toolName = "TNS|DSM AR636 Telemetry|TNE"
---- ######################################################################### #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
------------------------------------------------------------------------------
-- Developer: Francisco Arzu
-- Original idea taken from DsmPID.lua.. don't know who is the author
--
local DEBUG_ON = false
--
local TEXT_SIZE = 0 -- NORMAL
local X_COL1_HEADER = 6
local X_COL1_DATA = 60
local X_COL2_HEADER = 170
local X_COL2_DATA = 220
local Y_LINE_HEIGHT = 20
local Y_HEADER = 0
local Y_DATA = Y_HEADER + Y_LINE_HEIGHT*2
local X_DATA_LEN = 80
local X_DATA_SPACE = 5
local function getPage(iParam)
-- get page from 0-based index
-- {0,1,2,3}: cyclic (1), {4,5,6,7}: tail (2)
local res = (math.floor(iParam/4)==0) and 0 or 1
return res
end
local function round(v)
-- round float
local factor = 100
return math.floor(v * factor + 0.5) / factor
end
local function readValue(sensor)
-- read from sensor, round and return
local v = getValue(sensor)
--v = round(v)
return v
end
local function readValueById(sensor)
local i = getFieldInfo(sensor)
if (i==nil) then return nil end
local v = getValue(i.id)
return v
end
local function readBatValue(sensor)
-- read from sensor, round and return
local v = getValue(sensor)
if (v==nil) then return "--" end
return string.format("%2.2f",v)
end
local function readActiveParamValue(sensor)
-- read and return a validated active parameter value
local v = getValue(sensor)
if (v<1 or v>8) then
return -1
end
return v
end
local function drawPIDScreen()
-- draw labels and params on screen
local pageId = getValue("FLss")
lcd.clear()
-- if active gain does not validate then assume
-- Gain Adjustment Mode is disabled
if not (pageId==4401 or pageId==4402) then
lcd.drawText(0,0,"BLADE Gain Adjustment", TEXT_SIZE +INVERS)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*1,"Enter Gain Adjustment Mode",TEXT_SIZE)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*2,"Stk: Low/R + Low/R + Panic (3 sec)",TEXT_SIZE)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*4,"Op: Right Stk: Up/Down to select, Left/Right change value",TEXT_SIZE)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*5,"Panic to exit",TEXT_SIZE)
return
end
local activePage = (pageId % 100)-1 --Last 2 digits, make it zero base
lcd.drawText (X_COL1_HEADER, Y_HEADER, "Cyclic (0-200)", TEXT_SIZE + INVERS)
lcd.drawText (X_COL2_HEADER, Y_HEADER, "Tail (0-200)", TEXT_SIZE + INVERS)
local p = readValue("FdeA")
local i = readValue("FdeB")
local d = readValue("FdeL")
local r = readValue("FdeR")
local titles = {[0]="P:", "I:", "D:", "Resp:", "P:","I:","D:", "Filt:"}
local values = {[0]=p,i,d,r,p,i,d,r}
local activeParam = readActiveParamValue("Hold")-1
for iParam=0,7 do
-- highlight selected parameter
local attr = (activeParam==iParam) and INVERS or 0
-- circular index (per page)
local perPageIndx = (iParam % 4)
-- set y draw coord
local y = (perPageIndx+1)*Y_LINE_HEIGHT+Y_DATA
-- check if displaying cyclic params.
local isCyclicPage = (getPage(iParam)==0)
-- labels
local x = isCyclicPage and X_COL1_HEADER or X_COL2_HEADER
-- labels are P,I,D for both pages except for last param
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
-- gains
-- set all params for non-active page to '--' rather than 'last value'
val = (getPage(iParam)==activePage) and values[iParam] or '--'
x = isCyclicPage and X_COL1_DATA or X_COL2_DATA
if (val~=16384) then -- Active value
lcd.drawText (x, y, val, attr + TEXT_SIZE)
end
end
end
local function drawFlightLogScreen()
-- draw labels and params on screen
local h = getValue("Hold")
local activeParam = h-1 -- H
lcd.clear()
lcd.drawText (X_COL1_HEADER, Y_HEADER, "Flight Log", TEXT_SIZE + INVERS)
-- read and return parameters
local a = getValue("FdeA")
local b = getValue("FdeB")
local l = getValue("FdeL")
local r = getValue("FdeR")
local f = getValue("FLss")
local titles = {[0]="A:", "B:", "L:", "R:", "F:", "H:"}
local values = {[0]=a,b,l,r,f,h}
local y = Y_LINE_HEIGHT+Y_DATA
for iParam=0,3 do -- A,B,L,R
-- highlight selected parameter (rund)
local attr = ((activeParam%4)==iParam) and INVERS or 0
-- labels
local x = X_COL1_HEADER
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
-- Values
val = values[iParam]
x = X_COL1_DATA + X_DATA_LEN
if (val~=16384) then -- Active value
lcd.drawText (x, y, val, attr + TEXT_SIZE + RIGHT)
end
y = y + Y_LINE_HEIGHT
end
y = Y_LINE_HEIGHT+Y_DATA
for iParam=4,5 do -- F, H
-- labels
local x = X_COL2_HEADER
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE + BOLD)
-- Values
val = values[iParam]
x = X_COL2_DATA + X_DATA_LEN
lcd.drawText (x, y, val, TEXT_SIZE + RIGHT + BOLD)
y = y + Y_LINE_HEIGHT
end
-- Bat
y = y + Y_LINE_HEIGHT
local bat = readBatValue("A2") or "--"
lcd.drawText (X_COL2_HEADER, y, "Bat:", TEXT_SIZE)
lcd.drawText (X_COL2_DATA + X_DATA_LEN, y, bat, TEXT_SIZE + RIGHT)
lcd.drawText (X_COL2_DATA + X_DATA_LEN + X_DATA_SPACE, y, "v", TEXT_SIZE)
end
local function servoAdjustScreen()
-- draw labels and params on screen
local pageId = getValue("FLss") -- FLss
local activeParam = getValue("Hold")-1 -- Hold
lcd.clear()
lcd.drawText (0, Y_HEADER, "BLADE Servo SubTrim", TEXT_SIZE + INVERS)
if pageId~=1234 then
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*1,"Enter Servo Adjustment Mode",TEXT_SIZE)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*2,"Stk: Low/L + Low/R + Panic (3 sec)",TEXT_SIZE)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*4,"Op: R Stk: Up/Down to select, Left/Right change value",TEXT_SIZE)
lcd.drawText(X_COL1_HEADER,Y_LINE_HEIGHT*5,"Panic to exit",TEXT_SIZE)
return
end
local a = getValue("FdeA")
local b = getValue("FdeB")
local l = getValue("FdeL")
local titles = {[0]="Servo1:", "Servo2:", "Servo3:"}
local values = {[0]=a,b,l}
for iParam=0,#values do -- S1,S2,S3
-- highlight selected parameter
local attr = (activeParam==iParam) and INVERS or 0
-- set y draw coord
local y = (iParam+1)*Y_LINE_HEIGHT+Y_HEADER
-- labels
local x = X_COL1_HEADER
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
val = values[iParam]
x = X_COL1_DATA
if (val~=16384) then -- Active value
lcd.drawText (x, y, val, attr + TEXT_SIZE)
end
end
end
local function Unsigned_to_SInt16(value)
if value >= 0x8000 then -- Negative value??
return value - 0x10000
end
return value
end
local function getDegreesValue(sensor)
local i = getFieldInfo(sensor)
if (i==nil) then return "-unk-" end
local v = getValue(i.id)
if v==nil then return "---" end
local vs = Unsigned_to_SInt16(v)
return string.format("%0.1f o",vs/10)
end
local function getDecHexValue(sensor)
local i = getFieldInfo(sensor)
if (i==nil) then return "-unk-" end
local v = getValue(i.id)
if v==nil then return "---" end
local vs = Unsigned_to_SInt16(v)
return string.format("%d (0x%04X)",vs,v)
end
local function drawVersionScreen()
local paramV = getValue("FdeA")
local B = getValue("FdeB")
local rxId = getValue("FdeL")
local firmware = getValue("FLss")
local prodId = getValue("Hold")
local bat = readBatValue("A2")
lcd.clear()
lcd.drawText (0, Y_HEADER, "BLADE Version", TEXT_SIZE + INVERS)
--Product ID
local val = "ID_".. prodId
if (prodId==243) then val = "Blade 230 V1"
elseif (prodId==250) then val = "Blade 230 V2 (not Smart)"
elseif (prodId==149) then val = "Blade 250 CFX"
end
local y = Y_DATA
local x_data1 = X_COL1_DATA+X_DATA_LEN
lcd.drawText (X_COL1_HEADER, y, "Prod:", TEXT_SIZE)
lcd.drawText (x_data1, y, val, TEXT_SIZE)
-- RX
val = "ID_"..rxId
if (rxId==1) then val = "AR636"
end
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER, y, "RX:", TEXT_SIZE)
lcd.drawText (x_data1, y, val, TEXT_SIZE)
-- Firmware
val = string.format("%0.2f",firmware/100)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER, y, "Firmware:", TEXT_SIZE)
lcd.drawText (x_data1, y, val, TEXT_SIZE)
-- ParamV
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER, y, "Params:", TEXT_SIZE)
lcd.drawText (x_data1, y, paramV, TEXT_SIZE)
-- Bat
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER, y, "Bat:", TEXT_SIZE)
lcd.drawText (x_data1, y, bat, TEXT_SIZE)
y = y + Y_LINE_HEIGHT
lcd.drawText(X_COL1_HEADER,y,"Press Panic for 3s",TEXT_SIZE)
y = y + Y_LINE_HEIGHT
lcd.drawText(X_COL1_HEADER,y,"Usually Panic is Ch7 on a switch and Revesed",TEXT_SIZE)
end
local function parseFlightMode(v)
-- FlightMode (Hex: MMSGG) MM=Flight Mode, S=Status (0= off, 1=init, 2=Hold, 3=Running) GG=???
if v==nil then return "---" end
local fm = bit32.rshift(v, 12)
local status = bit32.band(bit32.rshift(v, 8),0xF)
local res = " "..fm.." "
if (fm==0) then res = res .. " NORMAL"
elseif (fm==1) then res = res .. " INTERMEDIATE"
elseif (fm==2) then res = res .. " ADVANCED"
elseif (fm==5) then res = res .. " PANIC"
end
if (status==2) then res=res .. " HOLD" end
if (DEBUG_ON) then
res = res .. string.format(" (0x%04X)",v)
end
return res
end
local function drawAlpha6Monitor()
lcd.clear()
local RxStatus = readValueById("2402") -- FlightMode (Hex: MMSGG) MM=Flight Mode, S=Status (0=init, 2=Ready, 3=Sensor Fault) GG=???
local ARoll = getDegreesValue("2406") --Att Roll
local APitch = getDegreesValue("2408") --Att Pitch
local AYaw = getDegreesValue("240B") --Att Yaw
lcd.drawText (0,0, "BLADE Alpha6 Monitor", TEXT_SIZE+INVERS)
local y = Y_DATA
local x_data1 = X_COL1_DATA+X_DATA_LEN
local x_data2 = X_COL1_DATA+X_DATA_LEN*2
local x_data3 = X_COL1_DATA+X_DATA_LEN*3
-- Flight Mode
lcd.drawText (0,y, "F-Mode:"..parseFlightMode(RxStatus), TEXT_SIZE)
y = y + Y_LINE_HEIGHT
lcd.drawText (x_data1,y, "Attitude", TEXT_SIZE+BOLD + RIGHT)
lcd.drawText (x_data2,y, "Gyro", TEXT_SIZE+BOLD + RIGHT)
lcd.drawText (x_data3,y, "Gain", TEXT_SIZE+BOLD + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Rol:", TEXT_SIZE)
lcd.drawText (x_data1,y, ARoll, TEXT_SIZE + RIGHT)
lcd.drawText (x_data2,y, "-", TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, "-", TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Pitch:", TEXT_SIZE)
lcd.drawText (x_data1,y, APitch, TEXT_SIZE + RIGHT)
lcd.drawText (x_data2,y, "-", TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, "-", TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Yaw:", TEXT_SIZE)
lcd.drawText (x_data1,y, AYaw, TEXT_SIZE + RIGHT)
lcd.drawText (x_data2,y, "-", TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, "-", TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT + Y_LINE_HEIGHT
lcd.drawText (0,y, "Bat: "..readBatValue("A2").." v", TEXT_SIZE)
-- Debug Values
if (DEBUG_ON) then
local s2400 = getDecHexValue("2400")
local s2402 = getDecHexValue("2402")
local s2404 = getDecHexValue("2404")
local s240D = getDecHexValue("240D")
local s1G00 = getDecHexValue("1G00")
local s1G02 = getDecHexValue("1G02")
local s1G04 = getDecHexValue("1G04")
local s1G06 = getDecHexValue("1G06")
local s1G08 = getDecHexValue("1G08")
local s1G0B = getDecHexValue("1G0B")
local s1G0D = getDecHexValue("1G0D")
local titles = {[0]=
"2400","2402/FM-S-?",
"2404","240D",
"1G00","1G02","1G04",
"1G06","1G08","1G0B","1G0D"}
local values = {[0]=
s2400,s2402,s2404,s240D,
s1G00,s1G02,s1G04,
s1G06,s1G08,s1G0B,s1G0D}
-- draw labels and params on screen
y = Y_LINE_HEIGHT*2 + Y_HEADER
for iParam=0,#titles do -- ??
-- labels
local x = X_COL1_HEADER+220
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
val = values[iParam]
x = X_COL1_DATA+250
lcd.drawText (x, y, val, TEXT_SIZE)
y = y + Y_LINE_HEIGHT
end
end
end
local function readAlpha3arameters()
end
local function drawAS3XMonitor()
lcd.clear()
local s1G00 = getDecHexValue("1G00")
local s1G02 = getDecHexValue("1G02")
local s1G04 = getDecHexValue("1G04")
local s1G06 = getDecHexValue("1G06")
local s1G08 = getDecHexValue("1G08")
local s1G0B = getDecHexValue("1G0B")
local s1G0D = getDecHexValue("1G0D")
local s6C00 = getDecHexValue("6C00")
local s6C02 = getDecHexValue("6C02")
local s6C04 = getDecHexValue("6C04")
local RRoll = bit32.rshift(getValue("1G00") or 0,8)
local RPitch = bit32.band(getValue("1G00") or 0,0xFF)
local RYaw = bit32.rshift(getValue("1G02") or 0,8)
local HRoll = bit32.band(getValue("1G02") or 0,0xFF)
local HPitch = bit32.rshift(getValue("1G04") or 0,8)
local HYaw = bit32.band(getValue("1G04") or 0,0xFF)
local ARoll = bit32.rshift(getValue("1G06") or 0,8)
local APitch = bit32.band(getValue("1G06") or 0,0xFF)
local AYaw = bit32.rshift(getValue("1G08") or 0,8)
lcd.drawText (0,0, "Plane AR636 AS3X Gains", TEXT_SIZE+INVERS)
local y = Y_DATA
local x_data1 = X_COL1_DATA+X_DATA_LEN
local x_data2 = X_COL1_DATA+X_DATA_LEN*2
local x_data3 = X_COL1_DATA+X_DATA_LEN*3.1
-- Flight Mode
--lcd.drawText (0,y, "F-Mode: "..(nil or "--"), TEXT_SIZE)
y = y + Y_LINE_HEIGHT
lcd.drawText (x_data1,y, "Rate", TEXT_SIZE+BOLD + RIGHT)
lcd.drawText (x_data2,y, "Head", TEXT_SIZE+BOLD + RIGHT)
lcd.drawText (x_data3+X_DATA_SPACE*3,y, "Actual", TEXT_SIZE+BOLD + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Roll %:", TEXT_SIZE)
lcd.drawText (x_data1,y, RRoll, TEXT_SIZE + RIGHT)
lcd.drawText (x_data2,y, HRoll, TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, ARoll, TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Pitch %:", TEXT_SIZE)
lcd.drawText (x_data1,y, RPitch, TEXT_SIZE + RIGHT)
lcd.drawText (x_data2,y, HPitch, TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, APitch, TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Yaw %:", TEXT_SIZE)
lcd.drawText (x_data1,y, RYaw, TEXT_SIZE + RIGHT)
lcd.drawText (x_data2,y, HYaw, TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, AYaw, TEXT_SIZE + RIGHT)
-- Debug Values
if (DEBUG_ON) then
local Alpha3Tags = {[0]=
"1G00/RA+RE","1G02/RY+HA","1G04R HP+HY","1G06/AR+AP","1G08/AY+?","1G0B","1G0D","6C00","6C02","6C04"}
local params = {[0]=
s1G00,s1G02,s1G04,s1G06,s1G08,s1G0B,s1G0D,s6C00,s6C02,s6C04 }
y = Y_LINE_HEIGHT*2 + Y_HEADER
for iParam=0,#Alpha3Tags do -- ??
-- labels
local x = X_COL1_HEADER+220
local val = Alpha3Tags[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
val = params[iParam]
x = X_COL1_DATA+250
lcd.drawText (x, y, val, TEXT_SIZE)
y = y + Y_LINE_HEIGHT
end
end
end
local function openTelemetryRaw(i2cId)
--Init telemetry (Spectrun Telemetry Raw STR)
multiBuffer( 0, string.byte('S') )
multiBuffer( 1, string.byte('T') )
multiBuffer( 2, string.byte('R') )
multiBuffer( 3, i2cId ) -- Monitor this teemetry data
multiBuffer( 4, 0 ) -- Allow to get Data
end
local function closeTelemetryRaw()
multiBuffer(0, 0) -- Destroy the STR header
multiBuffer(3, 0) -- Not requesting any Telementry ID
end
local lineText = {nil}
local I2C_TEXT_GEN = 0x0C
local function drawTextGen(event)
if (multiBuffer(0)~=string.byte('S')) then -- First time run???
openTelemetryRaw(I2C_TEXT_GEN) -- I2C_ID for TEXT_GEN
lineText = {nil}
end
-- Proces TEXT GEN Telementry message
if multiBuffer( 4 ) == I2C_TEXT_GEN then -- Specktrum Telemetry ID of data received
local instanceNo = multiBuffer( 5 )
local lineNo = multiBuffer( 6 )
local line = ""
for i=0,13 do
line = line .. string.char(multiBuffer( 7 + i ))
end
multiBuffer( 4, 0 ) -- Clear Semaphore, to notify that we fully process the current message
lineText[lineNo]=line
end
lcd.clear()
-- Header
if (lineText[0]) then
lcd.drawText (X_COL1_HEADER,0, " "..lineText[0].." ", TEXT_SIZE + BOLD + INVERS)
else
lcd.drawText (X_COL1_HEADER,0, "TextGen", TEXT_SIZE+INVERS)
end
-- Menu lines
local y = Y_DATA
for i=1,8 do
if (lineText[i]) then
lcd.drawText (X_COL1_HEADER,y, lineText[i], TEXT_SIZE)
end
y = y + Y_LINE_HEIGHT
end
if event == EVT_VIRTUAL_EXIT then -- Exit?? Clear menu data
closeTelemetryRaw()
end
end
local telPage = 1
local telPageSelected = 0
local pageTitle = {[0]="Main", "Blade Version", "Blade Servo Adjust","Blade Gyro Adjust", "Blade Alpha6 Monitor", "Plane AS3X Monitor", "TextGen", "Flight Log"}
local function drawMainScreen(event)
lcd.clear()
lcd.drawText (X_COL1_HEADER, Y_HEADER, "Main Telemetry (AR636)", TEXT_SIZE + INVERS)
for iParam=1,#pageTitle do
-- highlight selected parameter
local attr = (telPage==iParam) and INVERS or 0
-- set y draw coord
local y = (iParam-1)*Y_LINE_HEIGHT+Y_DATA
-- labels
local x = X_COL1_HEADER
local val = pageTitle[iParam]
lcd.drawText (x, y, val, attr + TEXT_SIZE)
end
if event == EVT_VIRTUAL_PREV then
if (telPage>1) then telPage = telPage - 1 end
elseif event == EVT_VIRTUAL_NEXT then
if (telPage<#pageTitle) then telPage = telPage + 1 end
elseif event == EVT_VIRTUAL_ENTER then
telPageSelected = telPage
end
end
local pageDraw = {[0]=drawMainScreen, drawVersionScreen, servoAdjustScreen,drawPIDScreen, drawAlpha6Monitor, drawAS3XMonitor, drawTextGen, drawFlightLogScreen}
local function run_func(event)
if event == nil then
error("Cannot be run as a model script!")
return 2
end
-- draw specific page
pageDraw[telPageSelected](event)
if event == EVT_VIRTUAL_EXIT then
if (telPageSelected==0) then return 1 end -- on Main?? Exit Script
telPageSelected = 0 -- any page, return to Main
end
return 0
end
local function init_func()
if (LCD_W <= 128 or LCD_H <=64) then -- Smaller Screens
TEXT_SIZE = SMLSIZE
X_COL1_HEADER = 0
X_COL1_DATA = 20
X_COL2_HEADER = 60
X_COL2_DATA = 90
X_DATA_LEN = 28
X_DATA_SPACE = 1
Y_LINE_HEIGHT = 8
Y_DATA = Y_HEADER + Y_LINE_HEIGHT
end
end
return { run=run_func, init=init_func }

View File

@ -0,0 +1,603 @@
local toolName = "TNS|DSM Smart RX Telemetry|TNE"
---- ######################################################################### #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
------------------------------------------------------------------------------
-- Developer: Francisco Arzu
local DEBUG_ON = false
--
local TEXT_SIZE = 0 -- NORMAL
local X_COL1_HEADER = 6
local X_COL1_DATA = 60
local X_COL2_HEADER = 170
local X_COL2_DATA = 220
local Y_LINE_HEIGHT = 20
local Y_HEADER = 0
local Y_DATA = Y_HEADER + Y_LINE_HEIGHT*2
local X_DATA_LEN = 80
local X_DATA_SPACE = 5
local function getPage(iParam)
-- get page from 0-based index
-- {0,1,2,3}: cyclic (1), {4,5,6,7}: tail (2)
local res = (math.floor(iParam/4)==0) and 0 or 1
return res
end
local function round(v)
-- round float
local factor = 100
return math.floor(v * factor + 0.5) / factor
end
local function readValue(sensor)
-- read from sensor, round and return
local v = getValue(sensor)
--v = round(v)
return v
end
local function readValueById(sensor)
local i = getFieldInfo(sensor)
if (i==nil) then return nil end
local v = getValue(i.id)
return v
end
local function readBatValue(sensor)
-- read from sensor, round and return
local v = getValue(sensor)
if (v==nil) then return v end
return string.format("%2.2f",v)
end
local function readActiveParamValue(sensor)
-- read and return a validated active parameter value
local v = getValue(sensor)
if (v<1 or v>8) then
return -1
end
return v
end
local function drawFlightLogScreen(event)
-- draw labels and params on screen
local h = getValue("Hold")
local activeParam = h-1 -- H
lcd.clear()
lcd.drawText (X_COL1_HEADER, Y_HEADER, "Flight Log", TEXT_SIZE + INVERS)
-- read and return parameters
local a = getValue("FdeA")
local b = getValue("FdeB")
local l = getValue("FdeL")
local r = getValue("FdeR")
local f = getValue("FLss")
local titles = {[0]="A:", "B:", "L:", "R:", "F:", "H:"}
local values = {[0]=a,b,l,r,f,h}
local y = Y_LINE_HEIGHT+Y_DATA
for iParam=0,3 do -- A,B,L,R
-- highlight selected parameter (rund)
local attr = ((activeParam%4)==iParam) and INVERS or 0
-- labels
local x = X_COL1_HEADER
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
-- Values
val = values[iParam]
x = X_COL1_DATA + X_DATA_LEN
if (val~=16384) then -- Active value
lcd.drawText (x, y, val, attr + TEXT_SIZE + RIGHT)
end
y = y + Y_LINE_HEIGHT
end
y = Y_LINE_HEIGHT+Y_DATA
for iParam=4,5 do -- F, H
-- labels
local x = X_COL2_HEADER
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE + BOLD)
-- Values
val = values[iParam]
x = X_COL2_DATA + X_DATA_LEN
lcd.drawText (x, y, val, TEXT_SIZE + RIGHT + BOLD)
y = y + Y_LINE_HEIGHT
end
-- Bat
y = y + Y_LINE_HEIGHT
local bat = readBatValue("A2") or "--"
lcd.drawText (X_COL2_HEADER, y, "Bat:", TEXT_SIZE)
lcd.drawText (X_COL2_DATA + X_DATA_LEN, y, bat, TEXT_SIZE + RIGHT)
lcd.drawText (X_COL2_DATA + X_DATA_LEN + X_DATA_SPACE, y, "v", TEXT_SIZE)
end
local function Unsigned_to_SInt16(value)
if value >= 0x8000 then -- Negative value??
return value - 0x10000
end
return value
end
local function getDegreesValue(sensor)
local i = getFieldInfo(sensor)
if (i==nil) then return "-unk-" end
local v = getValue(i.id)
if v==nil then return "---" end
local vs = Unsigned_to_SInt16(v)
return string.format("%0.1f o",vs/10)
end
local function getDecHexValue(sensor)
local i = getFieldInfo(sensor)
if (i==nil) then return "-unk-" end
local v = getValue(i.id)
if v==nil then return "---" end
local vs = Unsigned_to_SInt16(v)
return string.format("%d (0x%04X)",vs,v)
end
local as3xData = {[0]=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
local function drawAS3XSettings(event, page)
local s0500 = getDecHexValue("0500")
local s0502 = getDecHexValue("0502")
local s0504 = getDecHexValue("0504")
local s0506 = getDecHexValue("0506")
local s0508 = getDecHexValue("0508")
local s050B = getDecHexValue("050B")
local s050D = getDecHexValue("050D")
local d0500 = readValueById("0500") or 0
local flags = bit32.rshift(d0500,8)
local state = bit32.band(d0500,0xFF)
local flagsMsg=""
-- flags bits: Safe Envelop, ?, Angle Demand, Stab
if (bit32.band(flags,0x1)~=0) then flagsMsg=flagsMsg.."AS3X Stab" end
-- This one, only one should show
if (bit32.band(flags,0x2)~=0) then flagsMsg=flagsMsg..", Angle Demand"
elseif (bit32.band(flags,0x8)~=0) then flagsMsg=flagsMsg..", Safe Envelope"
elseif (bit32.band(flags,0x4)~=0) then flagsMsg=flagsMsg..", AS3X Heading" end
local d0502 = readValueById("0502") or 0 -- 0x?F?S
local fm = bit32.band(bit32.rshift(d0502,8),0xF) -- 0,1,2
local axis = bit32.band(d0502,0xF) -- 0=Gains,1=Headings,2=Angle Limits (cointinus iterating to provide all values)
local d0504 = readValueById("0504") or 0
local d0506 = readValueById("0506") or 0
local d0508 = readValueById("0508") or 0
local d0 = bit32.rshift(d0504,8)
local d1 = bit32.band(d0504,0xFF)
local d2 = bit32.rshift(d0506,8)
local d3 = bit32.band(d0506,0xFF)
local d4 = bit32.rshift(d0508,8)
local d5 = bit32.band(d0508,0xFF)
--axis: 0=Gains+Headings (RG,PG,YG,RH,PH,YH), 1=Safe Gains (R,P,Y),2=Angle Limits(L,R,U,D)
--Constantly changing from 0..2 to represent different data, thats why we have to store the values
--in a script/global variable, and not local to the function
local s = axis*6
as3xData[s+0] = d0
as3xData[s+1] = d1
as3xData[s+2] = d2
as3xData[s+3] = d3
as3xData[s+4] = d4
as3xData[s+5] = d5
lcd.clear()
lcd.drawText (0,0, "AS3X/SAFE Settings", TEXT_SIZE + INVERS)
local y = Y_DATA
-- Flight Mode
lcd.drawText (X_COL1_HEADER,y, "FM: "..(fm+1), TEXT_SIZE)
lcd.drawText (X_COL1_DATA+X_DATA_LEN*0.3,y, "Flags: "..flags, TEXT_SIZE)
lcd.drawText (X_COL2_HEADER+X_DATA_LEN*0.3,y, "State: "..state, TEXT_SIZE)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, flagsMsg, TEXT_SIZE)
y = y + Y_LINE_HEIGHT
if (page==1) then
lcd.drawText (X_COL1_HEADER+X_DATA_LEN*0.3,y, "AS3X Gains", TEXT_SIZE+BOLD)
lcd.drawText (X_COL2_HEADER+X_DATA_LEN*0.3,y, "AS3X Headings", TEXT_SIZE+BOLD)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Roll:", TEXT_SIZE)
lcd.drawText (X_COL1_DATA+X_DATA_LEN,y, as3xData[0], TEXT_SIZE + RIGHT) -- Roll G
lcd.drawText (X_COL2_DATA+X_DATA_LEN,y, as3xData[3], TEXT_SIZE + RIGHT) -- Roll H
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Pitch:", TEXT_SIZE)
lcd.drawText (X_COL1_DATA+X_DATA_LEN,y,as3xData[1], TEXT_SIZE + RIGHT) -- Pitch G
lcd.drawText (X_COL2_DATA+X_DATA_LEN,y, as3xData[4], TEXT_SIZE + RIGHT) -- Pitch H
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Yaw:", TEXT_SIZE)
lcd.drawText (X_COL1_DATA+X_DATA_LEN,y, as3xData[2], TEXT_SIZE + RIGHT) -- Yaw G
lcd.drawText (X_COL2_DATA+X_DATA_LEN,y, as3xData[5], TEXT_SIZE + RIGHT) -- Yaw H
end
if (page==2) then
local x_data1 = X_COL1_DATA+X_DATA_LEN
local x_data2 = X_COL2_HEADER+X_DATA_LEN*1.6
lcd.drawText (X_COL1_HEADER+X_DATA_LEN*0.3,y, "SAFE Gains", TEXT_SIZE+BOLD)
lcd.drawText (X_COL2_HEADER+X_DATA_LEN*0.1,y, "Angle Limits", TEXT_SIZE+BOLD)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Roll:", TEXT_SIZE)
lcd.drawText (x_data1,y, as3xData[6], TEXT_SIZE + RIGHT)
lcd.drawText (X_COL2_HEADER,y, "Roll R:", TEXT_SIZE)
lcd.drawText (x_data2,y, as3xData[12], TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Pitch:", TEXT_SIZE)
lcd.drawText (x_data1,y,as3xData[7], TEXT_SIZE + RIGHT)
lcd.drawText (X_COL2_HEADER,y, "Roll L:", TEXT_SIZE)
lcd.drawText (x_data2,y,as3xData[13], TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL1_HEADER,y, "Yaw:", TEXT_SIZE)
lcd.drawText (x_data1,y, as3xData[8], TEXT_SIZE + RIGHT)
lcd.drawText (X_COL2_HEADER,y, "Pitch U:", TEXT_SIZE)
lcd.drawText (x_data2,y, as3xData[14], TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
lcd.drawText (X_COL2_HEADER,y, "Pitch D:", TEXT_SIZE)
lcd.drawText (x_data2,y, as3xData[15], TEXT_SIZE + RIGHT)
end
-- Debug Values
if (DEBUG_ON) then
local titles = {[0]=
"0500","0502","0504","0506","0508","050B","050D"}
local values = {[0]=
s0500,s0502,s0504,s0506,s0508,s050B,s050D }
y = Y_LINE_HEIGHT*2 + Y_HEADER
for iParam=0,#titles do -- ??
-- labels
local x = X_COL1_HEADER+250
local val = titles[iParam]
lcd.drawText (x, y, val, TEXT_SIZE)
val = values[iParam] or "--"
x = X_COL1_DATA+250
lcd.drawText (x, y, val, TEXT_SIZE)
y = y + Y_LINE_HEIGHT
end
end
end
local function drawAS3XSettingsP1(event)
drawAS3XSettings(event, 1)
end
local function drawAS3XSettingsP2(event)
drawAS3XSettings(event, 2)
end
local function doFloat(v)
if v==nil then return 0.0 end
local vs = string.format("%1.2f",v)
return vs + 0.0
end
local ESC_Title={[0]="","RPM:","Volts:","Motor:","Mot Out:","Throttle:","FET Temp:", "BEC V:", "BEC T:", "BEC A:"}
local ESC_uom={[0]="","","V","A","%","%","C", "V","C","A"}
local ESC_Status={[0]=0,0,0,0,0,0,0,0,0,0,0}
local ESC_Min={[0]=0,0,0,0,0,0,0,0,0,0,0}
local ESC_Max={[0]=0,0,0,0,0,0,0,0,0,0,0}
local function drawESCStatus(event)
lcd.clear()
ESC_Status[1] = getValue("Erpm") -- RPM
ESC_Status[2] = doFloat(getValue("EVIN")) -- Volts
ESC_Status[3] = doFloat(getValue("ECUR")) -- Current
ESC_Status[4] = doFloat(getValue("EOUT")) -- % Output
ESC_Status[5] = doFloat(getValue("ETHR")) -- Throttle % (EOUT)
ESC_Status[6] = getValue("TFET") -- Temp FET
ESC_Status[7] = doFloat(getValue("VBEC")) -- Volts BEC
ESC_Status[8] = getValue("TBEC") -- Temp BEC
ESC_Status[9] = doFloat(getValue("CBEC")) -- Current BEC
for i=1,9 do
if (ESC_Status~=nil) then
if (ESC_Min[i]==0) then
ESC_Min[i]=ESC_Status[i]
else
ESC_Min[i] = math.min(ESC_Min[i],ESC_Status[i])
end
ESC_Max[i] = math.max(ESC_Max[i],ESC_Status[i])
end
end
lcd.drawText (0,0, "ESC", TEXT_SIZE+INVERS)
local y = 0
local x_data = X_COL1_DATA+X_DATA_LEN*1.5
local x_data2 = X_COL2_DATA+X_DATA_LEN*0.5
local x_data3 = x_data2 + X_DATA_LEN*0.8
lcd.drawText (x_data,y , "Status", TEXT_SIZE+BOLD+RIGHT)
lcd.drawText (x_data2,y, "Min", TEXT_SIZE+BOLD+RIGHT)
lcd.drawText (x_data3,y, "Max", TEXT_SIZE+BOLD+RIGHT)
y = Y_DATA
for i=1,9 do
lcd.drawText (X_COL1_HEADER,y, ESC_Title[i], TEXT_SIZE + BOLD)
lcd.drawText (x_data,y, ESC_Status[i] or "--", TEXT_SIZE + RIGHT)
lcd.drawText (x_data + X_DATA_SPACE,y, ESC_uom[i], TEXT_SIZE)
lcd.drawText (x_data2,y, ESC_Min[i] or "--", TEXT_SIZE + RIGHT)
lcd.drawText (x_data3,y, ESC_Max[i] or "--", TEXT_SIZE + RIGHT)
y = y + Y_LINE_HEIGHT
end
end
local function drawBATStatus(event)
local Title={[0]="","Bat:","Temp:","Rem :","Curr:","Used:","Imbal:","Cycles:", "RX:", "BCpT?:"}
local uom={[0]="","V","C","%","mAh","mAh","mV","", "V",""}
local Values={[0]=0,0,0,0,0,0,0,0,0,0,0}
local CellValues={[0]=0,0,0,0,0,0,0,0,0,0,0}
lcd.clear()
local ESC_Volts = getValue("EVIN") or 0 -- Volts
local ESC_Current = getValue("ECUR") or 0 -- Current
Values[1] = 0 -- compute later
Values[2] = getValue("BTmp") -- Current (C)
Values[3] = nil -- Remaining???
Values[4] = getValue("BCur") -- Current (mAh)
Values[5] = getValue("BUse") -- Current Used (mAh)
Values[6] = getValue("CLMa") -- 0.0 (mV) Imbalance
Values[7] = getValue("Cycl") -- Cycles
Values[8] = readBatValue("A2") -- v
Values[9] = getValue("BCpT") -- Current (mAh) ????
--- Total Voltange Calculation
local VTotal=0
for i=1,10 do
CellValues[i] = getValue("Cel"..i)
VTotal = VTotal + CellValues[i]
end
if (VTotal==0) then -- No Inteligent Battery,use intelligent ESC if any
VTotal = ESC_Volts
Values[4] = string.format("%d",ESC_Current * 1000)
end
Values[1] = string.format("%2.2f",VTotal)
--- SCREEN
lcd.drawText (X_COL1_HEADER,0, "Battery Stats", TEXT_SIZE+INVERS)
local y = Y_DATA
local x_data = X_COL1_DATA+X_DATA_LEN+X_DATA_SPACE*3
for i=2,9 do
lcd.drawText (X_COL1_HEADER, y, Title[i], TEXT_SIZE + BOLD)
lcd.drawText (x_data, y, Values[i] or "--", TEXT_SIZE + RIGHT)
lcd.drawText (x_data+X_DATA_SPACE, y, uom[i], TEXT_SIZE)
y = y + Y_LINE_HEIGHT
end
y = Y_DATA
x_data = X_COL2_DATA+X_DATA_LEN+X_DATA_SPACE*5
for i=1,8 do
if ((CellValues[i] or 0) > 0) then
lcd.drawText (X_COL2_HEADER+X_DATA_LEN/2,y, "Cel "..i..":", TEXT_SIZE + BOLD)
lcd.drawText (x_data,y, string.format("%2.2f",CellValues[i] or 0), TEXT_SIZE + RIGHT)
lcd.drawText (x_data+X_DATA_SPACE,y, "v", TEXT_SIZE)
end
y = y + Y_LINE_HEIGHT
end
lcd.drawText (X_COL2_HEADER+X_DATA_LEN/2,0, Title[1], TEXT_SIZE + INVERS + BOLD)
lcd.drawText (x_data,0, string.format("%2.2f",Values[1] or 0), TEXT_SIZE + INVERS+ RIGHT)
lcd.drawText (x_data+X_DATA_SPACE, 0, uom[1], TEXT_SIZE + INVERS)
end
local function openTelemetryRaw(i2cId)
--Init telemetry (Spectrun Telemetry Raw STR)
multiBuffer( 0, string.byte('S') )
multiBuffer( 1, string.byte('T') )
multiBuffer( 2, string.byte('R') )
multiBuffer( 3, i2cId ) -- Monitor this teemetry data
multiBuffer( 4, 0 ) -- Allow to get Data
end
local function closeTelemetryRaw()
multiBuffer(0, 0) -- Destroy the STR header
multiBuffer(3, 0) -- Not requesting any Telementry ID
end
local lineText = {nil}
local I2C_TEXT_GEN = 0x0C
local function drawTextGen(event)
if (multiBuffer(0)~=string.byte('S')) then -- First time run???
openTelemetryRaw(I2C_TEXT_GEN) -- I2C_ID for TEXT_GEN
lineText = {nil}
end
-- Proces TEXT GEN Telementry message
if multiBuffer( 4 ) == I2C_TEXT_GEN then -- Specktrum Telemetry ID of data received
local instanceNo = multiBuffer( 5 )
local lineNo = multiBuffer( 6 )
local line = ""
for i=0,13 do
line = line .. string.char(multiBuffer( 7 + i ))
end
multiBuffer( 4, 0 ) -- Clear Semaphore, to notify that we fully process the current message
lineText[lineNo]=line
end
lcd.clear()
-- Header
if (lineText[0]) then
lcd.drawText (X_COL1_HEADER,0, " "..lineText[0].." ", TEXT_SIZE + BOLD + INVERS)
else
lcd.drawText (X_COL1_HEADER,0, "TextGen", TEXT_SIZE+INVERS)
end
-- Menu lines
local y = Y_DATA
for i=1,8 do
if (lineText[i]) then
lcd.drawText (X_COL1_HEADER,y, lineText[i], TEXT_SIZE)
end
y = y + Y_LINE_HEIGHT
end
if event == EVT_VIRTUAL_EXIT then -- Exit?? Clear menu data
closeTelemetryRaw()
end
end
local telPage = 1
local telPageSelected = 0
local pageTitle = {[0]="Main", "AS3X Settings", "SAFE Settings", "ESC Status", "Battery Status","TextGen","Flight Log"}
local function drawMainScreen(event)
lcd.clear()
lcd.drawText (X_COL1_HEADER, Y_HEADER, "Main Telemetry (Smart RXs)", TEXT_SIZE + INVERS)
for iParam=1,#pageTitle do
-- highlight selected parameter
local attr = (telPage==iParam) and INVERS or 0
-- set y draw coord
local y = (iParam)*Y_LINE_HEIGHT+Y_DATA
-- labels
local x = X_COL1_HEADER
local val = pageTitle[iParam]
lcd.drawText (x, y, val, attr + TEXT_SIZE)
end
if event == EVT_VIRTUAL_PREV then
if (telPage>1) then telPage = telPage - 1 end
elseif event == EVT_VIRTUAL_NEXT then
if (telPage<#pageTitle) then telPage = telPage + 1 end
elseif event == EVT_VIRTUAL_ENTER then
telPageSelected = telPage
end
end
local pageDraw = {[0]=drawMainScreen, drawAS3XSettingsP1, drawAS3XSettingsP2, drawESCStatus, drawBATStatus, drawTextGen, drawFlightLogScreen}
local function run_func(event)
if event == nil then
error("Cannot be run as a model script!")
return 2
end
-- draw specific page
pageDraw[telPageSelected](event)
if event == EVT_VIRTUAL_EXIT then
if (telPageSelected==0) then return 1 end -- on Main?? Exit Script
telPageSelected = 0 -- any page, return to Main
end
return 0
end
local function init_func()
if (LCD_W <= 128 or LCD_H <=64) then -- Smaller Screens
TEXT_SIZE = SMLSIZE
X_COL1_HEADER = 0
X_COL1_DATA = 20
X_COL2_HEADER = 60
X_COL2_DATA = 90
X_DATA_LEN = 28
X_DATA_SPACE = 1
Y_LINE_HEIGHT = 8
Y_DATA = Y_HEADER + Y_LINE_HEIGHT
end
end
return { run=run_func, init=init_func }

Some files were not shown because too many files have changed in this diff Show More