Skip to content

Commit

Permalink
Fixed miband pairing
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Mar 7, 2016
1 parent 6367c55 commit 0e348c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web-bluetooth/mi-band/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ var offset = 0;
statusText.addEventListener('click', function() {
statusText.textContent = 'Walk...';
miBand.connect()
.then(() => miBand.pair(false))
.then(() => {
let reset = (localStorage.length === 0);
return miBand.pair(reset);
})
.then(() => miBand.getSteps())
.then(steps => {
var today = new Date().toJSON().substr(0, 10);
Expand Down

0 comments on commit 0e348c5

Please sign in to comment.