Skip to content

Commit

Permalink
Merge pull request espruino#3082 from jamespsteinberg/master
Browse files Browse the repository at this point in the history
final design changes for 28x6 app
  • Loading branch information
bobrippling authored Nov 8, 2023
2 parents f5bbb5c + fd9703a commit 0963409
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions apps/twentyeightbysix/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const weirdAwakeHours = 19;
const weirdSleepHours = 9;

const normalDayWidth = HARDWARE_VERSION == 1 ? 24: 28;
const normalWeekDayHeight = HARDWARE_VERSION == 1 ? 10: 11;
const normalDayBoxHeight = HARDWARE_VERSION == 1 ? 9: 5;
const normalSleepDayHeight = 28;
const normalWeekDayHeight = HARDWARE_VERSION == 1 ? 10: 9;
const normalDayBoxHeight = HARDWARE_VERSION == 1 ? 9: 4;
const normalSleepDayHeight = HARDWARE_VERSION == 1 ? 28: 27;
const normalAwakeHours = 15;
const normalSleepHours = 9;

Expand Down Expand Up @@ -403,24 +403,26 @@ function drawClockPointer() {
middle, circleBottom + 15
]);

g.fillPoly([
middle, circleTop,
middle - 25, circleTop + 5,
middle - 40, circleTop + 16,
middle - 10, circleTop - 5,
middle - 3, circleTop - 10,
middle, circleTop - 15
]);

var circleTopRightY = normalSleepDayHeight + 29;
g.fillPoly([
middle, circleTop,
middle + 25, circleTop + 5,
middle + 40, circleTop + 16,
middle + 10, circleTop - 5,
middle + 3, circleTop - 10,
middle, circleTop - 15
]);
if (HARDWARE_VERSION == 1) {
g.fillPoly([
middle, circleTop,
middle - 25, circleTop + 5,
middle - 40, circleTop + 16,
middle - 10, circleTop - 5,
middle - 3, circleTop - 10,
middle, circleTop - 15
]);

g.fillPoly([
middle, circleTop,
middle + 25, circleTop + 5,
middle + 40, circleTop + 16,
middle + 10, circleTop - 5,
middle + 3, circleTop - 10,
middle, circleTop - 15
]);

}

}

Expand Down Expand Up @@ -633,12 +635,11 @@ function printBackground() {

g.setColor(watchColor);
if (HARDWARE_VERSION == 1) {

g.drawCircle(screenWidth / 2, screenHeight / 2, 55);
g.drawCircle(screenWidth / 2, screenHeight / 2, 54);
g.drawCircle(screenWidth / 2, screenHeight / 2, 53);
drawClockPointer();
}
drawClockPointer();

}

Expand Down

0 comments on commit 0963409

Please sign in to comment.