We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1758893 commit 2d9ff82Copy full SHA for 2d9ff82
android/app/src/main/java/betaflight/configurator/plugin/SocketPlugin.java
@@ -203,6 +203,14 @@ public void disconnect(final PluginCall call) {
203
});
204
}
205
206
+ @PluginMethod
207
+ public void getStatus(final PluginCall call) {
208
+ JSObject result = new JSObject();
209
+ result.put("connected", state.get() == ConnectionState.CONNECTED);
210
+ result.put("state", state.get().toString());
211
+ call.resolve(result);
212
+ }
213
+
214
@Override
215
protected void handleOnDestroy() {
216
socketLock.lock();
0 commit comments