Merge branch 'main' of https://github.com/jimrandomh/faceclaw into calculator

This commit is contained in:
James Babcock committed 2026-08-29 20:13:48 -07:00
commit e1c4628566
46 files changed
+1445 -304

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
const test = require("node:test");
const assert = require("node:assert/strict");
const { chargingDisplayLabel, glassesDisplayLabel } = require("../.test-build/app/g2/glasses-display-state.js");
const connected = {
phase: "connected",
silentMode: false,
screenOn: true,
battery: 72,
foregroundTitle: "Music",
};
test("the foreground-title line covers visible, dark, and silent displays", () => {
assert.equal(glassesDisplayLabel(connected), "Music");
assert.equal(glassesDisplayLabel({ ...connected, foregroundTitle: null }), "Launcher");
assert.equal(glassesDisplayLabel({ ...connected, screenOn: false }), "Display off");
assert.equal(glassesDisplayLabel({ ...connected, screenOn: false, silentMode: true }), "Silent mode");
});
test("charging takes precedence and includes the last-known G2 battery", () => {
assert.equal(
glassesDisplayLabel({ ...connected, phase: "charging", silentMode: true, screenOn: false }),
"Charging · G2 72%",
);
assert.equal(chargingDisplayLabel(null), "Charging");
assert.equal(chargingDisplayLabel(-1), "Charging");
assert.equal(chargingDisplayLabel(101), "Charging");
});
+1
View File
@@ -15,6 +15,7 @@
"../app/g2/ble-proximity.ts",
"../app/g2/even-advertisement.ts",
"../app/g2/glasses-artwork.ts",
"../app/g2/glasses-display-state.ts",
"../app/g2/pairing-candidates.ts",
"../app/apps/calculator/math/*.ts",
"../app/apps/microphones/mic-protocol.ts",