mirror of
https://github.com/pdxlocations/contact.git
synced 2026-10-31 00:01:57 +01:00
a few very small, not particularly important changes
This commit is contained in:
3 files changed
+5
-4
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
venv/
|
||||||
+3
-4
@@ -1,7 +1,7 @@
|
|||||||
import curses
|
import curses
|
||||||
import meshtastic.serial_interface
|
import meshtastic.serial_interface
|
||||||
from pubsub import pub
|
from pubsub import pub
|
||||||
from meshtastic import config_pb2
|
from meshtastic import config_pb2, BROADCAST_NUM
|
||||||
|
|
||||||
# Initialize Meshtastic interface
|
# Initialize Meshtastic interface
|
||||||
interface = meshtastic.serial_interface.SerialInterface()
|
interface = meshtastic.serial_interface.SerialInterface()
|
||||||
@@ -12,7 +12,6 @@ channel_win = None
|
|||||||
message_row = 1
|
message_row = 1
|
||||||
selected_channel = 0
|
selected_channel = 0
|
||||||
# number_of_channels=0
|
# number_of_channels=0
|
||||||
BROADCAST_ADDR = 4294967295
|
|
||||||
|
|
||||||
def get_node_list():
|
def get_node_list():
|
||||||
node_list = []
|
node_list = []
|
||||||
@@ -22,7 +21,7 @@ def get_node_list():
|
|||||||
return node_list
|
return node_list
|
||||||
|
|
||||||
def decimal_to_hex(decimal_number):
|
def decimal_to_hex(decimal_number):
|
||||||
return "!" + hex(decimal_number)[2:]
|
return f"!{decimal_number:08x}"
|
||||||
|
|
||||||
def convert_to_camel_case(string):
|
def convert_to_camel_case(string):
|
||||||
words = string.split('_')
|
words = string.split('_')
|
||||||
@@ -69,7 +68,7 @@ def on_receive(packet, interface):
|
|||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
print(f"Error processing packet: {e}")
|
print(f"Error processing packet: {e}")
|
||||||
|
|
||||||
def send_message(message, destination=BROADCAST_ADDR, channel=0):
|
def send_message(message, destination=BROADCAST_NUM, channel=0):
|
||||||
global message_row, all_messages, selected_channel
|
global message_row, all_messages, selected_channel
|
||||||
|
|
||||||
interface.sendText(
|
interface.sendText(
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
meshtastic
|
||||||
Reference in new issue
Block a user