mirror of
https://github.com/meshtastic/python.git
synced 2025-12-26 01:17:51 -05:00
Compare commits
18 Commits
1.3alpha.8
...
1.2.93
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d205d8e9ba | ||
|
|
384ad456ae | ||
|
|
a99397468f | ||
|
|
f31297194a | ||
|
|
4dc3bea674 | ||
|
|
95f5d77c47 | ||
|
|
5034e2ca43 | ||
|
|
eb4f68fccc | ||
|
|
de03f8e1fb | ||
|
|
56f3e8a893 | ||
|
|
fbe0c09909 | ||
|
|
20c65974e9 | ||
|
|
96e42ac3f2 | ||
|
|
3912f5728a | ||
|
|
c016176520 | ||
|
|
e6999ba5ad | ||
|
|
5590dbeb6f | ||
|
|
e8a2909173 |
@@ -7,7 +7,7 @@
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=mqtt_pb2.py,channel_pb2.py,telemetry_pb2.py,admin_pb2.py,radioconfig_pb2.py,deviceonly_pb2.py,apponly_pb2.py,remote_hardware_pb2.py,portnums_pb2.py,mesh_pb2.py,storeforward_pb2.py,cannedmessages_pb2.py
|
||||
ignore-patterns=mqtt_pb2.py,channel_pb2.py,environmental_measurement_pb2.py,admin_pb2.py,radioconfig_pb2.py,deviceonly_pb2.py,apponly_pb2.py,remote_hardware_pb2.py,portnums_pb2.py,mesh_pb2.py,storeforward_pb2.py,cannedmessages_pb2.py
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
./nanopb-0.4.5/generator-bin/protoc -I=proto --python_out meshtastic `ls proto/*.proto`
|
||||
./nanopb-0.4.4/generator-bin/protoc -I=proto --python_out meshtastic `ls proto/*.proto`
|
||||
|
||||
# workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ from google.protobuf.json_format import MessageToJson
|
||||
from meshtastic.util import fixme, catchAndIgnore, stripnl, DeferredExecution, Timeout
|
||||
from meshtastic.node import Node
|
||||
from meshtastic import (mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2,
|
||||
telemetry_pb2, remote_hardware_pb2,
|
||||
environmental_measurement_pb2, remote_hardware_pb2,
|
||||
channel_pb2, radioconfig_pb2, util)
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ protocols = {
|
||||
portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User, _onNodeInfoReceive),
|
||||
portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage),
|
||||
portnums_pb2.PortNum.ROUTING_APP: KnownProtocol("routing", mesh_pb2.Routing),
|
||||
portnums_pb2.PortNum.TELEMETRY_APP: KnownProtocol("telemetry", telemetry_pb2.Telemetry),
|
||||
portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage)
|
||||
portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement),
|
||||
portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol(
|
||||
"remotehw", remote_hardware_pb2.HardwareMessage)
|
||||
}
|
||||
|
||||
@@ -119,6 +119,10 @@ def setPref(attributes, name, valStr):
|
||||
val = meshtastic.util.fromStr(valStr)
|
||||
logging.debug(f'valStr:{valStr} val:{val}')
|
||||
|
||||
if snake_name == 'wifi_password' and len(valStr) < 8:
|
||||
print(f"Warning: wifi_password must be 8 or more characters.")
|
||||
return
|
||||
|
||||
enumType = field.enum_type
|
||||
# pylint: disable=C0123
|
||||
if enumType and type(val) == str:
|
||||
@@ -139,22 +143,11 @@ def setPref(attributes, name, valStr):
|
||||
for temp_name in sorted(names):
|
||||
print(f" {temp_name}")
|
||||
return
|
||||
|
||||
# note: 'ignore_incoming' is a repeating field
|
||||
if snake_name != 'ignore_incoming':
|
||||
try:
|
||||
setattr(attributes, snake_name, val)
|
||||
except TypeError:
|
||||
# The setter didn't like our arg type guess try again as a string
|
||||
setattr(attributes, snake_name, valStr)
|
||||
else:
|
||||
if val == 0:
|
||||
# clear values
|
||||
print("Clearing ignore_incoming list")
|
||||
del attributes.ignore_incoming[:]
|
||||
else:
|
||||
print(f"Adding '{val}' to the ignore_incoming list")
|
||||
attributes.ignore_incoming.extend([val])
|
||||
try:
|
||||
setattr(attributes, snake_name, val)
|
||||
except TypeError:
|
||||
# The setter didn't like our arg type guess try again as a string
|
||||
setattr(attributes, snake_name, valStr)
|
||||
|
||||
if Globals.getInstance().get_camel_case():
|
||||
print(f"Set {camel_name} to {valStr}")
|
||||
@@ -450,8 +443,8 @@ def onConnected(interface):
|
||||
print(f"Deleting channel {channelIndex}")
|
||||
ch = interface.getNode(args.dest).deleteChannel(channelIndex)
|
||||
|
||||
ch_changes = [args.ch_vlongslow, args.ch_longslow, args.ch_longfast,
|
||||
args.ch_midslow, args.ch_midfast,
|
||||
ch_changes = [args.ch_longslow, args.ch_longfast,
|
||||
args.ch_mediumslow, args.ch_mediumfast,
|
||||
args.ch_shortslow, args.ch_shortfast]
|
||||
any_primary_channel_changes = any(x for x in ch_changes)
|
||||
if args.ch_set or any_primary_channel_changes or args.ch_enable or args.ch_disable:
|
||||
@@ -492,26 +485,23 @@ def onConnected(interface):
|
||||
ch.settings.CopyFrom(chs)
|
||||
|
||||
# handle the simple channel set commands
|
||||
if args.ch_vlongslow:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.VLongSlow)
|
||||
|
||||
if args.ch_longslow:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.LongSlow)
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.Bw125Cr48Sf4096)
|
||||
|
||||
if args.ch_longfast:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.LongFast)
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.Bw31_25Cr48Sf512)
|
||||
|
||||
if args.ch_midslow:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.MidSlow)
|
||||
if args.ch_mediumslow:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.Bw250Cr46Sf2048)
|
||||
|
||||
if args.ch_midfast:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.MidFast)
|
||||
if args.ch_mediumfast:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.Bw250Cr47Sf1024)
|
||||
|
||||
if args.ch_shortslow:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.ShortSlow)
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.Bw125Cr45Sf128)
|
||||
|
||||
if args.ch_shortfast:
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.ShortFast)
|
||||
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.Bw500Cr45Sf128)
|
||||
|
||||
# Handle the channel settings
|
||||
for pref in (args.ch_set or []):
|
||||
@@ -815,9 +805,6 @@ def initParser():
|
||||
"own key: '--ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --ch-index 0'."),
|
||||
nargs=2, action='append')
|
||||
|
||||
parser.add_argument(
|
||||
"--ch-vlongslow", help="Change to the very long-range and slow channel", action='store_true')
|
||||
|
||||
parser.add_argument(
|
||||
"--ch-longslow", help="Change to the long-range and slow channel", action='store_true')
|
||||
|
||||
@@ -825,10 +812,10 @@ def initParser():
|
||||
"--ch-longfast", help="Change to the long-range and fast channel", action='store_true')
|
||||
|
||||
parser.add_argument(
|
||||
"--ch-midslow", help="Change to the mid-range and slow channel", action='store_true')
|
||||
"--ch-mediumslow", help="Change to the medium-range and slow channel", action='store_true')
|
||||
|
||||
parser.add_argument(
|
||||
"--ch-midfast", help="Change to the mid-range and fast channel", action='store_true')
|
||||
"--ch-mediumfast", help="Change to the medium-range and fast channel", action='store_true')
|
||||
|
||||
parser.add_argument(
|
||||
"--ch-shortslow", help="Change to the short-range and slow channel", action='store_true')
|
||||
|
||||
@@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='',
|
||||
syntax='proto3',
|
||||
serialized_options=b'\n\023com.geeksville.meshB\013AdminProtosH\003Z!github.com/meshtastic/gomeshproto',
|
||||
serialized_pb=b'\n\x0b\x61\x64min.proto\x1a\rchannel.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\"\xa1\x08\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_radio_request\x18\x04 \x01(\x08H\x00\x12*\n\x12get_radio_response\x18\x05 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1d\n\x13get_channel_request\x18\x06 \x01(\rH\x00\x12(\n\x14get_channel_response\x18\x07 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_owner_request\x18\x08 \x01(\x08H\x00\x12#\n\x12get_owner_response\x18\t \x01(\x0b\x32\x05.UserH\x00\x12\x1d\n\x13\x63onfirm_set_channel\x18 \x01(\x08H\x00\x12\x1b\n\x11\x63onfirm_set_radio\x18! \x01(\x08H\x00\x12\x18\n\x0e\x65xit_simulator\x18\" \x01(\x08H\x00\x12\x18\n\x0ereboot_seconds\x18# \x01(\x05H\x00\x12\x31\n\'get_canned_message_module_part1_request\x18$ \x01(\x08H\x00\x12\x32\n(get_canned_message_module_part1_response\x18% \x01(\tH\x00\x12\x31\n\'get_canned_message_module_part2_request\x18& \x01(\x08H\x00\x12\x32\n(get_canned_message_module_part2_response\x18\' \x01(\tH\x00\x12\x31\n\'get_canned_message_module_part3_request\x18( \x01(\x08H\x00\x12\x32\n(get_canned_message_module_part3_response\x18) \x01(\tH\x00\x12\x31\n\'get_canned_message_module_part4_request\x18* \x01(\x08H\x00\x12\x32\n(get_canned_message_module_part4_response\x18+ \x01(\tH\x00\x12)\n\x1fset_canned_message_module_part1\x18, \x01(\tH\x00\x12)\n\x1fset_canned_message_module_part2\x18- \x01(\tH\x00\x12)\n\x1fset_canned_message_module_part3\x18. \x01(\tH\x00\x12)\n\x1fset_canned_message_module_part4\x18/ \x01(\tH\x00\x12\x1a\n\x10shutdown_seconds\x18\x33 \x01(\x05H\x00\x42\t\n\x07variantBG\n\x13\x63om.geeksville.meshB\x0b\x41\x64minProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
serialized_pb=b'\n\x0b\x61\x64min.proto\x1a\rchannel.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\"\xa1\x08\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_radio_request\x18\x04 \x01(\x08H\x00\x12*\n\x12get_radio_response\x18\x05 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1d\n\x13get_channel_request\x18\x06 \x01(\rH\x00\x12(\n\x14get_channel_response\x18\x07 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_owner_request\x18\x08 \x01(\x08H\x00\x12#\n\x12get_owner_response\x18\t \x01(\x0b\x32\x05.UserH\x00\x12\x1d\n\x13\x63onfirm_set_channel\x18 \x01(\x08H\x00\x12\x1b\n\x11\x63onfirm_set_radio\x18! \x01(\x08H\x00\x12\x18\n\x0e\x65xit_simulator\x18\" \x01(\x08H\x00\x12\x18\n\x0ereboot_seconds\x18# \x01(\x05H\x00\x12\x31\n\'get_canned_message_plugin_part1_request\x18$ \x01(\x08H\x00\x12\x32\n(get_canned_message_plugin_part1_response\x18% \x01(\tH\x00\x12\x31\n\'get_canned_message_plugin_part2_request\x18& \x01(\x08H\x00\x12\x32\n(get_canned_message_plugin_part2_response\x18\' \x01(\tH\x00\x12\x31\n\'get_canned_message_plugin_part3_request\x18( \x01(\x08H\x00\x12\x32\n(get_canned_message_plugin_part3_response\x18) \x01(\tH\x00\x12\x31\n\'get_canned_message_plugin_part4_request\x18* \x01(\x08H\x00\x12\x32\n(get_canned_message_plugin_part4_response\x18+ \x01(\tH\x00\x12)\n\x1fset_canned_message_plugin_part1\x18, \x01(\tH\x00\x12)\n\x1fset_canned_message_plugin_part2\x18- \x01(\tH\x00\x12)\n\x1fset_canned_message_plugin_part3\x18. \x01(\tH\x00\x12)\n\x1fset_canned_message_plugin_part4\x18/ \x01(\tH\x00\x12\x1a\n\x10shutdown_seconds\x18\x33 \x01(\x05H\x00\x42\t\n\x07variantBG\n\x13\x63om.geeksville.meshB\x0b\x41\x64minProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
,
|
||||
dependencies=[channel__pb2.DESCRIPTOR,mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,])
|
||||
|
||||
@@ -127,84 +127,84 @@ _ADMINMESSAGE = _descriptor.Descriptor(
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part1_request', full_name='AdminMessage.get_canned_message_module_part1_request', index=13,
|
||||
name='get_canned_message_plugin_part1_request', full_name='AdminMessage.get_canned_message_plugin_part1_request', index=13,
|
||||
number=36, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part1_response', full_name='AdminMessage.get_canned_message_module_part1_response', index=14,
|
||||
name='get_canned_message_plugin_part1_response', full_name='AdminMessage.get_canned_message_plugin_part1_response', index=14,
|
||||
number=37, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part2_request', full_name='AdminMessage.get_canned_message_module_part2_request', index=15,
|
||||
name='get_canned_message_plugin_part2_request', full_name='AdminMessage.get_canned_message_plugin_part2_request', index=15,
|
||||
number=38, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part2_response', full_name='AdminMessage.get_canned_message_module_part2_response', index=16,
|
||||
name='get_canned_message_plugin_part2_response', full_name='AdminMessage.get_canned_message_plugin_part2_response', index=16,
|
||||
number=39, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part3_request', full_name='AdminMessage.get_canned_message_module_part3_request', index=17,
|
||||
name='get_canned_message_plugin_part3_request', full_name='AdminMessage.get_canned_message_plugin_part3_request', index=17,
|
||||
number=40, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part3_response', full_name='AdminMessage.get_canned_message_module_part3_response', index=18,
|
||||
name='get_canned_message_plugin_part3_response', full_name='AdminMessage.get_canned_message_plugin_part3_response', index=18,
|
||||
number=41, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part4_request', full_name='AdminMessage.get_canned_message_module_part4_request', index=19,
|
||||
name='get_canned_message_plugin_part4_request', full_name='AdminMessage.get_canned_message_plugin_part4_request', index=19,
|
||||
number=42, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='get_canned_message_module_part4_response', full_name='AdminMessage.get_canned_message_module_part4_response', index=20,
|
||||
name='get_canned_message_plugin_part4_response', full_name='AdminMessage.get_canned_message_plugin_part4_response', index=20,
|
||||
number=43, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='set_canned_message_module_part1', full_name='AdminMessage.set_canned_message_module_part1', index=21,
|
||||
name='set_canned_message_plugin_part1', full_name='AdminMessage.set_canned_message_plugin_part1', index=21,
|
||||
number=44, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='set_canned_message_module_part2', full_name='AdminMessage.set_canned_message_module_part2', index=22,
|
||||
name='set_canned_message_plugin_part2', full_name='AdminMessage.set_canned_message_plugin_part2', index=22,
|
||||
number=45, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='set_canned_message_module_part3', full_name='AdminMessage.set_canned_message_module_part3', index=23,
|
||||
name='set_canned_message_plugin_part3', full_name='AdminMessage.set_canned_message_plugin_part3', index=23,
|
||||
number=46, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='set_canned_message_module_part4', full_name='AdminMessage.set_canned_message_module_part4', index=24,
|
||||
name='set_canned_message_plugin_part4', full_name='AdminMessage.set_canned_message_plugin_part4', index=24,
|
||||
number=47, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
@@ -282,41 +282,41 @@ _ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['reboot_seconds'])
|
||||
_ADMINMESSAGE.fields_by_name['reboot_seconds'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part1_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part1_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part1_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part1_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part1_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part1_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part1_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part1_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part2_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part2_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part2_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part2_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part2_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part2_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part2_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part2_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part3_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part3_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part3_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part3_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part3_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part3_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part3_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part3_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part4_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part4_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part4_request'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part4_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part4_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_module_part4_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part4_response'])
|
||||
_ADMINMESSAGE.fields_by_name['get_canned_message_plugin_part4_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part1'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part1'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part1'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part1'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part2'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part2'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part2'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part2'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part3'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part3'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part3'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part3'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part4'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_module_part4'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part4'])
|
||||
_ADMINMESSAGE.fields_by_name['set_canned_message_plugin_part4'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
|
||||
_ADMINMESSAGE.fields_by_name['shutdown_seconds'])
|
||||
_ADMINMESSAGE.fields_by_name['shutdown_seconds'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
|
||||
|
||||
@@ -18,42 +18,42 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='',
|
||||
syntax='proto3',
|
||||
serialized_options=b'\n\023com.geeksville.meshB\031CannedMessageConfigProtosH\003Z!github.com/meshtastic/gomeshproto',
|
||||
serialized_pb=b'\n\x14\x63\x61nnedmessages.proto\"w\n\x19\x43\x61nnedMessageModuleConfig\x12\x15\n\rmessagesPart1\x18\x0b \x01(\t\x12\x15\n\rmessagesPart2\x18\x0c \x01(\t\x12\x15\n\rmessagesPart3\x18\r \x01(\t\x12\x15\n\rmessagesPart4\x18\x0e \x01(\tBU\n\x13\x63om.geeksville.meshB\x19\x43\x61nnedMessageConfigProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
serialized_pb=b'\n\x14\x63\x61nnedmessages.proto\"w\n\x19\x43\x61nnedMessagePluginConfig\x12\x15\n\rmessagesPart1\x18\x0b \x01(\t\x12\x15\n\rmessagesPart2\x18\x0c \x01(\t\x12\x15\n\rmessagesPart3\x18\r \x01(\t\x12\x15\n\rmessagesPart4\x18\x0e \x01(\tBU\n\x13\x63om.geeksville.meshB\x19\x43\x61nnedMessageConfigProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
_CANNEDMESSAGEMODULECONFIG = _descriptor.Descriptor(
|
||||
name='CannedMessageModuleConfig',
|
||||
full_name='CannedMessageModuleConfig',
|
||||
_CANNEDMESSAGEPLUGINCONFIG = _descriptor.Descriptor(
|
||||
name='CannedMessagePluginConfig',
|
||||
full_name='CannedMessagePluginConfig',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='messagesPart1', full_name='CannedMessageModuleConfig.messagesPart1', index=0,
|
||||
name='messagesPart1', full_name='CannedMessagePluginConfig.messagesPart1', index=0,
|
||||
number=11, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='messagesPart2', full_name='CannedMessageModuleConfig.messagesPart2', index=1,
|
||||
name='messagesPart2', full_name='CannedMessagePluginConfig.messagesPart2', index=1,
|
||||
number=12, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='messagesPart3', full_name='CannedMessageModuleConfig.messagesPart3', index=2,
|
||||
name='messagesPart3', full_name='CannedMessagePluginConfig.messagesPart3', index=2,
|
||||
number=13, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='messagesPart4', full_name='CannedMessageModuleConfig.messagesPart4', index=3,
|
||||
name='messagesPart4', full_name='CannedMessagePluginConfig.messagesPart4', index=3,
|
||||
number=14, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=b"".decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
@@ -75,15 +75,15 @@ _CANNEDMESSAGEMODULECONFIG = _descriptor.Descriptor(
|
||||
serialized_end=143,
|
||||
)
|
||||
|
||||
DESCRIPTOR.message_types_by_name['CannedMessageModuleConfig'] = _CANNEDMESSAGEMODULECONFIG
|
||||
DESCRIPTOR.message_types_by_name['CannedMessagePluginConfig'] = _CANNEDMESSAGEPLUGINCONFIG
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
CannedMessageModuleConfig = _reflection.GeneratedProtocolMessageType('CannedMessageModuleConfig', (_message.Message,), {
|
||||
'DESCRIPTOR' : _CANNEDMESSAGEMODULECONFIG,
|
||||
CannedMessagePluginConfig = _reflection.GeneratedProtocolMessageType('CannedMessagePluginConfig', (_message.Message,), {
|
||||
'DESCRIPTOR' : _CANNEDMESSAGEPLUGINCONFIG,
|
||||
'__module__' : 'cannedmessages_pb2'
|
||||
# @@protoc_insertion_point(class_scope:CannedMessageModuleConfig)
|
||||
# @@protoc_insertion_point(class_scope:CannedMessagePluginConfig)
|
||||
})
|
||||
_sym_db.RegisterMessage(CannedMessageModuleConfig)
|
||||
_sym_db.RegisterMessage(CannedMessagePluginConfig)
|
||||
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
|
||||
@@ -18,7 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='',
|
||||
syntax='proto3',
|
||||
serialized_options=b'\n\023com.geeksville.meshB\rChannelProtosH\003Z!github.com/meshtastic/gomeshproto',
|
||||
serialized_pb=b'\n\rchannel.proto\"\xf6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"p\n\x0bModemConfig\x12\r\n\tVLongSlow\x10\x00\x12\x0c\n\x08LongSlow\x10\x01\x12\x0c\n\x08LongFast\x10\x02\x12\x0b\n\x07MidSlow\x10\x03\x12\x0b\n\x07MidFast\x10\x04\x12\r\n\tShortSlow\x10\x05\x12\r\n\tShortFast\x10\x06\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\x05\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\x42I\n\x13\x63om.geeksville.meshB\rChannelProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
serialized_pb=b'\n\rchannel.proto\"\x91\x03\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"\x8a\x01\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\x12\x13\n\x0f\x42w250Cr46Sf2048\x10\x04\x12\x13\n\x0f\x42w250Cr47Sf1024\x10\x05\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\x05\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\x42I\n\x13\x63om.geeksville.meshB\rChannelProtosH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
)
|
||||
|
||||
|
||||
@@ -30,38 +30,34 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor(
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='VLongSlow', index=0, number=0,
|
||||
name='Bw125Cr45Sf128', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='LongSlow', index=1, number=1,
|
||||
name='Bw500Cr45Sf128', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='LongFast', index=2, number=2,
|
||||
name='Bw31_25Cr48Sf512', index=2, number=2,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='MidSlow', index=3, number=3,
|
||||
name='Bw125Cr48Sf4096', index=3, number=3,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='MidFast', index=4, number=4,
|
||||
name='Bw250Cr46Sf2048', index=4, number=4,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='ShortSlow', index=5, number=5,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='ShortFast', index=6, number=6,
|
||||
name='Bw250Cr47Sf1024', index=5, number=5,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=280,
|
||||
serialized_end=392,
|
||||
serialized_start=281,
|
||||
serialized_end=419,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG)
|
||||
|
||||
@@ -86,8 +82,8 @@ _CHANNEL_ROLE = _descriptor.EnumDescriptor(
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=486,
|
||||
serialized_end=534,
|
||||
serialized_start=513,
|
||||
serialized_end=561,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_CHANNEL_ROLE)
|
||||
|
||||
@@ -190,7 +186,7 @@ _CHANNELSETTINGS = _descriptor.Descriptor(
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=18,
|
||||
serialized_end=392,
|
||||
serialized_end=419,
|
||||
)
|
||||
|
||||
|
||||
@@ -235,8 +231,8 @@ _CHANNEL = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=395,
|
||||
serialized_end=534,
|
||||
serialized_start=422,
|
||||
serialized_end=561,
|
||||
)
|
||||
|
||||
_CHANNELSETTINGS.fields_by_name['modem_config'].enum_type = _CHANNELSETTINGS_MODEMCONFIG
|
||||
|
||||
@@ -13,6 +13,7 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
from . import channel_pb2 as channel__pb2
|
||||
from . import mesh_pb2 as mesh__pb2
|
||||
from . import radioconfig_pb2 as radioconfig__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
@@ -20,13 +21,74 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='',
|
||||
syntax='proto3',
|
||||
serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003Z!github.com/meshtastic/gomeshproto',
|
||||
serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\rchannel.proto\x1a\nmesh.proto\"\xe6\x01\n\x0b\x44\x65viceState\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08J\x04\x08\x0c\x10\r\")\n\x0b\x43hannelFile\x12\x1a\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x08.ChannelBF\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\rchannel.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\"\x80\x01\n\x11LegacyRadioConfig\x12\x39\n\x0bpreferences\x18\x01 \x01(\x0b\x32$.LegacyRadioConfig.LegacyPreferences\x1a\x30\n\x11LegacyPreferences\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\"\x8f\x02\n\x0b\x44\x65viceState\x12\'\n\x0blegacyRadio\x18\x01 \x01(\x0b\x32\x12.LegacyRadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08J\x04\x08\x0c\x10\r\")\n\x0b\x43hannelFile\x12\x1a\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x08.ChannelBF\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
,
|
||||
dependencies=[channel__pb2.DESCRIPTOR,mesh__pb2.DESCRIPTOR,])
|
||||
dependencies=[channel__pb2.DESCRIPTOR,mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,])
|
||||
|
||||
|
||||
|
||||
|
||||
_LEGACYRADIOCONFIG_LEGACYPREFERENCES = _descriptor.Descriptor(
|
||||
name='LegacyPreferences',
|
||||
full_name='LegacyRadioConfig.LegacyPreferences',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='region', full_name='LegacyRadioConfig.LegacyPreferences.region', index=0,
|
||||
number=15, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=147,
|
||||
serialized_end=195,
|
||||
)
|
||||
|
||||
_LEGACYRADIOCONFIG = _descriptor.Descriptor(
|
||||
name='LegacyRadioConfig',
|
||||
full_name='LegacyRadioConfig',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='preferences', full_name='LegacyRadioConfig.preferences', index=0,
|
||||
number=1, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[_LEGACYRADIOCONFIG_LEGACYPREFERENCES, ],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=67,
|
||||
serialized_end=195,
|
||||
)
|
||||
|
||||
|
||||
_DEVICESTATE = _descriptor.Descriptor(
|
||||
name='DeviceState',
|
||||
full_name='DeviceState',
|
||||
@@ -35,56 +97,63 @@ _DEVICESTATE = _descriptor.Descriptor(
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='my_node', full_name='DeviceState.my_node', index=0,
|
||||
name='legacyRadio', full_name='DeviceState.legacyRadio', index=0,
|
||||
number=1, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='my_node', full_name='DeviceState.my_node', index=1,
|
||||
number=2, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='owner', full_name='DeviceState.owner', index=1,
|
||||
name='owner', full_name='DeviceState.owner', index=2,
|
||||
number=3, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='node_db', full_name='DeviceState.node_db', index=2,
|
||||
name='node_db', full_name='DeviceState.node_db', index=3,
|
||||
number=4, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='receive_queue', full_name='DeviceState.receive_queue', index=3,
|
||||
name='receive_queue', full_name='DeviceState.receive_queue', index=4,
|
||||
number=5, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='version', full_name='DeviceState.version', index=4,
|
||||
name='version', full_name='DeviceState.version', index=5,
|
||||
number=8, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='rx_text_message', full_name='DeviceState.rx_text_message', index=5,
|
||||
name='rx_text_message', full_name='DeviceState.rx_text_message', index=6,
|
||||
number=7, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='no_save', full_name='DeviceState.no_save', index=6,
|
||||
name='no_save', full_name='DeviceState.no_save', index=7,
|
||||
number=9, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='did_gps_reset', full_name='DeviceState.did_gps_reset', index=7,
|
||||
name='did_gps_reset', full_name='DeviceState.did_gps_reset', index=8,
|
||||
number=11, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
@@ -102,8 +171,8 @@ _DEVICESTATE = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=48,
|
||||
serialized_end=278,
|
||||
serialized_start=198,
|
||||
serialized_end=469,
|
||||
)
|
||||
|
||||
|
||||
@@ -133,20 +202,40 @@ _CHANNELFILE = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=280,
|
||||
serialized_end=321,
|
||||
serialized_start=471,
|
||||
serialized_end=512,
|
||||
)
|
||||
|
||||
_LEGACYRADIOCONFIG_LEGACYPREFERENCES.fields_by_name['region'].enum_type = radioconfig__pb2._REGIONCODE
|
||||
_LEGACYRADIOCONFIG_LEGACYPREFERENCES.containing_type = _LEGACYRADIOCONFIG
|
||||
_LEGACYRADIOCONFIG.fields_by_name['preferences'].message_type = _LEGACYRADIOCONFIG_LEGACYPREFERENCES
|
||||
_DEVICESTATE.fields_by_name['legacyRadio'].message_type = _LEGACYRADIOCONFIG
|
||||
_DEVICESTATE.fields_by_name['my_node'].message_type = mesh__pb2._MYNODEINFO
|
||||
_DEVICESTATE.fields_by_name['owner'].message_type = mesh__pb2._USER
|
||||
_DEVICESTATE.fields_by_name['node_db'].message_type = mesh__pb2._NODEINFO
|
||||
_DEVICESTATE.fields_by_name['receive_queue'].message_type = mesh__pb2._MESHPACKET
|
||||
_DEVICESTATE.fields_by_name['rx_text_message'].message_type = mesh__pb2._MESHPACKET
|
||||
_CHANNELFILE.fields_by_name['channels'].message_type = channel__pb2._CHANNEL
|
||||
DESCRIPTOR.message_types_by_name['LegacyRadioConfig'] = _LEGACYRADIOCONFIG
|
||||
DESCRIPTOR.message_types_by_name['DeviceState'] = _DEVICESTATE
|
||||
DESCRIPTOR.message_types_by_name['ChannelFile'] = _CHANNELFILE
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
LegacyRadioConfig = _reflection.GeneratedProtocolMessageType('LegacyRadioConfig', (_message.Message,), {
|
||||
|
||||
'LegacyPreferences' : _reflection.GeneratedProtocolMessageType('LegacyPreferences', (_message.Message,), {
|
||||
'DESCRIPTOR' : _LEGACYRADIOCONFIG_LEGACYPREFERENCES,
|
||||
'__module__' : 'deviceonly_pb2'
|
||||
# @@protoc_insertion_point(class_scope:LegacyRadioConfig.LegacyPreferences)
|
||||
})
|
||||
,
|
||||
'DESCRIPTOR' : _LEGACYRADIOCONFIG,
|
||||
'__module__' : 'deviceonly_pb2'
|
||||
# @@protoc_insertion_point(class_scope:LegacyRadioConfig)
|
||||
})
|
||||
_sym_db.RegisterMessage(LegacyRadioConfig)
|
||||
_sym_db.RegisterMessage(LegacyRadioConfig.LegacyPreferences)
|
||||
|
||||
DeviceState = _reflection.GeneratedProtocolMessageType('DeviceState', (_message.Message,), {
|
||||
'DESCRIPTOR' : _DEVICESTATE,
|
||||
'__module__' : 'deviceonly_pb2'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: telemetry.proto
|
||||
# source: environmental_measurement.proto
|
||||
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
@@ -14,60 +14,60 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='telemetry.proto',
|
||||
name='environmental_measurement.proto',
|
||||
package='',
|
||||
syntax='proto3',
|
||||
serialized_options=b'Z!github.com/meshtastic/gomeshproto',
|
||||
serialized_pb=b'\n\x0ftelemetry.proto\"\x92\x01\n\tTelemetry\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x12\x16\n\x0egas_resistance\x18\x04 \x01(\x02\x12\x0f\n\x07voltage\x18\x05 \x01(\x02\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x02\x42#Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
serialized_pb=b'\n\x1f\x65nvironmental_measurement.proto\"\xa1\x01\n\x18\x45nvironmentalMeasurement\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x12\x16\n\x0egas_resistance\x18\x04 \x01(\x02\x12\x0f\n\x07voltage\x18\x05 \x01(\x02\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x02\x42#Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
_TELEMETRY = _descriptor.Descriptor(
|
||||
name='Telemetry',
|
||||
full_name='Telemetry',
|
||||
_ENVIRONMENTALMEASUREMENT = _descriptor.Descriptor(
|
||||
name='EnvironmentalMeasurement',
|
||||
full_name='EnvironmentalMeasurement',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='temperature', full_name='Telemetry.temperature', index=0,
|
||||
name='temperature', full_name='EnvironmentalMeasurement.temperature', index=0,
|
||||
number=1, type=2, cpp_type=6, label=1,
|
||||
has_default_value=False, default_value=float(0),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='relative_humidity', full_name='Telemetry.relative_humidity', index=1,
|
||||
name='relative_humidity', full_name='EnvironmentalMeasurement.relative_humidity', index=1,
|
||||
number=2, type=2, cpp_type=6, label=1,
|
||||
has_default_value=False, default_value=float(0),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='barometric_pressure', full_name='Telemetry.barometric_pressure', index=2,
|
||||
name='barometric_pressure', full_name='EnvironmentalMeasurement.barometric_pressure', index=2,
|
||||
number=3, type=2, cpp_type=6, label=1,
|
||||
has_default_value=False, default_value=float(0),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='gas_resistance', full_name='Telemetry.gas_resistance', index=3,
|
||||
name='gas_resistance', full_name='EnvironmentalMeasurement.gas_resistance', index=3,
|
||||
number=4, type=2, cpp_type=6, label=1,
|
||||
has_default_value=False, default_value=float(0),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='voltage', full_name='Telemetry.voltage', index=4,
|
||||
name='voltage', full_name='EnvironmentalMeasurement.voltage', index=4,
|
||||
number=5, type=2, cpp_type=6, label=1,
|
||||
has_default_value=False, default_value=float(0),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='current', full_name='Telemetry.current', index=5,
|
||||
name='current', full_name='EnvironmentalMeasurement.current', index=5,
|
||||
number=6, type=2, cpp_type=6, label=1,
|
||||
has_default_value=False, default_value=float(0),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
@@ -85,19 +85,19 @@ _TELEMETRY = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=20,
|
||||
serialized_end=166,
|
||||
serialized_start=36,
|
||||
serialized_end=197,
|
||||
)
|
||||
|
||||
DESCRIPTOR.message_types_by_name['Telemetry'] = _TELEMETRY
|
||||
DESCRIPTOR.message_types_by_name['EnvironmentalMeasurement'] = _ENVIRONMENTALMEASUREMENT
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Telemetry = _reflection.GeneratedProtocolMessageType('Telemetry', (_message.Message,), {
|
||||
'DESCRIPTOR' : _TELEMETRY,
|
||||
'__module__' : 'telemetry_pb2'
|
||||
# @@protoc_insertion_point(class_scope:Telemetry)
|
||||
EnvironmentalMeasurement = _reflection.GeneratedProtocolMessageType('EnvironmentalMeasurement', (_message.Message,), {
|
||||
'DESCRIPTOR' : _ENVIRONMENTALMEASUREMENT,
|
||||
'__module__' : 'environmental_measurement_pb2'
|
||||
# @@protoc_insertion_point(class_scope:EnvironmentalMeasurement)
|
||||
})
|
||||
_sym_db.RegisterMessage(Telemetry)
|
||||
_sym_db.RegisterMessage(EnvironmentalMeasurement)
|
||||
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='',
|
||||
syntax='proto3',
|
||||
serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003Z!github.com/meshtastic/gomeshproto',
|
||||
serialized_pb=b'\n\x0eportnums.proto*\xbb\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x11\n\rTELEMETRY_APP\x10\x43\x12\x0b\n\x07ZPS_APP\x10\x44\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42\x44\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
serialized_pb=b'\n\x0eportnums.proto*\xcb\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x0b\n\x07ZPS_APP\x10\x44\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42\x44\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03Z!github.com/meshtastic/gomeshprotob\x06proto3'
|
||||
)
|
||||
|
||||
_PORTNUM = _descriptor.EnumDescriptor(
|
||||
@@ -77,7 +77,7 @@ _PORTNUM = _descriptor.EnumDescriptor(
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='TELEMETRY_APP', index=12, number=67,
|
||||
name='ENVIRONMENTAL_MEASUREMENT_APP', index=12, number=67,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
@@ -100,7 +100,7 @@ _PORTNUM = _descriptor.EnumDescriptor(
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=19,
|
||||
serialized_end=334,
|
||||
serialized_end=350,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_PORTNUM)
|
||||
|
||||
@@ -117,7 +117,7 @@ IP_TUNNEL_APP = 33
|
||||
SERIAL_APP = 64
|
||||
STORE_FORWARD_APP = 65
|
||||
RANGE_TEST_APP = 66
|
||||
TELEMETRY_APP = 67
|
||||
ENVIRONMENTAL_MEASUREMENT_APP = 67
|
||||
ZPS_APP = 68
|
||||
PRIVATE_APP = 256
|
||||
ATAK_FORWARDER = 257
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -47,6 +47,9 @@ tlora_v1_3 = SupportedDevice(name="T-Lora", version="1.3", for_firmware="tlora-v
|
||||
tlora_v2 = SupportedDevice(name="T-Lora", version="2", for_firmware="tlora-v2",
|
||||
baseport_on_linux="ttyACM", baseport_on_mac="cu.usbmodem",
|
||||
usb_vendor_id_in_hex="1a86", usb_product_id_in_hex="55d4")
|
||||
tlora_v2_1 = SupportedDevice(name="T-Lora", version="2.1", for_firmware="tlora-v2-1",
|
||||
baseport_on_linux="ttyACM", baseport_on_mac="cu.usbmodem",
|
||||
usb_vendor_id_in_hex="1a86", usb_product_id_in_hex="55d4")
|
||||
tlora_v2_1_1_6 = SupportedDevice(name="T-Lora", version="2.1-1.6", for_firmware="tlora-v2-1-1.6",
|
||||
baseport_on_linux="ttyACM", baseport_on_mac="cu.usbmodem",
|
||||
usb_vendor_id_in_hex="1a86", usb_product_id_in_hex="55d4")
|
||||
@@ -80,7 +83,7 @@ rak4631_19003 = SupportedDevice(name="RAK 4631 19003", version="", for_firmware=
|
||||
usb_vendor_id_in_hex="239a", usb_product_id_in_hex="8029")
|
||||
|
||||
supported_devices = [tbeam_v0_7, tbeam_v1_1, tbeam_M8N, tbeam_M8N_SX1262,
|
||||
tlora_v1, tlora_v1_3, tlora_v2, tlora_v2_1_1_6,
|
||||
tlora_v1, tlora_v1_3, tlora_v2, tlora_v2_1, tlora_v2_1_1_6,
|
||||
heltec_v1, heltec_v2_0, heltec_v2_1,
|
||||
meshtastic_diy_v1, techo_1, rak4631_5005, rak4631_19003,
|
||||
rak11200]
|
||||
|
||||
@@ -46,7 +46,7 @@ def test_main_init_parser_version(capsys):
|
||||
assert pytest_wrapped_e.type == SystemExit
|
||||
assert pytest_wrapped_e.value.code == 0
|
||||
out, err = capsys.readouterr()
|
||||
assert re.match(r'[0-9]+\.[0-9]+[\.a][0-9]', out)
|
||||
assert re.match(r'[0-9]+\.[0-9]+\.[0-9]', out)
|
||||
assert err == ''
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ def test_main_main_version(capsys):
|
||||
assert pytest_wrapped_e.type == SystemExit
|
||||
assert pytest_wrapped_e.value.code == 0
|
||||
out, err = capsys.readouterr()
|
||||
assert re.match(r'[0-9]+\.[0-9]+[\.a][0-9]', out)
|
||||
assert re.match(r'[0-9]+\.[0-9]+\.[0-9]', out)
|
||||
assert err == ''
|
||||
|
||||
|
||||
@@ -902,6 +902,27 @@ def test_main_set_valid_wifi_passwd(capsys):
|
||||
mo.assert_called()
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_globals")
|
||||
def test_main_set_invalid_wifi_passwd(capsys):
|
||||
"""Test --set with an invalid value (password must be 8 or more characters)"""
|
||||
sys.argv = ['', '--set', 'wifi_password', '1234567']
|
||||
Globals.getInstance().set_args(sys.argv)
|
||||
|
||||
mocked_node = MagicMock(autospec=Node)
|
||||
|
||||
iface = MagicMock(autospec=SerialInterface)
|
||||
iface.getNode.return_value = mocked_node
|
||||
|
||||
with patch('meshtastic.serial_interface.SerialInterface', return_value=iface) as mo:
|
||||
main()
|
||||
out, err = capsys.readouterr()
|
||||
assert re.search(r'Connected to radio', out, re.MULTILINE)
|
||||
assert not re.search(r'Set wifi_password to 1234567', out, re.MULTILINE)
|
||||
assert re.search(r'Warning: wifi_password must be 8 or more characters.', out, re.MULTILINE)
|
||||
assert err == ''
|
||||
mo.assert_called()
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_globals")
|
||||
def test_main_set_valid_camel_case(capsys):
|
||||
@@ -1285,8 +1306,8 @@ def test_main_ch_enable_primary_channel(capsys):
|
||||
@pytest.mark.usefixtures("reset_globals")
|
||||
def test_main_ch_range_options(capsys):
|
||||
"""Test changing the various range options."""
|
||||
range_options = ['--ch-vlongslow', '--ch-longslow', '--ch-longfast', '--ch-midslow',
|
||||
'--ch-midfast', '--ch-shortslow', '--ch-shortfast']
|
||||
range_options = ['--ch-longslow', '--ch-longfast', '--ch-mediumslow',
|
||||
'--ch-mediumfast', '--ch-shortslow', '--ch-shortfast']
|
||||
for range_option in range_options:
|
||||
sys.argv = ['', f"{range_option}" ]
|
||||
Globals.getInstance().set_args(sys.argv)
|
||||
@@ -2331,54 +2352,6 @@ def test_main_setPref_invalid_field_camel(capsys):
|
||||
assert err == ''
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_globals")
|
||||
def test_main_setPref_ignore_incoming_123(capsys):
|
||||
"""Test setPref() with ignore_incoming"""
|
||||
|
||||
class Field:
|
||||
"""Simple class for testing."""
|
||||
|
||||
def __init__(self, name, enum_type):
|
||||
"""constructor"""
|
||||
self.name = name
|
||||
self.enum_type = enum_type
|
||||
|
||||
ignore_incoming_field = Field('ignore_incoming', 'list')
|
||||
prefs = MagicMock()
|
||||
prefs.DESCRIPTOR.fields_by_name.get.return_value = ignore_incoming_field
|
||||
|
||||
setPref(prefs, 'ignore_incoming', '123')
|
||||
out, err = capsys.readouterr()
|
||||
assert re.search(r"Adding '123' to the ignore_incoming list", out, re.MULTILINE)
|
||||
assert re.search(r'Set ignore_incoming to 123', out, re.MULTILINE)
|
||||
assert err == ''
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_globals")
|
||||
def test_main_setPref_ignore_incoming_0(capsys):
|
||||
"""Test setPref() with ignore_incoming"""
|
||||
|
||||
class Field:
|
||||
"""Simple class for testing."""
|
||||
|
||||
def __init__(self, name, enum_type):
|
||||
"""constructor"""
|
||||
self.name = name
|
||||
self.enum_type = enum_type
|
||||
|
||||
ignore_incoming_field = Field('ignore_incoming', 'list')
|
||||
prefs = MagicMock()
|
||||
prefs.DESCRIPTOR.fields_by_name.get.return_value = ignore_incoming_field
|
||||
|
||||
setPref(prefs, 'ignore_incoming', '0')
|
||||
out, err = capsys.readouterr()
|
||||
assert re.search(r'Clearing ignore_incoming list', out, re.MULTILINE)
|
||||
assert re.search(r'Set ignore_incoming to 0', out, re.MULTILINE)
|
||||
assert err == ''
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_globals")
|
||||
def test_main_ch_set_psk_no_ch_index(capsys):
|
||||
|
||||
@@ -213,13 +213,13 @@ def test_handleFromRadio_with_my_info(caplog):
|
||||
# It "translates" to this:
|
||||
# my_info {
|
||||
# my_node_num: 682584012
|
||||
# num_bands: 13
|
||||
# firmware_version: "1.2.49.5354c49"
|
||||
# reboot_count: 13
|
||||
# bitrate: 17.088470458984375
|
||||
# message_timeout_msec: 300000
|
||||
# min_app_version: 20200
|
||||
# max_channels: 8
|
||||
# has_wifi: true
|
||||
# }
|
||||
from_radio_bytes = b'\x1a,\x08\xcc\xcf\xbd\xc5\x02\x18\r2\x0e1.2.49.5354c49P\r]0\xb5\x88Ah\xe0\xa7\x12p\xe8\x9d\x01x\x08\x90\x01\x01'
|
||||
iface = MeshInterface(noProto=True)
|
||||
@@ -227,6 +227,7 @@ def test_handleFromRadio_with_my_info(caplog):
|
||||
iface._handleFromRadio(from_radio_bytes)
|
||||
iface.close()
|
||||
assert re.search(r'Received myinfo', caplog.text, re.MULTILINE)
|
||||
assert re.search(r'num_bands: 13', caplog.text, re.MULTILINE)
|
||||
assert re.search(r'max_channels: 8', caplog.text, re.MULTILINE)
|
||||
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ def test_setURL_valid_URL(caplog):
|
||||
anode.channels = channels
|
||||
anode.setURL(url)
|
||||
assert re.search(r'Channel i:0', caplog.text, re.MULTILINE)
|
||||
assert re.search(r'modem_config: MidSlow', caplog.text, re.MULTILINE)
|
||||
assert re.search(r'modem_config: Bw125Cr48Sf4096', caplog.text, re.MULTILINE)
|
||||
assert re.search(r'psk: "\\001"', caplog.text, re.MULTILINE)
|
||||
assert re.search(r'role: PRIMARY', caplog.text, re.MULTILINE)
|
||||
|
||||
@@ -335,7 +335,7 @@ def test_showChannels(capsys):
|
||||
# primary channel
|
||||
assert re.search(r'Primary channel URL', out, re.MULTILINE)
|
||||
assert re.search(r'PRIMARY psk=default ', out, re.MULTILINE)
|
||||
assert re.search(r'"modemConfig": "MidSlow"', out, re.MULTILINE)
|
||||
assert re.search(r'"modemConfig": "Bw125Cr48Sf4096"', out, re.MULTILINE)
|
||||
assert re.search(r'"psk": "AQ=="', out, re.MULTILINE)
|
||||
# secondary channel
|
||||
assert re.search(r'SECONDARY psk=secret ', out, re.MULTILINE)
|
||||
|
||||
@@ -337,9 +337,9 @@ def test_eliminate_duplicate_port():
|
||||
assert eliminate_duplicate_port(['/dev/cu.SLAB_USBtoUART', '/dev/cu.usbserial-0001']) == ['/dev/cu.usbserial-0001']
|
||||
assert eliminate_duplicate_port(['/dev/cu.usbserial-0001', '/dev/cu.SLAB_USBtoUART']) == ['/dev/cu.usbserial-0001']
|
||||
assert eliminate_duplicate_port(['/dev/cu.usbmodem11301', '/dev/cu.wchusbserial11301']) == ['/dev/cu.wchusbserial11301']
|
||||
assert eliminate_duplicate_port(['/dev/cu.wchusbserial11301', '/dev/cu.usbmodem11301']) == ['/dev/cu.wchusbserial11301']
|
||||
assert eliminate_duplicate_port(['/dev/cu.usbmodem53230051441', '/dev/cu.wchusbserial53230051441']) == ['/dev/cu.wchusbserial53230051441']
|
||||
assert eliminate_duplicate_port(['/dev/cu.wchusbserial53230051441', '/dev/cu.usbmodem53230051441']) == ['/dev/cu.wchusbserial53230051441']
|
||||
assert eliminate_duplicate_port(['/dev/cu.wchusbserial11301', '/dev/cu.usbmodem11301']) == ['/dev/cu.wchusbserial11301']
|
||||
|
||||
@patch('platform.version', return_value='10.0.22000.194')
|
||||
@patch('platform.release', return_value='10')
|
||||
|
||||
2
proto
2
proto
Submodule proto updated: 441303d531...7c49bdad99
7
setup.py
7
setup.py
@@ -12,7 +12,7 @@ with open("README.md", "r") as fh:
|
||||
# This call to setup() does all the work
|
||||
setup(
|
||||
name="meshtastic",
|
||||
version="1.3alpha.7",
|
||||
version="1.2.92",
|
||||
description="Python API & client shell for talking to Meshtastic devices",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
@@ -22,7 +22,8 @@ setup(
|
||||
license="MIT",
|
||||
classifiers=[
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Development Status :: 4 - Beta",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
@@ -37,7 +38,7 @@ setup(
|
||||
extras_require={
|
||||
'tunnel': ["pytap2>=2.0.0"]
|
||||
},
|
||||
python_requires='>=3.7',
|
||||
python_requires='>=3.6',
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"meshtastic=meshtastic.__main__:main",
|
||||
|
||||
Reference in New Issue
Block a user