PlatformIO: Fix config parser warning (#736)
diff --git a/examples/platformio/platformio.ini b/examples/platformio/platformio.ini
index bf0d544..5049c0f 100644
--- a/examples/platformio/platformio.ini
+++ b/examples/platformio/platformio.ini
@@ -1,5 +1,5 @@
;
-; You can setup `nanopb_protos` `nanopb_options` vars to generate code from proto files
+; You can setup `custom_nanopb_protos` `nanopb_options` vars to generate code from proto files
;
; Generator will use next folders:
;
@@ -18,9 +18,9 @@
+<pio_with_options.c>
; All path are relative to the `$PROJECT_DIR`
-nanopb_protos =
+custom_nanopb_protos =
+<proto/pio_with_options.proto>
-nanopb_options =
+custom_nanopb_options =
--error-on-unmatched
[env:pio_without_options]
@@ -31,5 +31,5 @@
+<pio_without_options.c>
; All path are relative to the `$PROJECT_DIR`
-nanopb_protos =
+custom_nanopb_protos =
+<proto/pio_without_options.proto>
diff --git a/generator/platformio_generator.py b/generator/platformio_generator.py
index 7deea57..9f296bd 100644
--- a/generator/platformio_generator.py
+++ b/generator/platformio_generator.py
@@ -36,8 +36,8 @@
generated_build_dir = os.path.join(build_dir, 'nanopb', 'generated-build')
md5_dir = os.path.join(build_dir, 'nanopb', 'md5')
-nanopb_protos = env.GetProjectOption("nanopb_protos", "")
-nanopb_plugin_options = env.GetProjectOption("nanopb_options", "")
+nanopb_protos = env.GetProjectOption("custom_nanopb_protos", "")
+nanopb_plugin_options = env.GetProjectOption("custom_nanopb_options", "")
if not nanopb_protos:
print("[nanopb] No generation needed.")
@@ -50,7 +50,7 @@
protos_files = fs.match_src_files(project_dir, nanopb_protos)
if not len(protos_files):
print("[nanopb] ERROR: No files matched pattern:")
- print(f"nanopb_protos: {nanopb_protos}")
+ print(f"custom_nanopb_protos: {nanopb_protos}")
exit(1)
protoc_generator = os.path.join(nanopb_root, 'generator', 'protoc')