Skip to content

Commit 32a61b0

Browse files
committed
Make nanopb.proto stuff work right again, hopefully
1 parent 0c38a9e commit 32a61b0

File tree

4 files changed

+378
-16
lines changed

4 files changed

+378
-16
lines changed

bin/regen-protobufs.sh

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ OUTDIR=${TMPDIR}/out
2222
PYIDIR=${TMPDIR}/out
2323
mkdir -p "${OUTDIR}" "${INDIR}" "${PYIDIR}"
2424
cp ./protobufs/meshtastic/*.proto "${INDIR}"
25+
cp ./protobufs/nanopb.proto "${INDIR}"
2526

2627
# OS-X sed is apparently a little different and expects an arg for -i
2728
if [[ $OSTYPE == 'darwin'* ]]; then
@@ -36,6 +37,8 @@ $SEDCMD 's/^package meshtastic;/package meshtastic.protobuf;/' "${INDIR}/"*.prot
3637
# fix the imports to match
3738
$SEDCMD 's/^import "meshtastic\//import "meshtastic\/protobuf\//' "${INDIR}/"*.proto
3839

40+
$SEDCMD 's/^import "nanopb.proto"/import "meshtastic\/protobuf\/nanopb.proto"/' "${INDIR}/"*.proto
41+
3942
# Generate the python files
4043
./nanopb-0.4.8/generator-bin/protoc -I=$TMPDIR/in --python_out "${OUTDIR}" "--mypy_out=${PYIDIR}" $INDIR/*.proto
4144

meshtastic/protobuf/deviceonly_pb2.py

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meshtastic/protobuf/nanopb_pb2.py

+35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)