
Bienvenue invité ( Connexion | Inscription )
![]() ![]() |
Galevsky |
![]()
Message
#21
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
Amélioration: lorsqu'on bascule l'APU sur OFF, tant que la molette n'a pas été activée pour les sous-fréquences (= est revenue en zone orange), les LEDs ne s'allument pas lors du déplacement de la molette.
WARNING !! Ci-dessous le code non compile, (donc avec peut-être des erreurs), je le corrigerai ce soir après test si besoin. Mapping (à mettre dans le main()) pour éteindre les LEDs sur le basculement de l'APU: CODE MapKey(&Throttle, APUON, EXEC("LEDIndex=0;while(LEDIndex<5){ActKey(PULSE+KEYON+X(LEDOffFreqList, LEDIndex));LEDIndex=LEDIndex+1;}"); Puis allumage des LEDs inopérant tant que la molette n'est pas activée: CODE //*********************************** //*** Radio channel switch *** //*********************************** int ChangeRadioChannel(int iFreq) { if (Throttle[APUOFF]) { // Handle main channel if (iFreq != 0) { ActKey(KEYON+PULSE+X(mainFreqList, iFreq)); } radioMainFreq = iFreq; radioSubFreq = 0; areSubFreqEnable = 0; } else if (iFreq == 0) { // back to main channel, orange area if (areSubFreqEnable > 0) { ActKey(KEYON+PULSE+X(mainFreqList, radioMainFreq)); } radioSubFreq = 0; areSubFreqEnable = 1; } else if (areSubFreqEnable) { // Handle sub-channel gap = iFreq - radioSubFreq; if (gap > 0) { while (gap > 0) { ActKey(KEYON+PULSE+radio_go_down); gap = gap - 1; } } else { while (gap < 0) { ActKey(KEYON+PULSE+radio_go_up); gap = gap + 1; } } radioSubFreq = iFreq; } // Switch on/off the right LEDs if (iFreq > 0 & (Throttle[APUOFF] | areSubFreqEnable == 1) ) { // <- ici on allume les LEDs que si la molette est activée pour les sous-fréquences if (iFreq != 6) { // Switch off all but the right one to display 1 -> 5 LEDIndex = 0; while (LEDIndex < 5) { if (LEDIndex != (iFreq - 1)) ActKey(PULSE+KEYON+X(LEDOffFreqList, LEDIndex)); LEDIndex = LEDIndex + 1; } ActKey(PULSE+KEYON+X(LEDOnFreqList, iFreq - 1)); } else { // Switch on all but the first one to display 6 LEDIndex = 0; while (LEDIndex < 5) { if (LEDIndex != 0) ActKey(PULSE+KEYON+X(LEDOnFreqList, LEDIndex)); LEDIndex = LEDIndex + 1; } ActKey(PULSE+KEYON+X(LEDOffFreqList, 0)); } } // if channel 0 => all are OFF (means neither main nor sub-channel selected, depending on the APU switch) else { LEDIndex = 0; while (LEDIndex < 5) { ActKey(PULSE+KEYON+X(LEDOffFreqList, LEDIndex)); LEDIndex = LEDIndex + 1; } } } Ce message a été modifié par Galevsky - 18 Jun 2013, 08:55. --------------------
![]() ![]() |
Galevsky |
![]()
Message
#22
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
Testé hier soir, la radio est top. Y'a juste un truc: si quelqu'un vous déplace, en mode sous-fréquence, votre LED est faussée, et il vous faut retourner en zone orange pour repartir a plat. Mais bon, pas pire qu'en gérant les push au clavier.
--------------------
![]() ![]() |
Galevsky |
![]()
Message
#23
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
J'avance tranquilou sur mon profile de 25T, qui sera le même que pour FC3 et les autres au maximum, même si parfois il faut changer des touches.
![]() Si vous avez des remarques, n’hésitez pas... Ce message a été modifié par Galevsky - 24 Jun 2013, 15:57. --------------------
![]() ![]() |
Galevsky |
![]()
Message
#24
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
Code USB de la touche '< >' trouvé, du coup plus besoin de toucher à la config' 3rd originale.. CTRLgauche + < = previous channel, et CTRLgauche + SHIFTgauche + > = next channel
Les touches: CODE //*********************************** //*** radio *** //*********************************** define radio_go_310 L_CTL+L_SHIFT+USB[0x1E] define radio_go_320 L_CTL+L_SHIFT+USB[0x1F] define radio_go_330 L_CTL+L_SHIFT+USB[0x20] define radio_go_340 L_CTL+L_SHIFT+USB[0x21] define radio_go_350 L_CTL+L_SHIFT+USB[0x22] define radio_go_360 L_CTL+L_SHIFT+USB[0x23] define radio_go_up L_CTL+USB[0x64] define radio_go_down L_CTL+L_SHIFT+USB[0x64] Ce message a été modifié par Galevsky - 22 Jun 2013, 13:29. --------------------
![]() ![]() |
Galevsky |
![]()
Message
#25
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
Après un mois à l'utiliser et améliorer les dernières petites choses, je suis globalement très satisfait du résultat, et publie cette première version.
![]() Le script complet: CITATION //********************************************************************** //*** DCS WORLD Su-25T/FC3 MACROS v1 *** //*** by Galevsky *** //********************************************************************** include "target.tmh" include "DCS_su25.ttm" int AAModes, AGModes, AAmodeIdx, AGmodeIdx; //modes var. int mainFreqList, LEDOnFreqList, LEDOffFreqList, LEDIndex, radioMainFreq, radioSubFreq = 0; //radio var. int gap = 0, gapIndex = 0, areSubFreqEnable = 0; int isAutoPilotOn = 0; int isPowerEnabled = 0; int navLightsMode = 0; // 0=OFF 1=STEADY 2=FLASHY //*********************************** //*** main function *** //*********************************** int main() { if(Init(&EventHandle)) return 1; // declare the event handler, return on error //******** global config. SetShiftButton(&Joystick, S4, &Throttle, BSF, BSB); ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, 129)); Configure(&HCougar,MODE_EXCLUDED); Configure(&T16000,MODE_EXCLUDED); Configure(&LMFD,MODE_EXCLUDED); Configure(&RMFD,MODE_EXCLUDED); //****** axis //**** mapping //** stick MapAxis(&Joystick, JOYX, DX_X_AXIS); MapAxis(&Joystick, JOYY, DX_Y_AXIS); //** throttle MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS); MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS); //MapAxis(&Throttle, SCX, DX_XROT_AXIS, MAP_RELATIVE); //MapAxis(&Throttle, SCY, DX_YROT_AXIS, MAP_RELATIVE); MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS); //**** curves //** stick SetSCurve(&Joystick, JOYX, 2, 5, 2, 3, 0); SetSCurve(&Joystick, JOYY, 2, 5, 2, 3, 0); //** throttle //****** keys //**** mapping //** stick // auto-pilot MapKey(&Throttle, APENG, SEQ(EXEC("AutoPilotOn();"), EXEC("AutoPilotOff();"))); MapKey(&Throttle, APPAT, EXEC("AutoPilotHotChange();")); MapKey(&Throttle, APAH, EXEC("AutoPilotHotChange();")); MapKey(&Throttle, APALT, EXEC("AutoPilotHotChange();")); MapKey(&Throttle, RDRDIS, EXEC("AutoPilotHotChange();")); MapKey(&Throttle, RDRNRM, EXEC("AutoPilotHotChange();")); // countermeasures MapKeyIO(&Throttle, CHF, PULSE+countermeasures_ircm, CHAIN(PULSE+countermeasures_flare_release, D(1000), PULSE+countermeasures_flare_release, D(1000), PULSE+countermeasures_flare_release, D(1000), PULSE+countermeasures_flare_release)); MapKeyIO(&Throttle, CHB, PULSE+countermeasures_ecm, CHAIN(PULSE+countermeasures_chaff_release, D(1000), PULSE+countermeasures_chaff_release, D(1000), PULSE+countermeasures_chaff_release, D(1000), PULSE+countermeasures_chaff_release)); // engines MapKey(&Throttle, EOLMOTOR, PULSE+engine_left_on); MapKey(&Throttle, EOLNORM, PULSE+engine_left_off); MapKey(&Throttle, EORMOTOR, PULSE+engine_right_on); MapKey(&Throttle, EORNORM, PULSE+engine_right_off); // Flight control MapKey(&Throttle, SPDF, PULSE+flight_control_airbrake_on); MapKey(&Throttle, SPDM, PULSE+flight_control_airbrake_off); MapKey(&Throttle, SPDB, PULSE+flight_control_airbrake_on); MapKey(&Throttle, FLAPU, PULSE+flight_control_flaps_off); MapKey(&Throttle, FLAPM, PULSE+flight_control_flaps_on); MapKey(&Throttle, FLAPD, PULSE+flight_control_flaps_land); // lights MapKeyIO(&Throttle, PSF, PULSE+lights_gear, EXEC("NavLightSteady();")); MapKeyIO(&Throttle, PSM, PULSE+lights_gear, EXEC("NavLightOff();")); MapKeyIO(&Throttle, PSB, PULSE+lights_gear, EXEC("NavLightFlashy();")); // misc MapKey(&Throttle, LDGH, PULSE+misc_warning_reset); MapKey(&Throttle, EACON, PULSE+misc_elec_power); MapKey(&Throttle, EACOFF, PULSE+misc_elec_power); MapKey(&Throttle, EFLNORM, misc_fuel_jettison); //MapKey(&Throttle, EFLOVER, misc_fuel_jettison); // modes MapKeyUMD(&Joystick, S3, SEQ(PULSE+modes_a_a, PULSE+modes_reticule), PULSE+modes_nav, SEQ(PULSE+modes_reticule, PULSE+modes_ground)); AAModes = SEQ(modes_reticule, modes_a_a); AGModes = SEQ(modes_reticule, modes_ground); MapKeyIOUMD(&Throttle, CSL, EXEC("AAmodeIdx = (AAmodeIdx+1)%2; ActKey(PULSE+KEYON+X(AAModes, AAmodeIdx));"), 0, PULSE+modes_nav, 0, EXEC("AGmodeIdx = (AGmodeIdx+1)%2; ActKey(PULSE+KEYON+X(AGModes, AGmodeIdx));"), 0); MapKeyIOUMD(&Throttle, CSR, EXEC("AAmodeIdx = (AAmodeIdx+1)%2; ActKey(PULSE+KEYON+X(AAModes, AAmodeIdx));"), 0, PULSE+modes_nav, 0, EXEC("AGmodeIdx = (AGmodeIdx+1)%2; ActKey(PULSE+KEYON+X(AGModes, AGmodeIdx));"), 0); // radio mainFreqList = SEQ(0, radio_go_310, radio_go_320, radio_go_330, radio_go_340, radio_go_350, radio_go_360); LEDOnFreqList = SEQ( LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1), LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2), LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3), LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4), LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5), LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5)); LEDOffFreqList = SEQ( LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1), LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2), LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3), LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4), LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5), LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); KeyAxis(&Throttle, THR_FC, 0, AXMAP2( 7, EXEC("ChangeRadioChannel(0);"), EXEC("ChangeRadioChannel(1);"), EXEC("ChangeRadioChannel(2);"), EXEC("ChangeRadioChannel(3);"), EXEC("ChangeRadioChannel(4);"), EXEC("ChangeRadioChannel(5);"), EXEC("ChangeRadioChannel(6);"))); MapKey(&Throttle, APUON, EXEC("LEDIndex=0;while(LEDIndex<5){ActKey(PULSE+KEYON+X(LEDOffFreqList, LEDIndex));LEDIndex=LEDIndex+1;}")); MapKey(&Throttle, SC, radio_whisper); // sensors MapKeyIOUMD(&Joystick, H2U, sensors_shkval, sensors_shkval, flight_control_gear_up, 0, sensors_shkval, sensors_shkval); MapKeyIOUMD(&Joystick, H2R, 0, 0, flight_control_cross, 0, sensors_elint, sensors_elint); MapKeyIOUMD(&Joystick, H2L, sensors_mercury, sensors_mercury, flight_control_wings_fold, 0, sensors_mercury, sensors_mercury); MapKeyIOUMD(&Joystick, H2D, sensors_laser, sensors_laser, flight_control_gear_down, 0, sensors_laser, sensors_laser); MapKeyIOUMD(&Joystick, H3D, PULSE+weapons_time_dec, PULSE+sensors_zoom_out, SEQ(PULSE+flight_control_parachute, TEMPO(0, PULSE+flight_control_parachute, 500), TEMPO(0, PULSE+flight_control_parachute, 500), TEMPO(0, PULSE+flight_control_parachute, 500)), 0, PULSE+weapons_time_dec, PULSE+sensors_zoom_out); MapKeyIOUMD(&Joystick, H3U, PULSE+weapons_time_inc, PULSE+sensors_zoom_in, 0, 0, PULSE+weapons_time_inc, PULSE+sensors_zoom_in); MapKeyIOUMD(&Joystick, H3L, PULSE+weapons_salvo, PULSE+sensor_tgt_size_inc, 0, 0, PULSE+weapons_salvo, PULSE+sensor_tgt_size_inc); MapKeyIOUMD(&Joystick, H3R, PULSE+weapons_salvo, PULSE+sensor_tgt_size_dec, 0, 0, PULSE+weapons_salvo, PULSE+sensor_tgt_size_dec); MapKey(&Throttle, EFRNORM, EXEC("SwapRwRMode();")); MapKey(&Throttle, EFROVER, EXEC("SwapRwRMode();")); // targetting MapKey(&Joystick, H4U, targetting_up); MapKey(&Joystick, H4D, targetting_down); MapKey(&Joystick, H4L, targetting_left); MapKey(&Joystick, H4R, targetting_right); MapKey(&Joystick, H4P, TEMPO(PULSE+targetting_lock, CHAIN(PULSE+targetting_lock, D(), PULSE+targetting_unlock), 800)); MapKey(&Throttle, MSU, targetting_up); MapKey(&Throttle, MSD, targetting_down); MapKey(&Throttle, MSL, targetting_left); MapKey(&Throttle, MSR, targetting_right); MapKey(&Joystick, MSP, TEMPO(PULSE+targetting_lock, PULSE+targetting_unlock, 800)); // trim MapKeyIO(&Joystick, H1U, TEMPO(0,trim_reset,1000), trim_up); MapKey(&Joystick, H1D, trim_down); MapKeyIO(&Joystick, H1L, trim_yleft, trim_left); MapKeyIO(&Joystick, H1R, trim_yright, trim_right); // view MapKeyIO(&Throttle, LTB, TEMPO(0,CHAIN(PULSE+misc_eject,D(),PULSE+misc_eject,D(),PULSE+misc_eject), 800), PULSE+view_center); MapKeyIO(&Throttle, CSU, 0, view_zoom_out); MapKeyIO(&Throttle, CSD, 0, view_zoom_in); // weapons MapKey(&Joystick, TG1, PULSE+weapons_canon_mode); MapKeyR(&Joystick, TG1, PULSE+weapons_canon_mode); MapKey(&Joystick, TG2, weapons_fire); MapKey(&Joystick, S2, weapons_fire); MapKeyIOUMD(&Joystick, S1, 0, PULSE+weapons_change, TEMPO(0, PULSE+weapons_jettison, 2000), PULSE+misc_nav_next_wp, 0, PULSE+weapons_change); } //*********************************** //*** Enable auto-pilot *** //*********************************** int AutoPilotOn() { if(Throttle[APPAT]) { ActKey(PULSE+L_ALT+KEYON+autopilot_path_follow); ActKey(autopilot_path_follow); } else if(Throttle[APALT] & Throttle[RDRNRM]){ ActKey(PULSE+L_ALT+KEYON+autopilot_radar_altitude); ActKey(autopilot_radar_altitude); } else if(Throttle[APALT]) { ActKey(PULSE+L_ALT+KEYON+autopilot_baro_altitude); ActKey(autopilot_baro_altitude); } else { ActKey(PULSE+L_ALT+KEYON+autopilot_altitude_roll); ActKey(autopilot_altitude_roll); } isAutoPilotOn = 1; } //*********************************** //*** Disable auto-pilot *** //*********************************** int AutoPilotOff() { ActKey(PULSE+L_ALT+KEYON+autopilot_off); ActKey(autopilot_off); isAutoPilotOn = 0; } //*********************************** //*** Hot-change auto-pilot mode *** //*********************************** int AutoPilotHotChange() { if(isAutoPilotOn) { ActKey(PULSE+KEYON+CHAIN(EXEC("AutoPilotOff();"), D(), EXEC("AutoPilotOn();"))); } } //*********************************** //*** Radio channel switch *** //*********************************** int ChangeRadioChannel(int iFreq) { if (Throttle[APUOFF]) { // Handle main channel if (iFreq != 0) { ActKey(PULSE+KEYON+X(mainFreqList, iFreq)); } radioMainFreq = iFreq; radioSubFreq = 0; areSubFreqEnable = 0; } else if (iFreq == 0) { // back to main channel if (areSubFreqEnable == 1) { ActKey(PULSE+KEYON+X(mainFreqList, radioMainFreq)); } radioSubFreq = 0; areSubFreqEnable = 1; } else if (areSubFreqEnable) { // Handle sub-channel gap = iFreq - radioSubFreq; if (gap > 0) { while (gap > 0) { ActKey(PULSE+L_CTL+L_SHIFT+KEYON+radio_go_down); gap = gap - 1; } } else { while (gap < 0) { ActKey(PULSE+L_CTL+KEYON+radio_go_up); gap = gap + 1; } } radioSubFreq = iFreq; } // Switch on/off the right LEDs if (iFreq > 0 & (Throttle[APUOFF] | areSubFreqEnable == 1)) { if (iFreq != 6) { // Switch off all but the right one to display 1 -> 5 LEDIndex = 0; while (LEDIndex < 5) { if (LEDIndex != (iFreq - 1)) ActKey(PULSE+KEYON+X(LEDOffFreqList, LEDIndex)); LEDIndex = LEDIndex + 1; } ActKey(PULSE+KEYON+X(LEDOnFreqList, iFreq - 1)); } else { // Switch on all but the first one to display 6 LEDIndex = 0; while (LEDIndex < 5) { if (LEDIndex != 0) ActKey(PULSE+KEYON+X(LEDOnFreqList, LEDIndex)); LEDIndex = LEDIndex + 1; } ActKey(PULSE+KEYON+X(LEDOffFreqList, 0)); } } // if channel 0 => all are OFF (means neither main nor sub-channel selected, depending on the APU switch) else { LEDIndex = 0; while (LEDIndex < 5) { ActKey(PULSE+KEYON+X(LEDOffFreqList, LEDIndex)); LEDIndex = LEDIndex + 1; } } } //*********************************** //*** Switch on steady NAV lights *** //*********************************** int NavLightSteady() { if (navLightsMode != 1) { ActKey(PULSE+R_CTL+KEYON+lights_nav); ActKey(lights_nav); if (navLightsMode == 2) { ActKey(PULSE+R_CTL+KEYON+lights_nav); ActKey(lights_nav); } navLightsMode = 1; } } //*********************************** //*** Switch on flashy NAV lights *** //*********************************** int NavLightFlashy() { if (navLightsMode != 2) { ActKey(PULSE+R_CTL+KEYON+lights_nav); ActKey(lights_nav); if (navLightsMode == 0) { ActKey(PULSE+R_CTL+KEYON+lights_nav); ActKey(lights_nav); } navLightsMode = 2; } } //*********************************** //*** Switch off NAV lights *** //*********************************** int NavLightOff() { if (navLightsMode != 0) { ActKey(PULSE+R_CTL+KEYON+lights_nav); ActKey(lights_nav); if (navLightsMode==1) { ActKey(PULSE+R_CTL+KEYON+lights_nav); ActKey(lights_nav); } navLightsMode = 0; } } //*********************************** //*** Start Fuel Dump *** //*********************************** int startFuelDump() { ActKey(KEYON+misc_fuel_jettison); } //*********************************** //*** Stop Fuel Dump *** //*********************************** int stopFuelDump() { ActKey(misc_fuel_jettison); } //*********************************** //*** Toggle RWR Mode *** //*********************************** int toggleRwRMode() { ActKey(PULSE+R_SHIFT+KEYON+sensors_rwr_mode); ActKey(sensors_rwr_mode); } //*********************************** //*** Swap RWR Mode *** //*********************************** int SwapRwRMode() { if (Throttle[EFLNORM]) { ActKey(PULSE+KEYON+CHAIN(EXEC("stopFuelDump();"), D(), EXEC("toggleRwRMode();"), D(),EXEC("startFuelDump();"))); } else { ActKey(PULSE+KEYON+EXEC("toggleRwRMode();")); } } //*********************************** //*** event handler *** //*********************************** int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); } Les principales fonctionnalités de ce profil sont:
Ce message a été modifié par Galevsky - 5 Jul 2013, 00:12. Fichier(s) joint(s) ![]() --------------------
![]() ![]() |
PiedDroit |
![]()
Message
#26
|
![]() ![]() ![]() ![]() Indicatif : B-26 Messages : 925 Inscrit : 13/12/10 Membre n° 3,711 ![]() |
Pour info, l'intensité des LED est importante !
J'avais la ligne suivante dans mon profil : ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, 64)); Donc pas la même que celle de Gal, et toutes les commandes d'éclairage de LEDs ne fonctionnaient pas et mettaient 2 secondes à être exécutées. Du coup j'avais l'impression que le script était bloqué alors qu'en fait il mettait une éternité à changer de canal et bloquait les autres inputs. La ligne à utiliser : ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, 129)); EDIT: Sinon j'ai modifié le script pour qu'il passe dans le canal accueil en 0 ![]() ActKey(KEYON+PULSE+X(mainFreqList, iFreq+1)); [...] ActKey(KEYON+PULSE+X(mainFreqList, radioMainFreq+1)); [...] mainFreqList = SEQ(0, radio_accueil, radio_go_310, radio_go_320, radio_go_330, radio_go_340, radio_go_350, radio_go_360); Ce message a été modifié par PiedDroit - 19 Sep 2013, 01:52. |
Galevsky |
![]()
Message
#27
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
Alors ça m'épate que l'intensité des LED influence leur temps de réponse...
![]() Pour le coup de l'accueil, j'avais hésité... mais y'a pas "accueil" sur les VHF. Surtout qu'en faisant ça, tu seras automatiquement switché vers un channel, alors si des fois on est sur un autre canal comme le 72nd ou autre, je trouve ça cool d'avoir une position qui ne me bouge nulle part. Donc ca sert à "choix manuel" plutôt que seulement "accueil". Mais chacun voit à sa porte.... en tout cas tu me vois ravi de voir que mon partage serve à quelqu'un ![]() --------------------
![]() ![]() |
PiedDroit |
![]()
Message
#28
|
![]() ![]() ![]() ![]() Indicatif : B-26 Messages : 925 Inscrit : 13/12/10 Membre n° 3,711 ![]() |
Alors ça m'épate que l'intensité des LED influence leur temps de réponse... ![]() Pour le coup de l'accueil, j'avais hésité... mais y'a pas "accueil" sur les VHF. Surtout qu'en faisant ça, tu seras automatiquement switché vers un channel, alors si des fois on est sur un autre canal comme le 72nd ou autre, je trouve ça cool d'avoir une position qui ne me bouge nulle part. Donc ca sert à "choix manuel" plutôt que seulement "accueil". Mais chacun voit à sa porte.... en tout cas tu me vois ravi de voir que mon partage serve à quelqu'un ![]() C'est sur, c'est tres pratique ce bout de code, merci ![]() Je l'ai mis en fichiers separes ca marche bien, un. ttm avec les macros et un .tmh avec le code. Pour l'integrer dans un profil il suffit de faire l'include du ttm, suivi de l'include du .tmh et appeler la fonction mapRadio() dans le main (fonction qui contient tout le code d'init) Pour l'acceuil, je verrais bien a l'usage, c'est une modif de 5 secondes (suffit de reactiver la condition != 0)... Je l'avais fait pour revenir facilement a l'accueil causer avec Deus pendant mes test ![]() Essaie chez toi de changer l'intensité de 129 a 64 juste pour voir si ca change aussi pour toi. Sinon j'ai du modifier le raccourci pour remonter d'un canal TS. TS reagissait bizzarement, passer au canal precedent OK (ctrl+<) mais pour le canal suivant (maj+ctrl+<) ca faisait 310.4-310.3-310.5 (au lieu d'aller directement au .5 par exemple). En remplacant le precedent par alt+< ca marchait mieux. Je n'ai pas creusé, ca peut etre TARGET qui envoie mal la commande (et qui génère un transitoire en ctrl+<), ou alors TS qui supporte mal les combinaisons de touches qui se superposent. |
Galevsky |
![]()
Message
#29
|
![]() ![]() ![]() ![]() Born to fly, fly to feel alive ! Messages : 3,001 Inscrit : 26/10/05 Lieu : Antibes Membre n° 282 ![]() |
Je vais regarder, je te dirais.
Ça vaut peut-être le coup d'externaliser la radio en effet.... mais je suis déjà surpris de voir une personne l’utiliser, alors penser que plusieurs peuvent ![]() Plus sérieusement c'est THE SOLUTION quand on est mono-écran et qu'on dispose d'un warthog. Au début je pensais me logguer avec le smartphone pour voir si mes déplacements en aveugle avec les raccourcis (hotkeys) TS marchaient bien. Quand j'ai découvert que l'on pouvait programmer les lupiottes du Warthog a volonté, j'ai compris ce qu'il fallait faire. Le seul truc relou, c'est quand tu mets les gaz à 100%, il te faut te pencher pour voir les lupiottes. ![]() --------------------
![]() ![]() |
PiedDroit |
![]()
Message
#30
|
![]() ![]() ![]() ![]() Indicatif : B-26 Messages : 925 Inscrit : 13/12/10 Membre n° 3,711 ![]() |
Alors on est parti pour la radio... pour le moment le script n'est pas parfait, il y a un détail qui me gène: je n'arrive pas à faire fonctionner le fait de devoir attendre une seconde avant de réaliser le vrai push de fréquence, du coup, si tu pars du channel 310 vers 350, et bien tu vas passer dans 320, puis 330 puis 340 et enfin 350. Ce détail là omis, et que j'espère régler, tout marche impeccablement. Je te file le script en l'état comme ça si tu trouves de ton côté.... ![]() Tiens cadeau : Tu remplaces : CODE int ChangeRadioChannel(int iFreq) { if (Throttle[APUOFF]) { // Handle main channel if (iFreq != 0) { ActKey(KEYON+PULSE+X(mainFreqList, iFreq)); } radioMainFreq = iFreq; radioSubFreq = 0; areSubFreqEnable = 0; } Par CODE int ChangeChannelMainFreq(int iFreq) { // Change only when movement is finished if (iFreq == radioMainFreq) { ActKey(KEYON+PULSE+X(mainFreqList, iFreq)); } } int ChangeRadioChannel(int iFreq) { if (Throttle[APUOFF]) { // Handle main channel if (iFreq != 0) { DeferCall(1000,&ChangeChannelMainFreq,iFreq); } radioMainFreq = iFreq; radioSubFreq = 0; areSubFreqEnable = 0; } |
![]() ![]() |
Haut de page · Retour à l'accueil · Contacter le Webmestre | Nous sommes le : 12/05/25 - 21:27 |