1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00

Fix compiler warnings and doc typos.

This commit is contained in:
Jon Beniston 2023-02-16 16:21:27 +00:00
parent 1732d07cab
commit 2df815d479
3 changed files with 13 additions and 15 deletions

View File

@ -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));
}

View File

@ -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;

View File

@ -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.
![Heat Map plugin GUI](../../../doc/img/HeatMap_plugin.png)
![A Heat Map](../../../doc/img/HeatMap_plugin_map.png)
<h2>Interface</h2>
@ -39,7 +39,7 @@ Bandwidth in Hz of the channel for which power is to be measured.
<h3>5: Res - Resolution</h3>
Displays the heat map resolution in metres per pixel. Currently this is fixed at ~3m.
Displays the heat map resolution in metres per pixel. Currently this is fixed at ~3m per pixel.
<h3>6: SR - Sample Rate</h3>
@ -79,7 +79,7 @@ The colour map minimum power field, specifies the power in dB, below which, powe
<h3>15: Max - Colour Map Maximum Power</h3>
The colour map maximum power field, specifies the power in dB, above which, all power measurements are mapped to the highest entry in the colour map.
The colour map maximum power field, specifies the power in dB, above which, all power measurements are mapped to the highest entry in the colour map (16).
<h3>16: Colour Map</h3>
@ -99,7 +99,7 @@ Displays the range from the current position to the transmitter position in metr
<h3>20: Loss</h3>
Displays the free space path loss from the current position to the transmitter, based on the channel centre frequency, in dB
Displays the free space path loss from the current position to the transmitter, based on the channel centre frequency, in dB.
<h3>21: Avg - Average Power</h3>
@ -115,7 +115,7 @@ Displays the current minimum peak power measurement in dB.
<h3>24: Pulse - Pulse Average Power</h3>
Displays the most recent pulse average power in dB.
Displays the most recent pulse average power measurement in dB.
<h3>25: Data</h3>
@ -147,7 +147,7 @@ The chart displays the most recent average, max peak, min peak and pulse average
received signal level from the transmitter (9), taking in to account free space path loss.
Each series can be individually enabled or disabled.
The last number of minutes worth of data displayed can be specified from 1 to 60 minutes.
The last number of minutes worth of data displayed can be specified from 1 to 10 minutes.
<h2>Power Measurements</h2>