fix: restore aliased paths to vite config

This commit is contained in:
Dan Ditomaso
2025-03-06 14:28:07 -05:00
parent d379769672
commit d54a612e0b
4 changed files with 37 additions and 13 deletions
+14 -2
View File
@@ -1,9 +1,9 @@
import type { Device } from "@core/stores/deviceStore.ts";
import { Protobuf, type Types } from "@meshtastic/core";
import { MeshDevice, Protobuf } from "@meshtastic/core";
export const subscribeAll = (
device: Device,
connection: Types.ConnectionType,
connection: MeshDevice,
) => {
let myNodeNum = 0;
@@ -70,6 +70,8 @@ export const subscribeAll = (
});
connection.events.onChannelPacket.subscribe((channel) => {
console.log('channel', channel);
device.addChannel(channel);
});
connection.events.onConfigPacket.subscribe((config) => {
@@ -80,6 +82,9 @@ export const subscribeAll = (
});
connection.events.onMessagePacket.subscribe((messagePacket) => {
console.log('messagePacket', messagePacket);
device.addMessage({
...messagePacket,
state: messagePacket.from !== myNodeNum ? "ack" : "waiting",
@@ -103,4 +108,11 @@ export const subscribeAll = (
time: meshPacket.rxTime,
});
});
connection.events.onQueueStatus.subscribe((queueStatus) => {
device.setQueueStatus(queueStatus);
if (queueStatus.free < 10) {
// start queueing messages
}
});
};