Skip to content

Commit 52585db

Browse files
committed
Ethos: all radios version 1.4.1 - fix issues with Ethos 1.6.x
1 parent 6143d12 commit 52585db

39 files changed

+1235
-242
lines changed

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/center_panel.lua

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256
local panel = {}
3357
local status = nil

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/drawlib.lua

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256
local status = nil
3357
local libs = nil
@@ -196,7 +220,7 @@ function drawLib.drawNoTelemetryData(widget)
196220
lcd.font(FONT_XXL)
197221
lcd.drawText(240, 87, "NO TELEMETRY", CENTERED)
198222
lcd.font(FONT_STD)
199-
lcd.drawText(240, 152, "Yaapu Telemetry Widget 1.3.0".."("..'fc8f523'..")", CENTERED)
223+
lcd.drawText(240, 152, "Yaapu Telemetry Widget 1.4.1".."("..'bad9e8b'..")", CENTERED)
200224
end
201225
end
202226

@@ -208,7 +232,7 @@ function drawLib.drawWidgetPaused(widget)
208232
lcd.font(FONT_XXL)
209233
lcd.drawText(240, 87, "WIDGET PAUSED", CENTERED)
210234
lcd.font(FONT_STD)
211-
lcd.drawText(240, 152, "Yaapu Telemetry Widget 1.3.0".."("..'fc8f523'..")", CENTERED)
235+
lcd.drawText(240, 152, "Yaapu Telemetry Widget 1.4.1".."("..'bad9e8b'..")", CENTERED)
212236
end
213237

214238
function drawLib.drawFenceStatus(x,y)
@@ -474,8 +498,7 @@ end
474498
function drawLib.drawLineWithClipping(x0, y0, x1, y1, xmin, ymin, xmax, ymax)
475499
lcd.setClipping(xmin, ymin, xmax-xmin, ymax-ymin)
476500
lcd.drawLine(x0,y0,x1,y1)
477-
local w,h = lcd.getWindowSize()
478-
lcd.setClipping(0,0,w,h)
501+
lcd.setClipping()
479502
end
480503

481504
-- draw a line centered on (ox,oy) with angle and len, clipped

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/hudlib.lua

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256
local status = nil
3357
local libs = nil
@@ -49,8 +73,7 @@ local hudLib = {}
4973
local R2 = 11
5074

5175
local function unclip()
52-
local w,h = lcd.getWindowSize()
53-
lcd.setClipping(0,0,w,h)
76+
lcd.setClipping()
5477
end
5578

5679
local function clipHud(x,y,w,h)

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/layout_default.lua

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256
local panel = {}
3357
local status = nil

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/layout_map.lua

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256

3357
local panel = {}

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/layout_messages.lua

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256
local panel = {}
3357
local status = nil

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/layout_plot.lua

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,14 +27,39 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256
local panel = {}
3357
local status = nil
3458
local libs = nil
3559

3660
function panel.draw(widget)
3761
lcd.color(status.colors.white)
38-
local mask = lcd.loadMask("/bitmaps/system/mask_usb.png")
62+
local mask = lcd.loadMask(getBitmapsPath().."system/mask_usb.png")
3963
lcd.drawMask(0, 37, mask)
4064

4165
libs.drawLib.drawMessagesBar(widget,1)

ETHOS/c480x272/SD/scripts/yaaputelemetry/lib/left_panel.lua

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
-- You should have received a copy of the GNU General Public License
1818
-- along with this program; if not, see <http://www.gnu.org/licenses>.
1919

20-
2120
local HUD_W = 240
2221
local HUD_H = 130
2322
local HUD_X = (480 - HUD_W)/2
@@ -28,6 +27,31 @@ local function getTime()
2827
return os.clock()*100 -- 1/100th
2928
end
3029

30+
local function getBitmapsPath()
31+
-- local path from script root
32+
return "./../../bitmaps/"
33+
end
34+
35+
local function getLogsPath()
36+
-- local path from script root
37+
return "./../../logs/"
38+
end
39+
40+
local function getYaapuBitmapsPath()
41+
-- local path from script root
42+
return "./bitmaps/"
43+
end
44+
45+
local function getYaapuAudioPath()
46+
-- local path from script root
47+
return "./audio/"
48+
end
49+
50+
local function getYaapuLibPath()
51+
-- local path from script root
52+
return "./lib/"
53+
end
54+
3155

3256

3357

0 commit comments

Comments
 (0)