Closed StefanKellerAC closed 4 years ago
Hi, there's no such thing as a default sensors file, each controller exposes telemetry with different sensor names. You're welcome to contribute examples for your specific use cases.
I fly gliders and guess I will use for all or most of them the same layout. to avoid multi copies of this file I made a default file with that layout.
Therefore I changed loading this way:
utils.loadCustomSensors = function()
local success, sensorScript = pcall(loadScript,getSensorsConfigFilename())
if sensorScript == nil then
success, sensorScript = pcall(loadScript,"/SCRIPTS/YAAPU/CFG/default_sensors_maps.lua")
end
another question: what is the difference between ckecking success and sensorscript == nil ?
ok, this makes much more sense, if a model specific is not found use default, ok I like this approach.
lua is better to understand than text :-)
please load a default sensor definition file, when no specific one is found. eg: default_sensors_maps.lua