From 760ad02672c03bfc9b13ba4c9f35a7a7363608c8 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Thu, 22 Dec 2022 17:25:30 +0200 Subject: [PATCH] Added GA-B001 and DW-B5600 models support --- README.md | 4 +++- manifest.webapp | 2 +- rcvd.js | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 72f44a1..8ae2177 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,11 @@ RCVD is the missing KaiOS application and, first and foremost, a [JS library](rc ## Supported models - GW-B5600 +- DW-B5600 - GMW-B5000 - OCW-T200 -- GM-B2100 +- GM-B2100, GA-B2100 +- GA-B001 The list is incomplete and your watch may be supported too. Please [let me know](https://matrix.to/#/@luxferre:anonymousland.org) if this is the case! diff --git a/manifest.webapp b/manifest.webapp index 52418b7..20e6bc4 100644 --- a/manifest.webapp +++ b/manifest.webapp @@ -1,5 +1,5 @@ { - "version": "0.0.2", + "version": "0.0.3", "name": "RCVD", "description": "Casio BLE-enabled watches time synchronization app", "type": "certified", diff --git a/rcvd.js b/rcvd.js index 3573c07..62745a5 100644 --- a/rcvd.js +++ b/rcvd.js @@ -1,5 +1,5 @@ // RCVD.js: a small library for syncing time on BLE-enabled Casio watches -// Tested on: GW-B5600BC, GMW-B5000D, OCW-T200S, GM-B2100BD +// Tested on: GW-B5600BC, GMW-B5000D, OCW-T200S, GM-B2100BD, GA-B001G, DW-B5600G // Compatible with both KaiOS 2.5.x and in-progress Web Bluetooth API spec // Created by Luxferre in 2022, released into public domain @@ -86,7 +86,7 @@ RCVD = (function(nav) { var slist = [...plgen(30),...plgen(31)] if(watchModel.indexOf('OCW') > 5) slist = [[30,0],[30,1]] - else if(watchModel.indexOf('B2100') > 5) + else if(watchModel.indexOf('B2100') > 5 || watchModel.indexOf('B001') > 5 || watchModel.indexOf('DW-B5600') > 5 ) slist = [[30,0],[30,1],[31,0],[31,1]] var plist = [[29,0], [29,2], [29,4]].concat(slist); //populate the props list (function cycle() { @@ -125,7 +125,7 @@ RCVD = (function(nav) { sync: dObj => new Promise((res, rej) => { cyclePresyncProperties().then(_ => { //set to the next second to make up for latency - var d = dObj || new Date(Date.now() + 1000), year = d.getFullYear() + var d = dObj || new Date(Date.now() + 500), year = d.getFullYear() execWriteCmd(Uint8Array.from([ 9, year&255, year>>>8,