fixed androidstduio derp
fixed stripes aren't loaded correctly
This commit is contained in:
@@ -144,6 +144,7 @@ public class LedDHelper {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
try {
|
||||
System.out.println("got resp: " + response.toString());
|
||||
if (response.getBoolean("success")) {
|
||||
ledDDaemon.getControllers().clear();
|
||||
List<LedStripe> list = new ArrayList<>();
|
||||
@@ -160,7 +161,7 @@ public class LedDHelper {
|
||||
JSONArray jstripes = row.getJSONArray("stripes");
|
||||
|
||||
for (int o = 0; o < jstripes.length(); o++) {
|
||||
JSONObject srow = jstripes.getJSONObject(i);
|
||||
JSONObject srow = jstripes.getJSONObject(o);
|
||||
LedStripe nStripe = new LedStripe();
|
||||
nStripe.setId(srow.getInt("id"));
|
||||
nStripe.setRGB(srow.getBoolean("rgb"));
|
||||
|
Reference in New Issue
Block a user