Added GM/GA-B2100 support
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"name": "RCVD",
|
"name": "RCVD",
|
||||||
"description": "Casio BLE-enabled watches time synchronization app",
|
"description": "Casio BLE-enabled watches time synchronization app",
|
||||||
"type": "certified",
|
"type": "certified",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// RCVD.js: a small library for syncing time on BLE-enabled Casio watches
|
// RCVD.js: a small library for syncing time on BLE-enabled Casio watches
|
||||||
// Tested on: GW-B5600BC, GMW-B5000D, OCW-T200S
|
// Tested on: GW-B5600BC, GMW-B5000D, OCW-T200S, GM-B2100BD
|
||||||
// Compatible with both KaiOS 2.5.x and in-progress Web Bluetooth API spec
|
// Compatible with both KaiOS 2.5.x and in-progress Web Bluetooth API spec
|
||||||
// Created by Luxferre in 2022, released into public domain
|
// Created by Luxferre in 2022, released into public domain
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ RCVD = (function(nav) {
|
|||||||
|
|
||||||
plgen = k => [...Array(6)].map((a,i)=>[k,i]), //property list generator
|
plgen = k => [...Array(6)].map((a,i)=>[k,i]), //property list generator
|
||||||
cyclePresyncProperties = _ => new Promise((res, rej) => {
|
cyclePresyncProperties = _ => new Promise((res, rej) => {
|
||||||
var plist = [[29,0], [29,2], [29,4]].concat(watchModel.indexOf('OCW')>5 ? [[30,0],[30,1]] : [...plgen(30),...plgen(31)]); //populate the props list
|
var plist = [[29,0], [29,2], [29,4]].concat((watchModel.indexOf('OCW')>5 || watchModel.indexOf('B2100') > 5) ? [[30,0],[30,1],[31,0],[31,1]] : [...plgen(30),...plgen(31)]); //populate the props list
|
||||||
(function cycle() {
|
(function cycle() {
|
||||||
var p = plist.shift()
|
var p = plist.shift()
|
||||||
if(p) //we still have properties
|
if(p) //we still have properties
|
||||||
|
|||||||
Reference in New Issue
Block a user