Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor graph compiler's script format broken for array config variables #980

Open
anwu opened this issue May 21, 2020 · 1 comment
Open

Comments

@anwu
Copy link
Contributor

anwu commented May 21, 2020

Looks like the script format for the sensor graph compiler doesn't work when setting config variables that are arrays. It works just fine when using the snippet format.

C:\Arch\coretools\iotilesensorgraph\test\sensor_graphs> iotile-sgcompile .\basic_config.sgf -f script -o test
Traceback (most recent call last):
  File "C:\Arch\firmware\workspace\env_p38\Scripts\iotile-sgcompile-script.py", line 11, in <module>
    load_entry_point('iotile-sensorgraph', 'console_scripts', 'iotile-sgcompile')()
  File "c:\arch\coretools\iotilesensorgraph\iotile\sg\scripts\iotile_sgcompile.py", line 85, in main
    output = output_format.format(parser.sensor_graph)
  File "c:\arch\coretools\iotilesensorgraph\iotile\sg\output_formats\script.py", line 48, in format_script
    byte_value = _convert_to_bytes(config_type, value)
  File "c:\arch\coretools\iotilesensorgraph\iotile\sg\output_formats\script.py", line 71, in _convert_to_bytes
    raise ArgumentError('Type must be a known integer type, integer type array, string', known_integers=int_types.keys(), actual_type=type_name)
typedargs.exceptions.ArgumentError: ArgumentError: Type must be a known integer type, integer type array, string
Additional Information:
known_integers: dict_keys(['uint8_t', 'int8_t', 'uint16_t', 'int16_t', 'uint32_t', 'int32_t'])
actual_type: uint8_t[]
@anwu
Copy link
Contributor Author

anwu commented May 21, 2020

I believe the lib_controller proxy has a correct implementation on decoding the array variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant