[Taranis] Splash on SD fix. Tested OK on simu.

This commit is contained in:
bsongis@gmail.com
2013-07-04 22:55:31 +00:00
parent a19970c0ca
commit a7c26a4514
+2 -3
View File
@@ -179,10 +179,9 @@ const pm_char * bmpLoad(uint8_t *dest, const char *filename, const xcoord_t widt
break;
case 4:
n = w/8;
for (int32_t i=h-1; i>=0; i--) {
result = f_read(&bmpFile, buf, w/2, &read);
if (result != FR_OK || read != w/2) {
result = f_read(&bmpFile, buf, ((w+7)/8)*4, &read);
if (result != FR_OK || read != ((w+7)/8)*4) {
f_close(&bmpFile);
return SDCARD_ERROR(result);
}