From 892f5fe56b35d2651f9c946bfdab894cf75bd183 Mon Sep 17 00:00:00 2001 From: genuineparts Date: Mon, 4 Nov 2024 10:00:41 +0100 Subject: [PATCH] Chenged to new Info Orb Api --- src/main/java/be/jaud/Main.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/be/jaud/Main.java b/src/main/java/be/jaud/Main.java index 51620db..3fb79cc 100644 --- a/src/main/java/be/jaud/Main.java +++ b/src/main/java/be/jaud/Main.java @@ -67,13 +67,10 @@ public class Main { } private static String createOutput(){ - JSONArray dat = new JSONArray(); + JSONObject dat = new JSONObject(); Date updatetime = new Date(time); - JSONObject displays = new JSONObject(); + dat.put("interval",conf.getInt("refreshTime")*1000); JSONArray display = new JSONArray(); - JSONObject refresh = new JSONObject(); - refresh.put("interval",conf.getInt("refreshTime")); - dat.put(refresh); JSONObject monitor1 = new JSONObject(); monitor1.put("label","Zug"); JSONArray layout = new JSONArray(); @@ -133,8 +130,7 @@ public class Main { int zug4 = data.get(conf.getString("monitors.monitor4.DepartureTime")); makeLabel(monitor5, zug4); display.put(monitor5); - displays.put("displays", display); - dat.put(displays); + dat.put("displays",display); return dat.toString(); }