1
0
Fork 0

Merge pull request #3082 from jamespsteinberg/master

final design changes for 28x6 app
master
Rob Pilling 2023-11-08 08:31:50 +00:00 committed by GitHub
commit 0963409da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 23 deletions

View File

@ -13,9 +13,9 @@ const weirdAwakeHours = 19;
const weirdSleepHours = 9; const weirdSleepHours = 9;
const normalDayWidth = HARDWARE_VERSION == 1 ? 24: 28; const normalDayWidth = HARDWARE_VERSION == 1 ? 24: 28;
const normalWeekDayHeight = HARDWARE_VERSION == 1 ? 10: 11; const normalWeekDayHeight = HARDWARE_VERSION == 1 ? 10: 9;
const normalDayBoxHeight = HARDWARE_VERSION == 1 ? 9: 5; const normalDayBoxHeight = HARDWARE_VERSION == 1 ? 9: 4;
const normalSleepDayHeight = 28; const normalSleepDayHeight = HARDWARE_VERSION == 1 ? 28: 27;
const normalAwakeHours = 15; const normalAwakeHours = 15;
const normalSleepHours = 9; const normalSleepHours = 9;
@ -403,6 +403,7 @@ function drawClockPointer() {
middle, circleBottom + 15 middle, circleBottom + 15
]); ]);
if (HARDWARE_VERSION == 1) {
g.fillPoly([ g.fillPoly([
middle, circleTop, middle, circleTop,
middle - 25, circleTop + 5, middle - 25, circleTop + 5,
@ -412,7 +413,6 @@ function drawClockPointer() {
middle, circleTop - 15 middle, circleTop - 15
]); ]);
var circleTopRightY = normalSleepDayHeight + 29;
g.fillPoly([ g.fillPoly([
middle, circleTop, middle, circleTop,
middle + 25, circleTop + 5, middle + 25, circleTop + 5,
@ -424,6 +424,8 @@ function drawClockPointer() {
} }
}
function getNormalEvent(date) { function getNormalEvent(date) {
if(date.hour == 8) { if(date.hour == 8) {
if(date.minute <= 15) { if(date.minute <= 15) {
@ -633,12 +635,11 @@ function printBackground() {
g.setColor(watchColor); g.setColor(watchColor);
if (HARDWARE_VERSION == 1) { if (HARDWARE_VERSION == 1) {
g.drawCircle(screenWidth / 2, screenHeight / 2, 55); g.drawCircle(screenWidth / 2, screenHeight / 2, 55);
g.drawCircle(screenWidth / 2, screenHeight / 2, 54); g.drawCircle(screenWidth / 2, screenHeight / 2, 54);
g.drawCircle(screenWidth / 2, screenHeight / 2, 53); g.drawCircle(screenWidth / 2, screenHeight / 2, 53);
drawClockPointer();
} }
drawClockPointer();
} }