Skip to content

Commit

Permalink
Horus version 1.2.2
Browse files Browse the repository at this point in the history
- added support for timers as sensors
- added support for google maps
- removed limit of 3 zoom levels, now all zoom levels are usable
- added support for defining valid zoom levels in sensor file
- added menu option to select heading sensor and heading sensor unit between deg/rad
- added menu option to select sensor file type: model is default, added options for profile 1,2 and 3
  • Loading branch information
yaapu committed Apr 18, 2021
1 parent 16d3093 commit e3a109d
Show file tree
Hide file tree
Showing 1,801 changed files with 1,208 additions and 2,801 deletions.
315 changes: 101 additions & 214 deletions HORUS/SD/SCRIPTS/TOOLS/Yaapu Maps.lua

Large diffs are not rendered by default.

166 changes: 166 additions & 0 deletions HORUS/SD/SCRIPTS/YAAPU/CFG/examples/profile_1_sensors_maps.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
----------------------------------------
-- custom sensors configuration file
----------------------------------------
local sensors = {
-- Sensor 1
-- Sensor 2
[1]= {
"Alt", -- label
"Alt", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"m", -- label for unit of measure
1, -- multiplier if < 1 than divides
"+", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
50, -- warning level (nil is do not use feature)
100, -- critical level (nil is do not use feature)
},
-- Sensor 6
[2]= {
"Spd", -- label
"GSpd", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"m/s", -- label for unit of measure
1, -- multiplier if < 1 than divides
"+", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
-- Sensor 6
[3]= {
"Dist", -- label
"Dist", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"m", -- label for unit of measure
1, -- multiplier if < 1 than divides
"+", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[4]= {
"VSpd", -- label
"VSpd", -- OpenTX sensor name
1, -- precision: number of decimals 0,1,2
"m/s", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[5]= {
"Hdg", -- label
"Hdg", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"@", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[6]= {
"Celd", -- label
"Celd", -- OpenTX sensor name
2, -- precision: number of decimals 0,1,2
"V", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
3.65, -- warning level (nil is do not use feature)
3.30, -- critical level (nil is do not use feature)
},
[7]= {
"Celm", -- label
"Celm", -- OpenTX sensor name
2, -- precision: number of decimals 0,1,2
"V", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
3.65, -- warning level (nil is do not use feature)
3.30, -- critical level (nil is do not use feature)
},
[8]= {
"Batt", -- label
"VFAS", -- OpenTX sensor name
1, -- precision: number of decimals 0,1,2
"V", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[9]= {
"Fuel", -- label
"Fuel", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"%", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
50, -- warning level (nil is do not use feature)
25, -- critical level (nil is do not use feature)
},
[10]= {
"Curr", -- label
"Curr", -- OpenTX sensor name
1, -- precision: number of decimals 0,1,2
"A", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
}
------------------------------------------------------
-- the script can optionally look up values here
-- for each sensor and display the corresponding text instead
-- as an example to associate a lookup table to sensor 3 declare it like
--
--local lookups = {
-- [3] = {
-- [-10] = "ERR",
-- [0] = "OK",
-- [10] = "CRIT",
-- }
-- }
-- this would display the sensor value except when the value corresponds to one
-- of entered above
--
local lookups = {
}

------------------------------------------------------
-- the widget can optionally look up valid zoom levels
-- and skip not listed ones
-- an "nil" array disables the feature and all zoom levels between
-- min max will be used
-- example for disabled feature
--
--local zoomLevels = nil
--
-- example
--local zoomLevels = {
-- [-2] = true,
-- [-1] = true,
-- [1] = true,
--}
-- this would enable zoom levels -2,-1,1 skipping 0 and all levels > 1
--
local zoomLevels = {
[-2] = true,
[-1] = true,
[0] = true,
[3] = true,
}

collectgarbage()

return {
sensors=sensors,lookups=lookups,zoomLevels=zoomLevels
}
166 changes: 166 additions & 0 deletions HORUS/SD/SCRIPTS/YAAPU/CFG/examples/profile_2_sensors_maps.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
----------------------------------------
-- custom sensors configuration file
----------------------------------------
local sensors = {
-- Sensor 1
-- Sensor 2
[1]= {
"Alt", -- label
"Alt", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"m", -- label for unit of measure
1, -- multiplier if < 1 than divides
"+", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
50, -- warning level (nil is do not use feature)
100, -- critical level (nil is do not use feature)
},
-- Sensor 6
[2]= {
"Spd", -- label
"GSpd", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"m/s", -- label for unit of measure
1, -- multiplier if < 1 than divides
"+", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
-- Sensor 6
[3]= {
"Dist", -- label
"Dist", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"m", -- label for unit of measure
1, -- multiplier if < 1 than divides
"+", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[4]= {
"VSpd", -- label
"VSpd", -- OpenTX sensor name
1, -- precision: number of decimals 0,1,2
"m/s", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[5]= {
"Hdg", -- label
"Hdg", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"@", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[6]= {
"Celd", -- label
"Celd", -- OpenTX sensor name
2, -- precision: number of decimals 0,1,2
"V", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
3.65, -- warning level (nil is do not use feature)
3.30, -- critical level (nil is do not use feature)
},
[7]= {
"Celm", -- label
"Celm", -- OpenTX sensor name
2, -- precision: number of decimals 0,1,2
"V", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
3.65, -- warning level (nil is do not use feature)
3.30, -- critical level (nil is do not use feature)
},
[8]= {
"Batt", -- label
"VFAS", -- OpenTX sensor name
1, -- precision: number of decimals 0,1,2
"V", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
[9]= {
"Fuel", -- label
"Fuel", -- OpenTX sensor name
0, -- precision: number of decimals 0,1,2
"%", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
50, -- warning level (nil is do not use feature)
25, -- critical level (nil is do not use feature)
},
[10]= {
"Curr", -- label
"Curr", -- OpenTX sensor name
1, -- precision: number of decimals 0,1,2
"A", -- label for unit of measure
1, -- multiplier if < 1 than divides
"-", -- "+" track max values, "-" track min values with
2, -- font size 1=small, 2=big
nil, -- warning level (nil is do not use feature)
nil, -- critical level (nil is do not use feature)
},
}
------------------------------------------------------
-- the script can optionally look up values here
-- for each sensor and display the corresponding text instead
-- as an example to associate a lookup table to sensor 3 declare it like
--
--local lookups = {
-- [3] = {
-- [-10] = "ERR",
-- [0] = "OK",
-- [10] = "CRIT",
-- }
-- }
-- this would display the sensor value except when the value corresponds to one
-- of entered above
--
local lookups = {
}

------------------------------------------------------
-- the widget can optionally look up valid zoom levels
-- and skip not listed ones
-- an "nil" array disables the feature and all zoom levels between
-- min max will be used
-- example for disabled feature
--
--local zoomLevels = nil
--
-- example
--local zoomLevels = {
-- [-2] = true,
-- [-1] = true,
-- [1] = true,
--}
-- this would enable zoom levels -2,-1,1 skipping 0 and all levels > 1
--
local zoomLevels = {
[-2] = true,
[-1] = true,
[0] = true,
[3] = true,
}

collectgarbage()

return {
sensors=sensors,lookups=lookups,zoomLevels=zoomLevels
}
Loading

0 comments on commit e3a109d

Please sign in to comment.