1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
6b2bb96be7 Fixed speed info parsing 2022-01-24 21:29:07 +01:00
a815bc762f Make it clear what are we trying to check here 2022-01-24 21:22:33 +01:00

View File

@ -431,26 +431,7 @@ static quint32 readImageInfo(DataStream &stream, Waypoint &waypoint,
static int speed(quint8 flags) static int speed(quint8 flags)
{ {
switch (flags >> 4) { return ((flags >> 3) & 0x0F) * 10;
case 0x8:
return 40;
case 0x9:
return 30;
case 0xA:
return 50;
case 0xB:
return 70;
case 0xC:
return 80;
case 0xD:
return 90;
case 0xE:
return 100;
case 0xF:
return 120;
default:
return 0;
}
} }
static quint32 readCamera(DataStream &stream, QVector<Waypoint> &waypoints, static quint32 readCamera(DataStream &stream, QVector<Waypoint> &waypoints,
@ -654,7 +635,7 @@ static quint32 readSymbol(DataStream &stream, QPixmap &pixmap)
ds += paletteSize * 4; ds += paletteSize * 4;
} }
if (imageSize >= lineSize * height) { if (data.size() >= lineSize * height) {
if (paletteSize) { if (paletteSize) {
img = QImage((uchar*)data.data(), width, height, lineSize, img = QImage((uchar*)data.data(), width, height, lineSize,
QImage::Format_Indexed8); QImage::Format_Indexed8);