Update meshtastic.js version

This commit is contained in:
Sacha Weatherstone
2022-09-30 17:42:02 +10:00
parent cfc46fd12b
commit 09a8675958
6 changed files with 91 additions and 95 deletions
@@ -54,7 +54,7 @@ export const BLE = (): JSX.Element => {
onClick={() => {
void navigator.bluetooth
.requestDevice({
filters: [{ services: [Constants.SERVICE_UUID] }],
filters: [{ services: [Constants.serviceUUID] }],
})
.then((device) => {
const exists = bleDevices.findIndex((d) => d.id === device.id);
@@ -7,6 +7,7 @@ import { Message } from "@components/PageComponents/Messages/Message.js";
import { useDevice } from "@core/providers/useDevice.js";
import type { Channel } from "@core/stores/deviceStore.js";
import { MapPinIcon, PaperAirplaneIcon } from "@heroicons/react/24/outline";
import type { Types } from "@meshtastic/meshtasticjs";
export interface ChannelChatProps {
channel: Channel;
@@ -21,7 +22,7 @@ export const ChannelChat = ({ channel }: ChannelChatProps): JSX.Element => {
currentMessage,
undefined,
true,
channel.config.index,
channel.config.index as Types.ChannelNumber,
(id) => {
ackMessage(channel.config.index, id);
return Promise.resolve();
+3 -3
View File
@@ -3,7 +3,7 @@ import { createContext } from "react";
import { produce } from "immer";
import create from "zustand";
import { IConnection, Protobuf, Types } from "@meshtastic/meshtasticjs";
import { Protobuf, Types } from "@meshtastic/meshtasticjs";
export type Page =
| "messages"
@@ -45,7 +45,7 @@ export interface Device {
moduleConfig: Protobuf.LocalModuleConfig;
hardware: Protobuf.MyNodeInfo;
nodes: Node[];
connection?: IConnection;
connection?: Types.ConnectionType;
activePage: Page;
peerInfoOpen: boolean;
activePeer: number;
@@ -67,7 +67,7 @@ export interface Device {
addNodeInfo: (nodeInfo: Types.NodeInfoPacket) => void;
addUser: (user: Types.UserPacket) => void;
addPosition: (position: Types.PositionPacket) => void;
addConnection: (connection: IConnection) => void;
addConnection: (connection: Types.ConnectionType) => void;
addMessage: (message: MessageWithAck) => void;
addWaypointMessage: (message: WaypointIDWithAck) => void;
ackMessage: (channelIndex: number, messageId: number) => void;
+5 -7
View File
@@ -1,12 +1,10 @@
import type { Device } from "@core/stores/deviceStore.js";
import {
IConnection,
Protobuf,
SettingsManager,
Types,
} from "@meshtastic/meshtasticjs";
import { Protobuf, SettingsManager, Types } from "@meshtastic/meshtasticjs";
export const subscribeAll = (device: Device, connection: IConnection) => {
export const subscribeAll = (
device: Device,
connection: Types.ConnectionType
) => {
SettingsManager.debugMode = Protobuf.LogRecord_Level.TRACE;
// onLogEvent