Skip to content

Commit

Permalink
Merge pull request #24 from BaronVonPerko/versa3
Browse files Browse the repository at this point in the history
Versa3
  • Loading branch information
BaronVonPerko authored Jan 22, 2021
2 parents 74ccc67 + c3c4fdf commit 6d42435
Show file tree
Hide file tree
Showing 10 changed files with 1,297 additions and 356 deletions.
28 changes: 8 additions & 20 deletions 5.0/app/index.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
import Battery from "../../inc/battery";
import Clock from "../../inc/clock";
import Messaging from "../../inc/messaging";
import UI from "../../inc/ui";
import FileStore from "../../inc/fileStore";
import Battery from "../../core/battery";
import Clock from "../../core/clock";
import Messaging from "../../core/messaging";
import UI from "../../core/ui";
import FileStore from "../../core/fileStore";

//import analytics from "fitbit-google-analytics/app";
import analytics from "fitbit-google-analytics/app";

/*analytics.configure(
{
analytics.configure({
tracking_id: "UA-26651291-17"
});*/

import
{
me as device
} from "device";

if (!device.screen) device.screen =
{
width: 348,
height: 250
};
});

UI.instance.restore();

Expand Down
43 changes: 11 additions & 32 deletions 5.0/companion/index.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
import * as messaging from "messaging";
import
{
settingsStorage
} from "settings";
import {settingsStorage} from "settings";

//import "fitbit-google-analytics/companion";
import
{
DEFAULT_MODEL
} from "../common/constants";

import
{
device
} from "peer";

if (!device.screen) device.screen =
{
width: 348,
height: 250
};
settingsStorage.setItem("screenWidth", device.screen.width);
settingsStorage.setItem("screenHeight", device.screen.height);
import "fitbit-google-analytics/companion";
import {DEFAULT_MODEL} from "../../core/common/constants";

// Message socket opens
messaging.peerSocket.onopen = () => {
Expand All @@ -35,11 +16,10 @@ messaging.peerSocket.onclose = () => {

// A user changes settings
settingsStorage.onchange = evt => {
let data =
{
key: evt.key,
newValue: evt.newValue
};
let data = {
key: evt.key,
newValue: evt.newValue
};
sendVal(data);
};

Expand All @@ -52,11 +32,10 @@ function restoreSettings() {
for (let index = 0; index < settingsStorage.length; index++) {
let key = settingsStorage.key(index);
if (key) {
let data =
{
key: key,
newValue: settingsStorage.getItem(key)
};
let data = {
key: key,
newValue: settingsStorage.getItem(key)
};
sendVal(data);
}
}
Expand Down
Loading

0 comments on commit 6d42435

Please sign in to comment.