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

I find a trivial mistake in the code of EDB_Simple.pde #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
EDB_Simple.pde

This code shows in your serial monitor, "Record count: 10", and 9 records are 
displayed, but last one record is lost.

To show all 10 records, this example code should be modified.

  Serial.print("Record Count: "); Serial.println(db.count());
  for (recno = 1; recno <= RECORDS_TO_CREATE; recno++)
// for (recno = 1; recno < RECORDS_TO_CREATE; recno++)

"<" should be replaced by "<=" only.

Thanks.

Original issue reported on code.google.com by katts0...@gmail.com on 13 Jan 2011 at 6:02

jwhiddon commented 8 years ago

Fixed