WIP updates
This commit is contained in:
@@ -29,7 +29,7 @@ export const BLE = (): JSX.Element => {
|
||||
setSelectedDevice(id);
|
||||
const connection = new IBLEConnection(id);
|
||||
await connection.connect({
|
||||
device: BLEDevice,
|
||||
device: BLEDevice
|
||||
});
|
||||
device.addConnection(connection);
|
||||
subscribeAll(device, connection);
|
||||
@@ -58,7 +58,7 @@ export const BLE = (): JSX.Element => {
|
||||
onClick={() => {
|
||||
void navigator.bluetooth
|
||||
.requestDevice({
|
||||
filters: [{ services: [Constants.serviceUUID] }],
|
||||
filters: [{ services: [Constants.serviceUUID] }]
|
||||
})
|
||||
.then((device) => {
|
||||
const exists = bleDevices.findIndex((d) => d.id === device.id);
|
||||
|
||||
@@ -21,14 +21,14 @@ export const HTTP = (): JSX.Element => {
|
||||
}>({
|
||||
defaultValues: {
|
||||
ip: "meshtastic.local",
|
||||
tls: location.protocol === "https:",
|
||||
},
|
||||
tls: location.protocol === "https:"
|
||||
}
|
||||
});
|
||||
|
||||
const TLSEnabled = useWatch({
|
||||
control,
|
||||
name: "tls",
|
||||
defaultValue: location.protocol === "https:",
|
||||
defaultValue: location.protocol === "https:"
|
||||
});
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
@@ -40,7 +40,7 @@ export const HTTP = (): JSX.Element => {
|
||||
void connection.connect({
|
||||
address: data.ip,
|
||||
fetchInterval: 2000,
|
||||
tls: data.tls,
|
||||
tls: data.tls
|
||||
});
|
||||
device.addConnection(connection);
|
||||
subscribeAll(device, connection);
|
||||
|
||||
@@ -38,7 +38,7 @@ export const Serial = (): JSX.Element => {
|
||||
.connect({
|
||||
port,
|
||||
baudRate: undefined,
|
||||
concurrentLogOutput: true,
|
||||
concurrentLogOutput: true
|
||||
})
|
||||
.catch((e: Error) => console.log(`Unable to Connect: ${e.message}`));
|
||||
device.addConnection(connection);
|
||||
|
||||
Reference in New Issue
Block a user