Jump to content

jazzymanserg

Members
  • Posts

    309
  • Joined

  • Last visited

Everything posted by jazzymanserg

  1. FIRST problem with compass solved LUA- defineRotary("compass", 21, 3001, 34, "Heading Knob", "compass rotate") ARDUINO- DcsBios::RotaryEncoder compass ("compass", "-3200", "+3200", 18, 19); MISTAKE - DcsBios::RotaryEncoder compass ("compass", "DEC", "INC", 18, 19); I think, that it will be ready new module MIG-15, soon.. now it have 46 buttons , 10 encoders
  2. COOL ! Its working THNX IAN !!!!
  3. clickabledata.lua contains msg and arg number and its easy calculate address, but mainpanel_init.lua contains only arg_number. Its enought for standart export local panel = GetDevice(0) if panel then panel :update_arguments() local AC_GEN_LAMP = panel:get_argument_value(57) end but its not enought for DCS-BIOS I hope this is not a dead end?
  4. Sorry, Data from clickable elements i took from clickable_data.lua., but when i need to take data for indicators. So, for string (from MIG-21) defineIndicatorLight("AC_GEN_LIGHT", 511, "Main Warning Lights", "AC Generator Light") ? i can t find parametrs. P.S. Craft Mig-15
  5. Ошибка была в строке pit:performClickableAction(3071,1.0)--power ON Первый по счету элемент 3001, а не 3000
  6. Victory !!!!! Ian, Great Thanx ! You know your programm Brilliantly !!!! Now I'll create full Mig-15bis.lua !!!
  7. Its crazy I try everything, inspect all codes. Tx - blinking - socket create, rx blink when press botton, dcs.log without mistake, dcs_bios log empty. Control reference launch properly. I see Mig -15 and can switch toggle, BUT IN COCPIT - NOTHING I attach all needle files. Ian I can't solved this quest. What can I use for debugging / I think that problem in LUA I hope, you help me solve it!:joystick: And why is the file dcs-bios.log empty? This is strange. I even delete it, no result. Bios create it again, and it empty When I wrote simple export.lua file dofile(lfs.currentdir().."mods/aircraft/MiG-15bis/Cockpit/Scripts/devices.lua") dofile(lfs.currentdir().."mods/aircraft/MiG-15bis/Cockpit/Scripts/command_defs.lua") function LuaExportBeforeNextFrame() GetDevice(2):performClickableAction(3001,1)--power ON end Its working, but without dcs_bios AircraftList.lua BIOS.lua clickabledata.lua command_defs.lua device_init.lua devices.lua Export.lua log.txt MiG-15bis.lua
  8. Thanx Ian, I'll expect com baud rate in evening I'm not use "if". In higher post it was Mig15.jsonp file. I'm reading developer guide and try to understand about start address for output parametrs. For example: I have begin module address 0x2800, and i have defineToggleSwitch("AC_GEN", 2, 3001, 152, "Main Power Panel", "AC Generator On/Off") Its creates by bios.utils. So, I must write output address 10240 (0x2800 in DEC) Mask (number of edit bit) =1 Shift (number of shift bit)=0 because it's first SO output. "address": 10240, "description": "selector position", "mask": 1, "max_value": 1, "shift_by":0, "suffix": "", "type": "integer" } ], Am I right? Is there some program for calculating address, mask and shift all off crafts variable of, for example, A10.lua? Or i must manual calculate each of them ?
  9. Ian, first of all, thank you for your attention! No I have not mig 15 json, file, but Metadatastart sad me that module is Mig-15 . and changeged _UPDATE_SKIP_COUNTER I think that i not need control reference, but took your advice I decided to make the json for the mig-15 for one button. [b]{ "[color=Red]Main Power Panel"[/color]: [/b]{ [b]"[color=Red]AC_GEN"[/color]: {[/b] "category": "Main Power Panel", "control_type": "selector", "description": "AC Generator On/Off", "identifier": "AC_GEN", [b]"[color=Red]inputs"[/color]: [ {[/b] "description": "switch to previous or next state", "interface": "fixed_step" }, {"description": "set position", "interface": "set_state", "max_value": 1 }, { "argument": "TOGGLE", "description": "Toggle switch state", "interface": "action" } ], "momentary_positions": "none", [b][color=Red]"outputs":[/color] [ {[/b] "address": 8704, "description": "selector position", "mask": 8, "max_value": 1, "shift_by": 3, "suffix": "", "type": "integer" } ], "physical_variant": "toggle_switch" } }} So, where can I get output parametres "address","description", "selector position","mask","max_value","shift_by","suffix","type" About 250000. I can't setup on 250000 I have only 128000. So, plug arduino, enter in devices menager, open Com9. Try change bod rate, open list,and there... from 1200 to 128000. I will try 128000. May be it will enought when i install it on A-10. I not change anithing and not corrected baud rate in windows, and it worked/ I don't understand how Ian tell me please, in whitch lua file data received from com port? I can find it
  10. I corrected but not result. I found one proble. When I listen Com port, I hear symbols, and when I wrote in program void setup() { Serial.begin(9600); //DcsBios::setup(); } I become see AC_GEN 1 AC_GEN 0/ Its good but...... but tumbler not change then I wrote for test #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" DcsBios::Switch2Pos masterCautionBtn("AC_GEN", 10); void setup() { Serial.begin(9600); } void loop() { sendDcsBiosMessage("AC_GEN", "1"); } and see in com port AC_GEN 1, so its every thing good with com port and problem is in socket. Where data from com send to tcp or udp? May be uncorrect com bitrate stay there ? I have 9600 bod. I dont find file with this sending
  11. Oh, Ian ! Great thanks for answer. It was typographical error. In game defineToggleSwitch("AC_GEN", 2, 3001, 152, "Main Power Panel", "Accumulator Switch, ON/OFF") I edited past message and nothing work. Socket Ok, com ok, maybe it some secrets in Mig-15? Not shure? but maybe problem in configuration? I have 2 arduino UNO on com3 com4 and 2 arduino nano on com 6 and com 8/ they wrk by PPjoy witout sockets. And arduino Mega on com 9 by dcs_bios
  12. not work Can somebody help me ? Excuse for many words, but already I have broken my brain, BUT the tumbler doesn't turn on I build mig 15 cocpit. And i want realize it on DCS -BIOS. It`s everything work in A-10. And for begin I want press one 2pos toggle ACCU A small part of my -------- clickable.lua and --------------- device_int.lua ------command_defs.lua -------- clickable.lua -- Right Panel elements["pnt_152"] = default_2_position_tumb(_("Accumulator Switch, ON/OFF"), devices.ELEC_INTERFACE, electric_commands.Mig15_Command_BatterySw, 152) --3071 elements["pnt_153"] = default_2_position_tumb(_("Generator Switch, ON/OFF"), devices.ELEC_INTERFACE, electric_commands.Mig15_Command_GeneratorSw, 153) elements["pnt_151"] = default_2_position_tumb(_("Nose Light Master Switch, ON/OFF"), devices.ELEC_INTERFACE, electric_commands.Mig15_Command_CB_NoseLight, 151) .................................................... --------------- device_int.lua MainPanel = {"Mig15::ccMig15MainPanel", LockOn_Options.script_path.."mainpanel_init.lua", {{"FM_Proxy", devices.FM_PROXY}, {"electric_interface", devices.ELEC_INTERFACE}, {"hydro_interface", devices.HYDROSYS_INTERFACE}, {"gear_interface", devices.GEAR_INTERFACE}, ............................................. local count = 0 local function counter() count = count + 1 return count end count = 3000 electric_commands = { Mig15_Command_BatterySw = counter(); ................................................... So, I need use element 152 "Accumulator Switch, ON/OFF" devices.ELEC_INTERFACE (Num.2) electric_commands.Mig15_Command_BatterySw (Num.3001) 1. I create MIG15.lua --------Mig15.lua local success1 = pcall(dofile, lfs.currentdir().."mods/aircraft/Mig-15bis/Cockpit/devices.lua") local success2 = pcall(dofile, lfs.currentdir().."mods/aircraft/Mig-15bis/Cockpit/command_defs.lua") if success1 and success2 then BIOS.protocol.beginModule("MiG-15Bis", 0x2200) BIOS.protocol.setExportModuleAircrafts({"MiG-15Bis"}) local documentation = moduleBeingDefined.documentation local document = BIOS.util.document local parse_indication = BIOS.util.parse_indication local defineFloat = BIOS.util.defineFloat local defineIndicatorLight = BIOS.util.defineIndicatorLight local definePushButton = BIOS.util.definePushButton local definePotentiometer = BIOS.util.definePotentiometer local defineRotary = BIOS.util.defineRotary local defineSetCommandTumb = BIOS.util.defineSetCommandTumb local defineTumb = BIOS.util.defineTumb local defineToggleSwitch = BIOS.util.defineToggleSwitch local defineToggleSwitchToggleOnly = BIOS.util.defineToggleSwitchToggleOnly local defineFixedStepTumb = BIOS.util.defineFixedStepTumb local defineFixedStepInput = BIOS.util.defineFixedStepInput local defineVariableStepTumb = BIOS.util.defineVariableStepTumb local defineString = BIOS.util.defineString local defineRockerSwitch = BIOS.util.defineRockerSwitch local defineMultipositionSwitch = BIOS.util.defineMultipositionSwitch dofile(lfs.currentdir().."mods/aircraft/Mig-15bis/Cockpit/devices.lua") dofile(lfs.currentdir().."mods/aircraft/Mig-15bis/Cockpit/command_defs.lua") defineToggleSwitch("AC_GEN", 2, 3001, 152, "Main Power Panel", "Accumulator Switch, ON/OFF") --defineToggleSwitch("AC_GEN", devices.ELEC_INTERFACE, electric_commands.Mig15_Command_BatterySw, 152, "Main Power Panel", "Accumulator Switch, ON/OFF") 2) Changed mig21.lua on mig15.lua in bios.lua dofile(lfs.writedir()..[[scripts\dcs-bios\lib\mig15.lua]]) Add a("MiG-15Bis", true) in AircraftList.lua 3) changed in dcsbios.h string Serial.begin(9600); //my comport 9600 4) Arduino Mega2560 sketch #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" DcsBios::Switch2Pos AccBtn("AC_GEN", 10); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } Start Arduino. test by connect_serial. Press button 3 time Get answer (in attachments) So I see the data received. BUT DCS not see them? and tumb not input Data go to arduino, because, diodes TX blinking, and go out from Arduino, because diodes RX blinking, and socket work too. DCS.log not have mistake, dcs_bios.log is empty. I hope on your help !!
  13. Даже если в цикле - я всего лишь включаю питание. Выключения там нет. Но я все же попробовал, результат такой - же. Такое впечатление что функции не работают как надо ?
  14. Пишу вот такой текст: dofile(lfs.currentdir().."mods/aircraft/Mig-15bis/Cockpit/Scripts/devices.lua") dofile(lfs.currentdir().."mods/aircraft/Mig-15bis/Cockpit/Scripts/command_defs.lua") function LuaExportStart() end function LuaExportBeforeNextFrame() local pit = GetDevice(2) if pit then pit:performClickableAction(3071,1.0)--power ON end local pit = GetDevice(devices.ELEC_INTERFACE) if pit then pit:performClickableAction(electric_commands.Mig15_Command_BatterySw,1.0)--power ON end end function LuaExportAfterNextFrame() end function LuaExportStop() end function LuaExportActivityNextEvent(t) end Для теста написал - надо включить тумблер на старте. Ну и соответственно оно не включает. В чем ошибка не пойму. Вот отрывки из системных файлов ---clicable function default_2_position_tumb11(hint_, device_, command_, arg_) return { class = {class_type.TUMB,class_type.TUMB}, hint = hint_, device = device_, action = {command_,command_}, arg = {arg_,arg_}, arg_value = {2,-2}, arg_lim = {{-1,1},{-1,1}}, updatable = true, use_OBB = true } end -----------------------//////////////////////// --comman_defs count = start_command electric_commands = { Mig15_Command_BatterySw = counter(); Mig15_Command_GeneratorSw = counter(); [b] ---device.lua[/b] local count = 0 local function counter() count = count + 1 return count end -------DEVICE ID------- devices = {} -- moved forward for correct initialization of another devices -- do not changed following sequence for sim devices["FM_PROXY"] = counter() devices["ELEC_INTERFACE"] = counter() devices["CONTROL_INTERFACE"] = counter() devices["WEAPON_SYSTEM"] = counter() devices["STANDBY_COMPASS"] = counter() devices["KNEEBOARD"] = counter() devices["CLOCK"] = counter() de[/html] В логах ни каких ошибок
  15. Поддерживается ли Миг-15? Если да, то как обратиться к разрабам по вопросу изменений в управлении ? Интересует добавление осей 1) Кремальеры давления 2) Поворот компаса 3) Правая кнопка часов 4) Левая кнопка часов 5) Рычаг затяжки руд И Самое что хотелось бы - это ось крана закрылок Или их можно самому как то в ЛУА допилить ?
  16. Спасибо ! Я тоже думал об этом , но процедуры разгерметизации как таковой не нашел, сам покрутил краники, но видно не все )))) Буду копать в этом направлении
  17. Неужели никто на миге не садился ? Что там с фонарем после посадки.. АУ...
  18. вот ответ ...........однако проверил на нашей рабочей версии. Да, у теней в кабине есть участки с "пилой", эта пила немного дрожит (проверял на значении настройки теней "ВЫСОКИЕ"). Но пила есть только в некоторых местах и при некоторых положениях солнца. На Су-25 -тоже обнаружил схожие проявления. Может менее заметны - да, но есть точно. Все проверял с тракИРом. Проба без ТракИР - аналогичные проявления. Тени можно выключить в настройках (если сейчас не доступно в Вашей версии, то немного погодя будет возможно). После этого никаких теней в кабине нет вообще.............
  19. На вопрос по теням ответил пилот ми8 А вот вопрос с фонарем - остался открытый Не открывается на посадке. Может где-то какой то замок есть. всё обшарил. может с герметизацией как то связано ?
  20. Вопросы по графике Народ, - Помогите . В кабине мига все тени дрожат и как будто по краям теней бегут волны, тоесть впечатление, что все тени дрожат сами по себе. И форма теней какая то странная, такое впечтление, что просто отдельно живущая структураПробывал отключать верт. синхронизацию. Игра на макс настройках i5 карта 1060 nVidia/ 16 ГБ памяти и фритрек В СУ-25А все нормально И еще вопрос После посадки не могу открыть фонарь. Ручки двигаются но фонарь не отъезжает . там может защелка какая то ? Закрывается нормально
  21. Собираю виртуальную кабину этого пупсика. Ни где в инете нет ни одной ветки. До этого собирал Су-25А. 40 кнопок одна ось 4 7 сегментника , ОЛЕД , 3 галетников, 40 светодиодов и 2 платы ардуино, (ни стандартный джой на 12 кн 3 оси и хатка)для получения данных использовал Експорт луа, SIOC и PITHON, для отправки данных о джойстике - PPJoy и pithon. Есть вариант с управлением тоже через луа Есть у кого то наработки по этой теме? Есть ли какие то ньюнсы в луа скриптах применительно к Мигу ? Пока что кнопки сделал через вирт джойстик но в планах все таки експорт. Я пока что там не нашел много команд из тех что нужно.
  22. Новый сюрприз. В чём ошибка ? В данном варианте работает, но нужно постоянно слать данные, или -1 или комманду. Если ни чего не слать то на методе с:receive('*l') ГС зависает. Если разорвать соединение с сокетом то опять работает А по идее, если я ни чего не шлю в сокет, то с:receive('*l') должен вернуть nil, а не ждать данных. может еще какой то секрет есть ? function LuaExportBeforeNextFrame() rs, err = с:receive('*l') if (rs ~= nil) then _, _, pitch, bank, dCom = string.find(rs, "(.+) (.+) (.+)") dCom = tonumber(dCom) if dCom ~= -1 then LoSetCommand(dCom) end end
  23. А что за крафт у тебя ? И как полностью строк аекспорта выглядит - ну та \n \s \d ? В су 25 не кликабельнм Losetcommand содержит один параметр LoSetCommand(<command>) убрать шасси 431 Блииин - Севас - реальный чувак ! Таки да - дело было в серваке. его надо было поставить сначала на прослушку, а после коннекта слать И за сайт спасибо !https://pymotw.com
  24. огромное спасибо за направление мысли При оправки питоном строки "431=1", в СИОК переменная 431 выставляется в 1. Это я проверил. А дальше ЛУА должна прочитать данные методом receive(*l). Но ГС должен сначал в сиок послать запрос на нужныіе переменные. а потом обработать методом receive. И зачем тогда нужен СИОК ? если можнонапрямую в ГС
×
×
  • Create New...