jwhiddon / EDB

A re-implementation of the Arduino database library to allow more than 256 records
GNU Lesser General Public License v2.1
89 stars 43 forks source link

EDB.cpp open existing head #17

Open M-4A opened 8 years ago

M-4A commented 8 years ago

In ORIGINAL: EDB_Status EDB::open(unsigned long head_ptr) { EDB_head_ptr = head_ptr; // Thanks to Steve Kelly for the next line... EDB_table_ptr = sizeof(EDB_Header) + EDB_head_ptr; // this line was originally missing in the downloaded library readHead(); return EDB_OK; }

CORRECT: EDB_Status EDB::open(unsigned long head_ptr) { EDB_head_ptr = head_ptr; // Thanks to Steve Kelly for the next line... EDB_table_ptr = sizeof(EDB_Header) + EDB_head_ptr; // this line was originally missing in the downloaded library readHead(); if (EDB_head.flag == EDB_FLAG){ return EDB_OK; } else { return EDB_ERROR; } //return EDB_OK; }

rnsi commented 2 years ago

Seems to work for me. Thanks!