Skip to content

Commit

Permalink
fix dock bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjackhughes committed Sep 5, 2024
1 parent 0339c89 commit f874c5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/app/receiveData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ export const receiveData = async (event: WearableEvent): Promise<void> => {
let wearable = await getWearable(usableEvent.displayId);

if (!wearable) {
const charger = usableEvent.chargerId
? await getChargingStation(usableEvent.chargerId)
: false;
if (!usableEvent.chargerId) return;
const usableChargerId = usableEvent.chargerId.split(" ")[1];

const charger = await getChargingStation(usableChargerId);

if (!charger) {
console.error("Wearable+charging station not found");
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ wss.on("connection", async (ws: Socket) => {
sendBigLog(messageData);

// This is an allowed list for OTA updates of firmware
const firmware_version = ["0000"].includes(messageData.charger_id)
const firmware_version = ["Dock 0000"].includes(messageData.charger_id)
? "2.2.5"
: "2.2.4";

Expand Down

0 comments on commit f874c5c

Please sign in to comment.