I’m trying another approach at a need and thought of using an array of type struct. The declaration seems to be fine, but when I try to assign something to a member, I’m getting a nondescript compiler error message (the darn orange one at the bottom of the Dev screen that seems to like me).
Can someone provide some insight as to what I’m doing wrong?
Here’s a snippet of the troublesome code:
struct MyObject
{
uint32_t sec; // 4 bytes time stamp in epoch format
uint32_t vbat; // 4 bytes
uint16_t wlev; // 2 bytes
uint8_t dummy2; // 1 byte
uint8_t dummy3; // 1 byte
uint8_t dummy4; // 1 byte
uint8_t fault; // 1 byte
};
retained MyObject dufus[50];
dufus[17].sec = 17;