Skip to content

Commit 8d6827d

Browse files
authored
Merge pull request #490 from rc14193/master
Move pb2 Files to Own Folder
2 parents 90c218d + df8ea85 commit 8d6827d

44 files changed

Lines changed: 598 additions & 589 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/regen-protobufs.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
./nanopb-0.4.7/generator-bin/protoc -I=protobufs --python_out ./ ./protobufs/meshtastic/*.proto
88

99
# workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628
10+
mv ./meshtastic/*_pb2.py ./meshtastic/PbDefinitions
1011

1112
if [[ $OSTYPE == 'darwin'* ]]; then
12-
sed -i '' -E 's/^(import.*_pb2)/from . \1/' meshtastic/*.py
13+
sed -i '' -E 's/^(import.*_pb2)/from . \1/' meshtastic/PbDefinitions/*.py
1314
# automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/protobufs/issues/27)
14-
sed -i '' -E "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py
15+
sed -i '' -E "s/^None = 0/globals()['None'] = 0/" meshtastic/PbDefinitions/mesh_pb2.py
16+
# change from meshtastic to meshtastic.PbDefinitions
17+
sed -i -E 's/^from meshtastic(.*_pb2.*)/from meshtastic.PbDefinitions\1/' meshtastic/PbDefinitions/*.py
1518
else
16-
sed -i -e 's/^import.*_pb2/from . \0/' meshtastic/*.py
19+
sed -i -e 's/^import.*_pb2/from . \0/' meshtastic/PbDefinitions/*.py
1720
# automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/protobufs/issues/27)
18-
sed -i -e "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py
19-
fi
21+
sed -i -e "s/^None = 0/globals()['None'] = 0/" meshtastic/PbDefinitions/mesh_pb2.py
22+
# change from meshtastic to meshtastic.PbDefinitions
23+
sed -i -E 's/^from meshtastic(.*_pb2.*)/from meshtastic.PbDefinitions\1/' meshtastic/PbDefinitions/*.py
24+
fi

meshtastic/PbDefinitions/__init__.py

Whitespace-only changes.

meshtastic/PbDefinitions/admin_pb2.py

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meshtastic/PbDefinitions/atak_pb2.py

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meshtastic/cannedmessages_pb2.py renamed to meshtastic/PbDefinitions/cannedmessages_pb2.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meshtastic/PbDefinitions/channel_pb2.py

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meshtastic/clientonly_pb2.py renamed to meshtastic/PbDefinitions/clientonly_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)