Open maxd-nordic opened 1 month ago
An extra indirection makes the code generation succeed:
temperature = {
n => "0", ; Temperature Resource ID
vf => float, ; temperature in degrees Celsius
}
humidity = {
n => "1", ; Humidity Resource ID
vf => float, ; Relative humidity in percent
}
pressure = {
n => "2", ; Atmospheric pressure Resource ID
vf => float, ; Atmospheric pressure in pascals
}
iaq = {
n => "10", ; Air Quality Index Resource ID
vi => int .size 4 ; AQI value
}
timestamp = {
n => "99", ; Timestamp Resource ID
vi => int .size 8 ; UNIX timestamp in milliseconds
}
env-object = [
temperature,
humidity,
pressure,
iaq,
timestamp
]
I get this error: https://github.com/NordicSemiconductor/zcbor/blob/a9945b7d2e1203d79976a6f6fc9966cc337488e0/zcbor/zcbor.py#L2702
When generating an encoder for the
env-object
from the following CDDL:I'm using the latest pip release 0.8.1.
Could we at least get a useful error message here?