Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter275 committed Sep 17, 2024
1 parent f0cba9b commit 66badde
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/meshDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,17 @@ export abstract class MeshDevice {
break;
}

case "cannedMessagesConfig": {

Check failure on line 886 in src/meshDevice.ts

View workflow job for this annotation

GitHub Actions / publish

Fallthrough case in switch.

Check failure on line 886 in src/meshDevice.ts

View workflow job for this annotation

GitHub Actions / publish

Type '"cannedMessagesConfig"' is not comparable to type '"packet" | "xmodemPacket" | "mqttClientProxyMessage" | "channel" | "myInfo" | "nodeInfo" | "config" | "logRecord" | "configCompleteId" | "rebooted" | "moduleConfig" | "queueStatus" | "metadata" | "fileInfo" | "clientNotification" | undefined'.
this.log.trace(
Types.Emitter[Types.Emitter.HandleFromRadio],
`🥫 Received Canned Messages Config`,
);

this.events.onCannedMessagesConfigPacket.dispatch(
decodedMessage.payloadVariant.value,

Check failure on line 893 in src/meshDevice.ts

View workflow job for this annotation

GitHub Actions / publish

Property 'value' does not exist on type 'never'.
)
}

case "channel": {
this.log.trace(
Types.Emitter[Types.Emitter.HandleFromRadio],
Expand Down
8 changes: 8 additions & 0 deletions src/utils/eventSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export class EventSystem {
public readonly onModuleConfigPacket =
new SimpleEventDispatcher<Protobuf.ModuleConfig.ModuleConfig>();

/**
* Fires when a new CannedMessagesConfig message is received
*
* @event onCannedMessagesConfigPacket
*/
public readonly onCannedMessagesConfigPacket =
new SimpleEventDispatcher<Protobuf.CannedMessages.CannedMessageModuleConfig>();

/**
* Fires when a new MeshPacket message containing a ATAK packet has been
* received from device
Expand Down

0 comments on commit 66badde

Please sign in to comment.