Added GA-B001 and DW-B5600 models support
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user