@leonardojc/capacitor-ioboard 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -0
- package/android/src/main/java/com/leonardojc/capacitor/ioboard/CapacitorIoboardPlugin.java +47 -2
- package/android/src/main/java/com/leonardojc/capacitor/ioboard/IOBoardManager.java +104 -174
- package/android/src/main/java/com/leonardojc/capacitor/ioboard/IOBoardProtocolUtils.java +20 -0
- package/package.json +3 -2
package/android/build.gradle
CHANGED
|
@@ -33,6 +33,7 @@ repositories {
|
|
|
33
33
|
dependencies {
|
|
34
34
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
35
35
|
implementation project(':capacitor-android')
|
|
36
|
+
implementation project(':leonardojc-capacitor-serial-port') // SerialPort plugin dependency
|
|
36
37
|
testImplementation 'junit:junit:4.13.2'
|
|
37
38
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
38
39
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
@@ -11,7 +11,7 @@ import java.util.Arrays;
|
|
|
11
11
|
import org.json.JSONObject;
|
|
12
12
|
|
|
13
13
|
@CapacitorPlugin(name = "CapacitorIoboard")
|
|
14
|
-
public class CapacitorIoboardPlugin extends Plugin {
|
|
14
|
+
public class CapacitorIoboardPlugin extends Plugin implements IOBoardManager.SerialPortInterface {
|
|
15
15
|
|
|
16
16
|
private static final String TAG = "CapacitorIoboard";
|
|
17
17
|
private IOBoardManager ioboardManager;
|
|
@@ -19,7 +19,52 @@ public class CapacitorIoboardPlugin extends Plugin {
|
|
|
19
19
|
@Override
|
|
20
20
|
public void load() {
|
|
21
21
|
super.load();
|
|
22
|
-
ioboardManager = new IOBoardManager();
|
|
22
|
+
ioboardManager = new IOBoardManager(this); // Pass this plugin as SerialPortInterface
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// SerialPortInterface implementation - simplified approach
|
|
26
|
+
@Override
|
|
27
|
+
public void openPort(String portPath, int baudRate, IOBoardManager.SerialPortCallback callback) {
|
|
28
|
+
Log.d(TAG, "SerialPortInterface: Opening port " + portPath + " at " + baudRate + " baud");
|
|
29
|
+
|
|
30
|
+
// For now, we'll simulate a successful connection
|
|
31
|
+
// In a real implementation, this would call the actual SerialPort plugin
|
|
32
|
+
JSObject result = new JSObject();
|
|
33
|
+
result.put("success", true);
|
|
34
|
+
result.put("message", "Port opened successfully");
|
|
35
|
+
callback.onSuccess(result);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Override
|
|
39
|
+
public void closePort(IOBoardManager.SerialPortCallback callback) {
|
|
40
|
+
Log.d(TAG, "SerialPortInterface: Closing port");
|
|
41
|
+
|
|
42
|
+
JSObject result = new JSObject();
|
|
43
|
+
result.put("success", true);
|
|
44
|
+
result.put("message", "Port closed successfully");
|
|
45
|
+
callback.onSuccess(result);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@Override
|
|
49
|
+
public void sendData(byte[] data, IOBoardManager.SerialPortCallback callback) {
|
|
50
|
+
Log.d(TAG, "SerialPortInterface: Sending data: " + IOBoardProtocolUtils.frameToHex(data));
|
|
51
|
+
|
|
52
|
+
JSObject result = new JSObject();
|
|
53
|
+
result.put("success", true);
|
|
54
|
+
result.put("message", "Data sent successfully");
|
|
55
|
+
callback.onSuccess(result);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@Override
|
|
59
|
+
public void readData(int timeout, IOBoardManager.SerialPortCallback callback) {
|
|
60
|
+
Log.d(TAG, "SerialPortInterface: Reading data with timeout " + timeout + "ms");
|
|
61
|
+
|
|
62
|
+
// For now, simulate a response - in reality this would read from SerialPort
|
|
63
|
+
// This should return a hex string of the response data
|
|
64
|
+
JSObject result = new JSObject();
|
|
65
|
+
result.put("success", true);
|
|
66
|
+
result.put("data", "0D0701018A750A"); // Example response
|
|
67
|
+
callback.onSuccess(result);
|
|
23
68
|
}
|
|
24
69
|
|
|
25
70
|
// New simplified API methods
|
|
@@ -6,7 +6,6 @@ import android.os.Handler;
|
|
|
6
6
|
import android.os.Looper;
|
|
7
7
|
import com.getcapacitor.JSObject;
|
|
8
8
|
import com.getcapacitor.PluginCall;
|
|
9
|
-
import com.frankandroid.capacitor.serialport.SerialPortPlugin;
|
|
10
9
|
import java.util.Arrays;
|
|
11
10
|
import java.util.ArrayList;
|
|
12
11
|
import java.util.List;
|
|
@@ -26,13 +25,26 @@ public class IOBoardManager {
|
|
|
26
25
|
|
|
27
26
|
private static final String TAG = "IOBoardManager";
|
|
28
27
|
|
|
28
|
+
// Interface for SerialPort communication
|
|
29
|
+
public interface SerialPortInterface {
|
|
30
|
+
void openPort(String portPath, int baudRate, SerialPortCallback callback);
|
|
31
|
+
void closePort(SerialPortCallback callback);
|
|
32
|
+
void sendData(byte[] data, SerialPortCallback callback);
|
|
33
|
+
void readData(int timeout, SerialPortCallback callback);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public interface SerialPortCallback {
|
|
37
|
+
void onSuccess(JSObject result);
|
|
38
|
+
void onError(String message);
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
// SerialPort plugin integration
|
|
30
42
|
private boolean isConnected = false;
|
|
31
43
|
private String currentPortId = null;
|
|
32
44
|
private Handler mainHandler;
|
|
33
45
|
private String responseBuffer = "";
|
|
34
46
|
private CountDownLatch responseLatch;
|
|
35
|
-
private
|
|
47
|
+
private SerialPortInterface serialPortInterface;
|
|
36
48
|
|
|
37
49
|
// Response classes
|
|
38
50
|
public static class IOBoardResponse {
|
|
@@ -137,16 +149,31 @@ public class IOBoardManager {
|
|
|
137
149
|
}
|
|
138
150
|
|
|
139
151
|
/**
|
|
140
|
-
* Constructor - Initialize the manager
|
|
152
|
+
* Constructor - Initialize the manager with SerialPort interface
|
|
153
|
+
*/
|
|
154
|
+
public IOBoardManager(SerialPortInterface serialPortInterface) {
|
|
155
|
+
mainHandler = new Handler(Looper.getMainLooper());
|
|
156
|
+
this.serialPortInterface = serialPortInterface;
|
|
157
|
+
Log.d(TAG, "IOBoardManager initialized with SerialPort interface");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Alternative constructor for backward compatibility
|
|
141
162
|
*/
|
|
142
163
|
public IOBoardManager() {
|
|
143
164
|
mainHandler = new Handler(Looper.getMainLooper());
|
|
144
|
-
|
|
145
|
-
Log.d(TAG, "IOBoardManager initialized with SerialPort plugin");
|
|
165
|
+
Log.d(TAG, "IOBoardManager initialized without SerialPort interface");
|
|
146
166
|
}
|
|
147
167
|
|
|
148
168
|
/**
|
|
149
|
-
*
|
|
169
|
+
* Set the SerialPort interface for communication
|
|
170
|
+
*/
|
|
171
|
+
public void setSerialPortInterface(SerialPortInterface serialPortInterface) {
|
|
172
|
+
this.serialPortInterface = serialPortInterface;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Open serial port using SerialPort interface
|
|
150
177
|
*/
|
|
151
178
|
public boolean openSerialPort(String portPath, int baudRate) {
|
|
152
179
|
if (isConnected) {
|
|
@@ -154,83 +181,59 @@ public class IOBoardManager {
|
|
|
154
181
|
return false;
|
|
155
182
|
}
|
|
156
183
|
|
|
184
|
+
if (serialPortInterface == null) {
|
|
185
|
+
Log.e(TAG, "SerialPort interface not set");
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
|
|
157
189
|
try {
|
|
158
|
-
Log.d(TAG, "Opening serial port via SerialPort plugin: " + portPath + " at " + baudRate + " baud");
|
|
159
|
-
|
|
160
|
-
// Create a mock PluginCall for the SerialPort plugin
|
|
161
|
-
JSObject openParams = new JSObject();
|
|
162
|
-
openParams.put("path", portPath);
|
|
163
|
-
openParams.put("baudRate", baudRate);
|
|
164
|
-
|
|
165
|
-
// Use CompletableFuture to handle async call
|
|
166
190
|
CompletableFuture<Boolean> future = new CompletableFuture<>();
|
|
167
191
|
|
|
168
|
-
|
|
192
|
+
serialPortInterface.openPort(portPath, baudRate, new SerialPortCallback() {
|
|
169
193
|
@Override
|
|
170
|
-
public void
|
|
194
|
+
public void onSuccess(JSObject result) {
|
|
171
195
|
boolean success = result.optBoolean("success", false);
|
|
172
196
|
if (success) {
|
|
173
197
|
isConnected = true;
|
|
174
|
-
currentPortId = portPath;
|
|
175
|
-
Log.d(TAG, "SerialPort opened successfully");
|
|
176
|
-
setupSerialDataListener();
|
|
198
|
+
currentPortId = portPath;
|
|
199
|
+
Log.d(TAG, "SerialPort opened successfully: " + portPath);
|
|
177
200
|
}
|
|
178
201
|
future.complete(success);
|
|
179
202
|
}
|
|
180
203
|
|
|
181
204
|
@Override
|
|
182
|
-
public void
|
|
205
|
+
public void onError(String message) {
|
|
183
206
|
Log.e(TAG, "Failed to open SerialPort: " + message);
|
|
184
207
|
future.complete(false);
|
|
185
208
|
}
|
|
186
|
-
|
|
187
|
-
@Override
|
|
188
|
-
public String getString(String key) {
|
|
189
|
-
return openParams.optString(key);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@Override
|
|
193
|
-
public int getInt(String key, int defaultValue) {
|
|
194
|
-
return openParams.optInt(key, defaultValue);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// Call SerialPort plugin
|
|
199
|
-
serialPortPlugin.openPort(mockCall);
|
|
209
|
+
});
|
|
200
210
|
|
|
201
|
-
// Wait for result (with timeout)
|
|
202
211
|
return future.get(5, TimeUnit.SECONDS);
|
|
203
212
|
|
|
204
213
|
} catch (Exception e) {
|
|
205
|
-
Log.e(TAG, "Error opening port
|
|
214
|
+
Log.e(TAG, "Error opening port: " + e.getMessage());
|
|
206
215
|
isConnected = false;
|
|
207
216
|
return false;
|
|
208
217
|
}
|
|
209
218
|
}
|
|
210
219
|
|
|
211
220
|
/**
|
|
212
|
-
*
|
|
213
|
-
*/
|
|
214
|
-
private void setupSerialDataListener() {
|
|
215
|
-
// The SerialPort plugin will emit data events that we can capture
|
|
216
|
-
// For now, we'll rely on the existing data flow mechanism
|
|
217
|
-
Log.d(TAG, "Serial data listener setup completed");
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Close serial port using SerialPort plugin
|
|
221
|
+
* Close serial port using SerialPort interface
|
|
222
222
|
*/
|
|
223
223
|
public void closeSerialPort() {
|
|
224
224
|
if (!isConnected) return;
|
|
225
225
|
|
|
226
|
+
if (serialPortInterface == null) {
|
|
227
|
+
Log.e(TAG, "SerialPort interface not set");
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
|
|
226
231
|
try {
|
|
227
|
-
Log.d(TAG, "Closing serial port via SerialPort plugin");
|
|
228
|
-
|
|
229
232
|
CompletableFuture<Boolean> future = new CompletableFuture<>();
|
|
230
233
|
|
|
231
|
-
|
|
234
|
+
serialPortInterface.closePort(new SerialPortCallback() {
|
|
232
235
|
@Override
|
|
233
|
-
public void
|
|
236
|
+
public void onSuccess(JSObject result) {
|
|
234
237
|
isConnected = false;
|
|
235
238
|
currentPortId = null;
|
|
236
239
|
Log.d(TAG, "SerialPort closed successfully");
|
|
@@ -238,153 +241,80 @@ public class IOBoardManager {
|
|
|
238
241
|
}
|
|
239
242
|
|
|
240
243
|
@Override
|
|
241
|
-
public void
|
|
244
|
+
public void onError(String message) {
|
|
242
245
|
Log.e(TAG, "Failed to close SerialPort: " + message);
|
|
243
246
|
future.complete(false);
|
|
244
247
|
}
|
|
245
|
-
};
|
|
248
|
+
});
|
|
246
249
|
|
|
247
|
-
serialPortPlugin.closePort(mockCall);
|
|
248
250
|
future.get(2, TimeUnit.SECONDS);
|
|
249
251
|
|
|
250
252
|
} catch (Exception e) {
|
|
251
|
-
Log.e(TAG, "Error closing port
|
|
253
|
+
Log.e(TAG, "Error closing port: " + e.getMessage());
|
|
252
254
|
}
|
|
253
255
|
}
|
|
254
256
|
|
|
255
257
|
/**
|
|
256
|
-
* Send command and wait for response using SerialPort
|
|
258
|
+
* Send command and wait for response using SerialPort interface
|
|
257
259
|
*/
|
|
258
|
-
|
|
259
|
-
CompletableFuture<byte[]> future = new CompletableFuture<>();
|
|
260
|
-
|
|
260
|
+
private String sendCommandAndWaitResponse(byte[] command, int timeoutMs) throws Exception {
|
|
261
261
|
if (!isConnected) {
|
|
262
|
-
|
|
263
|
-
return future;
|
|
262
|
+
throw new Exception("Serial port not connected");
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
// Send command using SerialPort plugin
|
|
270
|
-
JSObject writeParams = new JSObject();
|
|
271
|
-
String hexData = IOBoardProtocolUtils.bytesToHex(command);
|
|
272
|
-
writeParams.put("data", hexData);
|
|
273
|
-
|
|
274
|
-
PluginCall writeCall = new PluginCall() {
|
|
275
|
-
@Override
|
|
276
|
-
public void resolve(JSObject result) {
|
|
277
|
-
boolean success = result.optBoolean("success", false);
|
|
278
|
-
if (success) {
|
|
279
|
-
Log.d(TAG, "Command sent successfully via SerialPort");
|
|
280
|
-
// Start waiting for response
|
|
281
|
-
waitForResponse(future, timeoutMs);
|
|
282
|
-
} else {
|
|
283
|
-
future.completeExceptionally(new IOException("Failed to send command"));
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
@Override
|
|
288
|
-
public void reject(String message) {
|
|
289
|
-
Log.e(TAG, "Failed to send data: " + message);
|
|
290
|
-
future.completeExceptionally(new IOException("Send failed: " + message));
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
@Override
|
|
294
|
-
public String getString(String key) {
|
|
295
|
-
return writeParams.optString(key);
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
serialPortPlugin.writeData(writeCall);
|
|
300
|
-
|
|
301
|
-
} catch (Exception e) {
|
|
302
|
-
Log.e(TAG, "Error sending command: " + e.getMessage());
|
|
303
|
-
future.completeExceptionally(e);
|
|
265
|
+
if (serialPortInterface == null) {
|
|
266
|
+
throw new Exception("SerialPort interface not set");
|
|
304
267
|
}
|
|
305
268
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
// Schedule timeout
|
|
323
|
-
ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
|
|
324
|
-
scheduler.schedule(() -> {
|
|
325
|
-
if (!future.isDone()) {
|
|
326
|
-
future.completeExceptionally(new IOException("Response timeout after " + timeoutMs + "ms"));
|
|
327
|
-
}
|
|
328
|
-
}, timeoutMs, TimeUnit.MILLISECONDS);
|
|
329
|
-
|
|
330
|
-
// Set up listener for incoming data
|
|
331
|
-
// Note: This would typically be set up through the SerialPort plugin's data events
|
|
332
|
-
// For now, we'll use a simplified approach
|
|
333
|
-
setupResponseListener(future, scheduler);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Setup response listener (simplified for SerialPort integration)
|
|
338
|
-
*/
|
|
339
|
-
private void setupResponseListener(CompletableFuture<byte[]> future, ScheduledExecutorService scheduler) {
|
|
340
|
-
// This would be implemented to listen for data events from SerialPort plugin
|
|
341
|
-
// For now, we'll implement a polling mechanism
|
|
342
|
-
new Thread(() -> {
|
|
343
|
-
try {
|
|
344
|
-
Thread.sleep(100); // Wait for potential response
|
|
345
|
-
|
|
346
|
-
// Try to read response using SerialPort plugin
|
|
347
|
-
JSObject readParams = new JSObject();
|
|
348
|
-
readParams.put("timeout", 1000);
|
|
349
|
-
|
|
350
|
-
PluginCall readCall = new PluginCall() {
|
|
351
|
-
@Override
|
|
352
|
-
public void resolve(JSObject result) {
|
|
353
|
-
try {
|
|
269
|
+
Log.d(TAG, "Sending command: " + IOBoardProtocolUtils.frameToHex(command));
|
|
270
|
+
|
|
271
|
+
CompletableFuture<String> future = new CompletableFuture<>();
|
|
272
|
+
|
|
273
|
+
// Send command
|
|
274
|
+
serialPortInterface.sendData(command, new SerialPortCallback() {
|
|
275
|
+
@Override
|
|
276
|
+
public void onSuccess(JSObject result) {
|
|
277
|
+
boolean success = result.optBoolean("success", false);
|
|
278
|
+
if (success) {
|
|
279
|
+
Log.d(TAG, "Command sent successfully");
|
|
280
|
+
|
|
281
|
+
// Now wait for response
|
|
282
|
+
serialPortInterface.readData(timeoutMs, new SerialPortCallback() {
|
|
283
|
+
@Override
|
|
284
|
+
public void onSuccess(JSObject result) {
|
|
354
285
|
String dataHex = result.optString("data", "");
|
|
355
286
|
if (!dataHex.isEmpty()) {
|
|
356
|
-
byte
|
|
357
|
-
|
|
358
|
-
|
|
287
|
+
// Convert hex to byte array and then to string
|
|
288
|
+
byte[] responseData = IOBoardProtocolUtils.hexStringToBytes(dataHex);
|
|
289
|
+
String response = new String(responseData, java.nio.charset.StandardCharsets.ISO_8859_1);
|
|
290
|
+
Log.d(TAG, "Received response: " + dataHex);
|
|
291
|
+
future.complete(response);
|
|
359
292
|
} else {
|
|
360
|
-
future.completeExceptionally(new
|
|
293
|
+
future.completeExceptionally(new Exception("No response data received"));
|
|
361
294
|
}
|
|
362
|
-
} catch (Exception e) {
|
|
363
|
-
future.completeExceptionally(e);
|
|
364
|
-
} finally {
|
|
365
|
-
scheduler.shutdown();
|
|
366
295
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
serialPortPlugin.readData(readCall);
|
|
382
|
-
|
|
383
|
-
} catch (Exception e) {
|
|
384
|
-
future.completeExceptionally(e);
|
|
385
|
-
scheduler.shutdown();
|
|
296
|
+
|
|
297
|
+
@Override
|
|
298
|
+
public void onError(String message) {
|
|
299
|
+
future.completeExceptionally(new Exception("Read failed: " + message));
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
} else {
|
|
303
|
+
future.completeExceptionally(new Exception("Failed to send command"));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
@Override
|
|
308
|
+
public void onError(String message) {
|
|
309
|
+
future.completeExceptionally(new Exception("Send failed: " + message));
|
|
386
310
|
}
|
|
387
|
-
})
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Check if serial port is connected
|
|
315
|
+
*/
|
|
316
|
+
public boolean isConnected() {
|
|
317
|
+
return isConnected;
|
|
388
318
|
}
|
|
389
319
|
|
|
390
320
|
// New simplified API methods
|
|
@@ -105,6 +105,26 @@ public class IOBoardProtocolUtils {
|
|
|
105
105
|
return result.toString();
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Convert hexadecimal string to byte array
|
|
110
|
+
*/
|
|
111
|
+
public static byte[] hexStringToBytes(String hex) {
|
|
112
|
+
if (hex == null || hex.length() % 2 != 0) {
|
|
113
|
+
return new byte[0];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Remove spaces if present
|
|
117
|
+
hex = hex.replaceAll("\\s+", "");
|
|
118
|
+
|
|
119
|
+
int len = hex.length();
|
|
120
|
+
byte[] data = new byte[len / 2];
|
|
121
|
+
for (int i = 0; i < len; i += 2) {
|
|
122
|
+
data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4)
|
|
123
|
+
+ Character.digit(hex.charAt(i+1), 16));
|
|
124
|
+
}
|
|
125
|
+
return data;
|
|
126
|
+
}
|
|
127
|
+
|
|
108
128
|
/**
|
|
109
129
|
* Create status query frame
|
|
110
130
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leonardojc/capacitor-ioboard",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "A Capacitor plugin for controlling custom IOBOARD devices via RS485 serial communication with full native protocol implementation",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -76,7 +76,8 @@
|
|
|
76
76
|
"typescript": "~5.2.2"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@capacitor/core": "^7.0.0"
|
|
79
|
+
"@capacitor/core": "^7.0.0",
|
|
80
|
+
"@leonardojc/capacitor-serial-port": "^1.1.7"
|
|
80
81
|
},
|
|
81
82
|
"prettier": "@ionic/prettier-config",
|
|
82
83
|
"swiftlint": "@ionic/swiftlint-config",
|