Closed GoogleCodeExporter closed 8 years ago
sorry forgot to add you need to put
page = DataFlash.GetPage();
}
at the end of the loop .. obviously 8)
Original comment by mbada...@gmail.com
on 1 Sep 2010 at 7:44
@mbadaire - I do not see that the DataFlash.GetPage() call will return -1 and
have not been able to duplicate this problem.
Did you take the step of erasing the logs before using them the first time? If
not there will be erroneous data in the start and stop page memory locations.
If you did take this step can you give me some additional information that may
help me duplicate this problem?
Thanks,
Doug
Original comment by dewei...@gmail.com
on 1 Sep 2010 at 11:01
I had emptied the logs once but now my logs were full.If the logs are full then
getPage will bring back -1 and not 4096 :
extract from DataFlash.cpp
http://code.google.com/p/arducopter/source/browse/trunk/libraries/DataFlash/Data
Flash.cpp
int DataFlash_Class::GetPage()
{
return(df_Read_PageAdr-1);
}
byte DataFlash_Class::ReadByte()
...
if (df_Read_PageAdr>=4096) // If we reach the end of the memory, start from the begining
{
df_Read_PageAdr = 0;
df_Read_END = true;
}
...
Original comment by mbada...@gmail.com
on 2 Sep 2010 at 7:54
@mbadaire - ah, thank you, missed that the first time.
I will verify your suggested fix and implement it as soon as time permits.
Original comment by dewei...@gmail.com
on 2 Sep 2010 at 11:06
Fixed as recommended
Original comment by dewei...@gmail.com
on 10 Sep 2010 at 5:39
Original issue reported on code.google.com by
mbada...@gmail.com
on 1 Sep 2010 at 7:42