Commit b6a9e308 authored by Dave Griffiths's avatar Dave Griffiths
Browse files

synced sound

parent 45185fda
...@@ -294,13 +294,13 @@ ...@@ -294,13 +294,13 @@
data))) data)))
(cond (cond
((null? r) ((null? r)
(debug! "All files up to date") (debug! "No new data to download")
(set-current! 'download 1) (set-current! 'download 1)
(append (append
(if (eqv? (get-current 'upload 0) 1) (if (eqv? (get-current 'upload 0) 1)
(list (play-sound "ping")) '()) (list (play-sound "ping")) '())
(list (list
(toast "All files up to date")) r)) (toast "No new data to download")) r))
(else (else
(debug! (string-append (debug! (string-append
"Requesting " "Requesting "
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
(spit db "stream" (dirty-entities db "stream"))))) (spit db "stream" (dirty-entities db "stream")))))
(append (cond (append (cond
((> (length r) 0) ((> (length r) 0)
(debug! (string-append "Uploading " (number->string (/ (length r) 2)) " items...")) (debug! (string-append "Uploading " (number->string (length r)) " items..."))
(list (list
(toast "Uploading data..."))) (toast "Uploading data...")))
(else (else
...@@ -331,7 +331,7 @@ ...@@ -331,7 +331,7 @@
(if (eqv? (get-current 'download 0) 1) (if (eqv? (get-current 'download 0) 1)
(list (play-sound "ping")) '()) (list (play-sound "ping")) '())
(list (list
(toast "No data changed to upload")))) r)))) (toast "No data changed to upload"))))) r)))
(define (connect-to-net fn) (define (connect-to-net fn)
(list (list
......
...@@ -51,11 +51,11 @@ public class NetworkManager { ...@@ -51,11 +51,11 @@ public class NetworkManager {
} }
void Start(String ssid, StarwispActivity c, String name, StarwispBuilder b) { void Start(String ssid, StarwispActivity c, String name, StarwispBuilder b) {
m_CallbackName=name;
m_Context=c;
m_Builder=b;
if (state==NetworkManager.State.IDLE) { if (state==NetworkManager.State.IDLE) {
m_CallbackName=name;
m_Context=c;
m_Builder=b;
wifi = (WifiManager) c.getSystemService(Context.WIFI_SERVICE); wifi = (WifiManager) c.getSystemService(Context.WIFI_SERVICE);
state = State.SCANNING; state = State.SCANNING;
SSID = ssid; SSID = ssid;
......
...@@ -676,7 +676,7 @@ public class StarwispBuilder ...@@ -676,7 +676,7 @@ public class StarwispBuilder
final Integer id = arr.getInt(1); final Integer id = arr.getInt(1);
String token = arr.getString(2); String token = arr.getString(2);
Log.i("starwisp", "Update: "+type+" "+id+" "+token); //Log.i("starwisp", "Update: "+type+" "+id+" "+token);
// non widget commands // non widget commands
if (token.equals("toast")) { if (token.equals("toast")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment