FlashStorage store an Array of struct

Hi all,

I use FlashStorage to store data and now I'd like to store an array of structure is possible to do something like this ?

  uint8_t const array_length = 5;
  struct my_data {
    uint32_t tps;  
    float angle;
  }; 

  std::deque<my_data> list_my_data;
  FlashStorage(my_list, my_data[array_length]);

If I try to put list_my_data[array_length] instead of my_data[array_length]I got an error list_my_data is not defined type

there is one example storing a structure

FlashStorage/StoreNameAndSurname.ino at master · cmaglie/FlashStorage · GitHub

Not sure about using a std::deque which might not be a trivial structure.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.