channel work

This commit is contained in:
pdxlocations
2024-03-29 08:04:54 -07:00
parent ba4e191be0
commit 15585ed490
+13 -2
View File
@@ -10,7 +10,9 @@ messages_win = None
nodes_win = None
channel_win = None # Added channel_win variable
message_row = 1
selected_channel = 0
BROADCAST_ADDR = 4294967295
node_list = []
if interface.nodes:
@@ -55,7 +57,17 @@ pub.subscribe(on_receive, 'meshtastic.receive')
def send_message(message):
global message_row
interface.sendText(message)
# interface.sendText(message)
interface.sendText(
text=message,
destinationId=BROADCAST_ADDR,
wantAck=False,
wantResponse=False,
onResponse=None,
channelIndex=selected_channel,
)
# Add sent message to the messages window
messages_win.addstr(message_row, 1, ">> Sent: ", curses.color_pair(2))
messages_win.addstr(message_row, 10, message + '\n')
@@ -112,7 +124,6 @@ def main(stdscr):
node = interface.getNode('^local')
device_channels = node.channels
selected_channel = 0
channel_output = []
for device_channel in device_channels: