diff --git a/plugins/channelrx/heatmap/heatmapgui.cpp b/plugins/channelrx/heatmap/heatmapgui.cpp index bcdedadde..e21683ef9 100644 --- a/plugins/channelrx/heatmap/heatmapgui.cpp +++ b/plugins/channelrx/heatmap/heatmapgui.cpp @@ -205,7 +205,7 @@ const QStringList HeatMapGUI::m_averagePeriodTexts = { void HeatMapGUI::on_averagePeriod_valueChanged(int value) { - m_settings.m_averagePeriodUS = (int)std::powf(10.0f, (float)value); + m_settings.m_averagePeriodUS = (int)std::pow(10.0f, (float)value); ui->averagePeriodText->setText(m_averagePeriodTexts[value-1]); applySettings(); } @@ -216,7 +216,7 @@ const QStringList HeatMapGUI::m_sampleRateTexts = { void HeatMapGUI::on_sampleRate_valueChanged(int value) { - m_settings.m_sampleRate = (int)std::powf(10.0f, (float)value); + m_settings.m_sampleRate = (int)std::pow(10.0f, (float)value); ui->sampleRateText->setText(m_sampleRateTexts[value-1]); ui->averagePeriod->setMinimum(std::max(1, m_averagePeriodTexts.size() - value)); m_scopeVis->setLiveRate(m_settings.m_sampleRate); @@ -296,8 +296,8 @@ void HeatMapGUI::coordsToPixel(double latitude, double longitude, int& x, int& y void HeatMapGUI::pixelToCoords(int x, int y, double& latitude, double& longitude) const { - latitude = m_north - (y /*+ 0.5*/) * m_degreesLatPerPixel; - longitude = m_west + (x /*+ 0.5*/) * m_degreesLonPerPixel; + latitude = m_north - y * m_degreesLatPerPixel; + longitude = m_west + x * m_degreesLonPerPixel; } void HeatMapGUI::on_writeCSV_clicked() @@ -460,6 +460,8 @@ void HeatMapGUI::on_txPower_valueChanged(double value) void HeatMapGUI::on_txPositionSet_clicked(bool checked) { + (void) checked; + ui->txLatitude->setText(QString::number(m_latitude)); ui->txLongitude->setText(QString::number(m_longitude)); m_settings.m_txLatitude = m_latitude; @@ -536,7 +538,6 @@ HeatMapGUI::HeatMapGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS m_basebandSampleRate(1), m_doApplySettings(true), m_tickCount(0), - m_brush(Qt::SolidPattern), m_powerChart(nullptr), m_powerAverageSeries(nullptr), m_powerMaxPeakSeries(nullptr), @@ -613,14 +614,13 @@ HeatMapGUI::HeatMapGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS ui->longitude->setText(QString::number(m_longitude)); QStringList colorMapNames = ColorMap::getColorMapNames(); - for (const auto color : colorMapNames) { + for (const auto& color : colorMapNames) { ui->colorMap->addItem(color); } m_colorMap = ColorMap::getColorMap(m_settings.m_colorMapName); m_pen.setColor(Qt::black); m_painter.setPen(m_pen); - //m_painter.setBrush(m_brush); createMap(); @@ -946,7 +946,6 @@ void HeatMapGUI::plotPixel(int x, int y, double power) QColor color = QColor::fromRgbF(m_colorMap[index*3], m_colorMap[index*3+1], m_colorMap[index*3+2]); m_pen.setColor(color); m_painter.setPen(m_pen); - //m_painter.setBrush(m_brush); m_painter.drawPoint(QPoint(x, y)); } diff --git a/plugins/channelrx/heatmap/heatmapgui.h b/plugins/channelrx/heatmap/heatmapgui.h index ca2ee4f6e..6d8c10777 100644 --- a/plugins/channelrx/heatmap/heatmapgui.h +++ b/plugins/channelrx/heatmap/heatmapgui.h @@ -116,7 +116,6 @@ private: double m_altitude; QPainter m_painter; QPen m_pen; - QBrush m_brush; const float *m_colorMap; int m_x; // Current position int m_y; diff --git a/plugins/channelrx/heatmap/readme.md b/plugins/channelrx/heatmap/readme.md index 4af4fcb6c..98f6ff568 100644 --- a/plugins/channelrx/heatmap/readme.md +++ b/plugins/channelrx/heatmap/readme.md @@ -11,7 +11,7 @@ To record data for a heat map, a GPS is required, and Preferences > My Position On Android, GPS setup should be automatic. On Windows/Linux/Mac, a GPS supporting NMEA via a serial port at 4800 baud is required. The COM port / serial device should be specfied via the QT_NMEA_SERIAL_PORT environment variable before SDRangel is started. - +