bug fixes
This commit is contained in:
parent
8596e263e7
commit
d1943718f9
@ -21,7 +21,7 @@ void DisplayArea::paintEvent(QPaintEvent *event)
|
|||||||
|
|
||||||
bool DisplayArea::pixelSet(int x, int y)
|
bool DisplayArea::pixelSet(int x, int y)
|
||||||
{
|
{
|
||||||
if(x>image.width()||y>image.height()) return false;
|
if(x>=image.width()||y>=image.height()) return false;
|
||||||
return qAlpha(image.pixel(x,y))==255;
|
return qAlpha(image.pixel(x,y))==255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,13 @@ void InputParser::process()
|
|||||||
case 1:
|
case 1:
|
||||||
computeEpochDate();
|
computeEpochDate();
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
minFreq=qMin(minFreq,currentLine.minFreq);
|
||||||
|
maxFreq=qMax(maxFreq,currentLine.maxFreq);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if(decimal) currentLine.freqStep++;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if(index>5){
|
if(index>5){
|
||||||
sendPixel();
|
sendPixel();
|
||||||
@ -58,11 +65,10 @@ void InputParser::process()
|
|||||||
decimal=false;
|
decimal=false;
|
||||||
break;
|
break;
|
||||||
case '\n':
|
case '\n':
|
||||||
minFreq=qMin(minFreq,currentLine.minFreq);
|
|
||||||
maxFreq=qMax(maxFreq,currentLine.maxFreq);
|
|
||||||
|
|
||||||
sendPixel();
|
sendPixel();
|
||||||
|
|
||||||
|
if(currentLine.maxFreq==maxFreq) currentY++;
|
||||||
|
|
||||||
lastMaxFreq=currentLine.maxFreq;
|
lastMaxFreq=currentLine.maxFreq;
|
||||||
|
|
||||||
index=0;
|
index=0;
|
||||||
@ -160,8 +166,6 @@ void InputParser::sendPixel()
|
|||||||
|
|
||||||
currentX=(currentLine.minFreq-minFreq)/currentLine.freqStep+(index-5);
|
currentX=(currentLine.minFreq-minFreq)/currentLine.freqStep+(index-5);
|
||||||
|
|
||||||
if(display->pixelSet(currentX,currentY)) currentY++;
|
|
||||||
|
|
||||||
display->setPixel(currentX,currentY,color);
|
display->setPixel(currentX,currentY,color);
|
||||||
currentX++;
|
currentX++;
|
||||||
currentPowerValue=0;
|
currentPowerValue=0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user