Comments in structures prevents structure to parse.
Hadatko opened this issue · 2 comments
Hadatko commented
Hi,
this structure isn't parsed and it is skipped (when most of comments are removed, structure is parsed properly):
struct acSensorArrayData
{
//Accelerometer
//{
uint16_t accelerationX;
uint16_t accelerationY;
uint16_t accelerationZ;
//}
//Proximity
//{
uint8_t proxyEvents;
uint8_t touchByte;
uint8_t touchHalfByte;
//}
//BME 680
//{
uint16_t gas;
uint16_t humidity;
uint16_t temperature;
uint16_t pressure;
//}
//Luxmeter
//{
uint32_t lux;
//}
//Battery
//{
uint16_t chargerState;
uint8_t chargeStatus;
//}
//GPIO expander
//{
uint8_t gpioExpInput;
//}
};
Schamper commented
What would be your expected parsed result? I assume the following:
struct acSensorArrayData
{
uint16_t accelerationX;
uint16_t accelerationY;
uint16_t accelerationZ;
uint8_t proxyEvents;
uint8_t touchByte;
uint8_t touchHalfByte;
uint16_t gas;
uint16_t humidity;
uint16_t temperature;
uint16_t pressure;
uint32_t lux;
uint16_t chargerState;
uint8_t chargeStatus;
uint8_t gpioExpInput;
};
Hadatko commented
Yes. I found out that issue is this //} comment. I created pull request for you.