Update step-notifier.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Mon, 5 Aug 2019 02:43:42 +0000 (19:43 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Mon, 5 Aug 2019 02:43:42 +0000 (19:43 -0700)
official/step-notifier.groovy

index 322418655d4b46a08f03c1b18a88845dea3976b2..e2c07fbe4e62c3a06f818956df949558b3f12f42 100755 (executable)
@@ -85,7 +85,7 @@ def setupNotifications() {
 private songOptions() {
 
        // Make sure current selection is in the set
-
+       /*
        def options = new LinkedHashSet()
        if (state.selectedSong?.station) {
                options << state.selectedSong.station
@@ -101,10 +101,12 @@ private songOptions() {
        options.addAll(dataMaps.collect{it.station})
 
        log.trace "${options.size()} songs in list"
-       options.take(20) as List
+       options.take(20) as List*/
+       state.selectedSong = "SomeTrack"
 }
 
 private saveSelectedSong() {
+       /*
        try {
                def thisSong = song
                log.info "Looking for $thisSong"
@@ -126,7 +128,8 @@ private saveSelectedSong() {
        }
        catch (Throwable t) {
                log.error t
-       }
+       }*/
+       state.selectedSong = "SomeTrack"        
 }
 
 def installed() {
@@ -147,7 +150,7 @@ def initialize() {
        log.trace "Entering initialize()"
     
        state.lastSteps = 0
-    state.steps = jawbone.currentValue("steps").toInteger()
+       state.steps = jawbone.currentValue("steps").toInteger()
     state.goal = jawbone.currentValue("goal").toInteger()
     
        subscribe (jawbone,"goal",goalHandler)