Compare commits
839 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 304445cd9d | |||
| b04452e6f9 | |||
| 080891db7b | |||
| 98944e9cee | |||
| a9fcf514a1 | |||
| 6872f85c52 | |||
| 16f2681050 | |||
| c882095a81 | |||
| d5235d586d | |||
| 7a6e870f55 | |||
| a3f42fb89f | |||
| ed70813e5f | |||
| 70846d4add | |||
| caf0fca1c2 | |||
| 723e4bf9c7 | |||
| 77d85b73bc | |||
| 4221bfdf74 | |||
| 76f0b306aa | |||
| fae55a21c6 | |||
| 55b3ea9b42 | |||
| aaf7f67ebb | |||
| 830593d62e | |||
| 90e8748e12 | |||
| 77065c7cfb | |||
| f37c695590 | |||
| f6b43ae40f | |||
| 29642e379f | |||
| 37a0258b19 | |||
| 38886e31a4 | |||
| 9c966515f2 | |||
| 4e576efdd7 | |||
| c994260c85 | |||
| 03c969fa3c | |||
| 161f3be468 | |||
| 842eb3e93a | |||
| 6bdb40ec81 | |||
| fc4b43dfb1 | |||
| 2ebd89159c | |||
| 585302d8a9 | |||
| a8394b6400 | |||
| 8de9f8e826 | |||
| f97eda2b4f | |||
| e79258d8a2 | |||
| ca5c20abe3 | |||
| 82b9ecc155 | |||
| 590b0eaab7 | |||
| ff37274e64 | |||
| 855814655e | |||
| 75b74da2bd | |||
| 7656450597 | |||
| 1ef91597ca | |||
| 931c3f9d6a | |||
| c793b492d2 | |||
| f0c2f10e27 | |||
| 5a9eeaacc1 | |||
| 5cdb1e52d1 | |||
| 7d6e96fe0c | |||
| 6038c0947f | |||
| 812ce55538 | |||
| 5b9bd52737 | |||
| e6ac77a789 | |||
| 89e0fd1e1d | |||
| 446ed3db59 | |||
| b71ba5b095 | |||
| 7522e54c83 | |||
| 30eb2baed9 | |||
| 504592ed18 | |||
| 5446b4707d | |||
| 0c2fb5f7f1 | |||
| 2a9e299818 | |||
| 6071b1aa0d | |||
| 4377815c7b | |||
| db79e2c53e | |||
| 506b24829c | |||
| b105214e32 | |||
| 3e960be9ce | |||
| f5d589d23c | |||
| 34441618f8 | |||
| 1d735f2bd3 | |||
| 3cb64d984a | |||
| 508e3e899c | |||
| c5346f6846 | |||
| 9e334bfc84 | |||
| 879ca36fdb | |||
| 7d1732b314 | |||
| 76300ae92d | |||
| b8edea5c05 | |||
| 204b1b9627 | |||
| 9d9fdf81b4 | |||
| b69c2aa41c | |||
| a95f9b7dde | |||
| dd1ca93b70 | |||
| 643a731979 | |||
| f34de72e25 | |||
| 0ff601a3fa | |||
| c16ad94e3a | |||
| 81c16212e0 | |||
| 7dc75cf73f | |||
| 9b7d97b441 | |||
| 64966c7d7d | |||
| a043c6f649 | |||
| a63657df40 | |||
| 1164f30fd1 | |||
| b657ca1862 | |||
| cd2b6b3864 | |||
| d961879e0f | |||
| 10aefb10db | |||
| 91dc936ef3 | |||
| ed0cc9f1d4 | |||
| 0994735035 | |||
| 607e737b32 | |||
| 44e477965e | |||
| fcce94a868 | |||
| f940fcdcd0 | |||
| 3e4f3b2a8e | |||
| 5d7f4ebc0b | |||
| 3160a7d878 | |||
| 62071a959c | |||
| 59083f4471 | |||
| 71a8a69f32 | |||
| d3ae3c035d | |||
| 282b856309 | |||
| 0fa7f6e132 | |||
| d55613aa26 | |||
| d62a985dcd | |||
| 6559456534 | |||
| d24f60f68b | |||
| f2d2677b2d | |||
| a908d73f1f | |||
| 9ea048f2ad | |||
| 16199194b5 | |||
| 789a0ee548 | |||
| 7fbd963b3f | |||
| 52435703a0 | |||
| 0b67d412a0 | |||
| d0527be2c4 | |||
| 0524f24ac6 | |||
| ba681666a0 | |||
| 9a00f03843 | |||
| 6d8b938706 | |||
| 22433a3a13 | |||
| ddfaa6f393 | |||
| 4d4b75d283 | |||
| 2ed742ebb7 | |||
| 459ab91f09 | |||
| 337ab74b8b | |||
| 9f37e7a0fb | |||
| ea095b2447 | |||
| 400faee588 | |||
| adeb53c726 | |||
| c5062d8c6a | |||
| 4df85d1047 | |||
| 6d2c5a4db6 | |||
| 6c34752907 | |||
| f74381bafa | |||
| 67eb04e44c | |||
| 351780bf17 | |||
| c2ed47d5d3 | |||
| d00472b810 | |||
| b44dce4977 | |||
| 5f06e06c55 | |||
| ebe36e0154 | |||
| e72017977c | |||
| 7bcac84253 | |||
| a33b1d2659 | |||
| 3728624486 | |||
| e76c574439 | |||
| 319df44188 | |||
| ba240abe64 | |||
| 4b2315f56b | |||
| 67ebadc9e0 | |||
| d4a54b5487 | |||
| fcdcccf8f5 | |||
| 9d492b4faf | |||
| 5fad5190dc | |||
| 4818efade6 | |||
| e900ad6c49 | |||
| 85f3bd4ed0 | |||
| e5bbf6766b | |||
| 51223a5864 | |||
| 0f740358f2 | |||
| 5ac2288782 | |||
| aa915e088b | |||
| 6dedf2ce65 | |||
| 840a3b2a8a | |||
| 83cdd67e6a | |||
| e3e0d970a5 | |||
| f88e904009 | |||
| 7e3cfc9b66 | |||
| c307e1987c | |||
| ac86ebc229 | |||
| a3cfef3123 | |||
| b0b6ac2f69 | |||
| 8169ef92c0 | |||
| 893ae215af | |||
| 3b90b0d6c0 | |||
| 00ba66fe20 | |||
| fdcc60b1b9 | |||
| bea0411071 | |||
| c97ba2bb83 | |||
| 7e6b9ebf4f | |||
| ab6c6babae | |||
| e25db7e9e0 | |||
| 0ad015f3e7 | |||
| dd44da14bc | |||
| 43d618a1de | |||
| 352de89838 | |||
| a28cbf88f3 | |||
| 789326d2cd | |||
| a11db7d73f | |||
| a6ceb56dcd | |||
| 0a1e913ecd | |||
| e33ae0e1ac | |||
| 7babf26809 | |||
| 04c85942f1 | |||
| b432056698 | |||
| e2efe2ac70 | |||
| 66e352d3c0 | |||
| f06c1e0be7 | |||
| e58bdff8a9 | |||
| a0476f0a7c | |||
| b966db4fa5 | |||
| 78da936536 | |||
| 35afe4c1ea | |||
| ea18909b46 | |||
| fed4450a8d | |||
| 2dd30c228d | |||
| 6e6ff7d313 | |||
| 3faa81d799 | |||
| 0da921df0d | |||
| 2f8effb6d1 | |||
| 53d8a615a0 | |||
| 49839b712b | |||
| e6c01cd140 | |||
| 1f15636ca4 | |||
| c9b3fb2994 | |||
| e5e02927af | |||
| 4148643492 | |||
| 9237d6af63 | |||
| 646170fe19 | |||
| c8638bae9d | |||
| 88e9e6c6a4 | |||
| e555cbbdba | |||
| 30f31450ce | |||
| 42aa06a166 | |||
| b48e14eeb9 | |||
| c777af2b72 | |||
| 5f03924b5f | |||
| fef4bff9fa | |||
| 9b7a4352d6 | |||
| e33c56d1eb | |||
| 2e78dad1a7 | |||
| 39c7e56b16 | |||
| 6d57f55662 | |||
| 93f21bc18f | |||
| ce63768df3 | |||
| 2b845314f5 | |||
| 25aab85c9b | |||
| 0f8b36fb3d | |||
| 52bb358662 | |||
| 7c57512f94 | |||
| ad998f5787 | |||
| 757bb55d81 | |||
| 8808c3aae6 | |||
| 46ba761b8d | |||
| 415dc10141 | |||
| 4dcb4a7b10 | |||
| 0b2f188381 | |||
| b0f9d69f7c | |||
| 4cc49d0d30 | |||
| 88511c1ba9 | |||
| 1a77d1ffda | |||
| 6861d6c8a4 | |||
| f69295b8f9 | |||
| 80291c73c4 | |||
| f697d36b1c | |||
| 8119da792d | |||
| e282c02be2 | |||
| ddc424de50 | |||
| 3ee9f56423 | |||
| 38fdae6f1f | |||
| 0bcd0a0c09 | |||
| 155656c88a | |||
| e64464ff9b | |||
| ea562a2502 | |||
| 732fea6c23 | |||
| a26c5461ab | |||
| 0c49f35687 | |||
| 4ad8c79bc1 | |||
| d01b427127 | |||
| f1bdb931b8 | |||
| 53b51cac94 | |||
| ab58151f2a | |||
| dad37f36ba | |||
| e80d3ff642 | |||
| 464996d3c3 | |||
| 5ed74f1329 | |||
| 4445f7cdec | |||
| 238943f4a2 | |||
| 900266be4a | |||
| e50aa21dd2 | |||
| 98b1029bec | |||
| 9b5b9be50c | |||
| d51e86b669 | |||
| de52ee513c | |||
| 370f954e10 | |||
| d287027502 | |||
| f5a4d51c8f | |||
| c172d9727c | |||
| c0d53f4506 | |||
| 88b655764d | |||
| 4519dadee4 | |||
| d5e4f1132b | |||
| 95641d649d | |||
| 5a3fc73946 | |||
| f415f38ba6 | |||
| 21075d5a4c | |||
| 4226b7c89b | |||
| ac953cdcc8 | |||
| dd12d09c92 | |||
| 13558214a8 | |||
| db741860c1 | |||
| e219446703 | |||
| 862fa5525e | |||
| 8523a2fdaf | |||
| 1f87920fe4 | |||
| 6fac983c8a | |||
| c5096ff531 | |||
| 22efe664d5 | |||
| 6db0c0791a | |||
| 1db3e1f816 | |||
| 99cce1b33f | |||
| bdae43c091 | |||
| ec2b5d66cb | |||
| 6fd538f30e | |||
| d77662b53e | |||
| 71e71f8314 | |||
| 17ab2c83aa | |||
| 575eb3d0d1 | |||
| c22818442e | |||
| 0c926e5d19 | |||
| beb21ab7db | |||
| a7e1867878 | |||
| 0f33b1b0a9 | |||
| 8606e75f45 | |||
| 0c66f520a2 | |||
| f488ebc1f5 | |||
| 5bcde76ca0 | |||
| 540faa51bf | |||
| 010d9d9629 | |||
| 404c5a8553 | |||
| 1a7a07dffd | |||
| 4588c0119d | |||
| 43387d1794 | |||
| d2180d9429 | |||
| 238ef2be38 | |||
| 177f672619 | |||
| 0c525826b4 | |||
| e3d22300ed | |||
| 06bef98a05 | |||
| 5822cfded1 | |||
| 3940716b5d | |||
| 8493a393fd | |||
| 5ee95c472a | |||
| b6d4442ba1 | |||
| 36423db252 | |||
| 0ea133e490 | |||
| 4be6cfccab | |||
| 14f4eec6f7 | |||
| 01e7c249f6 | |||
| 0eba4596d0 | |||
| 81733b10cc | |||
| 2cccb99e28 | |||
| c20b0b8de4 | |||
| 0cf3a278e8 | |||
| f6b9a0fcdb | |||
| 1be84e3b6d | |||
| 74fd8fc435 | |||
| 3d117efae1 | |||
| 0cf81a7245 | |||
| 5ff6341a34 | |||
| 69f2acca35 | |||
| 6f2ece9cd0 | |||
| 7ef9992349 | |||
| 5767be27b6 | |||
| 068fa45a06 | |||
| 348526b5ba | |||
| a9f518c3a0 | |||
| 8f0a47b724 | |||
| f6f43ee438 | |||
| 98ee2f8f52 | |||
| 90cb89e86a | |||
| cfcdf3c3f8 | |||
| f1d1bc9d95 | |||
| 52e59fc85b | |||
| 61420db3ff | |||
| 3a63c9edea | |||
| 086632003b | |||
| 60334a3cf2 | |||
| f7ba671034 | |||
| bbd79f57ee | |||
| ff9278cb0b | |||
| 38cba03556 | |||
| 79b2015b6e | |||
| 7dac0ba81b | |||
| 4fcf8ab7ff | |||
| d471dc6216 | |||
| 1246c7d916 | |||
| d1d3f7fa0a | |||
| 116802c946 | |||
| 74adc1c7e6 | |||
| 829b86da99 | |||
| 0eda971365 | |||
| 5f65217124 | |||
| 907b6337fc | |||
| c9e9087ec9 | |||
| 231499e191 | |||
| b7ad1ea226 | |||
| 144710f1f7 | |||
| 03b4797073 | |||
| 06fce5108e | |||
| 957bc11135 | |||
| 4765984900 | |||
| 8bcbd0f7f6 | |||
| d73e4a6fbf | |||
| e97fe93a2e | |||
| 55c69a4448 | |||
| c614b1ac67 | |||
| 9b72be1f97 | |||
| 36df7900af | |||
| d1e7b66f1a | |||
| cfbec2cad9 | |||
| 7a2c0b3b88 | |||
| 0fad67a8ea | |||
| f3d6dfea94 | |||
| e032215186 | |||
| 32576b6f72 | |||
| 7a98a85bc5 | |||
| 29a139559d | |||
| 7eba760797 | |||
| 6f8bfa8da5 | |||
| 9056e76460 | |||
| 5d42c437a8 | |||
| 633af68fa9 | |||
| 1da69e4066 | |||
| c13b5d064c | |||
| f27a87dea4 | |||
| 4268ce9eca | |||
| 8eda8244c6 | |||
| 67c0326cca | |||
| 164844319a | |||
| aed4bf3709 | |||
| a0feed7f4d | |||
| 3f74d54fd9 | |||
| f2d778e74e | |||
| 1d4e6101ba | |||
| 59653f9ca6 | |||
| 98798c1e42 | |||
| 721a166be3 | |||
| dcd42145d0 | |||
| cc6ccdc3ab | |||
| 29d1c4f6f6 | |||
| 0467ef862f | |||
| 30f2f3a1e4 | |||
| 77ca37cf96 | |||
| f63a9c4cb7 | |||
| 7b3dcec30e | |||
| 7161d90297 | |||
| 082e2bbefd | |||
| 5b7526c5e8 | |||
| 01a69e3dbf | |||
| aaa10034ad | |||
| 7908eaa406 | |||
| 24abad55ca | |||
| 77888ae200 | |||
| e55a84d8b7 | |||
| f46ff84845 | |||
| a8480f9af2 | |||
| 06d9ec846d | |||
| 0ec122f519 | |||
| 49b3e5428f | |||
| 2df621993e | |||
| 49cad7f757 | |||
| 5f648b2050 | |||
| fa9b94bb71 | |||
| dabfb705be | |||
| ec6a9541f1 | |||
| 1c7bd63a94 | |||
| 3b445321fc | |||
| 6349ff9496 | |||
| 8cd677d697 | |||
| e2247623a2 | |||
| cd9c17e1f4 | |||
| 8dee23d9d3 | |||
| a5a4309cee | |||
| 1d7f33e23f | |||
| 5409d00a2a | |||
| addb51b25a | |||
| 870b6e2c68 | |||
| 65c4b26181 | |||
| f9198e3b7e | |||
| cc8ea42cdb | |||
| baacc0fe29 | |||
| d2f654e32d | |||
| 30056224a6 | |||
| bded417e8d | |||
| 0e26f03a1c | |||
| afce17443f | |||
| 0e5df7235d | |||
| 3fb853c8b8 | |||
| 97cc58e323 | |||
| 9924695b1d | |||
| 895a62c84e | |||
| 3c377a55e7 | |||
| ce4b6ed2b8 | |||
| 633d52297d | |||
| e859baea3d | |||
| 3d815e5d1b | |||
| d8736bfe94 | |||
| 1f7485ed91 | |||
| c6f13de505 | |||
| bd87028fd5 | |||
| 56f59196ea | |||
| fe57faef74 | |||
| 9106ee581d | |||
| c147b2edbc | |||
| 92c76b5884 | |||
| e04dfb7b7e | |||
| fd72c22cf5 | |||
| 26e156f9ad | |||
| 34444aedb2 | |||
| 3693f34a41 | |||
| 7d21c9eb87 | |||
| 981d133607 | |||
| 8a545ee60b | |||
| 42f82cbbed | |||
| 13ded98f29 | |||
| 6e5786ca71 | |||
| 4c213d7639 | |||
| 788b62d80c | |||
| 7b30201867 | |||
| 67364789a8 | |||
| 80b406b8d9 | |||
| f99e792dea | |||
| 0ead216c24 | |||
| e053f75b76 | |||
| d2923a32d3 | |||
| e62759e5f2 | |||
| 41a5af5a6e | |||
| 403471d869 | |||
| c2e90d35fd | |||
| 195a09c008 | |||
| 9c0e0a136a | |||
| 740a2a71f5 | |||
| 9c116f94ce | |||
| 296d207cfa | |||
| e33e83f2b5 | |||
| 1f19256722 | |||
| 6b73df6935 | |||
| 8ed325c33f | |||
| 9e0e71ad92 | |||
| 14841590b9 | |||
| a93e1538b9 | |||
| bbc2e11cca | |||
| 7247a511cf | |||
| dd2ff29601 | |||
| 9e0a26c51c | |||
| 66bd674ccf | |||
| b7939dc742 | |||
| 30e2d52f76 | |||
| 2acf6aed3b | |||
| 5d171b3761 | |||
| 834092879c | |||
| e9bb5a5115 | |||
| 143afa855f | |||
| e43d88e6b8 | |||
| 070c64631a | |||
| efb290324a | |||
| 2f1f4243f0 | |||
| 5ed27f157d | |||
| 868133371c | |||
| ee9bb73ef9 | |||
| c5a44250fc | |||
| a84357ad0b | |||
| 1e3da34ec8 | |||
| 5e354749b2 | |||
| 57028614fb | |||
| 651b0ad579 | |||
| 0c187412ea | |||
| 1a05cfca16 | |||
| 4bb5631b65 | |||
| 1fc0525636 | |||
| 79fcaec78f | |||
| dc4587b5b6 | |||
| 5d869d78e3 | |||
| 64a3c21c4e | |||
| c8cd34405d | |||
| 8807aa8689 | |||
| f534702d59 | |||
| 81c687dcd4 | |||
| 7d57b4df05 | |||
| 18f56075a5 | |||
| eaed9dd1a9 | |||
| b1e5e06d5b | |||
| 30018b2432 | |||
| eab639362a | |||
| 29325ad54f | |||
| ce0b17744c | |||
| 05ad98f9d8 | |||
| 38c7d9c2a0 | |||
| 7abcb28d11 | |||
| cbe92aa058 | |||
| 0e7662b36d | |||
| f0a0dc56c3 | |||
| bdb938cd53 | |||
| bb21c20b21 | |||
| 5993d28ab7 | |||
| 8c36199d69 | |||
| 3ef7326756 | |||
| 018fec4863 | |||
| 839296ac1b | |||
| 2990e9b9a3 | |||
| a8aa6148e5 | |||
| 9673df83a7 | |||
| a0b4053e82 | |||
| b0bda14f23 | |||
| 664a966bbc | |||
| 3cd6638e01 | |||
| d207a600e8 | |||
| 1f6a711d24 | |||
| 27d37f7b78 | |||
| ab2960b6aa | |||
| 43418e6705 | |||
| 21312cb1be | |||
| a03f85b083 | |||
| d41218eb29 | |||
| 788bdfbb09 | |||
| 9615c98103 | |||
| cbec010f44 | |||
| 5cb1ed87d8 | |||
| 1f303ec995 | |||
| 36316ecf4c | |||
| 555f6510b2 | |||
| 3c39893bca | |||
| 5f86e87ae2 | |||
| c5e95c9730 | |||
| 75977b6b6d | |||
| 09780a07ff | |||
| 54cb3de46e | |||
| 009eaa3893 | |||
| 02dfff319f | |||
| 3d4f3611b0 | |||
| 1f54c61e41 | |||
| 3c1221452a | |||
| e4d820b11e | |||
| 7076889e1a | |||
| 438f81aef9 | |||
| 4382445123 | |||
| 5f10deb182 | |||
| 9fb5416ac9 | |||
| 791a2e5f75 | |||
| 9cd9616ece | |||
| 3f4cae8cb1 | |||
| a2e5efa6c7 | |||
| 2ad644d793 | |||
| c09c3e0a2b | |||
| 5d19adb1eb | |||
| 96c64f2895 | |||
| 0dc2f60e09 | |||
| 99c7e3f0ad | |||
| f86dc6b156 | |||
| 9de6e09c09 | |||
| 119e413a6d | |||
| c788ad6add | |||
| 2e6570e209 | |||
| 9762656ad0 | |||
| f2eadf0ff0 | |||
| 90f67cd5ef | |||
| 41b1e1c9bc | |||
| fb5feb8a91 | |||
| 86076bbf32 | |||
| c24219cbcd | |||
| 38dbfd130a | |||
| a6a07e9714 | |||
| ed30b5a8ed | |||
| 83a7859f6f | |||
| 6a2e26272e | |||
| be1526a86d | |||
| 554f230696 | |||
| f2fb6b20de | |||
| a3c175f537 | |||
| 5a5f192451 | |||
| af87c57d1d | |||
| 7c1db4c4dc | |||
| d73b34e1a9 | |||
| 746dc450fa | |||
| 485d30f65b | |||
| 7e4b5d97e3 | |||
| 2c00a3437f | |||
| fef78a1b97 | |||
| 2c256e9e73 | |||
| 1fba706bdb | |||
| 7ec0dd8a40 | |||
| 8d5e5b2d01 | |||
| 8c636e31d9 | |||
| c2412ca05e | |||
| 6ceb575d1e | |||
| a70cbe6a0d | |||
| e1b7848a91 | |||
| dfd4a04220 | |||
| 1c9a5ed753 | |||
| 42f1515b2f | |||
| 06cdc6ba7b | |||
| e774fe091c | |||
| 0273038289 | |||
| d609158b27 | |||
| 4bf837b21f | |||
| ca47684e36 | |||
| 210ee69101 | |||
| 6b4da258e7 | |||
| 47f083e1c8 | |||
| 69fc1b9354 | |||
| c2786d36c9 | |||
| a2928c5d79 | |||
| 2bb63e6644 | |||
| 7501608aca | |||
| 862199f822 | |||
| ccfcfa85d0 | |||
| 884e1feee4 | |||
| a681c341a2 | |||
| 34f9bc0b63 | |||
| f073c9fe85 | |||
| dd76e9d8bf | |||
| ecff71b044 | |||
| 79dffdf5f4 | |||
| bc70acb55d | |||
| 4b6bcc6a0e | |||
| 1809addbb3 | |||
| 641fdc5160 | |||
| c1cd54ee6a | |||
| 497f699331 | |||
| b4bf833667 | |||
| f979fd7289 | |||
| d5931d2129 | |||
| d6dfdea6e2 | |||
| 31fa16bf87 | |||
| e3d70817ea | |||
| 20ab3a324b | |||
| fd57db6068 | |||
| 3d0bf81bfd | |||
| c58217a82c | |||
| d831d1428c | |||
| 3480107a9b | |||
| c5a5fa2430 | |||
| ea41a59da7 | |||
| cb42f4814b | |||
| e5e3bb4997 | |||
| cd43482911 | |||
| 82ccb70ebd | |||
| 8931b76143 | |||
| c6b2e12802 | |||
| c282aa6065 | |||
| bff45a4b2a | |||
| ad5b17900b | |||
| 43c70780b1 | |||
| a05fa1738f | |||
| 5691395dcf | |||
| 74992a69dc | |||
| d064ba0136 | |||
| 1efad1ac38 | |||
| 909b3bb595 | |||
| 3eb0c3a953 | |||
| 9e61f3e5e0 | |||
| dbcda02770 | |||
| c8a84a404b | |||
| c19b35ea0e | |||
| bca7773279 | |||
| b29f9584d1 | |||
| e6acfc7e88 | |||
| 38e44991e9 | |||
| 27dc84028c | |||
| bd3c52d6ac | |||
| 8ecd053af5 | |||
| be29e80988 | |||
| 28dd71905f | |||
| 76e39222db | |||
| 5e6288b7d1 | |||
| 65664c0bc9 | |||
| 3a064b15ed | |||
| af2cd30146 | |||
| a25b20a1e7 | |||
| 43e7680c9b | |||
| e317687973 | |||
| a3af63edad | |||
| 49e70dbf12 | |||
| 74229b808f | |||
| 5925e8eae4 | |||
| 63d306070a | |||
| bffa99d98f | |||
| defef14018 | |||
| 0a7d0119fe | |||
| 3fdfcf45f9 | |||
| f43a790d5c | |||
| 244239ff6a | |||
| 4443ab22ee | |||
| f622d7cf6d | |||
| b8068438fb | |||
| e8b783a491 | |||
| 5cb6884ab3 | |||
| e810367284 | |||
| 648f03a079 | |||
| 0661b8219c | |||
| e4b596d733 | |||
| f90a69335b | |||
| dd066c3ec1 | |||
| 83c88d93ee | |||
| 92911daf73 | |||
| ca7eae6ef0 | |||
| 662137aa6d | |||
| a2db3f2150 | |||
| de08e50f15 | |||
| 32a3d4588e | |||
| ca4a5356f2 | |||
| 8cf4b5e4e8 | |||
| e4729727ae | |||
| 14673dd7bb | |||
| c2dffd2b24 | |||
| 5a7c9311de | |||
| eb477f2953 | |||
| 5337092e93 | |||
| e0ead516f6 | |||
| 083060968f | |||
| c038a7e4d5 | |||
| 7e45537402 | |||
| 9a66da21d5 | |||
| 63fcf537e6 | |||
| b1ebcb9ace | |||
| 98a7900e70 | |||
| 726e32731b |
@@ -10,3 +10,4 @@ radio/src/bootloader/bootloader_ramBoot*
|
||||
*.stamp
|
||||
radio/src/lua/lua_fields_*.txt
|
||||
radio/src/lua/lua_exports_*.txt
|
||||
build*/
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
language: cpp
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: python
|
||||
|
||||
virtualenv:
|
||||
system_site_packages: true
|
||||
|
||||
python:
|
||||
- 3.4
|
||||
|
||||
before_install:
|
||||
- sudo apt-get remove cmake cmake-data --yes
|
||||
- sudo add-apt-repository ppa:george-edison55/precise-backports --yes
|
||||
- sudo add-apt-repository ppa:ubuntu-sdk-team/ppa --yes
|
||||
- sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded --yes
|
||||
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
|
||||
- sudo add-apt-repository ppa:beineri/opt-qt551 --yes
|
||||
- sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' --yes
|
||||
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
- sudo apt-get update -qq
|
||||
- rsync -av firmware.diydrones.com::Tools/Travis/*.deb ExtraPackages
|
||||
|
||||
install:
|
||||
- sudo apt-get install -y xvfb lcov cmake cmake-data bc curl gcc-arm-none-eabi qt-latest g++-5 libxerces-c-dev xsdcxx libsdl1.2-dev libusb-1.0-0 libfox-1.6-dev libgtest-dev python-clang-3.8 libclang-3.8-dev python-qt4
|
||||
- sudo dpkg -i ExtraPackages/*.deb || echo "FAILED INSTALL OF EXTRA DEBS"
|
||||
- export CXX="g++-5" CC="gcc-5"
|
||||
- sudo apt-get --yes --force-yes install qtbase5-dev qtmultimedia5-dev qttools5-dev qttools5-dev-tools python3-pyqt5 curl gcc-arm-none-eabi libfox-1.6-dev libgtest-dev
|
||||
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/gcc-avr_1%253a4.8-2.1_amd64.deb
|
||||
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/libmpfr4_3.1.2-1_amd64.deb
|
||||
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/avr-libc_1%253a1.8.0-4.1_all.deb
|
||||
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/binutils-avr_2.23.1-2.1_amd64.deb
|
||||
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/libmpc3_1.0.1-1ubuntu1_amd64.deb
|
||||
- sudo dpkg --install gcc-avr_1%3a4.8-2.1_amd64.deb avr-libc_1%3a1.8.0-4.1_all.deb libmpfr4_3.1.2-1_amd64.deb binutils-avr_2.23.1-2.1_amd64.deb libmpc3_1.0.1-1ubuntu1_amd64.deb
|
||||
|
||||
script:
|
||||
- ./radio/util/commit-tests.sh .
|
||||
- ./tools/commit-tests.sh .
|
||||
|
||||
@@ -11,6 +11,9 @@ message(STATUS "OpenTX ${VERSION}")
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
cmake_policy(SET CMP0023 OLD)
|
||||
if(POLICY CMP0043)
|
||||
cmake_policy(SET CMP0043 NEW)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
@@ -28,6 +31,20 @@ find_package(Qt5LinguistTools)
|
||||
find_package(Qt5PrintSupport)
|
||||
find_package(Qt5Multimedia)
|
||||
|
||||
message(STATUS "Looking for SDL ")
|
||||
find_package(Sdl)
|
||||
if(SDL_FOUND)
|
||||
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
|
||||
else()
|
||||
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Looking for FOX ")
|
||||
find_package(Fox)
|
||||
if ((NOT FOX_FOUND) AND (NOT WIN32))
|
||||
message("Libfox not found, simu target will not be available")
|
||||
endif()
|
||||
|
||||
include(Macros)
|
||||
today(DATE)
|
||||
now(TIME)
|
||||
|
||||
@@ -17,3 +17,4 @@ Karl Szmutny
|
||||
Michal Hlavinka
|
||||
Pat Mackenzie
|
||||
Michael Byrne
|
||||
Christophe Brision (Ingwie)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
##OpenTX 2.2 Branch
|
||||
|
||||
[](https://travis-ci.org/opentx/opentx)
|
||||
[](https://gitter.im/opentx/opentx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://opentx.rocket.chat)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJ9MASSKVW8WN)
|
||||
|
||||
The ongoing development on 2.2.x is done in this branch.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
macro(add_bitmaps_target targetname filter width format)
|
||||
set(bitmaps_files)
|
||||
file(GLOB bitmaps ${filter})
|
||||
foreach(bitmap ${bitmaps})
|
||||
get_filename_component(target ${bitmap} NAME_WE)
|
||||
@@ -19,4 +20,5 @@ macro(add_truetype_font_target radio name font size bold)
|
||||
COMMAND ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${bold} ${target}
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
|
||||
endmacro(add_truetype_font_target)
|
||||
@@ -0,0 +1,63 @@
|
||||
# Imported from the DeskVox project (LPGL 2.1)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(hints
|
||||
$ENV{LIB_BASE_PATH}/fox
|
||||
)
|
||||
|
||||
set(paths
|
||||
/usr
|
||||
/usr/local
|
||||
)
|
||||
|
||||
find_path(FOX_INCLUDE_DIR
|
||||
NAMES
|
||||
fx.h
|
||||
HINTS
|
||||
${hints}
|
||||
PATHS
|
||||
${paths}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include/fox
|
||||
include/fox-1.6
|
||||
)
|
||||
|
||||
find_library(FOX_LIBRARY
|
||||
NAMES
|
||||
FOX-1.6
|
||||
fox-1.6
|
||||
HINTS
|
||||
${hints}
|
||||
PATHS
|
||||
${paths}
|
||||
PATH_SUFFIXES
|
||||
lib64
|
||||
lib
|
||||
)
|
||||
|
||||
find_library(FOX_LIBRARY_DEBUG
|
||||
NAMES
|
||||
FOXD-1.6
|
||||
foxd-1.6
|
||||
HINTS
|
||||
${hints}
|
||||
PATHS
|
||||
${paths}
|
||||
PATH_SUFFIXES
|
||||
lib64
|
||||
lib
|
||||
)
|
||||
|
||||
if(FOX_LIBRARY_DEBUG)
|
||||
set(FOX_LIBRARIES optimized ${FOX_LIBRARY} debug ${FOX_LIBRARY_DEBUG})
|
||||
else()
|
||||
set(FOX_LIBRARIES ${FOX_LIBRARY})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(FOX
|
||||
DEFAULT_MSG
|
||||
FOX_INCLUDE_DIR
|
||||
FOX_LIBRARY
|
||||
)
|
||||
@@ -150,11 +150,6 @@ IF(SDL_LIBRARY_TEMP)
|
||||
SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP})
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
|
||||
|
||||
|
||||
@@ -25,15 +25,10 @@ if(TABLE_LAYOUT)
|
||||
message(STATUS "Using QTableWidget")
|
||||
endif(TABLE_LAYOUT)
|
||||
|
||||
message(STATUS "Looking for SDL ")
|
||||
find_package(Sdl)
|
||||
if(SDL_FOUND)
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
|
||||
add_definitions(-DJOYSTICKS)
|
||||
add_definitions(-DSIMU_AUDIO)
|
||||
else()
|
||||
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
|
||||
add_definitions(-DJOYSTICKS)
|
||||
endif()
|
||||
|
||||
message(STATUS "Looking for QT lupdate ")
|
||||
@@ -223,6 +218,7 @@ qt5_wrap_ui(companion_SRCS ${companion_UIS})
|
||||
qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})
|
||||
qt5_add_translation(companion_QM ${companion_TS})
|
||||
qt5_add_resources(companion_RCC ${companion_RESOURCES})
|
||||
add_custom_target(gen_qrc DEPENDS ${companion_RCC})
|
||||
|
||||
add_definitions(-DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}")
|
||||
|
||||
@@ -234,6 +230,7 @@ else()
|
||||
add_executable(${COMPANION_NAME} WIN32 ${companion_SRCS} ${companion_RCC} ${companion_QM})
|
||||
endif()
|
||||
|
||||
add_dependencies(${COMPANION_NAME} gen_qrc)
|
||||
qt5_use_modules(${COMPANION_NAME} Core Widgets Network)
|
||||
target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit simulation common qcustomplot shared ${PTHREAD_LIBRARY} ${SDL_LIBRARY})
|
||||
|
||||
@@ -261,29 +258,50 @@ else()
|
||||
add_executable(${SIMULATOR_NAME} WIN32 ${simu_SRCS} ${companion_RCC})
|
||||
endif()
|
||||
|
||||
add_dependencies(${SIMULATOR_NAME} gen_qrc)
|
||||
# TODO not the same link command than companion?
|
||||
target_link_libraries(${SIMULATOR_NAME} PRIVATE simulation common qxtcommandoptions ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${OPENTX_SIMULATOR_LIBS})
|
||||
|
||||
############# Packaging ####################
|
||||
|
||||
message(STATUS ${CMAKE_BINARY_DIR} ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install(TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${SIMULATOR_LIB_PATH} USE_SOURCE_PERMISSIONS
|
||||
FILES_MATCHING PATTERN "libopentx-*.so"
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
PATTERN "_CPack_Packages" EXCLUDE
|
||||
PATTERN "companion" EXCLUDE
|
||||
PATTERN "radio" EXCLUDE
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop)
|
||||
install(FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
|
||||
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
|
||||
if(${CMAKE_INSTALL_PREFIX} MATCHES "/usr/local")
|
||||
install(FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
|
||||
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
|
||||
else()
|
||||
install(FILES images/linuxicons/16x16/companion.png DESTINATION share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/22x22/companion.png DESTINATION share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/24x24/companion.png DESTINATION share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/32x32/companion.png DESTINATION share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/48x48/companion.png DESTINATION share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/128x128/companion.png DESTINATION share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/256x256/companion.png DESTINATION share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/512x512/companion.png DESTINATION share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
|
||||
install(FILES images/linuxicons/scalable/companion.svg DESTINATION share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
|
||||
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
|
||||
endif()
|
||||
# Linux specific code
|
||||
set(OperatingSystem "Linux")
|
||||
else()
|
||||
elseif(WIN32)
|
||||
get_target_property(QtCore_LOCATION Qt5::Core LOCATION)
|
||||
get_filename_component(QT_DLL_DIR ${QtCore_LOCATION} PATH)
|
||||
get_filename_component(SDL_DIR ${SDL_LIBRARY} PATH)
|
||||
|
||||
@@ -740,7 +740,7 @@ void AppData::init()
|
||||
|
||||
// Load and store all variables. Use default values if setting values are missing
|
||||
QString _tempString; // Do not touch. Do not change the settings version before a new verson update!
|
||||
getset( _tempString, "settings_version" ,"210" ); // This is a version marker. Will be used to upgrade the settings later on.
|
||||
getset( _tempString, "settings_version" ,"220" ); // This is a version marker. Will be used to upgrade the settings later on.
|
||||
|
||||
getset( _recentFiles, "recentFileList" ,"" );
|
||||
getset( _mainWinGeo, "mainWindowGeometry" ,"" );
|
||||
|
||||
@@ -109,9 +109,14 @@ void AppPreferencesDialog::initSettings()
|
||||
ui->snapshotPath->setDisabled(true);
|
||||
ui->snapshotPathButton->setDisabled(true);
|
||||
}
|
||||
#if defined(ALLOW_NIGHTLY_BUILDS)
|
||||
ui->useCompanionNightlyBuilds->setChecked(g.useCompanionNightlyBuilds());
|
||||
ui->autoCheckCompanion->setChecked(g.autoCheckApp());
|
||||
ui->useFirmwareNightlyBuilds->setChecked(g.useFirmwareNightlyBuilds());
|
||||
#else
|
||||
ui->useCompanionNightlyBuilds->hide();
|
||||
ui->useFirmwareNightlyBuilds->hide();
|
||||
#endif
|
||||
ui->autoCheckCompanion->setChecked(g.autoCheckApp());
|
||||
ui->autoCheckFirmware->setChecked(g.autoCheckFw());
|
||||
ui->showSplash->setChecked(g.showSplash());
|
||||
ui->historySize->setValue(g.historySize());
|
||||
|
||||
@@ -21,7 +21,7 @@ burnConfigDialog::burnConfigDialog(QWidget *parent) :
|
||||
getSettings();
|
||||
populateProgrammers();
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
setWindowTitle(tr("DFU-UTIL Configuration"));
|
||||
ui->avrArgs->hide();
|
||||
ui->avrdude_location->hide();
|
||||
@@ -310,7 +310,7 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
|
||||
{
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
if (checked) {
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
ui->label_dfu2->show();
|
||||
ui->dfuArgs->show();
|
||||
}
|
||||
@@ -327,7 +327,7 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
ui->label_dfu2->hide();
|
||||
ui->dfuArgs->hide();
|
||||
}
|
||||
|
||||
@@ -134,10 +134,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
QString splashScreen;
|
||||
if ( g.profile[g.id()].fwType().contains("taranis")) splashScreen = ":/images/splash-taranis.png";
|
||||
else if ( g.profile[g.id()].fwType().contains("9xrpro")) splashScreen = ":/images/splash-9xrpro.png";
|
||||
else if ( g.profile[g.id()].fwType().contains("9xr")) splashScreen = ":/images/splash-9xr.png";
|
||||
else splashScreen = ":/images/splash-9x.png";
|
||||
splashScreen = ":/images/splash.png";
|
||||
|
||||
QPixmap pixmap = QPixmap(splashScreen);
|
||||
QSplashScreen *splash = new QSplashScreen(pixmap);
|
||||
|
||||
@@ -54,10 +54,7 @@
|
||||
<file>images/simulator/9X/9xcursdown.png</file>
|
||||
<file>images/simulator/9X/9xcursphoto.png</file>
|
||||
<file>images/screenshot.png</file>
|
||||
<file>images/splash-9x.png</file>
|
||||
<file>images/splash-9xrpro.png</file>
|
||||
<file>images/splash-9xr.png</file>
|
||||
<file>images/splash-taranis.png</file>
|
||||
<file>images/splash.png</file>
|
||||
<file>images/companion-title.png</file>
|
||||
<file>images/maps.png</file>
|
||||
<file>images/track.png</file>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "helpers.h"
|
||||
|
||||
ContributorsDialog::ContributorsDialog(QWidget * parent):
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
QDialog(parent),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -1380,9 +1380,9 @@ void ModelData::clear()
|
||||
moduleData[0].channelsCount = 8;
|
||||
moduleData[1].channelsStart = 0;
|
||||
moduleData[1].channelsCount = 8;
|
||||
moduleData[0].ppmDelay = 300;
|
||||
moduleData[1].ppmDelay = 300;
|
||||
moduleData[2].ppmDelay = 300;
|
||||
moduleData[0].ppm.delay = 300;
|
||||
moduleData[1].ppm.delay = 300;
|
||||
moduleData[2].ppm.delay = 300;
|
||||
int board = GetEepromInterface()->getBoard();
|
||||
if (IS_TARANIS(board)) {
|
||||
moduleData[0].protocol = PULSES_PXX_XJT_X16;
|
||||
@@ -1397,7 +1397,7 @@ void ModelData::clear()
|
||||
moduleData[1].protocol = PULSES_OFF;
|
||||
}
|
||||
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
flightModeData[i].clear();
|
||||
flightModeData[i].clear(i);
|
||||
}
|
||||
clearInputs();
|
||||
clearMixes();
|
||||
@@ -1510,9 +1510,7 @@ int ModelData::getTrimValue(int phaseIdx, int trimIdx)
|
||||
}
|
||||
else {
|
||||
phaseIdx = phase.trimRef[trimIdx];
|
||||
if (phase.trimMode[trimIdx] == 0)
|
||||
result = 0;
|
||||
else
|
||||
if (phase.trimMode[trimIdx] != 0)
|
||||
result += phase.trim[trimIdx];
|
||||
}
|
||||
}
|
||||
@@ -1767,6 +1765,33 @@ QString getBoardName(BoardEnum board)
|
||||
}
|
||||
}
|
||||
|
||||
const int Firmware::getFlashSize()
|
||||
{
|
||||
switch (board) {
|
||||
case BOARD_STOCK:
|
||||
return FSIZE_STOCK;
|
||||
case BOARD_M128:
|
||||
return FSIZE_M128;
|
||||
case BOARD_MEGA2560:
|
||||
case BOARD_GRUVIN9X:
|
||||
return FSIZE_GRUVIN9X;
|
||||
case BOARD_SKY9X:
|
||||
return FSIZE_SKY9X;
|
||||
case BOARD_9XRPRO:
|
||||
case BOARD_AR9X:
|
||||
return FSIZE_9XRPRO;
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
case BOARD_TARANIS_X9E:
|
||||
case BOARD_FLAMENCO:
|
||||
return FSIZE_TARANIS;
|
||||
case BOARD_HORUS:
|
||||
return FSIZE_HORUS;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Firmware * GetFirmware(QString id)
|
||||
{
|
||||
foreach(Firmware * firmware, firmwares) {
|
||||
@@ -1830,3 +1855,45 @@ SimulatorInterface *GetCurrentFirmwareSimulator()
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
|
||||
switch (type) {
|
||||
case MM_RF_PROTO_HISKY:
|
||||
case MM_RF_PROTO_DSM2:
|
||||
case MM_RF_PROTO_SYMAX:
|
||||
case MM_RF_PROTO_KN:
|
||||
return 2;
|
||||
|
||||
case MM_RF_PROTO_FRSKY:
|
||||
case MM_RF_PROTO_CG023:
|
||||
case MM_RF_PROTO_MT99XX:
|
||||
return 3;
|
||||
|
||||
case MM_RF_PROTO_FLYSKY:
|
||||
case MM_RF_PROTO_MJXQ:
|
||||
return 4;
|
||||
|
||||
case MM_RF_PROTO_YD717:
|
||||
return 5;
|
||||
|
||||
case MM_RF_PROTO_CX10:
|
||||
case MM_RF_PROTO_CUSTOM:
|
||||
return 8;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FlightModeData::clear(const int phase)
|
||||
{
|
||||
memset(this, 0, sizeof(FlightModeData));
|
||||
if (phase != 0) {
|
||||
for (int idx=0; idx<C9X_MAX_GVARS; idx++) {
|
||||
gvars[idx] = 1025;
|
||||
}
|
||||
for (int idx=0; idx<C9X_MAX_ENCODERS; idx++) {
|
||||
rotaryEncoders[idx] = 1025;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <iostream>
|
||||
#include <bitset>
|
||||
#include "constants.h"
|
||||
#include "../../radio/src/definitions.h"
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
#define EESIZE_STOCK 2048
|
||||
@@ -36,6 +37,15 @@
|
||||
#define EESIZE_9XRPRO (128*4096)
|
||||
#define EESIZE_MAX EESIZE_9XRPRO
|
||||
|
||||
#define FSIZE_STOCK (64*1024)
|
||||
#define FSIZE_M128 (128*1024)
|
||||
#define FSIZE_GRUVIN9X (256*1024)
|
||||
#define FSIZE_TARANIS (512*1024)
|
||||
#define FSIZE_SKY9X (256*1024)
|
||||
#define FSIZE_9XRPRO (512*1024)
|
||||
#define FSIZE_HORUS (2048*1024)
|
||||
#define FSIZE_MAX FSIZE_HORUS
|
||||
|
||||
QString getBoardName(BoardEnum board);
|
||||
|
||||
#define IS_9X(board) (board==BOARD_STOCK || board==BOARD_M128)
|
||||
@@ -135,7 +145,11 @@ enum FailsafeModes {
|
||||
#define TRIM_RV_UP 5
|
||||
#define TRIM_RH_L 6
|
||||
#define TRIM_RH_R 7
|
||||
#define TRIM_NONE 8
|
||||
#define TRIM_T5_DN 8
|
||||
#define TRIM_T5_UP 9
|
||||
#define TRIM_T6_DN 10
|
||||
#define TRIM_T6_UP 11
|
||||
#define TRIM_NONE 12
|
||||
|
||||
// Beep center bits
|
||||
#define BC_BIT_RUD (0x01)
|
||||
@@ -149,23 +163,6 @@ enum FailsafeModes {
|
||||
#define BC_BIT_REA (0x80)
|
||||
#define BC_BIT_REB (0x100)
|
||||
|
||||
// TODO remove this enum!
|
||||
enum EnumKeys {
|
||||
KEY_MENU,
|
||||
KEY_EXIT,
|
||||
#if defined(PCBTARANIS)
|
||||
KEY_ENTER,
|
||||
KEY_PAGE,
|
||||
KEY_PLUS,
|
||||
KEY_MINUS,
|
||||
#else
|
||||
KEY_DOWN,
|
||||
KEY_UP,
|
||||
KEY_RIGHT,
|
||||
KEY_LEFT,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define CHAR_FOR_NAMES " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-."
|
||||
#define CHAR_FOR_NAMES_REGEX "[ A-Za-z0-9_.-,]*"
|
||||
|
||||
@@ -635,7 +632,7 @@ class CustomFunctionData { // Function Switches data
|
||||
|
||||
class FlightModeData {
|
||||
public:
|
||||
FlightModeData() { clear(); }
|
||||
FlightModeData() { clear(0); }
|
||||
int trimMode[NUM_STICKS];
|
||||
int trimRef[NUM_STICKS];
|
||||
int trim[NUM_STICKS];
|
||||
@@ -643,9 +640,9 @@ class FlightModeData {
|
||||
char name[10+1];
|
||||
unsigned int fadeIn;
|
||||
unsigned int fadeOut;
|
||||
int rotaryEncoders[2];
|
||||
int rotaryEncoders[C9X_MAX_ENCODERS];
|
||||
int gvars[C9X_MAX_GVARS];
|
||||
void clear() { memset(this, 0, sizeof(FlightModeData)); }
|
||||
void clear(const int phase);
|
||||
};
|
||||
|
||||
class SwashRingData { // Swash Ring data
|
||||
@@ -845,9 +842,38 @@ enum PulsesProtocol {
|
||||
PULSES_PXX_XJT_LR12,
|
||||
PULSES_PXX_DJT,
|
||||
PULSES_CROSSFIRE,
|
||||
PULSES_MULTIMODULE,
|
||||
PULSES_PROTOCOL_LAST
|
||||
};
|
||||
|
||||
enum MultiModuleRFProtocols {
|
||||
MM_RF_PROTO_FLYSKY=0,
|
||||
MM_RF_PROTO_FIRST=MM_RF_PROTO_FLYSKY,
|
||||
MM_RF_PROTO_HUBSAN,
|
||||
MM_RF_PROTO_FRSKY,
|
||||
MM_RF_PROTO_HISKY,
|
||||
MM_RF_PROTO_V2X2,
|
||||
MM_RF_PROTO_DSM2,
|
||||
MM_RF_PROTO_DEVO,
|
||||
MM_RF_PROTO_YD717,
|
||||
MM_RF_PROTO_KN,
|
||||
MM_RF_PROTO_SYMAX,
|
||||
MM_RF_PROTO_SLT,
|
||||
MM_RF_PROTO_CX10,
|
||||
MM_RF_PROTO_CG023,
|
||||
MM_RF_PROTO_BAYANG,
|
||||
MM_RF_PROTO_ESky,
|
||||
MM_RF_PROTO_MT99XX,
|
||||
MM_RF_PROTO_MJXQ,
|
||||
MM_RF_PROTO_SHENQI,
|
||||
MM_RF_PROTO_FY326,
|
||||
MM_RF_PROTO_SFHSS,
|
||||
MM_RF_PROTO_CUSTOM,
|
||||
MM_RF_PROTO_LAST= MM_RF_PROTO_CUSTOM
|
||||
};
|
||||
|
||||
unsigned int getNumSubtypes(MultiModuleRFProtocols type);
|
||||
|
||||
enum TrainerProtocol {
|
||||
TRAINER_MASTER_JACK,
|
||||
TRAINER_SLAVE_JACK,
|
||||
@@ -861,17 +887,39 @@ class ModuleData {
|
||||
ModuleData() { clear(); }
|
||||
unsigned int modelId;
|
||||
int protocol;
|
||||
int subprotocol;
|
||||
unsigned int subType;
|
||||
bool invertedSerial;
|
||||
unsigned int channelsStart;
|
||||
int channelsCount; // 0=8 channels
|
||||
unsigned int failsafeMode;
|
||||
int failsafeChannels[C9X_NUM_CHNOUT];
|
||||
int ppmDelay;
|
||||
bool ppmPulsePol; // false = positive
|
||||
bool ppmOutputType; // false = open drain, true = push pull
|
||||
int ppmFrameLength;
|
||||
|
||||
// By pure coincidence the struct are unions with the same datatype in Companion
|
||||
// and the firmware itself. If this changes the multi struct needs it own logic in the eeprom interface
|
||||
union {
|
||||
struct {
|
||||
int delay;
|
||||
bool pulsePol; // false = positive
|
||||
bool outputType; // false = open drain, true = push pull
|
||||
int frameLength;
|
||||
} ppm;
|
||||
struct {
|
||||
int rfProtocol;
|
||||
bool autoBindMode;
|
||||
bool lowPowerMode;
|
||||
int optionValue;
|
||||
} multi;
|
||||
};
|
||||
|
||||
// Currently the Eeprom read/write code does not work with unions
|
||||
// define a hack for the multi rf Protocol to get the real numbers here
|
||||
// (reverse the int => ms logic of the ppm delay)
|
||||
int getMultiRfProtocol () { return (multi.rfProtocol - 300) / 50; }
|
||||
void setMultiRfProtocol (int val) { multi.rfProtocol = 300 + 50 * val; }
|
||||
|
||||
void clear() { memset(this, 0, sizeof(ModuleData)); }
|
||||
QString polarityToString() const { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
|
||||
QString polarityToString() const { return ppm.pulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
|
||||
|
||||
};
|
||||
|
||||
#define C9X_MAX_SCRIPTS 7
|
||||
@@ -1627,9 +1675,13 @@ class Firmware {
|
||||
|
||||
virtual int getCapability(const Capability) = 0;
|
||||
|
||||
virtual QTime getMaxTimerStart() = 0;
|
||||
|
||||
virtual bool isTelemetrySourceAvailable(int source) = 0;
|
||||
|
||||
virtual int isAvailable(PulsesProtocol proto, int port=0) = 0;
|
||||
|
||||
const int getFlashSize();
|
||||
|
||||
public:
|
||||
QList<const char *> languages;
|
||||
|
||||
@@ -125,7 +125,7 @@ bool RleFile::searchFat()
|
||||
uint32_t bestFatIndex = 0;
|
||||
for (int i=0; i<EEPROM_ZONE_SIZE/EEPROM_FAT_SIZE; i++) {
|
||||
EepromHeader * header = (EepromHeader *)(eeprom+i*EEPROM_FAT_SIZE);
|
||||
if (header->mark == EEPROM_MARK && (int)header->index >= bestFatIndex) {
|
||||
if (header->mark == EEPROM_MARK && header->index >= bestFatIndex) {
|
||||
eepromFatHeader = header;
|
||||
bestFatIndex = header->index;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ int getFileType(const QString &fullFileName)
|
||||
}
|
||||
|
||||
FirmwareInterface::FirmwareInterface(const QString &filename):
|
||||
flash(MAX_FSIZE, 0),
|
||||
flash(FSIZE_MAX, 0),
|
||||
flashSize(0),
|
||||
versionId(0),
|
||||
eepromVersion(0),
|
||||
@@ -59,11 +59,11 @@ FirmwareInterface::FirmwareInterface(const QString &filename):
|
||||
QFile file(filename);
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { // reading HEX TEXT file
|
||||
QTextStream inputStream(&file);
|
||||
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), MAX_FSIZE);
|
||||
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), FSIZE_MAX);
|
||||
file.close();
|
||||
if (flashSize == 0) {
|
||||
file.open(QIODevice::ReadOnly);
|
||||
flashSize = file.read((char *)flash.data(), MAX_FSIZE);
|
||||
flashSize = file.read((char *)flash.data(), FSIZE_MAX);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,10 +130,12 @@ QString FirmwareInterface::seekLabel(const QString & label)
|
||||
|
||||
QString FirmwareInterface::getFlavour() const
|
||||
{
|
||||
if (flavour == "opentx-x9dp")
|
||||
return "opentx-taranis-plus";
|
||||
else if (flavour == "opentx-x9d")
|
||||
return "opentx-taranis";
|
||||
if (flavour == "opentx-taranis-x9e")
|
||||
return "opentx-x9e";
|
||||
else if (flavour == "opentx-x9dp" || flavour == "opentx-taranis-plus")
|
||||
return "opentx-x9d+";
|
||||
else if (flavour == "opentx-taranis")
|
||||
return "opentx-x9d";
|
||||
else
|
||||
return flavour;
|
||||
}
|
||||
@@ -340,14 +342,18 @@ bool FirmwareInterface::isValid()
|
||||
|
||||
unsigned int FirmwareInterface::save(QString fileName)
|
||||
{
|
||||
uint8_t binflash[MAX_FSIZE];
|
||||
memcpy(&binflash, flash.constData(), flashSize);
|
||||
uint8_t *binflash = (uint8_t*)malloc(FSIZE_MAX);
|
||||
if (binflash == NULL) {
|
||||
return -1;
|
||||
}
|
||||
memcpy(binflash, flash.constData(), flashSize);
|
||||
QFile file(fileName);
|
||||
|
||||
int fileType = getFileType(fileName);
|
||||
|
||||
if (fileType == FILE_TYPE_HEX) {
|
||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text)) { //reading HEX TEXT file
|
||||
free(binflash);
|
||||
return -1;
|
||||
}
|
||||
QTextStream outputStream(&file);
|
||||
@@ -356,6 +362,7 @@ unsigned int FirmwareInterface::save(QString fileName)
|
||||
}
|
||||
else {
|
||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) { //reading HEX TEXT file
|
||||
free(binflash);
|
||||
return -1;
|
||||
}
|
||||
file.write((char*)binflash, flashSize);
|
||||
@@ -363,5 +370,6 @@ unsigned int FirmwareInterface::save(QString fileName)
|
||||
|
||||
file.close();
|
||||
|
||||
free(binflash);
|
||||
return flashSize;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <QImage>
|
||||
#include <QByteArray>
|
||||
|
||||
#define MAX_FSIZE (512*1024)
|
||||
#define SPLASH_WIDTH (128)
|
||||
#define SPLASH_HEIGHT (64)
|
||||
#define SPLASHX9D_WIDTH (212)
|
||||
|
||||
@@ -373,17 +373,17 @@ t_Er9xModelData::operator ModelData ()
|
||||
c9x.moduleData[0].protocol = PULSES_PPM;
|
||||
break;
|
||||
}
|
||||
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.customFn[0].func = FuncInstantTrim;
|
||||
if (trimSw) {
|
||||
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
|
||||
}
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
|
||||
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
|
||||
|
||||
@@ -19,13 +19,14 @@
|
||||
|
||||
#define SIMU
|
||||
#define SIMU_EXCEPTIONS
|
||||
#define FRSKY
|
||||
#define TELEMETRY_FRSKY
|
||||
#define PHASES
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
#define NUM_POTS 3
|
||||
#define SWSRC_SW1 DSW_SW1
|
||||
#define NUM_POTS 3
|
||||
#define NUM_SLIDERS 0
|
||||
#define SWSRC_SW1 DSW_SW1
|
||||
|
||||
#include <exception>
|
||||
|
||||
@@ -47,7 +48,7 @@ namespace Er9x {
|
||||
uint8_t pxxFlag = 0;
|
||||
int16_t g_anas[7];
|
||||
|
||||
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
|
||||
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
|
||||
|
||||
uint16_t anaIn(uint8_t chan)
|
||||
{
|
||||
@@ -151,7 +152,7 @@ void simuSetKey(uint8_t key, bool state)
|
||||
}
|
||||
}
|
||||
|
||||
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
|
||||
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -505,17 +505,17 @@ t_Ersky9xModelData_v10::operator ModelData ()
|
||||
c9x.moduleData[0].protocol = PULSES_PPM;
|
||||
break;
|
||||
}
|
||||
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.customFn[0].func = FuncInstantTrim;
|
||||
if (trimSw) {
|
||||
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
|
||||
}
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
|
||||
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
|
||||
@@ -620,17 +620,17 @@ t_Ersky9xModelData_v11::operator ModelData ()
|
||||
c9x.moduleData[0].protocol = PULSES_PPM;
|
||||
break;
|
||||
}
|
||||
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.customFn[0].func = FuncInstantTrim;
|
||||
if (trimSw) {
|
||||
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
|
||||
}
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
|
||||
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define PCBSKY9X
|
||||
#define PCBSKY
|
||||
#define STAMP
|
||||
#define FRSKY
|
||||
#define TELEMETRY_FRSKY
|
||||
#define FRSKY_HUB
|
||||
#define WS_HOW_HIGH
|
||||
#define TEMPLATES
|
||||
@@ -31,8 +31,9 @@
|
||||
#define AUDIO
|
||||
#define REVB
|
||||
|
||||
#define NUM_POTS 3
|
||||
#define SWSRC_SW1 DSW_SW1
|
||||
#define NUM_POTS 3
|
||||
#define NUM_SLIDERS 0
|
||||
#define SWSRC_SW1 DSW_SW1
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
@@ -58,7 +59,7 @@ namespace Ersky9x {
|
||||
#include "../ersky9x/sound.cpp"
|
||||
#include "../ersky9x/diskio.cpp"
|
||||
|
||||
#define isBacklightEnable() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
|
||||
#define isBacklightEnabled() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
|
||||
|
||||
//uint8_t pxxFlag = 0;
|
||||
int16_t g_anas[7];
|
||||
|
||||
@@ -447,9 +447,9 @@ t_Gruvin9xModelData_v102::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
|
||||
c9x.flightModeData[i] = flightModeData[i];
|
||||
@@ -517,9 +517,9 @@ t_Gruvin9xModelData_v103::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
|
||||
c9x.flightModeData[i] = flightModeData[i];
|
||||
@@ -587,9 +587,9 @@ t_Gruvin9xModelData_v105::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
|
||||
@@ -677,9 +677,9 @@ t_Gruvin9xModelData_v106::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc-2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
|
||||
|
||||
@@ -455,9 +455,9 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -499,7 +499,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
return c9x;
|
||||
@@ -533,9 +533,9 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -578,7 +578,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
c9x.frsky.varioCenterMax = varioSpeedUpMin;
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -615,9 +615,9 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -661,7 +661,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
|
||||
c9x.frsky.varioCenterMax = varioSpeedUpMin;
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -698,9 +698,9 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -744,7 +744,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -785,9 +785,9 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -831,7 +831,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
return c9x;
|
||||
|
||||
@@ -735,9 +735,9 @@ t_Open9xArmModelData_v208::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<9; i++) {
|
||||
@@ -780,7 +780,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
|
||||
c9x.frsky.varioSource = varioSource;
|
||||
c9x.frsky.varioCenterMax = varioSpeedUpMin;
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -818,9 +818,9 @@ t_Open9xArmModelData_v209::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<9; i++) {
|
||||
@@ -864,7 +864,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
|
||||
c9x.frsky.varioCenterMax = varioSpeedUpMin;
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -902,9 +902,9 @@ t_Open9xArmModelData_v210::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<9; i++) {
|
||||
@@ -948,7 +948,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
|
||||
c9x.frsky.varioCenterMax = varioSpeedUpMin;
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -986,9 +986,9 @@ t_Open9xArmModelData_v211::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<9; i++) {
|
||||
@@ -1032,7 +1032,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
for (int i=0; i<16; i++) {
|
||||
@@ -1073,9 +1073,9 @@ t_Open9xArmModelData_v212::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<9; i++) {
|
||||
@@ -1119,7 +1119,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
return c9x;
|
||||
|
||||
@@ -932,9 +932,9 @@ t_Open9xModelData_v201::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1006,9 +1006,9 @@ t_Open9xModelData_v202::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter,
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1052,7 +1052,7 @@ t_Open9xModelData_v202::operator ModelData ()
|
||||
// c9x.safetySw[i] = safetySw[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
return c9x;
|
||||
@@ -1082,9 +1082,9 @@ t_Open9xModelData_v203::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1126,7 +1126,7 @@ t_Open9xModelData_v203::operator ModelData ()
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
return c9x;
|
||||
@@ -1156,9 +1156,9 @@ t_Open9xModelData_v204::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1202,7 +1202,7 @@ t_Open9xModelData_v204::operator ModelData ()
|
||||
c9x.frsky = frsky;
|
||||
c9x.frsky.rssiAlarms[0] = frskyRssiAlarms[0].get(0);
|
||||
c9x.frsky.rssiAlarms[1] = frskyRssiAlarms[1].get(1);
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
return c9x;
|
||||
@@ -1235,9 +1235,9 @@ t_Open9xModelData_v205::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1279,7 +1279,7 @@ t_Open9xModelData_v205::operator ModelData ()
|
||||
c9x.customFn[i] = customFn[i];
|
||||
c9x.swashRingData = swashR;
|
||||
c9x.frsky = frsky;
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0]. modelId = modelId;
|
||||
c9x.frsky.screens[1].type = 0;
|
||||
@@ -1314,9 +1314,9 @@ t_Open9xModelData_v208::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1362,7 +1362,7 @@ t_Open9xModelData_v208::operator ModelData ()
|
||||
c9x.frsky.varioCenterMax = varioSpeedUpMin;
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
c9x.frsky.screens[1].type = 0;
|
||||
@@ -1400,9 +1400,9 @@ t_Open9xModelData_v209::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1449,7 +1449,7 @@ t_Open9xModelData_v209::operator ModelData ()
|
||||
c9x.frsky.varioCenterMin = varioSpeedDownMin;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
c9x.frsky.screens[1].type = 0;
|
||||
@@ -1487,9 +1487,9 @@ t_Open9xModelData_v210::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1536,7 +1536,7 @@ t_Open9xModelData_v210::operator ModelData ()
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
|
||||
@@ -1575,9 +1575,9 @@ t_Open9xModelData_v211::operator ModelData ()
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.disableThrottleWarning=disableThrottleWarning;
|
||||
c9x.trimInc = trimInc - 2;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.moduleData[0].ppm.pulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<5; i++) {
|
||||
@@ -1624,7 +1624,7 @@ t_Open9xModelData_v211::operator ModelData ()
|
||||
c9x.frsky = frsky;
|
||||
c9x.switchWarningStates = switchWarningStates;
|
||||
|
||||
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
|
||||
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
|
||||
c9x.thrTraceSrc = thrTraceSrc;
|
||||
c9x.moduleData[0].modelId = modelId;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? (version >= 216 ? 64 : 32) : (IS_DBLEEPROM(board, version) ? 24 : 16))
|
||||
#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : 8)
|
||||
#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5)
|
||||
#define MAX_SENSORS(board, version) (32)
|
||||
#define MAX_TELEMETRY_SENSORS(board, version) (32)
|
||||
#define NUM_PPM_INPUTS(board, version) ((IS_ARM(board) && version >= 216) ? 16 : 8)
|
||||
#define ROTENC_COUNT(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 218) ? 0 : 1) : (IS_2560(board) ? 2 : 0))
|
||||
|
||||
@@ -742,6 +742,14 @@ class CurveReferenceField: public TransformedField {
|
||||
int _curve_value;
|
||||
};
|
||||
|
||||
static int exportHeliInversionWeight(int source) {
|
||||
return (source < 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
static int importHeliInversionWeight(int source) {
|
||||
return source ? -100: 100;
|
||||
}
|
||||
|
||||
class HeliField: public StructField {
|
||||
public:
|
||||
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
|
||||
@@ -757,22 +765,15 @@ class HeliField: public StructField {
|
||||
Append(new SignedField<8>(heli.elevatorWeight));
|
||||
}
|
||||
else {
|
||||
Append(new BoolField<1>(invertELE));
|
||||
Append(new BoolField<1>(invertAIL));
|
||||
Append(new BoolField<1>(invertCOL));
|
||||
Append(new ConversionField< SignedField<1> >(heli.elevatorWeight, exportHeliInversionWeight, importHeliInversionWeight));
|
||||
Append(new ConversionField< SignedField<1> >(heli.aileronWeight, exportHeliInversionWeight, importHeliInversionWeight));
|
||||
Append(new ConversionField< SignedField<1> >(heli.collectiveWeight, exportHeliInversionWeight, importHeliInversionWeight));
|
||||
Append(new UnsignedField<5>(heli.type));
|
||||
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
|
||||
//, FLAG_NOSWITCHES)); Fix shift in collective
|
||||
Append(new UnsignedField<8>(heli.value));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO before + after
|
||||
|
||||
protected:
|
||||
bool invertELE;
|
||||
bool invertAIL;
|
||||
bool invertCOL;
|
||||
};
|
||||
|
||||
class FlightModeField: public TransformedField {
|
||||
@@ -3055,14 +3056,14 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))
|
||||
internalField.Append(new BoolField<1>(modelData.displayChecklist));
|
||||
else
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol));
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppm.pulsePol));
|
||||
|
||||
internalField.Append(new BoolField<1>(modelData.extendedLimits));
|
||||
internalField.Append(new BoolField<1>(modelData.extendedTrims));
|
||||
internalField.Append(new BoolField<1>(modelData.throttleReversed));
|
||||
|
||||
if (!IS_ARM(board) || version < 216) {
|
||||
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppmDelay, exportPpmDelay, importPpmDelay));
|
||||
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppm.delay, exportPpmDelay, importPpmDelay));
|
||||
}
|
||||
|
||||
if (IS_ARM(board) || IS_2560(board))
|
||||
@@ -3091,7 +3092,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
}
|
||||
|
||||
if (!IS_ARM(board) || version < 216) {
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength));
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppm.frameLength));
|
||||
}
|
||||
|
||||
internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc, "Throttle Source"));
|
||||
@@ -3170,31 +3171,33 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
if (IS_ARM(board) && version >= 215) {
|
||||
for (int module=0; module<modulesCount; module++) {
|
||||
if (version >= 217) {
|
||||
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
|
||||
internalField.Append(new ConversionField<SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
|
||||
internalField.Append(new SignedField<4>(subprotocols[module]));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new SignedField<8>(subprotocols[module]));
|
||||
}
|
||||
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].channelsStart));
|
||||
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
|
||||
if (version >= 217)
|
||||
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].failsafeMode));
|
||||
else
|
||||
internalField.Append(new ConversionField<SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
|
||||
if (version >= 217) {
|
||||
internalField.Append(new UnsignedField<4>(modelData.moduleData[module].failsafeMode));
|
||||
internalField.Append(new UnsignedField<3>(modelData.moduleData[module].subType));
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[module].invertedSerial));
|
||||
} else
|
||||
internalField.Append(new ConversionField< UnsignedField<8> >(modelData.moduleData[module].failsafeMode, -1));
|
||||
for (int i=0; i<32; i++) {
|
||||
internalField.Append(new SignedField<16>(modelData.moduleData[module].failsafeChannels[i]));
|
||||
}
|
||||
if (version >= 217) {
|
||||
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmPulsePol));
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmOutputType));
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
|
||||
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.pulsePol));
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.outputType));
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
|
||||
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppmPulsePol));
|
||||
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
|
||||
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
|
||||
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppm.pulsePol));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3268,7 +3271,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
}
|
||||
|
||||
if (IS_ARM(board) && version >= 217) {
|
||||
for (int i=0; i<MAX_SENSORS(board, version); ++i) {
|
||||
for (int i=0; i<MAX_TELEMETRY_SENSORS(board, version); ++i) {
|
||||
internalField.Append(new SensorField(modelData.sensorData[i], board, version));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ class ProtocolsConversionTable: public ConversionTable
|
||||
}
|
||||
if (IS_TARANIS(board)) {
|
||||
addConversion(PULSES_CROSSFIRE, val++);
|
||||
addConversion(PULSES_MULTIMODULE, val++);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -813,6 +813,16 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
||||
}
|
||||
}
|
||||
|
||||
QTime OpenTxFirmware::getMaxTimerStart()
|
||||
{
|
||||
if (IS_TARANIS(board) || IS_HORUS(board))
|
||||
return QTime(23, 59, 59);
|
||||
else if (IS_ARM(board))
|
||||
return QTime(8, 59, 59);
|
||||
else
|
||||
return QTime(0, 59, 59);
|
||||
}
|
||||
|
||||
bool OpenTxFirmware::isTelemetrySourceAvailable(int source)
|
||||
{
|
||||
if (IS_TARANIS(board) && (source == TELEMETRY_SOURCE_RSSI_TX))
|
||||
@@ -855,6 +865,8 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
||||
case PULSES_DSMX:
|
||||
case PULSES_CROSSFIRE:
|
||||
return 1;
|
||||
case PULSES_MULTIMODULE:
|
||||
return id.contains("multimodule") ? 1 : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -1097,10 +1109,12 @@ QString OpenTxFirmware::getFirmwareBaseUrl()
|
||||
QString OpenTxFirmware::getFirmwareUrl()
|
||||
{
|
||||
QString url = getFirmwareBaseUrl();
|
||||
QByteArray data = QUrl::toPercentEncoding(id);
|
||||
|
||||
if (IS_ARM(board))
|
||||
url.append(QString("/getfw.php?fw=%1.bin").arg(id));
|
||||
url.append(QString("/getfw.php?fw=%1.bin").arg((QString)data));
|
||||
else
|
||||
url.append(QString("/getfw.php?fw=%1.hex").arg(id));
|
||||
url.append(QString("/getfw.php?fw=%1.hex").arg((QString)data));
|
||||
return url;
|
||||
}
|
||||
|
||||
@@ -1121,7 +1135,6 @@ QString OpenTxFirmware::getStampUrl()
|
||||
void addOpenTxCommonOptions(OpenTxFirmware * firmware)
|
||||
{
|
||||
firmware->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
firmware->addOption("nooverridech", QObject::tr("No OverrideCH functions available"));
|
||||
Option fai_options[] = { { "faichoice", QObject::tr("Possibility to enable FAI MODE (no telemetry) at field") }, { "faimode", QObject::tr("FAI MODE (no telemetry) always enabled") }, { NULL } };
|
||||
firmware->addOptions(fai_options);
|
||||
@@ -1136,8 +1149,10 @@ void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
|
||||
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
|
||||
firmware->addOptions(usb_options);
|
||||
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
|
||||
firmware->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use in the EU on radios sold after Jan 1st, 2015"));
|
||||
firmware->addOption("eu", QObject::tr("Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
|
||||
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
|
||||
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
}
|
||||
|
||||
void addOpenTxLcdOptions(OpenTxFirmware * firmware)
|
||||
@@ -1147,6 +1162,7 @@ void addOpenTxLcdOptions(OpenTxFirmware * firmware)
|
||||
{ "ST7565R", QObject::tr("ST7565R LCD or compatible") },
|
||||
{ "ERC12864FSF", QObject::tr("ERC12864FSF LCD") },
|
||||
{ "ST7920", QObject::tr("ST7920 LCD") },
|
||||
{ "KS108", QObject::tr("KS108 LCD") },
|
||||
{ NULL }
|
||||
};
|
||||
firmware->addOptions(lcd_options);
|
||||
@@ -1161,8 +1177,124 @@ void registerOpenTxFirmwares()
|
||||
Option nav_options[] = { { "rotenc", QObject::tr("Rotary Encoder use in menus navigation") }, { "potscroll", QObject::tr("Pots use in menus navigation") }, { NULL } };
|
||||
Option dsm2_options[] = { { "DSM2", QObject::tr("Support for DSM2 modules"), 0 }, { "DSM2PPM", QObject::tr("Support for DSM2 modules using ppm instead of true serial"), 0 }, { NULL } };
|
||||
|
||||
/* Taranis Plus board */
|
||||
firmware = new OpenTxFirmware("opentx-x9d+", QObject::tr("FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Taranis board */
|
||||
firmware = new OpenTxFirmware("opentx-x9d", QObject::tr("FrSky Taranis"), BOARD_TARANIS);
|
||||
firmware->addOption("haptic", QObject::tr("Haptic module installed"));
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Taranis X9E board */
|
||||
firmware = new OpenTxFirmware("opentx-x9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
|
||||
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Horus board */
|
||||
firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS);
|
||||
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
|
||||
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
|
||||
firmware->addOptions(usb_options);
|
||||
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmware->addOption("pcbdev", QObject::tr("Use ONLY with first DEV pcb version"));
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9XR-Pro */
|
||||
firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("Turnigy 9XR-PRO"), BOARD_9XRPRO);
|
||||
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9XR board with M128 chip */
|
||||
firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("Turnigy 9XR with m128 chip"), BOARD_M128);
|
||||
firmware->addOptions(extr_options);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9XR board */
|
||||
firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("Turnigy 9XR"), BOARD_STOCK);
|
||||
firmware->addOptions(extr_options);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
|
||||
firmware->addOption("novario", QObject::tr("No vario support"));
|
||||
firmware->addOption("nogps", QObject::tr("No GPS support"));
|
||||
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9x board */
|
||||
firmware = new OpenTxFirmware("opentx-9x", QObject::tr("9X board"), BOARD_STOCK);
|
||||
firmware = new OpenTxFirmware("opentx-9x", QObject::tr("9X with stock board"), BOARD_STOCK);
|
||||
firmware->addOptions(ext_options);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
@@ -1194,11 +1326,12 @@ void registerOpenTxFirmwares()
|
||||
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
firmware->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
|
||||
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9x board with M128 chip */
|
||||
firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("M128 / 9X board"), BOARD_M128);
|
||||
firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("9X with stock board and m128 chip"), BOARD_M128);
|
||||
firmware->addOptions(ext_options);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
@@ -1224,72 +1357,58 @@ void registerOpenTxFirmwares()
|
||||
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9XR board */
|
||||
firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("9XR"), BOARD_STOCK);
|
||||
firmware->addOptions(extr_options);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
/* ar9x board */
|
||||
firmware = new OpenTxFirmware("opentx-ar9x", QObject::tr("9X with AR9X board"), BOARD_AR9X);
|
||||
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
|
||||
firmware->addOption("novario", QObject::tr("No vario support"));
|
||||
firmware->addOption("nogps", QObject::tr("No GPS support"));
|
||||
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
// firmware->addOption("rtc", QObject::tr("Optional RTC added"));
|
||||
// firmware->addOption("volume", QObject::tr("i2c volume control added"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9XR board with M128 chip */
|
||||
firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("9XR with M128 chip"), BOARD_M128);
|
||||
firmware->addOptions(extr_options);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
/* Sky9x board */
|
||||
firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("9X with Sky9x board"), BOARD_SKY9X);
|
||||
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nosplash", QObject::tr("No splash screen"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
|
||||
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Gruvin9x board */
|
||||
firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("Gruvin9x board / 9X"), BOARD_GRUVIN9X);
|
||||
firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("9X with Gruvin9x board"), BOARD_GRUVIN9X);
|
||||
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
@@ -1310,11 +1429,12 @@ void registerOpenTxFirmwares()
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* MEGA2560 board */
|
||||
firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("MEGA2560 board"), BOARD_MEGA2560);
|
||||
firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("DIY MEGA2560 radio"), BOARD_MEGA2560);
|
||||
addOpenTxLcdOptions(firmware);
|
||||
firmware->addOption("PWR", QObject::tr("Power management by soft-off circuitry"));
|
||||
firmware->addOptions(ext_options);
|
||||
@@ -1326,7 +1446,7 @@ void registerOpenTxFirmwares()
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("sdcard", QObject::tr("Support for SD memory card"));
|
||||
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
|
||||
//firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
|
||||
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
@@ -1340,103 +1460,11 @@ void registerOpenTxFirmwares()
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
|
||||
firmware->addOption("imperial", QObject::tr("Imperial units"));
|
||||
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Sky9x board */
|
||||
firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("Sky9x board / 9X"), BOARD_SKY9X);
|
||||
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* ar9x board */
|
||||
firmware = new OpenTxFirmware("opentx-ar9x", QObject::tr("ar9x board / 9X"), BOARD_AR9X);
|
||||
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
// firmware->addOption("rtc", QObject::tr("Optional RTC added"));
|
||||
// firmware->addOption("volume", QObject::tr("i2c volume control added"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* 9XR-Pro */
|
||||
firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("9XR-PRO"), BOARD_9XRPRO);
|
||||
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
firmware->addOption("nofp", QObject::tr("No flight modes"));
|
||||
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
firmware->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Taranis board */
|
||||
firmware = new OpenTxFirmware("opentx-taranis", QObject::tr("FrSky Taranis"), BOARD_TARANIS);
|
||||
firmware->addOption("haptic", QObject::tr("Haptic module installed"));
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Taranis Plus board */
|
||||
firmware = new OpenTxFirmware("opentx-taranisplus", QObject::tr("FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Taranis X9E board */
|
||||
firmware = new OpenTxFirmware("opentx-taranisx9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
|
||||
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
|
||||
firmware->addOption("horussticks", QObject::tr("Horus magnetic sticks"));
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
/* Horus board */
|
||||
firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS);
|
||||
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
|
||||
addOpenTxCommonOptions(firmware);
|
||||
firmwares.push_back(firmware);
|
||||
|
||||
default_firmware_variant = GetFirmware("opentx-taranisplus-en");
|
||||
default_firmware_variant = GetFirmware("opentx-x9d+");
|
||||
current_firmware_variant = default_firmware_variant;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,8 @@ class OpenTxFirmware: public Firmware {
|
||||
virtual QString getFirmwareUrl();
|
||||
|
||||
virtual int getCapability(const Capability);
|
||||
|
||||
virtual QTime getMaxTimerStart();
|
||||
|
||||
virtual bool isTelemetrySourceAvailable(int source);
|
||||
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
#define NUM_POTS 3
|
||||
#define NUM_CSW 12
|
||||
#define SWSRC_SW1 10
|
||||
#define NUM_POTS 3
|
||||
#define NUM_SLIDERS 0
|
||||
#define NUM_CSW 12
|
||||
#define SWSRC_SW1 10
|
||||
|
||||
#include <exception>
|
||||
#include <algorithm>
|
||||
@@ -156,7 +157,7 @@ void simuSetKey(uint8_t key, bool state)
|
||||
}
|
||||
}
|
||||
|
||||
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
|
||||
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ t_Th9xModelData::operator ModelData ()
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
c9x.trimInc = trimInc;
|
||||
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
|
||||
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
|
||||
c9x.customFn[0].func = FuncTrims2Offsets;
|
||||
if (trimSw) {
|
||||
c9x.customFn[0].swtch = trimSw;
|
||||
|
||||
@@ -37,7 +37,7 @@ fwName(g.profile[g.id()].fwName())
|
||||
ui->useProfileSplash->setDisabled(true);
|
||||
}
|
||||
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
if (IS_STM32(GetEepromInterface()->getBoard())) {
|
||||
// No backup on Taranis ... could be done if in massstorage
|
||||
ui->backupEEprom->hide();
|
||||
ui->backupEEprom->setCheckState(Qt::Unchecked);
|
||||
@@ -124,7 +124,7 @@ void FlashFirmwareDialog::on_firmwareLoad_clicked()
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER);
|
||||
if (!fileName.isEmpty()) {
|
||||
fwName = fileName;
|
||||
if (!fwName.isEmpty() && !FirmwareInterface(fwName).isValid()) {
|
||||
if (!fwName.isEmpty() && !fwName.endsWith(".dfu") && !FirmwareInterface(fwName).isValid()) {
|
||||
QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fwName));
|
||||
}
|
||||
updateUI();
|
||||
@@ -203,6 +203,7 @@ void FlashFirmwareDialog::on_useLibrarySplash_clicked()
|
||||
void FlashFirmwareDialog::on_burnButton_clicked()
|
||||
{
|
||||
g.flashDir(QFileInfo(fwName).dir().absolutePath());
|
||||
g.profile[g.id()].fwName(fwName);
|
||||
g.checkHardwareCompatibility(ui->checkHardwareCompatibility->isChecked());
|
||||
g.backupOnFlash(ui->backupEEprom->isChecked());
|
||||
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
#define HEX_FILES_FILTER "HEX files (*.hex);;"
|
||||
#define BIN_FILES_FILTER "BIN files (*.bin);;"
|
||||
#define DFU_FILES_FILTER "DFU files (*.dfu);;"
|
||||
#define EEPE_FILES_FILTER "EEPE EEPROM files (*.eepe);;"
|
||||
#define EEPROM_FILES_FILTER "EEPE files (*.eepe *.bin *.hex);;" EEPE_FILES_FILTER BIN_FILES_FILTER HEX_FILES_FILTER
|
||||
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
|
||||
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex *.dfu);;" BIN_FILES_FILTER HEX_FILES_FILTER DFU_FILES_FILTER
|
||||
#define EXTERNAL_EEPROM_FILES_FILTER "EEPROM files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
|
||||
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
|
||||
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
|
||||
|
||||
@@ -108,22 +108,18 @@ void GeneralEdit::on_calretrieve_PB_clicked()
|
||||
for (int i=0; i<(NUM_STICKS+potsnum); i++) {
|
||||
Byte=calib.mid(i*12,4);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.calibMid[i]=byte16;
|
||||
if (ok) generalSettings.calibMid[i]=byte16;
|
||||
Byte=calib.mid(4+i*12,4);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.calibSpanNeg[i]=byte16;
|
||||
if (ok) generalSettings.calibSpanNeg[i]=byte16;
|
||||
Byte=calib.mid(8+i*12,4);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.calibSpanPos[i]=byte16;
|
||||
if (ok) generalSettings.calibSpanPos[i]=byte16;
|
||||
}
|
||||
for (int i=0; i<4; i++) {
|
||||
Byte=trainercalib.mid(i*4,4);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.trainer.calib[i]=byte16;
|
||||
if (ok) generalSettings.trainer.calib[i]=byte16;
|
||||
}
|
||||
generalSettings.txCurrentCalibration=txCurrentCalibration;
|
||||
generalSettings.txVoltageCalibration=txVoltageCalibration;
|
||||
@@ -150,27 +146,30 @@ void GeneralEdit::on_calretrieve_PB_clicked()
|
||||
Byte=hwtypes.mid(i,1);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
qba=controlNames.mid(3*(i+NUM_STICKS),3).toLatin1();
|
||||
if (ok)
|
||||
if (ok) {
|
||||
generalSettings.switchConfig[i]=byte16;
|
||||
strcpy(generalSettings.switchName[i], qba.data());
|
||||
}
|
||||
}
|
||||
offset = GetCurrentFirmware()->getCapability(Switches);
|
||||
for (int i=0; i<(GetCurrentFirmware()->getCapability(Pots)); i++) {
|
||||
Byte=hwtypes.mid(i+offset,1);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toLatin1();
|
||||
if (ok)
|
||||
if (ok) {
|
||||
generalSettings.potConfig[i]=byte16;
|
||||
strcpy(generalSettings.potName[i], qba.data());
|
||||
}
|
||||
}
|
||||
offset += GetCurrentFirmware()->getCapability(Pots);
|
||||
for (int i=0; i<(GetCurrentFirmware()->getCapability(Sliders)); i++) {
|
||||
Byte=hwtypes.mid(i+offset,1);
|
||||
byte16=(int16_t)Byte.toInt(&ok,16);
|
||||
qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toLatin1();
|
||||
if (ok)
|
||||
if (ok) {
|
||||
generalSettings.sliderConfig[i]=byte16;
|
||||
strcpy(generalSettings.sliderName[i], qba.data());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, Switch/pot config not retrieved"));
|
||||
@@ -182,45 +181,32 @@ void GeneralEdit::on_calretrieve_PB_clicked()
|
||||
QString chars;
|
||||
bool ok;
|
||||
byte8=(int8_t)DisplaySet.mid(0,2).toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.optrexDisplay=(byte8==1 ? true : false);
|
||||
if (ok) generalSettings.optrexDisplay=(byte8==1 ? true : false);
|
||||
byte8u=(uint8_t)DisplaySet.mid(2,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.contrast=byte8u;
|
||||
if (ok) generalSettings.contrast=byte8u;
|
||||
byte8u=(uint8_t)DisplaySet.mid(4,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.backlightBright=byte8u;
|
||||
if (ok) generalSettings.backlightBright=byte8u;
|
||||
byte8=(int8_t)BeeperSet.mid(0,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8;
|
||||
if (ok) generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8;
|
||||
byte8=(int8_t)BeeperSet.mid(2,2).toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.beeperLength=byte8;
|
||||
if (ok) generalSettings.beeperLength=byte8;
|
||||
byte8=(int8_t)HapticSet.mid(0,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8;
|
||||
if (ok) generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8;
|
||||
byte8=(int8_t)HapticSet.mid(2,2).toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.hapticStrength=byte8;
|
||||
if (ok) generalSettings.hapticStrength=byte8;
|
||||
byte8=(int8_t)HapticSet.mid(4,2).toInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.hapticLength=byte8;
|
||||
if (ok) generalSettings.hapticLength=byte8;
|
||||
byte8u=(uint8_t)SpeakerSet.mid(0,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.speakerMode=byte8u;
|
||||
if (ok) generalSettings.speakerMode=byte8u;
|
||||
byte8u=(uint8_t)SpeakerSet.mid(2,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.speakerPitch=byte8u;
|
||||
if (ok) generalSettings.speakerPitch=byte8u;
|
||||
byte8u=(uint8_t)SpeakerSet.mid(4,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.speakerVolume=byte8u;
|
||||
if (ok) generalSettings.speakerVolume=byte8u;
|
||||
if (CountrySet.length()==6) {
|
||||
byte8u=(uint8_t)CountrySet.mid(0,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.countryCode=byte8u;
|
||||
if (ok) generalSettings.countryCode=byte8u;
|
||||
byte8u=(uint8_t)CountrySet.mid(2,2).toUInt(&ok,16);
|
||||
if (ok)
|
||||
generalSettings.imperial=byte8u;
|
||||
if (ok) generalSettings.imperial=byte8u;
|
||||
chars=CountrySet.mid(4,2);
|
||||
generalSettings.ttsLanguage[0]=chars[0].toLatin1();
|
||||
generalSettings.ttsLanguage[1]=chars[1].toLatin1();
|
||||
|
||||
@@ -103,7 +103,7 @@ void populatePhasesCB(QComboBox *b, int value)
|
||||
b->setCurrentIndex(value + GetCurrentFirmware()->getCapability(FlightModes));
|
||||
}
|
||||
|
||||
GVarGroup::GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const double step, bool allowGvars):
|
||||
GVarGroup::GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBox * weightCB, int & weight, const ModelData & model, const int deflt, const int mini, const int maxi, const double step, bool allowGvars):
|
||||
QObject(),
|
||||
weightGV(weightGV),
|
||||
weightSB(weightSB),
|
||||
@@ -115,7 +115,7 @@ GVarGroup::GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox
|
||||
lock(true)
|
||||
{
|
||||
if (allowGvars && GetCurrentFirmware()->getCapability(Gvars)) {
|
||||
populateGVCB(weightCB, weight);
|
||||
populateGVCB(*weightCB, weight, model);
|
||||
connect(weightGV, SIGNAL(stateChanged(int)), this, SLOT(gvarCBChanged(int)));
|
||||
connect(weightCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
|
||||
}
|
||||
@@ -179,13 +179,14 @@ void GVarGroup::valuesChanged()
|
||||
}
|
||||
}
|
||||
|
||||
CurveGroup::CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags):
|
||||
CurveGroup::CurveGroup(QComboBox * curveTypeCB, QCheckBox * curveGVarCB, QComboBox * curveValueCB, QSpinBox * curveValueSB, CurveReference & curve, const ModelData & model, unsigned int flags):
|
||||
QObject(),
|
||||
curveTypeCB(curveTypeCB),
|
||||
curveGVarCB(curveGVarCB),
|
||||
curveValueCB(curveValueCB),
|
||||
curveValueSB(curveValueSB),
|
||||
curve(curve),
|
||||
model(model),
|
||||
flags(flags),
|
||||
lock(false),
|
||||
lastType(-1)
|
||||
@@ -219,7 +220,7 @@ void CurveGroup::update()
|
||||
curveGVarCB->setChecked(true);
|
||||
if (lastType != CurveReference::CURVE_REF_DIFF && lastType != CurveReference::CURVE_REF_EXPO) {
|
||||
lastType = curve.type;
|
||||
populateGVCB(curveValueCB, curve.value);
|
||||
populateGVCB(*curveValueCB, curve.value, model);
|
||||
}
|
||||
curveValueCB->show();
|
||||
curveValueSB->hide();
|
||||
@@ -276,6 +277,7 @@ void CurveGroup::gvarCBChanged(int state)
|
||||
if (!lock) {
|
||||
if (state) {
|
||||
curve.value = 10000+1; // TODO constant in EEpromInterface ...
|
||||
lastType = -1; // quickfix for issue #3518: force refresh of curveValueCB at next update() to set current index to GV1
|
||||
}
|
||||
else {
|
||||
curve.value = 0; // TODO could be better
|
||||
@@ -478,33 +480,39 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
|
||||
b->setMaxVisibleItems(10);
|
||||
}
|
||||
|
||||
void populateGVCB(QComboBox *b, int value)
|
||||
void populateGVCB(QComboBox & b, int value, const ModelData & model)
|
||||
{
|
||||
bool selected = false;
|
||||
|
||||
b->clear();
|
||||
b.clear();
|
||||
|
||||
int pgvars = GetCurrentFirmware()->getCapability(Gvars);
|
||||
for (int i=-pgvars; i<=-1; i++) {
|
||||
int count = GetCurrentFirmware()->getCapability(Gvars);
|
||||
for (int i=-count; i<=-1; i++) {
|
||||
int16_t gval = (int16_t)(-10000+i);
|
||||
b->addItem(QObject::tr("-GV%1").arg(-i), gval);
|
||||
if (strlen(model.gvars_names[-i-1]) > 0)
|
||||
b.addItem(QObject::tr("-GV%1 (%2)").arg(-i).arg(model.gvars_names[-i-1]), gval);
|
||||
else
|
||||
b.addItem(QObject::tr("-GV%1").arg(-i), gval);
|
||||
if (value == gval) {
|
||||
b->setCurrentIndex(b->count()-1);
|
||||
b.setCurrentIndex(b.count()-1);
|
||||
selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=1; i<=pgvars; i++) {
|
||||
for (int i=1; i<=count; i++) {
|
||||
int16_t gval = (int16_t)(10000+i);
|
||||
b->addItem(QObject::tr("GV%1").arg(i), gval);
|
||||
if (strlen(model.gvars_names[i-1]) > 0)
|
||||
b.addItem(QObject::tr("GV%1 (%2)").arg(i).arg(model.gvars_names[i-1]), gval);
|
||||
else
|
||||
b.addItem(QObject::tr("GV%1").arg(i), gval);
|
||||
if (value == gval) {
|
||||
b->setCurrentIndex(b->count()-1);
|
||||
b.setCurrentIndex(b.count()-1);
|
||||
selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!selected) {
|
||||
b->setCurrentIndex(pgvars);
|
||||
b.setCurrentIndex(count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class GVarGroup: public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const double step=1.0, bool allowGVars=true);
|
||||
GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBox * weightCB, int & weight, const ModelData & model, const int deflt, const int mini, const int maxi, const double step=1.0, bool allowGVars=true);
|
||||
|
||||
protected slots:
|
||||
void gvarCBChanged(int);
|
||||
@@ -72,7 +72,7 @@ class CurveGroup : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags=0);
|
||||
CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, const ModelData & model, unsigned int flags=0);
|
||||
void update();
|
||||
|
||||
protected slots:
|
||||
@@ -86,6 +86,7 @@ class CurveGroup : public QObject {
|
||||
QComboBox *curveValueCB;
|
||||
QSpinBox *curveValueSB;
|
||||
CurveReference & curve;
|
||||
const ModelData & model;
|
||||
unsigned int flags;
|
||||
bool lock;
|
||||
int lastType;
|
||||
@@ -118,8 +119,7 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase);
|
||||
#define GVARS_VARIANT 0x0001
|
||||
#define FRSKY_VARIANT 0x0002
|
||||
|
||||
// void populateGVarCB(QComboBox *b, int value, int min, int max,int pgvars=5); //TODO: Clean Up
|
||||
void populateGVCB(QComboBox *b, int value);
|
||||
void populateGVCB(QComboBox & b, int value, const ModelData & model);
|
||||
void populateSourceCB(QComboBox *b, const RawSource &source, const GeneralSettings generalSettings, const ModelData * model, unsigned int flags);
|
||||
QString image2qstring(QImage image);
|
||||
int findmult(float value, float base);
|
||||
|
||||
|
After Width: | Height: | Size: 866 KiB |
|
After Width: | Height: | Size: 960 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 101 KiB |
@@ -1,3 +1,4 @@
|
||||
#include <math.h>
|
||||
#include "logsdialog.h"
|
||||
#include "appdata.h"
|
||||
#include "ui_logsdialog.h"
|
||||
@@ -10,7 +11,11 @@
|
||||
|
||||
LogsDialog::LogsDialog(QWidget *parent) :
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
ui(new Ui::LogsDialog)
|
||||
ui(new Ui::LogsDialog),
|
||||
tracerMaxAlt(0),
|
||||
cursorA(0),
|
||||
cursorB(0),
|
||||
cursorLine(0)
|
||||
{
|
||||
csvlog.clear();
|
||||
|
||||
@@ -78,7 +83,7 @@ LogsDialog::LogsDialog(QWidget *parent) :
|
||||
// connect slot that ties some axis selections together (especially opposite axes):
|
||||
connect(ui->customPlot, SIGNAL(selectionChangedByUser()), this, SLOT(selectionChanged()));
|
||||
// connect slots that takes care that when an axis is selected, only that direction can be dragged and zoomed:
|
||||
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress()));
|
||||
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress(QMouseEvent*)));
|
||||
connect(ui->customPlot, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheel()));
|
||||
|
||||
// make left axes transfer its range to right axes:
|
||||
@@ -419,7 +424,7 @@ void LogsDialog::on_mapsButton_clicked()
|
||||
ui->logTable->setDisabled(false);
|
||||
}
|
||||
|
||||
void LogsDialog::mousePress()
|
||||
void LogsDialog::mousePress(QMouseEvent * event)
|
||||
{
|
||||
// if an axis is selected, only allow the direction of that axis to be dragged
|
||||
// if no axis is selected, both directions may be dragged
|
||||
@@ -430,6 +435,74 @@ void LogsDialog::mousePress()
|
||||
axisRect->setRangeDrag(axisRect->axis(QCPAxis::atLeft)->orientation());
|
||||
else
|
||||
axisRect->setRangeDrag(Qt::Horizontal | Qt::Vertical);
|
||||
|
||||
if (event->button() == Qt::RightButton) {
|
||||
double x = axisRect->axis(QCPAxis::atBottom)->pixelToCoord(event->pos().x());
|
||||
placeCursor(x, event->modifiers() & Qt::ShiftModifier);
|
||||
}
|
||||
}
|
||||
|
||||
void LogsDialog::placeCursor(double x, bool second)
|
||||
{
|
||||
QCPItemTracer * cursor = second ? cursorB : cursorA;
|
||||
|
||||
if (cursor) {
|
||||
cursor->setGraphKey(x);
|
||||
cursor->updatePosition();
|
||||
cursor->setVisible(true);
|
||||
}
|
||||
|
||||
if (cursorA && cursorB) {
|
||||
updateCursorsLabel();
|
||||
}
|
||||
}
|
||||
|
||||
void LogsDialog::updateCursorsLabel()
|
||||
{
|
||||
QString text = QString("Max Altitude: %1 m\n").arg(tracerMaxAlt->position->value(), 0, 'f', 1);
|
||||
if (cursorA->visible() ) {
|
||||
text += tr("Cursor A: %1 m").arg(cursorA->position->value(), 0, 'f', 1) + "\n";
|
||||
}
|
||||
if (cursorB->visible() ) {
|
||||
text += tr("Cursor B: %1 m").arg(cursorB->position->value(), 0, 'f', 1) + "\n";
|
||||
}
|
||||
if (cursorA->visible() && cursorB->visible()) {
|
||||
cursorLine->setVisible(true);
|
||||
// calc deltas
|
||||
double deltaX = cursorB->position->key() - cursorA->position->key();
|
||||
double deltaY = cursorB->position->value() - cursorA->position->value();
|
||||
double slope = 0;
|
||||
if (deltaX != 0) {
|
||||
slope = deltaY / deltaX;
|
||||
}
|
||||
qDebug() << "Cursors: dt:" << formatTimeDelta(deltaX) << "dy:" << deltaY << "rate:" << slope;
|
||||
text += tr("Time delta: %1").arg(formatTimeDelta(deltaX)) + "\n";
|
||||
text += tr("Climb rate: %1 m/s").arg(slope, 0, 'f', fabs(slope)<1.0 ? 2 : 1) + "\n";
|
||||
}
|
||||
ui->labelCursors->setText(text);
|
||||
}
|
||||
|
||||
QString LogsDialog::formatTimeDelta(double timeDelta)
|
||||
{
|
||||
if (abs(timeDelta) < 10) {
|
||||
return QString("%1 s").arg(timeDelta, 1, 'f', 1);
|
||||
}
|
||||
|
||||
int seconds = (int)round(abs(timeDelta));
|
||||
int hours = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
int minutes = seconds / 60;
|
||||
seconds %= 60;
|
||||
|
||||
if (hours) {
|
||||
return QString("%1h:%2:%3").arg(hours).arg(minutes, 2, 10, QChar('0')).arg(seconds, 2, 10, QChar('0'));
|
||||
}
|
||||
else if (minutes) {
|
||||
return QString("%1m:%2").arg(minutes).arg(seconds, 2, 10, QChar('0'));
|
||||
}
|
||||
else {
|
||||
return QString("%1 s").arg(seconds);
|
||||
}
|
||||
}
|
||||
|
||||
void LogsDialog::mouseWheel()
|
||||
@@ -453,6 +526,7 @@ void LogsDialog::mouseWheel()
|
||||
void LogsDialog::removeAllGraphs()
|
||||
{
|
||||
ui->customPlot->clearGraphs();
|
||||
ui->customPlot->clearItems();
|
||||
ui->customPlot->legend->setVisible(false);
|
||||
rightLegend->clearItems();
|
||||
rightLegend->setVisible(false);
|
||||
@@ -466,6 +540,11 @@ void LogsDialog::removeAllGraphs()
|
||||
axisRect->axis(QCPAxis::atRight, 1)->setSelectedParts(QCPAxis::spNone);
|
||||
axisRect->axis(QCPAxis::atBottom)->setSelectedParts(QCPAxis::spNone);
|
||||
ui->customPlot->replot();
|
||||
tracerMaxAlt = 0;
|
||||
cursorA = 0;
|
||||
cursorB = 0;
|
||||
cursorLine = 0;
|
||||
ui->labelCursors->setText("");
|
||||
}
|
||||
|
||||
void LogsDialog::on_fileOpen_BT_clicked()
|
||||
@@ -608,7 +687,7 @@ void LogsDialog::setFlightSessions()
|
||||
QDateTime lastvalue;
|
||||
for (int i = 1; i < n; i++) {
|
||||
QDateTime tmp = getRecordTimeStamp(i);
|
||||
if (lastvalue.secsTo(tmp) > 60) {
|
||||
if (!lastvalue.isValid() || lastvalue.secsTo(tmp) > 60) {
|
||||
sessions.push_back(i-1);
|
||||
// qDebug() << "session index" << i-1;
|
||||
}
|
||||
@@ -904,6 +983,17 @@ void LogsDialog::plotLogs()
|
||||
plots.coords.at(i).y);
|
||||
pen.setColor(colors.at(i % colors.size()));
|
||||
ui->customPlot->graph(i)->setPen(pen);
|
||||
|
||||
if (!tracerMaxAlt && (plots.coords.at(i).name.endsWith("(m)") ||
|
||||
plots.coords.at(i).name.endsWith(" Alt") ||
|
||||
plots.coords.at(i).name.endsWith("(ft)"))) {
|
||||
addMaxAltitudeMarker(plots.coords.at(i), ui->customPlot->graph(i));
|
||||
countNumberOfThrows(plots.coords.at(i), ui->customPlot->graph(i));
|
||||
addCursor(&cursorA, ui->customPlot->graph(i), Qt::blue);
|
||||
addCursor(&cursorB, ui->customPlot->graph(i), Qt::red);
|
||||
addCursorLine(&cursorLine, ui->customPlot->graph(i), Qt::black);
|
||||
updateCursorsLabel();
|
||||
}
|
||||
}
|
||||
|
||||
ui->customPlot->legend->setVisible(true);
|
||||
@@ -951,3 +1041,73 @@ void LogsDialog::yAxisChangeRanges(QCPRange range)
|
||||
yAxesRanges[firstLeft].max = range.upper;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LogsDialog::addMaxAltitudeMarker(const coords & c, QCPGraph * graph) {
|
||||
// find max altitude
|
||||
int positionIndex = 0;
|
||||
double maxAlt = -100000;
|
||||
|
||||
for(int i=0; i<c.x.count(); ++i) {
|
||||
double alt = c.y.at(i);
|
||||
if (alt > maxAlt) {
|
||||
maxAlt = alt;
|
||||
positionIndex = i;
|
||||
// qDebug() << "max alt: " << maxAlt << "@" << result;
|
||||
}
|
||||
}
|
||||
// qDebug() << "max alt: " << maxAlt << "@" << positionIndex;
|
||||
|
||||
// add max altitude marker
|
||||
tracerMaxAlt = new QCPItemTracer(ui->customPlot);
|
||||
ui->customPlot->addItem(tracerMaxAlt);
|
||||
tracerMaxAlt->setGraph(graph);
|
||||
tracerMaxAlt->setInterpolating(true);
|
||||
tracerMaxAlt->setStyle(QCPItemTracer::tsSquare);
|
||||
tracerMaxAlt->setPen(QPen(Qt::blue));
|
||||
tracerMaxAlt->setBrush(Qt::NoBrush);
|
||||
tracerMaxAlt->setSize(7);
|
||||
tracerMaxAlt->setGraphKey(c.x.at(positionIndex));
|
||||
tracerMaxAlt->updatePosition();
|
||||
}
|
||||
|
||||
void LogsDialog::countNumberOfThrows(const coords & c, QCPGraph * graph)
|
||||
{
|
||||
#if 0
|
||||
// find all launches
|
||||
// TODO
|
||||
double startTime = c.x.at(0);
|
||||
|
||||
for(int i=0; i<c.x.count(); ++i) {
|
||||
double alt = c.y.at(i);
|
||||
double time = c.x.at(i);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void LogsDialog::addCursor(QCPItemTracer ** cursor, QCPGraph * graph, const QColor & color) {
|
||||
QCPItemTracer * c = new QCPItemTracer(ui->customPlot);
|
||||
ui->customPlot->addItem(c);
|
||||
c->setGraph(graph);
|
||||
c->setInterpolating(false);
|
||||
c->setStyle(QCPItemTracer::tsCrosshair);
|
||||
QPen pen(color);
|
||||
pen.setStyle(Qt::DashLine);
|
||||
c->setPen(pen);
|
||||
c->setBrush(color);
|
||||
c->setSize(7);
|
||||
c->setVisible(false);
|
||||
*cursor = c;
|
||||
}
|
||||
|
||||
void LogsDialog::addCursorLine(QCPItemStraightLine ** line, QCPGraph * graph, const QColor & color) {
|
||||
QCPItemStraightLine * l = new QCPItemStraightLine(ui->customPlot);
|
||||
ui->customPlot->addItem(l);
|
||||
l->point1->setParentAnchor(cursorA->position);
|
||||
l->point2->setParentAnchor(cursorB->position);
|
||||
QPen pen(color);
|
||||
pen.setStyle(Qt::DashLine);
|
||||
l->setPen(pen);
|
||||
l->setVisible(false);
|
||||
*line = l;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ private slots:
|
||||
void axisLabelDoubleClick(QCPAxis* axis, QCPAxis::SelectablePart part);
|
||||
void legendDoubleClick(QCPLegend* legend, QCPAbstractLegendItem* item);
|
||||
void selectionChanged();
|
||||
void mousePress();
|
||||
void mousePress(QMouseEvent * event);
|
||||
void mouseWheel();
|
||||
void removeAllGraphs();
|
||||
void plotLogs();
|
||||
@@ -76,6 +76,11 @@ private:
|
||||
double yAxesRatios[AXES_LIMIT];
|
||||
minMax yAxesRanges[AXES_LIMIT];
|
||||
|
||||
QCPItemTracer * tracerMaxAlt;
|
||||
QCPItemTracer * cursorA;
|
||||
QCPItemTracer * cursorB;
|
||||
QCPItemStraightLine * cursorLine;
|
||||
|
||||
bool cvsFileParse();
|
||||
QList<QStringList> filterGePoints(const QList<QStringList> & input);
|
||||
void exportToGoogleEarth();
|
||||
@@ -83,6 +88,15 @@ private:
|
||||
QString generateDuration(const QDateTime & start, const QDateTime & end);
|
||||
void setFlightSessions();
|
||||
|
||||
void addMaxAltitudeMarker(const coords & c, QCPGraph * graph);
|
||||
void countNumberOfThrows(const coords & c, QCPGraph * graph);
|
||||
void addCursor(QCPItemTracer ** cursor, QCPGraph * graph, const QColor & color);
|
||||
void addCursorLine(QCPItemStraightLine ** line, QCPGraph * graph, const QColor & color);
|
||||
void placeCursor(double x, bool second);
|
||||
QString formatTimeDelta(double timeDelta);
|
||||
void updateCursorsLabel();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // _LOGSDIALOG_H_
|
||||
|
||||
@@ -16,32 +16,78 @@
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,0,0,0,0,0,0">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0">
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Filename</string>
|
||||
<string>Fly sessions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="FileName_LE">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<widget class="QComboBox" name="sessions_CB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="fileOpen_BT">
|
||||
<property name="text">
|
||||
<string>Open LogFile</string>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="12">
|
||||
<widget class="QTableWidget" name="FieldsTW">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoScrollMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="sizePolicy">
|
||||
@@ -127,121 +173,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Fly sessions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="sessions_CB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="1" rowspan="4">
|
||||
<widget class="QTableWidget" name="logTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="dragDropOverwriteMode">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideNone</enum>
|
||||
</property>
|
||||
<property name="rowCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderDefaultSectionSize">
|
||||
<number>18</number>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="6">
|
||||
<widget class="QTableWidget" name="FieldsTW">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoScrollMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="13" column="0">
|
||||
<widget class="QPushButton" name="mapsButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
@@ -276,6 +208,106 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Filename</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="FileName_LE">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="fileOpen_BT">
|
||||
<property name="text">
|
||||
<string>Open LogFile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="1" rowspan="8">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="5,1">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="logTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="dragDropOverwriteMode">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideNone</enum>
|
||||
</property>
|
||||
<property name="rowCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderDefaultSectionSize">
|
||||
<number>18</number>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelCursors">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
@@ -289,14 +321,12 @@
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>FileName_LE</tabstop>
|
||||
<tabstop>fileOpen_BT</tabstop>
|
||||
<tabstop>FieldsTW</tabstop>
|
||||
<tabstop>mapsButton</tabstop>
|
||||
<tabstop>ZoomX_ChkB</tabstop>
|
||||
<tabstop>ZoomY_ChkB</tabstop>
|
||||
<tabstop>Reset_PB</tabstop>
|
||||
<tabstop>sessions_CB</tabstop>
|
||||
<tabstop>logTable</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="companion.qrc"/>
|
||||
|
||||
@@ -360,16 +360,25 @@ void MainWindow::firmwareDownloadAccepted()
|
||||
int errnum = hline.mid(6).toInt();
|
||||
switch(errnum) {
|
||||
case 1:
|
||||
errormsg = tr("Not enough memory for all the selected firmware options");
|
||||
errormsg = tr("Not enough flash available on this board for all the selected options");
|
||||
break;
|
||||
case 2:
|
||||
errormsg = tr("Compilation server termporary failure, try later");
|
||||
errormsg = tr("Compilation server temporary failure, try later");
|
||||
break;
|
||||
case 3:
|
||||
errormsg = tr("Compilation server too busy, try later");
|
||||
break;
|
||||
case 4:
|
||||
errormsg = tr("Compilation server requires registration, please check OpenTX web site");
|
||||
errormsg = tr("Compilation error");
|
||||
break;
|
||||
case 5:
|
||||
errormsg = tr("Invalid firmware");
|
||||
break;
|
||||
case 6:
|
||||
errormsg = tr("Invalid board");
|
||||
break;
|
||||
case 7:
|
||||
errormsg = tr("Invalid language");
|
||||
break;
|
||||
default:
|
||||
errormsg = tr("Unknown server failure, try later");
|
||||
@@ -493,6 +502,7 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
||||
}
|
||||
}
|
||||
else if (download == true) {
|
||||
firmwareVersionString = versionString;
|
||||
startFirmwareDownload();
|
||||
}
|
||||
|
||||
@@ -910,15 +920,38 @@ void MainWindow::about()
|
||||
void MainWindow::updateMenus()
|
||||
{
|
||||
bool hasMdiChild = (activeMdiChild() != 0);
|
||||
saveAct->setEnabled(hasMdiChild);
|
||||
saveAsAct->setEnabled(hasMdiChild);
|
||||
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
|
||||
writeEepromAct->setEnabled(hasMdiChild);
|
||||
separatorAct->setVisible(hasMdiChild);
|
||||
|
||||
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
|
||||
cutAct->setEnabled(hasSelection);
|
||||
copyAct->setEnabled(hasSelection);
|
||||
|
||||
if(GetCurrentFirmware()->getBoard() == BOARD_HORUS) {
|
||||
newAct->setEnabled(false);
|
||||
openAct->setEnabled(false);
|
||||
saveAct->setEnabled(false);
|
||||
saveAsAct->setEnabled(false);
|
||||
writeEepromAct->setEnabled(false);
|
||||
readEepromAct->setEnabled(false);
|
||||
writeBackupToRadioAct->setEnabled(false);
|
||||
readBackupToFileAct->setEnabled(false);
|
||||
cutAct->setEnabled(false);
|
||||
copyAct->setEnabled(false);
|
||||
pasteAct->setEnabled(false);
|
||||
for (int i=0; i<MAX_RECENT; ++i)
|
||||
recentFileActs[i]->setEnabled(false);
|
||||
} else {
|
||||
newAct->setEnabled(true);
|
||||
openAct->setEnabled(true);
|
||||
saveAct->setEnabled(hasMdiChild);
|
||||
saveAsAct->setEnabled(hasMdiChild);
|
||||
cutAct->setEnabled(hasSelection);
|
||||
copyAct->setEnabled(hasSelection);
|
||||
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
|
||||
writeEepromAct->setEnabled(hasMdiChild);
|
||||
readEepromAct->setEnabled(true);
|
||||
writeBackupToRadioAct->setEnabled(true);
|
||||
readBackupToFileAct->setEnabled(true);
|
||||
for (int i=0; i<MAX_RECENT; ++i)
|
||||
recentFileActs[i]->setEnabled(true);
|
||||
}
|
||||
separatorAct->setVisible(hasMdiChild);
|
||||
simulateAct->setEnabled(hasSelection);
|
||||
printAct->setEnabled(hasSelection);
|
||||
loadbackupAct->setEnabled(hasMdiChild);
|
||||
@@ -1438,6 +1471,8 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
|
||||
|
||||
void MainWindow::dropEvent(QDropEvent *event)
|
||||
{
|
||||
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS)
|
||||
return;
|
||||
QList<QUrl> urls = event->mimeData()->urls();
|
||||
if (urls.isEmpty())
|
||||
return;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "channels.h"
|
||||
#include "helpers.h"
|
||||
|
||||
LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, int min, int max, int deflt):
|
||||
LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt):
|
||||
firmware(firmware),
|
||||
spinbox(new QDoubleSpinBox()),
|
||||
value(value),
|
||||
@@ -44,7 +44,7 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row,
|
||||
horizontalLayout->addWidget(cb);
|
||||
horizontalLayout->addWidget(spinbox);
|
||||
tableLayout->addLayout(row, col, horizontalLayout);
|
||||
gvarGroup = new GVarGroup(gv, spinbox, cb, value, deflt, min, max, displayStep, allowGVars);
|
||||
gvarGroup = new GVarGroup(gv, spinbox, cb, value, model, deflt, min, max, displayStep, allowGVars);
|
||||
}
|
||||
|
||||
LimitsGroup::~LimitsGroup()
|
||||
@@ -113,13 +113,13 @@ Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & genera
|
||||
}
|
||||
|
||||
// Channel offset
|
||||
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].offset, -1000, 1000, 0);
|
||||
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].offset, model, -1000, 1000, 0);
|
||||
|
||||
// Channel min
|
||||
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].min, -model.getChannelsMax()*10, 0, -1000);
|
||||
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].min, model, -model.getChannelsMax()*10, 0, -1000);
|
||||
|
||||
// Channel max
|
||||
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].max, 0, model.getChannelsMax()*10, 1000);
|
||||
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].max, model, 0, model.getChannelsMax()*10, 1000);
|
||||
|
||||
// Channel inversion
|
||||
QComboBox * invCB = new QComboBox(this);
|
||||
|
||||
@@ -9,7 +9,7 @@ class GVarGroup;
|
||||
class LimitsGroup
|
||||
{
|
||||
public:
|
||||
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, int min, int max, int deflt);
|
||||
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt);
|
||||
~LimitsGroup();
|
||||
|
||||
void updateMinMax(int max);
|
||||
|
||||
@@ -498,9 +498,8 @@ void Curves::resizeEvent(QResizeEvent *event)
|
||||
ModelPanel::resizeEvent(event);
|
||||
}
|
||||
|
||||
void Curves::on_curveType_currentIndexChanged()
|
||||
void Curves::on_curveType_currentIndexChanged(int index)
|
||||
{
|
||||
int index = ui->curveType->currentIndex();
|
||||
unsigned int flags = templates[index].flags;
|
||||
ui->curveCoeffLabel->setVisible(flags & CURVE_COEFF_ENABLE);
|
||||
ui->curveCoeff->setVisible(flags & CURVE_COEFF_ENABLE);
|
||||
|
||||
@@ -45,7 +45,7 @@ class Curves : public ModelPanel
|
||||
void onNodeMoved(int x, int y);
|
||||
void onNodeFocus();
|
||||
void onNodeUnfocus();
|
||||
void on_curveType_currentIndexChanged();
|
||||
void on_curveType_currentIndexChanged(int index);
|
||||
void on_curveApply_clicked();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -397,7 +397,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
|
||||
else if (func>=FuncSetTimer1 && func<=FuncSetTimer3) {
|
||||
if (modified) cfn.param = QTimeS(fswtchParamTime[i]->time()).seconds();
|
||||
fswtchParamTime[i]->setMinimumTime(QTime(0, 0, 0));
|
||||
fswtchParamTime[i]->setMaximumTime(QTime(0, 59, 59));
|
||||
fswtchParamTime[i]->setMaximumTime(firmware->getMaxTimerStart());
|
||||
fswtchParamTime[i]->setTime(QTimeS(cfn.param));
|
||||
widgetsMask |= CUSTOM_FUNCTION_TIME_PARAM + CUSTOM_FUNCTION_ENABLE;
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
||||
QRegExp rx(CHAR_FOR_NAMES_REGEX);
|
||||
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, -100, 100);
|
||||
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, ed->offset, 0, -100, 100);
|
||||
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, model, 100, -100, 100);
|
||||
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, ed->offset, model, 0, -100, 100);
|
||||
}
|
||||
else {
|
||||
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, 0, 100);
|
||||
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, model, 100, 0, 100);
|
||||
gvOffsetGroup = NULL;
|
||||
ui->offsetLabel->hide();
|
||||
ui->offsetGV->hide();
|
||||
@@ -33,7 +33,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
||||
ui->offsetCB->hide();
|
||||
}
|
||||
|
||||
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve,
|
||||
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve, model,
|
||||
firmware->getCapability(HasInputDiff) ? 0 : (HIDE_DIFF | HIDE_NEGATIVE_CURVES));
|
||||
|
||||
populateSwitchCB(ui->switchesCB, ed->swtch, generalSettings, MixesContext);
|
||||
|
||||
@@ -107,14 +107,14 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
|
||||
reLayout->addWidget(label, i, 0, 1, 1);
|
||||
if (phaseIdx > 0) {
|
||||
// RE link to another RE
|
||||
QComboBox *link = new QComboBox(ui->gvGB);
|
||||
link->setProperty("index", i);
|
||||
populateGvarUseCB(link, phaseIdx);
|
||||
connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int)));
|
||||
reUse[i] = new QComboBox(ui->reGB);
|
||||
reUse[i]->setProperty("index", i);
|
||||
populateGvarUseCB(reUse[i], phaseIdx);
|
||||
if (phase.rotaryEncoders[i] > 1024) {
|
||||
link->setCurrentIndex(phase.rotaryEncoders[i] - 1024);
|
||||
reUse[i]->setCurrentIndex(phase.rotaryEncoders[i] - 1024);
|
||||
}
|
||||
reLayout->addWidget(link, i, 1, 1, 1);
|
||||
connect(reUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int)));
|
||||
reLayout->addWidget(reUse[i], i, 1, 1, 1);
|
||||
}
|
||||
// RE value
|
||||
reValues[i] = new QSpinBox(ui->reGB);
|
||||
@@ -149,14 +149,14 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
|
||||
}
|
||||
if (phaseIdx > 0) {
|
||||
// GVar link to another GVar
|
||||
QComboBox *link = new QComboBox(ui->gvGB);
|
||||
link->setProperty("index", i);
|
||||
populateGvarUseCB(link, phaseIdx);
|
||||
gvUse[i] = new QComboBox(ui->gvGB);
|
||||
gvUse[i]->setProperty("index", i);
|
||||
populateGvarUseCB(gvUse[i], phaseIdx);
|
||||
if (phase.gvars[i] > 1024) {
|
||||
link->setCurrentIndex(phase.gvars[i] - 1024);
|
||||
gvUse[i]->setCurrentIndex(phase.gvars[i] - 1024);
|
||||
}
|
||||
connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int)));
|
||||
gvLayout->addWidget(link, i, col++, 1, 1);
|
||||
connect(gvUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int)));
|
||||
gvLayout->addWidget(gvUse[i], i, col++, 1, 1);
|
||||
}
|
||||
// GVar value
|
||||
gvValues[i] = new QSpinBox(ui->gvGB);
|
||||
@@ -229,8 +229,9 @@ void FlightModePanel::update()
|
||||
int idx = phase.rotaryEncoders[i];
|
||||
FlightModeData *phasere = &phase;
|
||||
while (idx > 1024) {
|
||||
idx -= 1025;
|
||||
phasere = &model->flightModeData[idx];
|
||||
int nextPhase = idx - 1025;
|
||||
if (nextPhase >= phaseIdx) nextPhase += 1;
|
||||
phasere = &model->flightModeData[nextPhase];
|
||||
idx = phasere->rotaryEncoders[i];
|
||||
reValues[i]->setDisabled(true);
|
||||
}
|
||||
@@ -248,9 +249,11 @@ void FlightModePanel::phaseName_editingFinished()
|
||||
|
||||
void FlightModePanel::phaseSwitch_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
phase.swtch = RawSwitch(comboBox->itemData(index).toInt());
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void FlightModePanel::phaseFadeIn_editingFinished()
|
||||
@@ -287,8 +290,14 @@ void FlightModePanel::trimUpdate(unsigned int trim)
|
||||
trimsUse[trim]->setCurrentIndex(1 + 2*phase.trimRef[chn] + phase.trimMode[chn] - (phase.trimRef[chn] > phaseIdx ? 1 : 0));
|
||||
else
|
||||
trimsUse[trim]->setCurrentIndex(phase.trimRef[chn]);
|
||||
trimsValue[trim]->setEnabled(true);
|
||||
trimsSlider[trim]->setEnabled(true);
|
||||
if (phaseIdx == 0 || phase.trimRef[chn] == phaseIdx || (IS_TARANIS(board) && phase.trimMode[chn] != 0)) {
|
||||
trimsValue[trim]->setEnabled(true);
|
||||
trimsSlider[trim]->setEnabled(true);
|
||||
}
|
||||
else {
|
||||
trimsValue[trim]->setEnabled(false);
|
||||
trimsSlider[trim]->setEnabled(false);
|
||||
}
|
||||
}
|
||||
lock = false;
|
||||
}
|
||||
@@ -337,6 +346,7 @@ void FlightModePanel::phaseGVPopupToggled(bool checked)
|
||||
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
|
||||
int gvar = cb->property("index").toInt();
|
||||
model->gvars_popups[gvar] = checked;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightModePanel::phaseREValue_editingFinished()
|
||||
@@ -439,9 +449,29 @@ void FlightModePanel::fmClear()
|
||||
{
|
||||
int res = QMessageBox::question(this, "Companion", tr("Clear all current Flight Mode properties?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (res == QMessageBox::Yes) {
|
||||
phase.clear();
|
||||
for(int i=0; i < 4; ++i) {
|
||||
model->setTrimValue(phaseIdx, i, 0);
|
||||
phase.clear(phaseIdx);
|
||||
if (phaseIdx == 0) {
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
for (int i=0; i < gvCount; ++i) {
|
||||
memset(&model->gvars_names[i], 0, sizeof(model->gvars_names[i]));
|
||||
model->gvars_popups[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
lock = true;
|
||||
QComboBox * pswtch = ui->swtch;
|
||||
RawSwitch item = RawSwitch(SWITCH_TYPE_NONE);
|
||||
pswtch->setCurrentIndex(pswtch->findText(item.toString()));
|
||||
if (gvCount > 0 && (firmware->getCapability(GvarsFlightModes))) {
|
||||
for (int i=0; i<gvCount; i++) {
|
||||
gvUse[i]->setCurrentIndex((phase.gvars[i] > 1024 ? (phase.gvars[i] - 1024) : 0));
|
||||
}
|
||||
}
|
||||
for (int i=0; i<reCount; i++) {
|
||||
reUse[i]->setCurrentIndex((phase.rotaryEncoders[i] > 1024 ? (phase.rotaryEncoders[i] - 1024) : 0));
|
||||
}
|
||||
lock = false;
|
||||
}
|
||||
update();
|
||||
emit modified();
|
||||
|
||||
@@ -48,7 +48,9 @@ class FlightModePanel : public ModelPanel
|
||||
QLineEdit * gvNames[C9X_MAX_GVARS];
|
||||
QSpinBox * gvValues[C9X_MAX_GVARS];
|
||||
QCheckBox * gvPopups[C9X_MAX_GVARS];
|
||||
QComboBox * gvUse[C9X_MAX_GVARS];
|
||||
QSpinBox * reValues[C9X_MAX_ENCODERS];
|
||||
QComboBox * reUse[C9X_MAX_ENCODERS];
|
||||
QVector<QComboBox *> trimsUse;
|
||||
QVector<QSpinBox *> trimsValue;
|
||||
QVector<QSlider *> trimsSlider;
|
||||
|
||||
@@ -25,10 +25,10 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
|
||||
|
||||
int limit = firmware->getCapability(OffsetWeight);
|
||||
|
||||
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, 100, -limit, limit);
|
||||
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, 0, -limit, limit);
|
||||
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, model, 100, -limit, limit);
|
||||
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, model, 0, -limit, limit);
|
||||
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB,
|
||||
md->curve, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
|
||||
md->curve, model, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
|
||||
|
||||
ui->MixDR_CB->setChecked(md->noExpo == 0);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ void Node::stepToCenter(qreal step)
|
||||
if(centerX)
|
||||
{
|
||||
qreal x = qr.right() - qr.width()/2;
|
||||
if(abs(x-p.x())>xStep)
|
||||
if(fabs(x-p.x())>xStep)
|
||||
p.rx() += p.x()>x ? -xStep : xStep;
|
||||
else
|
||||
p.rx() = x;
|
||||
@@ -91,7 +91,7 @@ void Node::stepToCenter(qreal step)
|
||||
if(centerY)
|
||||
{
|
||||
qreal y = qr.bottom() - qr.height()/2;
|
||||
if(abs(y-p.y())>yStep)
|
||||
if(fabs(y-p.y())>yStep)
|
||||
p.ry() += p.y()>y ? -yStep : yStep;
|
||||
else
|
||||
p.ry() = y;
|
||||
|
||||
@@ -42,6 +42,8 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
|
||||
ui->countdownBeep->addItem(tr("Voice"), TimerData::COUNTDOWN_VOICE);
|
||||
ui->countdownBeep->addItem(tr("Haptic"), TimerData::COUNTDOWN_HAPTIC);
|
||||
}
|
||||
|
||||
ui->value->setMaximumTime(firmware->getMaxTimerStart());
|
||||
|
||||
ui->persistent->setField(timer.persistent, this);
|
||||
ui->persistent->addItem(tr("Not persistent"), 0);
|
||||
@@ -66,9 +68,11 @@ TimerPanel::~TimerPanel()
|
||||
|
||||
void TimerPanel::update()
|
||||
{
|
||||
int min = timer.val / 60;
|
||||
int sec = timer.val % 60;
|
||||
ui->value->setTime(QTime(0, min, sec));
|
||||
int hour = timer.val / 3600;
|
||||
int min = (timer.val - (hour * 3600)) / 60;
|
||||
int sec = (timer.val - (hour * 3600)) % 60;
|
||||
|
||||
ui->value->setTime(QTime(hour, min, sec));
|
||||
|
||||
if (firmware->getCapability(PermTimers)) {
|
||||
int sign = 1;
|
||||
@@ -94,7 +98,7 @@ QWidget * TimerPanel::getLastFocus()
|
||||
|
||||
void TimerPanel::on_value_editingFinished()
|
||||
{
|
||||
timer.val = ui->value->time().minute()*60 + ui->value->time().second();
|
||||
timer.val = ui->value->time().hour()*3600 + ui->value->time().minute()*60 + ui->value->time().second();
|
||||
emit modified();
|
||||
}
|
||||
|
||||
@@ -177,6 +181,11 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<=MM_RF_PROTO_LAST; i++)
|
||||
{
|
||||
ui->multiProtocol->addItem(ModelPrinter::printMultiRfProtocol(i), (QVariant) i);
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HasFailsafe)) {
|
||||
for (int i=0; i<maxChannels; i++) {
|
||||
QLabel * label = new QLabel(this);
|
||||
@@ -222,6 +231,7 @@ ModulePanel::~ModulePanel()
|
||||
#define MASK_PPM_FIELDS 16
|
||||
#define MASK_FAILSAFES 32
|
||||
#define MASK_OPEN_DRAIN 64
|
||||
#define MASK_MULTIMODULE 128
|
||||
|
||||
void ModulePanel::update()
|
||||
{
|
||||
@@ -257,6 +267,9 @@ void ModulePanel::update()
|
||||
mask |= MASK_OPEN_DRAIN;
|
||||
}
|
||||
break;
|
||||
case PULSES_MULTIMODULE:
|
||||
mask |= MASK_CHANNELS_RANGE | MASK_RX_NUMBER | MASK_MULTIMODULE;
|
||||
break;
|
||||
case PULSES_OFF:
|
||||
default:
|
||||
break;
|
||||
@@ -289,18 +302,44 @@ void ModulePanel::update()
|
||||
// PPM settings fields
|
||||
ui->label_ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
|
||||
ui->ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
|
||||
ui->ppmPolarity->setCurrentIndex(module.ppmPulsePol);
|
||||
ui->ppmPolarity->setCurrentIndex(module.ppm.pulsePol);
|
||||
ui->label_ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
|
||||
ui->ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
|
||||
ui->ppmOutputType->setCurrentIndex(module.ppmOutputType);
|
||||
ui->ppmOutputType->setCurrentIndex(module.ppm.outputType);
|
||||
ui->label_ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
|
||||
ui->ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
|
||||
ui->ppmDelay->setValue(module.ppmDelay);
|
||||
ui->ppmDelay->setValue(module.ppm.delay);
|
||||
ui->label_ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
|
||||
ui->ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
|
||||
ui->ppmFrameLength->setMinimum(module.channelsCount*(model->extendedLimits ? 2.250 : 2)+3.5);
|
||||
ui->ppmFrameLength->setMaximum(firmware->getCapability(PPMFrameLength));
|
||||
ui->ppmFrameLength->setValue(22.5+((double)module.ppmFrameLength)*0.5);
|
||||
ui->ppmFrameLength->setValue(22.5+((double)module.ppm.frameLength)*0.5);
|
||||
|
||||
// Multi settings fields
|
||||
ui->label_multiProtocol->setVisible(mask & MASK_MULTIMODULE);
|
||||
ui->multiProtocol->setVisible(mask & MASK_MULTIMODULE);
|
||||
ui->multiProtocol->setCurrentIndex(module.getMultiRfProtocol());
|
||||
ui->label_multiSubType->setVisible(mask & MASK_MULTIMODULE);
|
||||
ui->multiSubType->setVisible(mask & MASK_MULTIMODULE);
|
||||
|
||||
if (mask & MASK_MULTIMODULE) {
|
||||
int numEntries = getNumSubtypes(static_cast<MultiModuleRFProtocols>(module.getMultiRfProtocol()));
|
||||
// Removes extra items
|
||||
ui->multiSubType->setMaxCount(numEntries);
|
||||
for (int i=0; i < numEntries; i++) {
|
||||
if (i < ui->multiSubType->count())
|
||||
ui->multiSubType->setItemText(i, ModelPrinter::printMultiSubType(module.getMultiRfProtocol(), i));
|
||||
else
|
||||
ui->multiSubType->addItem(ModelPrinter::printMultiSubType(module.getMultiRfProtocol(), i), (QVariant) i);
|
||||
}
|
||||
}
|
||||
ui->multiSubType->setCurrentIndex(module.subType);
|
||||
|
||||
ui->cb_autoBind->setVisible(mask & MASK_MULTIMODULE);
|
||||
ui->cb_autoBind->setChecked(module.multi.autoBindMode ? Qt::Checked : Qt::Unchecked);
|
||||
ui->cb_lowPower->setVisible(mask & MASK_MULTIMODULE);
|
||||
ui->cb_lowPower->setChecked(module.multi.lowPowerMode ? Qt::Checked : Qt::Unchecked);
|
||||
|
||||
|
||||
if (firmware->getCapability(HasFailsafe)) {
|
||||
ui->label_failsafeMode->setVisible(mask & MASK_FAILSAFES);
|
||||
@@ -327,8 +366,8 @@ void ModulePanel::update()
|
||||
ui->failsafesFrame->setVisible(mask & MASK_FAILSAFES);
|
||||
|
||||
if (mask & MASK_CHANNELS_RANGE) {
|
||||
ui->channelsStart->setMaximum(32 - ui->channelsCount->value());
|
||||
ui->channelsCount->setMaximum(qMin(16, 32-ui->channelsStart->value()));
|
||||
ui->channelsStart->setMaximum(33 - ui->channelsCount->value());
|
||||
ui->channelsCount->setMaximum(qMin(16, 33-ui->channelsStart->value()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,13 +391,13 @@ void ModulePanel::on_protocol_currentIndexChanged(int index)
|
||||
|
||||
void ModulePanel::on_ppmPolarity_currentIndexChanged(int index)
|
||||
{
|
||||
module.ppmPulsePol = index;
|
||||
module.ppm.pulsePol = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void ModulePanel::on_ppmOutputType_currentIndexChanged(int index)
|
||||
{
|
||||
module.ppmOutputType = index;
|
||||
module.ppm.outputType = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
@@ -384,7 +423,7 @@ void ModulePanel::on_ppmDelay_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
// TODO only accept valid values
|
||||
module.ppmDelay = ui->ppmDelay->value();
|
||||
module.ppm.delay = ui->ppmDelay->value();
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
@@ -397,7 +436,7 @@ void ModulePanel::on_rxNumber_editingFinished()
|
||||
|
||||
void ModulePanel::on_ppmFrameLength_editingFinished()
|
||||
{
|
||||
module.ppmFrameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
|
||||
module.ppm.frameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
@@ -431,6 +470,39 @@ void ModulePanel::onFailsafeComboIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void ModulePanel::on_multiProtocol_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
lock=true;
|
||||
module.setMultiRfProtocol(index);
|
||||
unsigned int maxSubTypes = getNumSubtypes(static_cast<MultiModuleRFProtocols>(index));
|
||||
module.subType = std::min(module.subType, maxSubTypes -1);
|
||||
update();
|
||||
emit modified();
|
||||
lock = false;
|
||||
}
|
||||
}
|
||||
|
||||
void ModulePanel::on_multiSubType_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
lock=true;
|
||||
module.subType = index;
|
||||
update();
|
||||
emit modified();
|
||||
lock = false;
|
||||
}
|
||||
}
|
||||
|
||||
void ModulePanel::on_autoBind_stateChanged(int state)
|
||||
{
|
||||
module.multi.autoBindMode = (state == Qt::Checked);
|
||||
}
|
||||
void ModulePanel::on_lowPower_stateChanged(int state)
|
||||
{
|
||||
module.multi.lowPowerMode = (state == Qt::Checked);
|
||||
}
|
||||
|
||||
void ModulePanel::updateFailsafe(int channel)
|
||||
{
|
||||
int failsafeValue = module.failsafeChannels[channel];
|
||||
|
||||
@@ -65,6 +65,10 @@ class ModulePanel : public ModelPanel
|
||||
void on_failsafeMode_currentIndexChanged(int value);
|
||||
void onFailsafeComboIndexChanged(int index);
|
||||
void onFailsafeSpinChanged(double value);
|
||||
void on_multiProtocol_currentIndexChanged(int index);
|
||||
void on_multiSubType_currentIndexChanged(int index);
|
||||
void on_autoBind_stateChanged(int state);
|
||||
void on_lowPower_stateChanged(int state);
|
||||
|
||||
private:
|
||||
ModuleData & module;
|
||||
|
||||
@@ -534,6 +534,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_multiProtocol">
|
||||
<property name="text">
|
||||
<string>Multi Radio Protocol</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="multiProtocol">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QLabel" name="label_rxNumber">
|
||||
<property name="maximumSize">
|
||||
@@ -571,6 +591,37 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_multiSubType">
|
||||
<property name="text">
|
||||
<string>SubType</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QComboBox" name="multiSubType">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QCheckBox" name="cb_autoBind">
|
||||
<property name="text">
|
||||
<string>Autobind</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<widget class="QCheckBox" name="cb_lowPower">
|
||||
<property name="text">
|
||||
<string>Low Power</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>-1</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
@@ -39,10 +39,10 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentSection">
|
||||
<enum>QDateTimeEdit::MinuteSection</enum>
|
||||
<enum>QDateTimeEdit::HourSection</enum>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string notr="true">mm:ss</string>
|
||||
<string notr="true">hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -619,7 +619,7 @@ void TelemetrySensorPanel::update()
|
||||
ui->source4->setVisible(sources34FieldsDisplayed);
|
||||
ui->autoOffset->setVisible(sensor.unit != SensorData::UNIT_RPMS && isConfigurable);
|
||||
ui->filter->setVisible(isConfigurable);
|
||||
ui->persistent->setVisible((sensor.type == SensorData::TELEM_TYPE_CALCULATED && sensor.formula == SensorData::TELEM_FORMULA_CONSUMPTION) || isConfigurable);
|
||||
ui->persistent->setVisible(sensor.type == SensorData::TELEM_TYPE_CALCULATED);
|
||||
|
||||
lock = false;
|
||||
}
|
||||
@@ -696,10 +696,10 @@ void TelemetrySensorPanel::on_unit_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void TelemetrySensorPanel::on_prec_valueChanged()
|
||||
void TelemetrySensorPanel::on_prec_valueChanged(double value)
|
||||
{
|
||||
if (!lock) {
|
||||
sensor.prec = ui->prec->value();
|
||||
sensor.prec = value;
|
||||
emit dataModified();
|
||||
emit modified();
|
||||
}
|
||||
@@ -800,7 +800,8 @@ void TelemetryPanel::setup()
|
||||
if (IS_ARM(firmware->getBoard())) {
|
||||
ui->telemetryProtocol->addItem(tr("FrSky S.PORT"), 0);
|
||||
ui->telemetryProtocol->addItem(tr("FrSky D"), 1);
|
||||
if (IS_9XRPRO(firmware->getBoard())) {
|
||||
if (IS_9XRPRO(firmware->getBoard()) ||
|
||||
(IS_TARANIS(firmware->getBoard()) && generalSettings.hw_uartMode == 2)) {
|
||||
ui->telemetryProtocol->addItem(tr("FrSky D (cable)"), 2);
|
||||
}
|
||||
ui->telemetryProtocol->setCurrentIndex(model->telemetryProtocol);
|
||||
|
||||
@@ -93,7 +93,7 @@ class TelemetrySensorPanel: public ModelPanel
|
||||
void on_type_currentIndexChanged(int index);
|
||||
void on_formula_currentIndexChanged(int index);
|
||||
void on_unit_currentIndexChanged(int index);
|
||||
void on_prec_valueChanged();
|
||||
void on_prec_valueChanged(double value);
|
||||
|
||||
protected:
|
||||
void updateSourcesComboBox(AutoComboBox * cb, bool negative);
|
||||
|
||||
@@ -91,31 +91,91 @@ QString ModelPrinter::printThrottleTrimMode()
|
||||
QString ModelPrinter::printModuleProtocol(unsigned int protocol)
|
||||
{
|
||||
static const char * strings[] = {
|
||||
"OFF",
|
||||
"PPM",
|
||||
"Silverlit A", "Silverlit B", "Silverlit C",
|
||||
"CTP1009",
|
||||
"LP45", "DSM2", "DSMX",
|
||||
"PPM16", "PPMsim",
|
||||
"FrSky XJT (D16)", "FrSky XJT (D8)", "FrSky XJT (LR12)", "FrSky DJT",
|
||||
"Crossfire"
|
||||
"OFF",
|
||||
"PPM",
|
||||
"Silverlit A", "Silverlit B", "Silverlit C",
|
||||
"CTP1009",
|
||||
"LP45", "DSM2", "DSMX",
|
||||
"PPM16", "PPMsim",
|
||||
"FrSky XJT (D16)", "FrSky XJT (D8)", "FrSky XJT (LR12)", "FrSky DJT",
|
||||
"Crossfire",
|
||||
"DIY Multiprotocol Module"
|
||||
};
|
||||
|
||||
return CHECK_IN_ARRAY(strings, protocol);
|
||||
}
|
||||
|
||||
QString ModelPrinter::printModule(int idx)
|
||||
QString ModelPrinter::printMultiRfProtocol(int rfProtocol)
|
||||
{
|
||||
const ModuleData & module = model.moduleData[idx];
|
||||
static const char *strings[] = {
|
||||
"FlySky", "Hubsan", "FrSky", "Hisky", "V2x2", "DSM", "Devo", "YD717", "KN", "SymaX", "SLT", "CX10", "CG023",
|
||||
"Bayang", "ESky", "MT99XX", "MJXQ", "Shenqi", "FY326", "SFHSS", "Custom"
|
||||
};
|
||||
if (rfProtocol > MM_RF_PROTO_CUSTOM)
|
||||
return "Custom - proto " + QString::number(rfProtocol & 0x1f);
|
||||
else
|
||||
return CHECK_IN_ARRAY(strings, rfProtocol);
|
||||
}
|
||||
|
||||
QString ModelPrinter::printMultiSubType(int rfProtocol, int subType) {
|
||||
/* custom protocols */
|
||||
static const char *custom_subtype_strings[] = {"Subtype 0","Subtype 1","Subtype 2","Subtype 3","Subtype 4","Subtype 5","Subtype 6","Subtype 7"};
|
||||
static const char *flysky_strings[] = {"Standard","V9x9","V6x6","V912"};
|
||||
static const char *frsky_strings[] = {"D16", "D8", "D16 8ch"};
|
||||
static const char *hisky_strings[] = { "HiSky", "HK310" };
|
||||
static const char *dsm2_strings[] = {"DSM2", "DSMX"};
|
||||
static const char *yd717_strings[] = {"YD717", "Skywalker", "Syma X2", "XINXUN", "NIHUI"};
|
||||
static const char *symax_strings[] = {"Standard", "Syma X5C"};
|
||||
static const char *cx10_strings[] = {"Green", "Blue", "DM007", "Q282", "JC3015a", "JC3015b", "MK33041", "Q242"};
|
||||
static const char *cg023_strings[] = {"CG023", "YD829", "H3 3D"};
|
||||
static const char* kn_strings[] = {"WLtoys", "FeiLun"};
|
||||
static const char* mt99_strings[] = {"MT99","H7","YZ"};
|
||||
static const char* mjxq_strings[] = {"WLH08", "X600", "X800", "H26D"};
|
||||
|
||||
if (rfProtocol >= MM_RF_PROTO_CUSTOM) {
|
||||
return CHECK_IN_ARRAY(custom_subtype_strings, subType);
|
||||
}
|
||||
switch (rfProtocol) {
|
||||
case MM_RF_PROTO_FLYSKY:
|
||||
return CHECK_IN_ARRAY(flysky_strings, subType);
|
||||
case MM_RF_PROTO_FRSKY:
|
||||
return CHECK_IN_ARRAY(frsky_strings, subType);
|
||||
case MM_RF_PROTO_HISKY:
|
||||
return CHECK_IN_ARRAY(hisky_strings, subType);
|
||||
case MM_RF_PROTO_DSM2:
|
||||
return CHECK_IN_ARRAY(dsm2_strings, subType);
|
||||
case MM_RF_PROTO_YD717:
|
||||
return CHECK_IN_ARRAY(yd717_strings, subType);
|
||||
case MM_RF_PROTO_SYMAX:
|
||||
return CHECK_IN_ARRAY(symax_strings, subType);
|
||||
case MM_RF_PROTO_CX10:
|
||||
return CHECK_IN_ARRAY(cx10_strings, subType);
|
||||
case MM_RF_PROTO_CG023:
|
||||
return CHECK_IN_ARRAY(cg023_strings, subType);
|
||||
case MM_RF_PROTO_KN:
|
||||
return CHECK_IN_ARRAY(kn_strings, subType);
|
||||
case MM_RF_PROTO_MT99XX:
|
||||
return CHECK_IN_ARRAY(mt99_strings, subType);
|
||||
case MM_RF_PROTO_MJXQ:
|
||||
return CHECK_IN_ARRAY(mjxq_strings, subType);
|
||||
default:
|
||||
return "DEFAULT";
|
||||
}
|
||||
}
|
||||
|
||||
QString ModelPrinter::printModule(int idx) {
|
||||
const ModuleData &module = model.moduleData[idx];
|
||||
if (module.protocol == PULSES_OFF)
|
||||
return printModuleProtocol(module.protocol);
|
||||
else if (module.protocol == PULSES_PPM)
|
||||
return tr("%1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart+1).arg(module.channelsStart+module.channelsCount).arg(module.ppmDelay).arg(module.polarityToString());
|
||||
return tr("%1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart + 1).arg(module.channelsStart + module.channelsCount).arg(module.ppm.delay).arg(module.polarityToString());
|
||||
else {
|
||||
QString result = tr("%1, Channels(%2-%3)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart+1).arg(module.channelsStart+module.channelsCount);
|
||||
if (module.protocol != PULSES_PXX_XJT_D8) {
|
||||
result += " " + tr("Receiver number(%1)").arg(module.modelId);
|
||||
}
|
||||
if (module.protocol == PULSES_MULTIMODULE)
|
||||
result += " " + tr("radio Protocol %1, subType %2, option value %3").arg(printMultiRfProtocol(module.multi.rfProtocol)).arg(printMultiSubType(module.multi.rfProtocol, module.subType)).arg(module.multi.optionValue);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -125,7 +185,7 @@ QString ModelPrinter::printTrainerMode()
|
||||
QString result;
|
||||
switch (model.trainerMode) {
|
||||
case 1:
|
||||
result = tr("Slave/Jack"); // TODO + tr(": Channel start: %1, %2 Channels, %3usec Delay, Pulse polarity %4").arg(module.channelsStart+1).arg(module.channelsCount).arg(module.ppmDelay).arg(module.polarityToString());
|
||||
result = tr("Slave/Jack"); // TODO + tr(": Channel start: %1, %2 Channels, %3usec Delay, Pulse polarity %4").arg(module.channelsStart+1).arg(module.channelsCount).arg(module.ppm.delay).arg(module.polarityToString());
|
||||
break;
|
||||
case 2:
|
||||
result = tr("Master/SBUS Module");
|
||||
@@ -142,6 +202,25 @@ QString ModelPrinter::printTrainerMode()
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ModelPrinter::printHeliSwashType ()
|
||||
{
|
||||
switch (model.swashRingData.type) {
|
||||
case HELI_SWASH_TYPE_90:
|
||||
return tr("90");
|
||||
case HELI_SWASH_TYPE_120:
|
||||
return tr("120");
|
||||
case HELI_SWASH_TYPE_120X:
|
||||
return tr("120X");
|
||||
case HELI_SWASH_TYPE_140:
|
||||
return tr("140");
|
||||
case HELI_SWASH_TYPE_NONE:
|
||||
return tr("Off");
|
||||
default:
|
||||
return "???";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString ModelPrinter::printCenterBeep()
|
||||
{
|
||||
QStringList strl;
|
||||
|
||||
@@ -38,12 +38,15 @@ class ModelPrinter: public QObject
|
||||
QString printTrimIncrementMode();
|
||||
QString printThrottleTrimMode();
|
||||
static QString printModuleProtocol(unsigned int protocol);
|
||||
static QString printMultiRfProtocol(int rfProtocol);
|
||||
static QString printMultiSubType(int rfProtocol, int subType);
|
||||
QString printFlightModeSwitch(int index);
|
||||
QString printFlightModeName(int index);
|
||||
QString printFlightModes(unsigned int flightModes);
|
||||
QString printModule(int idx);
|
||||
QString printTrainerMode();
|
||||
QString printCenterBeep();
|
||||
QString printHeliSwashType();
|
||||
QString printTrim(int flightModeIndex, int stickIndex);
|
||||
QString printGlobalVar(int flightModeIndex, int gvarIndex);
|
||||
QString printRotaryEncoder(int flightModeIndex, int reIndex);
|
||||
|
||||
@@ -128,6 +128,8 @@ QString MultiModelPrinter::print(QTextDocument * document)
|
||||
|
||||
QString str = "<table border='1' cellspacing='0' cellpadding='3' width='100%' style='font-family: monospace;'>";
|
||||
str += printSetup();
|
||||
if (firmware->getCapability(Heli))
|
||||
str += printHeliSetup();
|
||||
if (firmware->getCapability(FlightModes))
|
||||
str += printFlightModes();
|
||||
str += printInputs();
|
||||
@@ -181,6 +183,57 @@ QString MultiModelPrinter::printSetup()
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
QString MultiModelPrinter::printHeliSetup()
|
||||
{
|
||||
bool heliEnabled = false;
|
||||
for (int k=0; k<models.size(); k++) {
|
||||
heliEnabled = heliEnabled || models[k]->swashRingData.type != HELI_SWASH_TYPE_NONE;
|
||||
}
|
||||
|
||||
if (!heliEnabled)
|
||||
return "";
|
||||
|
||||
QString str = printTitle(tr("Helicopter Setup"));
|
||||
MultiColumns columns(models.size());
|
||||
columns.appendTitle (tr("Swash Type:"));
|
||||
COMPARE(modelPrinter->printHeliSwashType());
|
||||
columns.append ("<br/>");
|
||||
|
||||
columns.appendTitle (tr("Swash Ring:"));
|
||||
COMPARE(model->swashRingData.value);
|
||||
|
||||
columns.append ("<table cellspacing='0' cellpadding='1' width='100%' border='0' style='border-collapse:collapse'>");
|
||||
columns.append("<tr>");
|
||||
columns.append("<td></td><td><b>" + tr("Input") + "</b></td><td><b>" + tr("Weight") + "</b></td>");
|
||||
columns.append("</tr>");
|
||||
|
||||
columns.append("<tr><td><b>" + tr("Long. cyc") + "</b></td><td>");
|
||||
COMPARE(model->swashRingData.elevatorSource.toString(model));
|
||||
columns.append("</td><td>");
|
||||
COMPARE(model->swashRingData.elevatorWeight)
|
||||
columns.append("</td></tr>");
|
||||
|
||||
columns.append("<tr><td><b>" + tr("Lateral cyc") + "</b></td><td>");
|
||||
COMPARE(model->swashRingData.aileronSource.toString(model));
|
||||
columns.append("</td><td>");
|
||||
COMPARE(model->swashRingData.aileronWeight)
|
||||
columns.append("</td></tr>");
|
||||
|
||||
|
||||
columns.append("<tr><td><b>" + tr("Collective") + "</b></td><td>");
|
||||
COMPARE(model->swashRingData.collectiveSource.toString(model));
|
||||
columns.append("</td><td>");
|
||||
COMPARE(model->swashRingData.collectiveWeight)
|
||||
columns.append("</td></tr>");
|
||||
columns.append("</table>");
|
||||
|
||||
|
||||
|
||||
str.append(columns.print());
|
||||
return str;
|
||||
}
|
||||
|
||||
QString MultiModelPrinter::printFlightModes()
|
||||
{
|
||||
QString str = printTitle(tr("Flight modes"));
|
||||
|
||||
@@ -43,6 +43,7 @@ class MultiModelPrinter: public QObject
|
||||
|
||||
QString printTitle(const QString & label);
|
||||
QString printSetup();
|
||||
QString printHeliSetup();
|
||||
QString printFlightModes();
|
||||
QString printLimits();
|
||||
QString printInputs();
|
||||
|
||||
@@ -108,7 +108,7 @@ QString SyncProcess::updateEntry(const QString & path, const QDir & source, cons
|
||||
QString sourceContents = sourceFile.readAll();
|
||||
sourceFile.close();
|
||||
// try to retrieve destination contents
|
||||
QFile destinationFile(path);
|
||||
QFile destinationFile(destinationPath);
|
||||
if (destinationFile.open(QFile::ReadOnly)) {
|
||||
QString destinationContents = destinationFile.readAll();
|
||||
destinationFile.close();
|
||||
|
||||
@@ -60,20 +60,22 @@ QStringList getAvrdudeArgs(const QString &cmd, const QString &filename)
|
||||
return args;
|
||||
}
|
||||
|
||||
QStringList getDfuArgs(const QString &cmd, const QString &filename)
|
||||
QStringList getDfuArgs(const QString & cmd, const QString & filename)
|
||||
{
|
||||
QStringList arguments;
|
||||
QStringList args;
|
||||
burnConfigDialog bcd;
|
||||
QString memory="0x08000000";
|
||||
if (cmd=="-U") {
|
||||
memory.append(QString(":%1").arg(MAX_FSIZE));
|
||||
QString memory = "0x08000000";
|
||||
if (cmd == "-U") {
|
||||
memory.append(QString(":%1").arg(GetCurrentFirmware()->getFlashSize()));
|
||||
}
|
||||
arguments << bcd.getDFUArgs() << "--dfuse-address" << memory << "-d" << "0483:df11";
|
||||
args << bcd.getDFUArgs();
|
||||
if (!filename.endsWith(".dfu")) {
|
||||
args << "--dfuse-address" << memory;
|
||||
}
|
||||
args << "-d" << "0483:df11";
|
||||
QString fullcmd = cmd + filename;
|
||||
|
||||
arguments << "" << fullcmd;
|
||||
|
||||
return arguments;
|
||||
args << "" << fullcmd;
|
||||
return args;
|
||||
}
|
||||
|
||||
QStringList getSambaArgs(const QString &tcl)
|
||||
@@ -102,7 +104,7 @@ QStringList getReadEEpromCmd(const QString &filename)
|
||||
{
|
||||
QStringList result;
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
// impossible
|
||||
}
|
||||
else if (IS_SKY9X(eepromInterface->getBoard())) {
|
||||
@@ -117,7 +119,7 @@ QStringList getReadEEpromCmd(const QString &filename)
|
||||
QStringList getWriteEEpromCmd(const QString &filename)
|
||||
{
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
// impossible
|
||||
return QStringList();
|
||||
}
|
||||
@@ -132,7 +134,7 @@ QStringList getWriteEEpromCmd(const QString &filename)
|
||||
QStringList getWriteFirmwareArgs(const QString &filename)
|
||||
{
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
return getDfuArgs("-D", filename);
|
||||
}
|
||||
else if (eepromInterface->getBoard() == BOARD_SKY9X) {
|
||||
@@ -149,7 +151,7 @@ QStringList getWriteFirmwareArgs(const QString &filename)
|
||||
QStringList getReadFirmwareArgs(const QString &filename)
|
||||
{
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
if (IS_TARANIS(eepromInterface->getBoard())) {
|
||||
if (IS_STM32(eepromInterface->getBoard())) {
|
||||
return getDfuArgs("-U", filename);
|
||||
}
|
||||
else if (eepromInterface->getBoard() == BOARD_SKY9X) {
|
||||
@@ -191,7 +193,7 @@ void resetAvrdudeFuses(bool eepromProtect, ProgressWidget *progress)
|
||||
QStringList str;
|
||||
if (bcd.getMCU() == "m2560") {
|
||||
args << "-B8";
|
||||
QString erStr = eepromProtect ? "hfuse:w:0x11:m" : "hfuse:w:0x19:m";
|
||||
QString erStr = eepromProtect ? "hfuse:w:0x51:m" : "hfuse:w:0x59:m";
|
||||
str << "-U" << "lfuse:w:0xD7:m" << "-U" << erStr << "-U" << "efuse:w:0xFC:m";
|
||||
//use hfuse = 0x81 to prevent eeprom being erased with every flashing
|
||||
}
|
||||
@@ -220,7 +222,7 @@ void resetAvrdudeFuses(bool eepromProtect, ProgressWidget *progress)
|
||||
lfuses = "lfuse:w:0x3F:m";
|
||||
}
|
||||
|
||||
QString erStr = eepromProtect ? "hfuse:w:0x81:m" : "hfuse:w:0x89:m";
|
||||
QString erStr = eepromProtect ? "hfuse:w:0xC1:m" : "hfuse:w:0xC9:m";
|
||||
str << "-U" << lfuses << "-U" << erStr << "-U" << "efuse:w:0xFF:m";
|
||||
//use hfuse = 0x81 to prevent eeprom being erased with every flashing
|
||||
}
|
||||
@@ -313,7 +315,7 @@ bool readEeprom(const QString &filename, ProgressWidget *progress)
|
||||
}
|
||||
}
|
||||
|
||||
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
|
||||
if (result == false && !IS_STM32(GetCurrentFirmware()->getBoard())) {
|
||||
FlashProcess flashProcess(getRadioInterfaceCmd(), getReadEEpromCmd(filename), progress);
|
||||
result = flashProcess.run();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "ui_htmldialog.h"
|
||||
|
||||
ReleaseNotesDialog::ReleaseNotesDialog(QWidget * parent) :
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
QDialog(parent),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "helpers.h"
|
||||
|
||||
ReleaseNotesFirmwareDialog::ReleaseNotesFirmwareDialog(QWidget * parent, const QString & rnurl):
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
QDialog(parent),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
#include "modeledit/modeledit.h"
|
||||
#if __GNUC__
|
||||
#include <math.h>
|
||||
#else
|
||||
#include "../targets/windows/winbuild.h"
|
||||
#endif
|
||||
|
||||
class AutoDoubleSpinBox: public QDoubleSpinBox
|
||||
|
||||
@@ -62,7 +62,16 @@ class LcdWidget : public QWidget
|
||||
|
||||
void makeScreenshot(const QString & fileName)
|
||||
{
|
||||
QPixmap buffer(2*lcdWidth, 2*lcdHeight);
|
||||
int width, height;
|
||||
if (lcdDepth < 12) {
|
||||
width = 2 * lcdWidth;
|
||||
height = 2 * lcdHeight;
|
||||
}
|
||||
else {
|
||||
width = lcdWidth;
|
||||
height = lcdHeight;
|
||||
}
|
||||
QPixmap buffer(width, height);
|
||||
QPainter p(&buffer);
|
||||
doPaint(p);
|
||||
bool toclipboard = g.snapToClpbrd();
|
||||
|
||||
@@ -141,7 +141,12 @@ void SimulatorDialogHorus::getValues()
|
||||
trimPressed == TRIM_RV_DN,
|
||||
trimPressed == TRIM_RV_UP,
|
||||
trimPressed == TRIM_RH_L,
|
||||
trimPressed == TRIM_RH_R
|
||||
trimPressed == TRIM_RH_R,
|
||||
0,0,0,0
|
||||
/*trimPressed == TRIM_T5_DN,
|
||||
trimPressed == TRIM_T5_UP,
|
||||
trimPressed == TRIM_T6_DN,
|
||||
trimPressed == TRIM_T6_UP*/
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ void SimulatorDialogTaranis::getValues()
|
||||
{
|
||||
-pots[0]->value(),
|
||||
pots[1]->value(),
|
||||
((flags && SIMULATOR_FLAGS_S3) ? pots[2]->value() : 0),
|
||||
((flags & SIMULATOR_FLAGS_S3) ? pots[2]->value() : 0),
|
||||
-sliders[0]->value(),
|
||||
sliders[1]->value()
|
||||
},
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if !defined(NUM_LOGICAL_SWITCH) && defined(NUM_CSW)
|
||||
#define NUM_LOGICAL_SWITCH NUM_CSW
|
||||
#if !defined(MAX_LOGICAL_SWITCHES) && defined(NUM_CSW)
|
||||
#define MAX_LOGICAL_SWITCHES NUM_CSW
|
||||
#endif
|
||||
|
||||
#ifdef INIT_IMPORT
|
||||
#undef INIT_IMPORT
|
||||
#ifdef FRSKY
|
||||
frskyStreaming = 20;
|
||||
#ifdef TELEMETRY_FRSKY
|
||||
telemetryStreaming = 20;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -31,13 +31,13 @@ frskyStreaming = 20;
|
||||
#undef SETVALUES_IMPORT
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
g_anas[i] = inputs.sticks[i];
|
||||
for (int i=0; i<NUM_POTS; i++)
|
||||
for (int i=0; i<NUM_POTS+NUM_SLIDERS; i++)
|
||||
g_anas[NUM_STICKS+i] = inputs.pots[i];
|
||||
for (int i=0; i<C9X_NUM_SWITCHES; i++)
|
||||
simuSetSwitch(i, inputs.switches[i]);
|
||||
for (int i=0; i<C9X_NUM_KEYS; i++)
|
||||
simuSetKey(i, inputs.keys[i]);
|
||||
for (int i=0; i<NUM_STICKS*2; i++)
|
||||
for (int i=0; i<(NUM_STICKS+NUM_AUX_TRIMS)*2; i++)
|
||||
simuSetTrim(i, inputs.trims[i]);
|
||||
|
||||
#ifdef PCBGRUVIN9X
|
||||
@@ -50,7 +50,7 @@ if (inputs.rotenc) pind |= 0x20;
|
||||
if (inputs.rotenc) PIOB->PIO_PDSR &= ~0x40; else PIOB->PIO_PDSR |= 0x40;
|
||||
#endif
|
||||
|
||||
#if defined(PCBFLAMENCO) || (defined(PCBTARANIS) && defined(REV9E))
|
||||
#if defined(PCBFLAMENCO) || defined(PCBX9E)
|
||||
if (inputs.rotenc) simuSetKey(KEY_ENTER, true);
|
||||
#endif
|
||||
#endif
|
||||
@@ -60,7 +60,7 @@ if (inputs.rotenc) simuSetKey(KEY_ENTER, true);
|
||||
memset(outputs.chans, 0, sizeof(outputs.chans));
|
||||
for (unsigned int i=0; i<DIM(g_chans512); i++)
|
||||
outputs.chans[i] = g_chans512[i];
|
||||
for (int i=0; i<NUM_LOGICAL_SWITCH; i++)
|
||||
for (int i=0; i<MAX_LOGICAL_SWITCHES; i++)
|
||||
#if defined(BOLD_FONT)
|
||||
outputs.vsw[i] = getSwitch(SWSRC_SW1+i);
|
||||
#else
|
||||
@@ -81,7 +81,7 @@ for (int fm=0; fm<MAX_FLIGHT_MODES; fm++) {
|
||||
#ifdef LCDCHANGED_IMPORT
|
||||
#undef LCDCHANGED_IMPORT
|
||||
if (simuLcdRefresh) {
|
||||
lightEnable = isBacklightEnable();
|
||||
lightEnable = isBacklightEnabled();
|
||||
simuLcdRefresh = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ void registerSimulators()
|
||||
#elif (!defined __GNUC__)
|
||||
char name[MAX_PATH];
|
||||
GetModuleFileName(NULL, name, MAX_PATH);
|
||||
QString path(name);
|
||||
path.truncate(path.lastIndexOf('\\'));
|
||||
dir.setPath(path);
|
||||
QString path(name);
|
||||
path.truncate(path.lastIndexOf('\\'));
|
||||
dir.setPath(path);
|
||||
#else
|
||||
dir = SIMULATOR_LIB_SEARCH_PATH;
|
||||
#endif
|
||||
@@ -69,7 +69,7 @@ void registerSimulators()
|
||||
}
|
||||
}
|
||||
|
||||
SimulatorFactory *getSimulatorFactory(const QString &name)
|
||||
SimulatorFactory * getSimulatorFactory(const QString & name)
|
||||
{
|
||||
QString simuName = name;
|
||||
while(1) {
|
||||
@@ -85,6 +85,8 @@ SimulatorFactory *getSimulatorFactory(const QString &name)
|
||||
if (pos <= 0)
|
||||
break;
|
||||
simuName = simuName.mid(0, pos);
|
||||
if (simuName.count('-') == 0)
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -24,12 +24,7 @@
|
||||
#include <QMap>
|
||||
#include <algorithm>
|
||||
|
||||
#if __GNUC__
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
#else
|
||||
#include "../targets/windows/winbuild.h"
|
||||
#endif
|
||||
|
||||
// TODO can be removed?
|
||||
template<class t> t LIMIT(t mi, t x, t ma) { return std::min(std::max(mi, x), ma); }
|
||||
|
||||
struct TxInputs
|
||||
@@ -39,7 +34,7 @@ struct TxInputs
|
||||
int switches[C9X_NUM_SWITCHES];
|
||||
bool keys[C9X_NUM_KEYS];
|
||||
bool rotenc;
|
||||
bool trims[8];
|
||||
bool trims[12];
|
||||
};
|
||||
|
||||
class TxOutputs
|
||||
|
||||
@@ -147,31 +147,32 @@ void TelemetrySimulator::closeEvent(QCloseEvent *event)
|
||||
|
||||
void TelemetrySimulator::showEvent(QShowEvent *event)
|
||||
{
|
||||
SET_INSTANCE(rxbt_inst, BATT_ID, 0);
|
||||
SET_INSTANCE(rssi_inst, RSSI_ID, 24);
|
||||
SET_INSTANCE(swr_inst, SWR_ID, 24);
|
||||
SET_INSTANCE(a1_inst, ADC1_ID, 0);
|
||||
SET_INSTANCE(a2_inst, ADC2_ID, 0);
|
||||
SET_INSTANCE(a3_inst, A3_FIRST_ID, 0);
|
||||
SET_INSTANCE(a4_inst, A4_FIRST_ID, 0);
|
||||
SET_INSTANCE(t1_inst, T1_FIRST_ID, 0);
|
||||
SET_INSTANCE(t2_inst, T2_FIRST_ID, 0);
|
||||
SET_INSTANCE(rpm_inst, RPM_FIRST_ID, DATA_ID_RPM);
|
||||
SET_INSTANCE(fuel_inst, FUEL_FIRST_ID, 0);
|
||||
SET_INSTANCE(aspd_inst, AIR_SPEED_FIRST_ID, 0);
|
||||
SET_INSTANCE(vvspd_inst, VARIO_FIRST_ID, DATA_ID_VARIO);
|
||||
SET_INSTANCE(valt_inst, ALT_FIRST_ID, DATA_ID_VARIO);
|
||||
SET_INSTANCE(fasv_inst, VFAS_FIRST_ID, DATA_ID_FAS);
|
||||
SET_INSTANCE(fasc_inst, CURR_FIRST_ID, DATA_ID_FAS);
|
||||
SET_INSTANCE(cells_inst, CELLS_FIRST_ID, DATA_ID_FLVSS);
|
||||
SET_INSTANCE(gpsa_inst, GPS_ALT_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpss_inst, GPS_SPEED_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpsc_inst, GPS_COURS_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpst_inst, GPS_TIME_DATE_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpsll_inst, GPS_LONG_LATI_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(accx_inst, ACCX_FIRST_ID, 0);
|
||||
SET_INSTANCE(accy_inst, ACCY_FIRST_ID, 0);
|
||||
SET_INSTANCE(accz_inst, ACCZ_FIRST_ID, 0);
|
||||
SET_INSTANCE(rxbt_inst, BATT_ID, 0);
|
||||
SET_INSTANCE(rssi_inst, RSSI_ID, 24);
|
||||
SET_INSTANCE(swr_inst, SWR_ID, 24);
|
||||
SET_INSTANCE(a1_inst, ADC1_ID, 0);
|
||||
SET_INSTANCE(a2_inst, ADC2_ID, 0);
|
||||
SET_INSTANCE(a3_inst, A3_FIRST_ID, 0);
|
||||
SET_INSTANCE(a4_inst, A4_FIRST_ID, 0);
|
||||
SET_INSTANCE(t1_inst, T1_FIRST_ID, 0);
|
||||
SET_INSTANCE(t2_inst, T2_FIRST_ID, 0);
|
||||
SET_INSTANCE(rpm_inst, RPM_FIRST_ID, DATA_ID_RPM);
|
||||
SET_INSTANCE(fuel_inst, FUEL_FIRST_ID, 0);
|
||||
SET_INSTANCE(fuel_qty_inst, FUEL_QTY_FIRST_ID, 0);
|
||||
SET_INSTANCE(aspd_inst, AIR_SPEED_FIRST_ID, 0);
|
||||
SET_INSTANCE(vvspd_inst, VARIO_FIRST_ID, DATA_ID_VARIO);
|
||||
SET_INSTANCE(valt_inst, ALT_FIRST_ID, DATA_ID_VARIO);
|
||||
SET_INSTANCE(fasv_inst, VFAS_FIRST_ID, DATA_ID_FAS);
|
||||
SET_INSTANCE(fasc_inst, CURR_FIRST_ID, DATA_ID_FAS);
|
||||
SET_INSTANCE(cells_inst, CELLS_FIRST_ID, DATA_ID_FLVSS);
|
||||
SET_INSTANCE(gpsa_inst, GPS_ALT_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpss_inst, GPS_SPEED_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpsc_inst, GPS_COURS_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpst_inst, GPS_TIME_DATE_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(gpsll_inst, GPS_LONG_LATI_FIRST_ID, DATA_ID_GPS);
|
||||
SET_INSTANCE(accx_inst, ACCX_FIRST_ID, 0);
|
||||
SET_INSTANCE(accy_inst, ACCY_FIRST_ID, 0);
|
||||
SET_INSTANCE(accz_inst, ACCZ_FIRST_ID, 0);
|
||||
|
||||
ui->rxbt_ratio->setValue(simulator->getSensorRatio(BATT_ID) / 10.0);
|
||||
ui->A1_ratio->setValue(simulator->getSensorRatio(ADC1_ID) / 10.0);
|
||||
@@ -283,7 +284,7 @@ void TelemetrySimulator::generateTelemetryFrame()
|
||||
|
||||
case 10:
|
||||
if (ui->rpm->value() > 0)
|
||||
generateSportPacket(buffer, ui->rpm_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, RPM_FIRST_ID, LIMIT<uint32_t>(0, ui->rpm->value(), 0xFFFF));
|
||||
generateSportPacket(buffer, ui->rpm_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, RPM_FIRST_ID, LIMIT<uint32_t>(0, ui->rpm->value(), 0x7FFFFFFF));
|
||||
break;
|
||||
|
||||
case 11:
|
||||
@@ -383,6 +384,11 @@ void TelemetrySimulator::generateTelemetryFrame()
|
||||
generateSportPacket(buffer, ui->accz_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, ACCZ_FIRST_ID, LIMIT<int32_t>(-0x7FFFFFFF, ui->accz->value() * 100.0, 0x7FFFFFFF));
|
||||
break;
|
||||
|
||||
case 26:
|
||||
if (ui->fuel_qty->value() > 0)
|
||||
generateSportPacket(buffer, ui->fuel_qty_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, FUEL_QTY_FIRST_ID, LIMIT<uint32_t>(0, ui->fuel_qty->value() * 100.0, 0xFFFFFF));
|
||||
break;
|
||||
|
||||
default:
|
||||
item = 0;
|
||||
return;
|
||||
@@ -596,6 +602,7 @@ TelemetrySimulator::LogPlaybackController::LogPlaybackController(Ui::TelemetrySi
|
||||
colToFuncMap.insert("Tmp2(@F)", T2_DEGF);
|
||||
colToFuncMap.insert("RPM(rpm)", RPM);
|
||||
colToFuncMap.insert("Fuel(%)", FUEL);
|
||||
colToFuncMap.insert("Fuel(ml)", FUEL_QTY);
|
||||
colToFuncMap.insert("VSpd(m/s)", VSPD_MS);
|
||||
colToFuncMap.insert("VSpd(f/s)", VSPD_FS);
|
||||
colToFuncMap.insert("Alt(ft)", ALT_FEET);
|
||||
@@ -644,14 +651,15 @@ QDateTime TelemetrySimulator::LogPlaybackController::parseTransmittterTimestamp(
|
||||
void TelemetrySimulator::LogPlaybackController::calcLogFrequency()
|
||||
{
|
||||
// examine up to 20 rows to determine log frequency in seconds
|
||||
// Skip the first entry which contains the file open time
|
||||
logFrequency = 25.5; // default value
|
||||
QDateTime lastTime;
|
||||
for (int i = 1; (i < 20) && (i < csvRecords.count()); i++)
|
||||
for (int i = 2; (i < 21) && (i < csvRecords.count()); i++)
|
||||
{
|
||||
QDateTime logTime = parseTransmittterTimestamp(csvRecords[i]);
|
||||
// ugh - no timespan in this Qt version
|
||||
double timeDiff = (logTime.toMSecsSinceEpoch() - lastTime.toMSecsSinceEpoch()) / 1000.0;
|
||||
if ((timeDiff > 0) && (timeDiff < logFrequency)) {
|
||||
if ((timeDiff > 0.1) && (timeDiff < logFrequency)) {
|
||||
logFrequency = timeDiff;
|
||||
}
|
||||
lastTime = logTime;
|
||||
@@ -890,6 +898,9 @@ void TelemetrySimulator::LogPlaybackController::setUiDataValues()
|
||||
case FUEL:
|
||||
ui->fuel->setValue(columnData[info.dataIndex].toDouble());
|
||||
break;
|
||||
case FUEL_QTY:
|
||||
ui->fuel_qty->setValue(columnData[info.dataIndex].toDouble());
|
||||
break;
|
||||
case VSPD_MS:
|
||||
ui->vspeed->setValue(columnData[info.dataIndex].toDouble());
|
||||
break;
|
||||
|
||||
@@ -80,6 +80,7 @@ class TelemetrySimulator : public QDialog
|
||||
ACCX,
|
||||
ACCY,
|
||||
ACCZ,
|
||||
FUEL_QTY,
|
||||
};
|
||||
QMap<QString, CONVERT_TYPE> colToFuncMap; // contains all 'known' column headings and how they are to be processed
|
||||
Ui::TelemetrySimulator * ui;
|
||||
|
||||
@@ -1360,7 +1360,7 @@ Timestamp</string>
|
||||
</font>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
<number>2147483647</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1520,23 +1520,20 @@ Timestamp</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_51">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>VSpd</string>
|
||||
<string>Fuel Qty</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="vvspd_inst">
|
||||
<widget class="QLineEdit" name="fuel_qty_inst">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
@@ -1545,35 +1542,26 @@ Timestamp</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QDoubleSpinBox" name="vspeed">
|
||||
<widget class="QSpinBox" name="fuel_qty">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-16777215.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>16777215.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
<double>100000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="3">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<widget class="QLabel" name="label_52">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>m/s</string>
|
||||
<string>ml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1632,7 +1620,7 @@ Timestamp</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
@@ -1642,12 +1630,12 @@ Timestamp</string>
|
||||
<string><html><head/><body><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Alt</string>
|
||||
<string>VSpd</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="valt_inst">
|
||||
<widget class="QLineEdit" name="vvspd_inst">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
@@ -1656,7 +1644,7 @@ Timestamp</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2">
|
||||
<widget class="QDoubleSpinBox" name="valt">
|
||||
<widget class="QDoubleSpinBox" name="vspeed">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
@@ -1677,14 +1665,14 @@ Timestamp</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="3">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Meters</string>
|
||||
<string>m/s</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1742,7 +1730,64 @@ Timestamp</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Alt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QLineEdit" name="valt_inst">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="2">
|
||||
<widget class="QDoubleSpinBox" name="valt">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-16777215.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>16777215.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="3">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Meters</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<tabstops>
|
||||
@@ -1812,6 +1857,8 @@ Timestamp</string>
|
||||
<tabstop>accy</tabstop>
|
||||
<tabstop>accz_inst</tabstop>
|
||||
<tabstop>accz</tabstop>
|
||||
<tabstop>fuel_qty_inst</tabstop>
|
||||
<tabstop>fuel_qty</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -425,12 +425,12 @@ May be different from firmware language</source>
|
||||
<message>
|
||||
<location filename="../apppreferencesdialog.ui" line="877"/>
|
||||
<source>Find Executable</source>
|
||||
<translation>Suche die *.EXE-Datei</translation>
|
||||
<translation>Ausführbare Datei auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../apppreferencesdialog.ui" line="751"/>
|
||||
<source>Google Earth Executable</source>
|
||||
<translation>Google Earth *.EXE Datei</translation>
|
||||
<translation>Ausführbare Datei Google Earth</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../apppreferencesdialog.ui" line="831"/>
|
||||
|
||||
@@ -8067,8 +8067,8 @@ Mixage actif par défaut si non-renseigné.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../firmwares/opentx/opentxinterface.cpp" line="1144"/>
|
||||
<source>Removes D8 and LR12 FrSky protocols that are not legal for use in the EU on radios sold after Jan 1st, 2015</source>
|
||||
<translation>Supprime les protocoles RF D8 et LR12 qui ne sont plus utilisable légalementen Europe sur les radios vendues après le 1er janvier 2015</translation>
|
||||
<source>Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015</source>
|
||||
<translation>Supprime le protocole RF D8 qui n'est plus utilisable légalement en Europe sur les radios vendues après le 1er janvier 2015</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../firmwares/opentx/opentxinterface.cpp" line="1145"/>
|
||||
|
||||
@@ -124,12 +124,12 @@ void saveModel(ModelData & m, model & xm)
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (m.moduleData[0].protocol != PULSES_PPM || m.moduleData[0].channelsCount != 8 || m.moduleData[0].ppmDelay != 300 || m.moduleData[0].ppmPulsePol != 0) {
|
||||
if (m.moduleData[0].protocol != PULSES_PPM || m.moduleData[0].channelsCount != 8 || m.moduleData[0].ppm.delay != 300 || m.moduleData[0].ppm.pulsePol != 0) {
|
||||
modulation mod;
|
||||
mod.type(modulation::type_type::value(m.moduleData[0].protocol));
|
||||
mod.channels(m.moduleData[0].channelsCount);
|
||||
mod.delay(m.moduleData[0].ppmDelay);
|
||||
mod.polarity(modulation::polarity_type::value(m.moduleData[0].ppmPulsePol));
|
||||
mod.delay(m.moduleData[0].ppm.delay);
|
||||
mod.polarity(modulation::polarity_type::value(m.moduleData[0].ppm.pulsePol));
|
||||
xm.modulation(mod);
|
||||
}
|
||||
{
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Author - Bertrand Songis <bsongis@gmail.com>
|
||||
*
|
||||
* Based on th9x -> http://code.google.com/p/th9x/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WINBUILD_H
|
||||
#define WINBUILD_H
|
||||
|
||||
#define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
||||
#undef FORCEINLINE
|
||||
#define FORCEINLINE inline
|
||||
#define NOINLINE
|
||||
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _tcsnicmp
|
||||
#define snprintf _snprintf
|
||||
|
||||
inline double round(double number)
|
||||
{
|
||||
return number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,43 +0,0 @@
|
||||
SET CODE_DIR=%~dp0%
|
||||
|
||||
cd %CODE_DIR%
|
||||
git fetch
|
||||
git checkout next
|
||||
git reset --hard origin/next
|
||||
|
||||
cd ..
|
||||
rmdir build /s /q
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=9X %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=GRUVIN9X %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=MEGA2560 %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=SKY9X %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=9XRPRO %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=TARANIS %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=TARANIS -DPCBREV=REVPLUS %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=TARANIS -DPCBREV=REV9E %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=HORUS %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\opentx-simulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
|
||||
cmake -DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DVERSION_SUFFIX=%1 -DPCB=HORUS %CODE_DIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" companion\src\installer.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 873 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 674 B |
|
Before Width: | Height: | Size: 814 B After Width: | Height: | Size: 814 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 807 B |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |