[Horus] Bitmaps dynamic load

This commit is contained in:
Bertrand Songis
2016-02-21 18:25:52 +01:00
parent 63713578fe
commit 358badfed9
12 changed files with 117 additions and 99 deletions
-7
View File
@@ -30,9 +30,7 @@ Clipboard clipboard;
#if defined(PCBTARANIS)
uint8_t modelBitmap[MODEL_BITMAP_SIZE] __DMA;
#endif
#if defined(PCBTARANIS) || defined(PCBHORUS)
bool loadModelBitmap(char * name, uint8_t * bitmap)
{
uint8_t len = zlen(name, LEN_BITMAP_NAME);
@@ -45,13 +43,8 @@ bool loadModelBitmap(char * name, uint8_t * bitmap)
}
}
#if defined(COLORLCD)
// TODO only the first bytes can be set to 0
memset(bitmap, 0, MODEL_BITMAP_SIZE);
#else
// In all error cases, we set the default logo
memcpy(bitmap, logo_taranis, MODEL_BITMAP_SIZE);
#endif
return false;
}