50 lines
826 B
JavaScript
50 lines
826 B
JavaScript
'use strict';
|
|
|
|
|
|
import * as fe from "../core/fetcher.js";
|
|
|
|
import * as ti from "../core/time.js";
|
|
|
|
import * as sc from "../core/screen.js";
|
|
|
|
// Import services
|
|
import * as serv from "../services/service.js";
|
|
|
|
// Import views
|
|
import * as domman from "../dom/schedule.js";
|
|
import * as clk from "../dom/clock.js";
|
|
|
|
|
|
// Empty JSON lists for data
|
|
let storage = {
|
|
scheduleData: undefined
|
|
};
|
|
|
|
|
|
let do_fetch = fe.configure({}, serv);
|
|
|
|
do_fetch(storage);
|
|
|
|
|
|
|
|
// Main Loop
|
|
let screen_update = sc.configure(serv, domman);
|
|
let clock_update = sc.configure(serv, clk);
|
|
|
|
|
|
let cfg = {
|
|
"roomName": "D002"
|
|
};
|
|
|
|
|
|
// Just do it
|
|
function main_loop() {
|
|
screen_update(storage, ti, cfg);
|
|
clock_update(storage, ti, cfg);
|
|
// update_screen();
|
|
// setTimeout(main_loop, 1 * 1000);
|
|
setTimeout(main_loop, 1 * 50);
|
|
};
|
|
|
|
main_loop();
|