-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hi!
I have a issue when i try to use multiple tables. A just created table don't retrieve zero when call count function.
Follow a example of output:
#define TABLE_SIZE 8192
#define TABLE_1 0
#define TABLE_2 1
#define TABLE_3 2
#define TABLE_4 3
enum Enum1
{
OPT1,
OPT2
};
enum Enum2
{
OPT1,
OPT2
};
enum Enum3
{
OPT1,
OPT2
};
struct Struct1
{
uint8_t field1;
Enum1 field2;
};
struct Struct2
{
int id;
char* field1;
tmElements_t field2;
tmElements_t field3;
int field4;
int field5;
int field6;
Enum2 field7;
Enum2 field8;
};
struct Struct3
{
Enum3 field1;
};
struct Struct4
{
int field1;
tmElements_t field2;
tmElements_t field3;
int field4;
};
void Test() {
db.create(TABLE_1, TABLE_SIZE, sizeof(Struct1));
db.create(TABLE_2, TABLE_SIZE, sizeof(Struct4));
db.create(TABLE_3, TABLE_SIZE, sizeof(Struct2));
db.create(TABLE_4, TABLE_SIZE, sizeof(Struct3));
db.open(TABLE_1);
Serial.println(_db.count()); >> 0
db.open(TABLE_2);
Serial.println(_db.count()); >> 301989888
db.open(TABLE_3);
Serial.println(_db.count()); >> 1179648
db.open(TABLE_4);
Serial.println(_db.count()); >> 4608
}
How can i proceed?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels