more bug fixing
moved rate limiting to another class navigation header is close to being functional
This commit is contained in:
@@ -231,10 +231,16 @@ public class LedDHelper {
|
||||
try {
|
||||
JSONObject json = new JSONObject(response.getResult().toString());
|
||||
JSONArray hsv = json.getJSONArray("color");
|
||||
ledStripe.setColor(new HSV(hsv.getDouble(0), hsv.getDouble(1), hsv.getDouble(2)));
|
||||
callback.onColorRecieved(ledStripe);
|
||||
if (hsv.length() == 3) {
|
||||
System.out.println(hsv);
|
||||
ledStripe.setColor(new HSV(hsv.getDouble(0), hsv.getDouble(1), hsv.getDouble(2)));
|
||||
callback.onColorRecieved(ledStripe);
|
||||
} else {
|
||||
callback.onRecievFailed(-1, "HSV was empty");
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
callback.onRecievFailed(-1, "Unhandeled JSON Exception");
|
||||
}
|
||||
} else {
|
||||
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") JSONRPC2Error error = response.getError();
|
||||
|
Reference in New Issue
Block a user