mirror of
https://github.com/meshtastic/python.git
synced 2026-09-08 11:33:15 -04:00
move pb2 to own folder, regen script writes to new folder, update imports
This commit is contained in:
1 parent
90c218daa7
commit
9a4feecea8
29 files changed
+15
-13
No files matched your search
@@ -4,7 +4,7 @@
|
||||
#gsed -i 's/import "\//import ".\//g' ./protobufs/meshtastic/*
|
||||
#gsed -i 's/package meshtastic;//g' ./protobufs/meshtastic/*
|
||||
|
||||
./nanopb-0.4.7/generator-bin/protoc -I=protobufs --python_out ./ ./protobufs/meshtastic/*.proto
|
||||
./nanopb-0.4.7/generator-bin/protoc -I=protobufs --python_out ./pbDefinitions ./protobufs/meshtastic/*.proto
|
||||
|
||||
# workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ from google.protobuf.json_format import MessageToJson
|
||||
from pubsub import pub
|
||||
from tabulate import tabulate
|
||||
|
||||
from meshtastic import (
|
||||
from meshtastic.pbDefinitions import (
|
||||
admin_pb2,
|
||||
apponly_pb2,
|
||||
channel_pb2,
|
||||
@@ -86,10 +86,10 @@ from meshtastic import (
|
||||
mesh_pb2,
|
||||
portnums_pb2,
|
||||
remote_hardware_pb2,
|
||||
telemetry_pb2,
|
||||
util,
|
||||
)
|
||||
from meshtastic.node import Node
|
||||
from meshtastic.pbDefinitions import telemetry_pb2
|
||||
from meshtastic.util import DeferredExecution, Timeout, catchAndIgnore, fixme, stripnl
|
||||
|
||||
# Note: To follow PEP224, comments should be after the module variable.
|
||||
|
||||
@@ -17,7 +17,7 @@ from pubsub import pub
|
||||
|
||||
import meshtastic.test
|
||||
import meshtastic.util
|
||||
from meshtastic import channel_pb2, config_pb2, portnums_pb2, remote_hardware
|
||||
from meshtastic.pbDefinitions import channel_pb2, config_pb2, portnums_pb2, remote_hardware
|
||||
from meshtastic.__init__ import BROADCAST_ADDR
|
||||
from meshtastic.ble_interface import BLEInterface
|
||||
from meshtastic.globals import Globals
|
||||
|
||||
@@ -18,7 +18,7 @@ from pubsub import pub
|
||||
from tabulate import tabulate
|
||||
|
||||
import meshtastic.node
|
||||
from meshtastic import mesh_pb2, portnums_pb2, telemetry_pb2
|
||||
from meshtastic.pbDefinitions import mesh_pb2, portnums_pb2
|
||||
from meshtastic.__init__ import (
|
||||
BROADCAST_ADDR,
|
||||
BROADCAST_NUM,
|
||||
@@ -28,6 +28,7 @@ from meshtastic.__init__ import (
|
||||
protocols,
|
||||
publishingThread,
|
||||
)
|
||||
from meshtastic.pbDefinitions import telemetry_pb2
|
||||
from meshtastic.util import (
|
||||
Acknowledgment,
|
||||
Timeout,
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ import time
|
||||
|
||||
from google.protobuf.json_format import MessageToJson
|
||||
|
||||
from meshtastic import admin_pb2, apponly_pb2, channel_pb2, localonly_pb2, portnums_pb2
|
||||
from meshtastic.pbDefinitions import admin_pb2, apponly_pb2, channel_pb2, portnums_pb2
|
||||
from meshtastic.pbDefinitions import localonly_pb2
|
||||
from meshtastic.util import (
|
||||
Timeout,
|
||||
camel_to_snake,
|
||||
|
||||
Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -11,7 +11,7 @@ from google.protobuf import symbol_database as _symbol_database
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from meshtastic import localonly_pb2 as meshtastic_dot_localonly__pb2
|
||||
from meshtastic.pbDefinitions import localonly_pb2 as meshtastic_dot_localonly__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bmeshtastic/clientonly.proto\x1a\x1ameshtastic/localonly.proto\"\xf7\x01\n\rDeviceProfile\x12\x16\n\tlong_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nshort_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63hannel_url\x18\x03 \x01(\tH\x02\x88\x01\x01\x12!\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x0c.LocalConfigH\x03\x88\x01\x01\x12.\n\rmodule_config\x18\x05 \x01(\x0b\x32\x12.LocalModuleConfigH\x04\x88\x01\x01\x42\x0c\n\n_long_nameB\r\n\x0b_short_nameB\x0e\n\x0c_channel_urlB\t\n\x07_configB\x10\n\x0e_module_configBe\n\x13\x63om.geeksville.meshB\x10\x43lientOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3')
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -12,9 +12,9 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from meshtastic import channel_pb2 as meshtastic_dot_channel__pb2
|
||||
from meshtastic import localonly_pb2 as meshtastic_dot_localonly__pb2
|
||||
from meshtastic.pbDefinitions import localonly_pb2 as meshtastic_dot_localonly__pb2
|
||||
from meshtastic import mesh_pb2 as meshtastic_dot_mesh__pb2
|
||||
from meshtastic import telemetry_pb2 as meshtastic_dot_telemetry__pb2
|
||||
from meshtastic.pbDefinitions import telemetry_pb2 as meshtastic_dot_telemetry__pb2
|
||||
from meshtastic import module_config_pb2 as meshtastic_dot_module__config__pb2
|
||||
|
||||
|
||||
File renamed without changes.
File diff suppressed because one or more lines are too long.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@ import logging
|
||||
|
||||
from pubsub import pub
|
||||
|
||||
from meshtastic import portnums_pb2, remote_hardware_pb2
|
||||
from meshtastic.pbDefinitions import portnums_pb2, remote_hardware_pb2
|
||||
from meshtastic.util import our_exit
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import threading
|
||||
from pubsub import pub
|
||||
from pytap2 import TapDevice
|
||||
|
||||
from meshtastic import portnums_pb2
|
||||
from meshtastic.pbDefinitions import portnums_pb2
|
||||
from meshtastic.globals import Globals
|
||||
from meshtastic.util import ipstr, readnet_u16
|
||||
|
||||
|
||||
Reference in new issue
Block a user