Current behavior:
Using struct in events function resulted a compilation error
ERROR | Error executing EValidator
No C code are generated in base folder.
Expected behavior:
Mita compiles successfully and C code are generated
Steps to reproduce:
TBD
Related code:
struct RoomClimate {
var temperature : uint32;
var humidity : uint32;
var pressure : uint32;
var light : uint32;
}
setup mqtt: MQTT {
...
}
fn toJson(rc : RoomClimate) {
return `{"temperature": ${rc.temperature}, "humidity": ${rc.humidity}, "pressure":${rc.pressure}, "lux": ${rc.light}}`;
}
every 2 seconds {
varcelcius : uint32 = environment.temperature.read() / 1000;
var humidity : uint32= environment.humidity.read();
var pressure : uint32 = environment.pressure.read();
var light : uint32 = light.intensity.read() / 1000;
let rcm : RoomClimate = RoomClimate(celcius, humidity, pressure , light );
var jsonData = toJson(rcm);
mqtt.telemetry.write(jsonData);
}
Current behavior: Using struct in events function resulted a compilation error
ERROR | Error executing EValidator
No C code are generated in base folder.Expected behavior:
Mita compiles successfully and C code are generated
Steps to reproduce:
TBD Related code:
Other information:
Workbench 3.6.0, XDK Device 1.1.0, Mita 0.1.0.xx