Skip to content
Snippets Groups Projects
Commit 454645ba authored by Volker Richert's avatar Volker Richert
Browse files

adapt JSON #61

parent 4ffa2105
No related branches found
No related tags found
No related merge requests found
...@@ -257,11 +257,13 @@ public class NightscoutUploadIntentService extends IntentService { ...@@ -257,11 +257,13 @@ public class NightscoutUploadIntentService extends IntentService {
iob.put("bolusiob", record.getActiveInsulin()); iob.put("bolusiob", record.getActiveInsulin());
JSONObject status = new JSONObject(); JSONObject status = new JSONObject();
// todo put real status in here.... if (record.isBolusing()) {
status.put("status", "normal"); status.put("bolusing", true);
status.put("timestamp", record.getPumpDate()); } else if (record.isSuspended()) {
status.put("bolusing", record.isBolusing()); status.put("suspended", true);
status.put("suspended", record.isSuspended()); } else {
status.put("status", "normal");
}
JSONObject battery = new JSONObject(); JSONObject battery = new JSONObject();
battery.put("percent", record.getBatteryPercentage()); battery.put("percent", record.getBatteryPercentage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment