Update GPS Adv Sports II.js

pull/1453/head
nujw 2022-02-08 08:29:01 +13:00 committed by GitHub
parent d4e9aff5c9
commit 09d0f424da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -7,8 +7,8 @@ app.LoadPlugin("PuckJS");
//Called when application is started. //Called when application is started.
function OnStart() { function OnStart() {
v = '1.49' // Version of this script v = '1.50' // Version of this script
requiredBangleVer = '1.46'; // Minimum speedalt2 version required on Bangle requiredBangleVer = '1.47'; // Minimum speedalt2 version required on Bangle
curBangleVer = '-.--' curBangleVer = '-.--'
isStopped = true; // Data receive turned off isStopped = true; // Data receive turned off
lastData = new Date().getTime() / 1000; // Time of last data received lastData = new Date().getTime() / 1000; // Time of last data received
@ -20,6 +20,8 @@ function OnStart() {
col = new Array(['black'],['#64FF00'],['#FCFA00'],['#00E4FF']) // bg, main, units, wp - 0xFFFF,0x007F,0x0054,0x0054 col = new Array(['black'],['#64FF00'],['#FCFA00'],['#00E4FF']) // bg, main, units, wp - 0xFFFF,0x007F,0x0054,0x0054
// Connect to Bangle // Connect to Bangle
if( !app.IsBluetoothEnabled() ) app.SetBluetoothEnabled( true );
puck = app.CreatePuckJS(); puck = app.CreatePuckJS();
puck.SetOnConnect(onConnect); // Callback. puck.SetOnConnect(onConnect); // Callback.
puck.SetOnReceive(readResponse); // Callback to capture console output from app. puck.SetOnReceive(readResponse); // Callback to capture console output from app.
@ -270,4 +272,3 @@ function btn_OnScan() {
btnStop.SetBackColor(btnOff) btnStop.SetBackColor(btnOff)
puck.Scan("Bangle"); puck.Scan("Bangle");
} }