454x454 device support

This commit is contained in:
Gyuri Horák 2023-10-03 11:12:05 +02:00
parent 30d43d1fde
commit a8efb2b012
Signed by: dyuri
GPG Key ID: 4993F07B3EAE8D38
5 changed files with 99 additions and 4 deletions

22
.vscode/launch.json vendored
View File

@ -4,7 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - get device",
"stopAtLaunch": false,
"device": "${command:GetTargetDevice}"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - epix2",
"stopAtLaunch": false,
"device": "epix2"
},
{ {
"type": "monkeyc", "type": "monkeyc",
"request": "launch", "request": "launch",
@ -33,6 +46,13 @@
"stopAtLaunch": false, "stopAtLaunch": false,
"device": "fr265" "device": "fr265"
}, },
{
"type": "monkeyc",
"request": "launch",
"name": "Run App - fr965",
"stopAtLaunch": false,
"device": "fr965"
},
{ {
"type": "monkeyc", "type": "monkeyc",
"request": "launch", "request": "launch",

View File

@ -5,9 +5,11 @@
<iq:products> <iq:products>
<iq:product id="epix2"/> <iq:product id="epix2"/>
<iq:product id="epix2pro47mm"/> <iq:product id="epix2pro47mm"/>
<!-- iq:product id="fr265"/ TODO resolution is OK, font sizes are big --> <iq:product id="epix2pro51mm"/>
<iq:product id="fr965"/>
<iq:product id="venu2"/> <iq:product id="venu2"/>
<iq:product id="venu2plus"/> <iq:product id="venu2plus"/>
<iq:product id="venu3"/>
</iq:products> </iq:products>
<iq:permissions> <iq:permissions>
<iq:uses-permission id="UserProfile"/> <iq:uses-permission id="UserProfile"/>

View File

@ -0,0 +1,73 @@
<layouts>
<!-- A generic, centered layout. -->
<layout id="MainLayout">
<drawable class="Background"/>
<drawable class="BgOverlay" id="BgOverlay">
<param name="x">158</param>
<param name="y">78</param>
<param name="w">400</param>
<param name="h">280</param>
<param name="d">-36</param>
</drawable>
<drawable class="HeartRate" id="HeartRate">
<param name="y">80</param>
</drawable>
<drawable class="Track" />
<!-- drawable class="Stamina" /-->
<!-- hr labels -->
<label id="hr" x="center" y="12" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_MEDIUM" />
<label id="ahr" x="30%" y="24" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<label id="mhr" x="70%" y="24" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<!-- time/timer -->
<label id="timerHM" x="138" y="298" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_MEDIUM" />
<label id="timerS" x="140" y="318" color="Graphics.COLOR_LT_GRAY" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_XTINY" />
<label id="time" x="50%" y="375" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_LARGE" />
<!-- distance/pace/avg pace -->
<label id="pace" x="390" y="90" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_NUMBER_MILD"/>
<bitmap id="iconPace" filename="../resources/drawables/pace.png" x="394" y="142" />
<label id="apace" x="390" y="198" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_LARGE"/>
<bitmap id="iconAPace" filename="../resources/drawables/apace.png" x="394" y="228" />
<label id="distance" x="390" y="264" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_NUMBER_MILD" />
<label id="distanceLabel" x="392" y="276" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_XTINY" text="km"/>
<!-- cadence -->
<bitmap id="iconCadence" filename="../resources/drawables/cadence.png" x="36" y="116" />
<label id="cadence" x="62" y="92" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM" />
<!-- elevation, egain -->
<bitmap id="iconHills" filename="../resources/drawables/hills.png" x="22" y="154" />
<label id="elevation" x="62" y="142" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<bitmap id="iconEGain" filename="../resources/drawables/e_gain.png" x="22" y="204" />
<label id="elevationGain" x="62" y="192" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
<bitmap id="iconELoss" filename="../resources/drawables/e_loss.png" x="22" y="254" />
<label id="elevationLoss" x="62" y="242" color="0x0088FF" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_MEDIUM"/>
</layout>
<!-- Layouts used for the for the four quadrants. -->
<layout id="TopLayout">
<drawable class="Background" />
<drawable class="HeartRate" id="HeartRate">
<param name="y">80</param>
</drawable>
<!-- hr labels -->
<label id="hr" x="center" y="6" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_MEDIUM" />
<label id="ahr" x="32%" y="18" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<label id="mhr" x="68%" y="18" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
</layout>
<layout id="BottomLayout">
<drawable class="Background" />
<drawable class="HeartRate" id="HeartRate">
<param name="y">80</param>
</drawable>
<!-- hr labels -->
<label id="hr" x="center" y="72" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_MEDIUM" />
<label id="ahr" x="32%" y="72" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
<label id="mhr" x="68%" y="72" color="0x888888" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_TINY" />
</layout>
</layouts>

View File

@ -23,7 +23,7 @@
<!-- time/timer --> <!-- time/timer -->
<label id="timerHM" x="132" y="258" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_MEDIUM" /> <label id="timerHM" x="132" y="258" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_MEDIUM" />
<label id="timerS" x="134" y="278" color="Graphics.COLOR_LT_GRAY" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_XTINY" /> <label id="timerS" x="134" y="278" color="Graphics.COLOR_LT_GRAY" justification="Graphics.TEXT_JUSTIFY_LEFT" font="Graphics.FONT_XTINY" />
<label id="time" x="213" y="330" color="0x000000" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_LARGE" /> <label id="time" x="213" y="330" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_LARGE" />
<!-- distance/pace/avg pace --> <!-- distance/pace/avg pace -->
<label id="pace" x="360" y="80" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_NUMBER_MEDIUM"/> <label id="pace" x="360" y="80" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_RIGHT" font="Graphics.FONT_NUMBER_MEDIUM"/>

View File

@ -40,7 +40,7 @@ class HeartRate extends WatchUi.Drawable {
dc.setPenWidth(8); dc.setPenWidth(8);
dc.setColor(0x555555, Graphics.COLOR_TRANSPARENT); dc.setColor(0x555555, Graphics.COLOR_TRANSPARENT);
var width = dc.getWidth(); var width = dc.getWidth();
dc.drawLine(width * .1, 64, width * .9, 64); dc.drawLine(width * .1, y, width * .9, y);
if (hrTicks == 0) { if (hrTicks == 0) {
return; return;