Msiipola Posted July 2, 2023 Posted July 2, 2023 In BIOS.lua are lot of statements like this: Quote dofile(lfs.writedir()..[[Scripts\DCS-BIOS\lib\Util.lua]]) I assume in this case the file "Util.lua" is executed, and some global variables are set. But don't understand the syntax. I have learnt "lfs" stands for Lua file system, but I have not found any lfs manual referens which has "writedir". For example this: http://math2.org/luasearch/lfs.html And what the ".." mean/do?
No1sonuk Posted July 2, 2023 Posted July 2, 2023 (edited) IIRC, the ".." refers to the relative directory structure location. It's used so that path names aren't broken by installing in nonstandard folder locations. Edited July 2, 2023 by No1sonuk
lesthegrngo Posted July 2, 2023 Posted July 2, 2023 Interesting - so does that mean that if there is a legacy installation somewhere it might still use it even if you have another correct one?
No1sonuk Posted July 3, 2023 Posted July 3, 2023 No. It's relative to the file making the call. I don't remember the syntax, but I think part of it means "go up x directory levels from here".
lesthegrngo Posted July 3, 2023 Posted July 3, 2023 ok, thanks - the question was related to the fact that I still have some sketches that work with the A10C but not with the A10C2 mods, so wondered if it was due to some scrap code somewhere in the PC being read when it shouldn't be. Vinc has also reported similar issues to me, but I'm reluctant to report it as a bug when it may be due to PC specific issues Cheers Les
No1sonuk Posted July 3, 2023 Posted July 3, 2023 Sketches? If it's DCS-BIOS, are you using the Flightpanels fork?
lesthegrngo Posted July 3, 2023 Posted July 3, 2023 (edited) Yes, the one here https://github.com/DCSFlightpanels/dcs-bios Vinc made a sketch for the Standby Compass using an ESP32 board, it works great in A10C but not at all in A10C2 Les Edited July 3, 2023 by lesthegrngo
No1sonuk Posted July 3, 2023 Posted July 3, 2023 There's no separate DCS-BIOS control ref for them. The same code should work for both unless it's WRT one of the differences between the two.
lesthegrngo Posted July 3, 2023 Posted July 3, 2023 Yes, that's why it's so puzzling. You can literally run the one mod with the device connected and running fine, then simply change the module without changing anything else or exiting the game, and it just doesn't work. Most run fine, just the occasional one that doesn't. It isn't even consistent with a particular sketch, Vinc has the standby compass working for both mods, yet my installation refuses to play along. That's what makes me believe it's something to do with my installation
Recommended Posts