Merge of ARM branch

This commit is contained in:
bsongis
2012-04-26 14:43:52 +00:00
parent ea53713580
commit 30be30212c
15 changed files with 209 additions and 61 deletions
+10 -7
View File
@@ -476,19 +476,22 @@ void eeLoadModel(uint8_t id)
size = File_system[id+1].size ;
memset(&g_model, 0, sizeof(g_model));
if ( size > sizeof(g_model) )
{
#ifdef SIMU
if (size > 0 && size != sizeof(g_model)) {
printf("Model data read=%d bytes vs %d bytes\n", size, (int)sizeof(ModelData));
}
#endif
if (size > sizeof(g_model)) {
size = sizeof(g_model) ;
}
if(size<256) // if not loaded a fair amount
{
if(size < 256) { // if not loaded a fair amount
modelDefault(id) ;
eeCheck(true);
}
else
{
else {
read32_eeprom_data( ( File_system[id+1].block_no << 12) + sizeof( struct t_eeprom_header), ( uint8_t *)&g_model, size, 0 ) ;
}