I’m experimenting with new DetectionSensor functionality. I need to add further module parameters. So, I went into the protobufs directory and added them.
Then, I tried to run bin/regen-protos.sh (with nanopb-0.4.7 at the appropriate place) but I get error messages like:
meshtastic/module_config.proto:161:44: Field numbers must be positive integers.
meshtastic/localonly.proto:6:1: Import “meshtastic/module_config.proto” was not found or had errors.
meshtastic/localonly.proto:67:3: “ModuleConfig.MQTTConfig” is not defined.
etc
What is the proper way to regenerate the files under src/mesh/generated (and possibly more places?)?
That looks like the right command. Based on which version of the protobufs repository did you make your changes? Can you try running the command without your changes? It looks like there is an error in module_config.proto.
I’m also curious what kind of additional module parameters you need?
Sorry, it was entirely my fault. I had introduced a new parameter and didn’t realize that I had to supply a suitable field number. (I instead supplied a default value. ) By giving the reasonable field number (9 in this case), everything compiled nicely.
Yes, right, what additional parameters? Well, let me prepare a pull request. I can update this thread once it is ready.