Update custom.html

pull/925/head
Ronin0000 2021-11-22 19:11:40 -08:00 committed by GitHub
parent 0664a44c45
commit be08311331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -93,9 +93,7 @@
var app = ` var app = `
require("Font8x12").add(Graphics); require("Font8x12").add(Graphics);
require("Font7x11Numeric7Seg", 2).add(Graphics); require("Font7x11Numeric7Seg", 2).add(Graphics);
var file = require("Storage").open("calendarItems.csv","w"); var file = require("Storage").open("calendarItems.csv","w");
let nIntervId; let nIntervId;
function redrawScreen() { function redrawScreen() {
layout.render(layout.background); layout.render(layout.background);
@ -175,12 +173,15 @@ function updateDay(ffunction,day){
} }
} }
function getScheduleTable() { function getScheduleTable() {
let schedule = ${JSON.stringify(schedule)}; let schedule = [//Monday:
{cn: "Biblical Theology", dow:1, sh: 8, sm: 10, eh:9, em: 5, r:"207", t:"Mr. Besaw"},
{cn: "English", dow:1, sh: 9, sm: 5, eh:10, em: 0, t:"Dr. Wong"},
{cn: "Break", dow:1, sh: 10, sm: 0, eh:10, em: 10, t:""},
{cn: "MS Robotics", dow:1, sh: 10, sm: 10, eh:11, em: 0, r:"211", t:"Mr. Broyles"}];//${JSON.stringify(schedule)};
logDebug(JSON.stringify(schedule));
return schedule; return schedule;
} }
file.write(JSON.stringify(schedule));
function findNextScheduleIndex() { function findNextScheduleIndex() {
var schedule = getScheduleTable(); var schedule = getScheduleTable();
var currentDate = new Date(); var currentDate = new Date();
@ -403,8 +404,8 @@ layout.update();
layout.render(layout.loading); layout.render(layout.loading);
layout.render(layout.background); layout.render(layout.background);
layout.render(layout.buttons); layout.render(layout.buttons);
draw(); draw();
file.write(JSON.stringify(schedule));
`; `;
// send finished app (in addition to contents of app.json) // send finished app (in addition to contents of app.json)
sendCustomizedApp({ sendCustomizedApp({