qba667 / FlySkyI6

14 channels FW modifications for FlySky I6
GNU General Public License v3.0
287 stars 72 forks source link

FSI6 transmitter and software. #78

Closed Speedaco closed 5 years ago

Speedaco commented 5 years ago

Question on behalf of my friend

The question is: may use the code content that is givenand if so how should it be done correctly?

oryginal: strcatCall(target, (const char ) ARMED); return; case IBUS_MEAS_TYPE_FLIGHT_MODE: if (result <= 9){ strcatCall(target, (const char ) FLY_MODES + (flyModesOffset[result])); return;

changed by a friend: strcatCall(target, (const char ) ARMED); return; case IBUS_MEAS_TYPE_FLIGHT_MODE: if (result <= 15){ strcatCall(target, (const char ) FLY_MODES + (flyModesOffset[result])); return; }

oryginal: const uint8_t attribute((section (".mod_flyModesOffset"))) flyModesOffset[] = { 0, 5, 10, 16, 21, 28, 35, 39, 46, 52 }; const uint8_t attribute((section (".mod_flyModes"))) FLY_MODES[] = { /0@00/ "Stab\0" /1@05/ "Acro\0" /2@10/ "AHold\0" /3@16/ "Auto\0" /4@21/ "Guided\0" /5@28/ "Loiter\0" /6@35/ "RTL\0" /7@39/ "Circle\0" /8@46/ "PHold\0" /9@52/ "Land" };

changed by a friend: const uint8_t attribute((section (".mod_flyModesOffset"))) flyModesOffset[] = { 0, 7, 12, 18, 23, 28, 30, 34, 46, 52, 18, 30, 28, 28, 28, 34 }; const uint8_t attribute((section (".mod_flyModes"))) FLY_MODES[] = { /0@00/ "Manual\0" /1@07/ "Hold\0" /2@12/ "Learn\0" /3@18/ "Auto\0" /4@23/ "Hold\0" /5@28/ "L\0" /6@30/ "RTL\0" /7@34/ "Guided\0" /8@46/ "G\0" /9@52/ "Land" Thanks!