move frequency precision to 5 places;

pull/72/head
Bryan Biedenkapp 1 year ago
parent e11758a06a
commit 68d98817a9

@ -208,11 +208,11 @@ private:
// channel frequency // channel frequency
{ {
m_txFreqLabel.setGeometry(FPoint(2, 2), FSize(4, 1)); m_txFreqLabel.setGeometry(FPoint(2, 2), FSize(4, 1));
m_txFreq.setGeometry(FPoint(6, 2), FSize(8, 1)); m_txFreq.setGeometry(FPoint(6, 2), FSize(9, 1));
m_txFreq.setText(""); m_txFreq.setText("");
m_rxFreqLabel.setGeometry(FPoint(2, 3), FSize(4, 1)); m_rxFreqLabel.setGeometry(FPoint(2, 3), FSize(4, 1));
m_rxFreq.setGeometry(FPoint(6, 3), FSize(8, 1)); m_rxFreq.setGeometry(FPoint(6, 3), FSize(9, 1));
m_rxFreq.setText(""); m_rxFreq.setText("");
} }
@ -256,12 +256,12 @@ private:
uint32_t txFrequency = (uint32_t)((entry.baseFrequency() + ((calcSpace * 125) * m_channelNo))); uint32_t txFrequency = (uint32_t)((entry.baseFrequency() + ((calcSpace * 125) * m_channelNo)));
std::stringstream ss; std::stringstream ss;
ss << std::fixed << std::setprecision(4) << (float)(txFrequency / 1000000.0f); ss << std::fixed << std::setprecision(5) << (float)(txFrequency / 1000000.0f);
m_txFreq.setText(ss.str()); m_txFreq.setText(ss.str());
ss.str(std::string()); ss.str(std::string());
ss << std::fixed << std::setprecision(4) << (float)(rxFrequency / 1000000.0f); ss << std::fixed << std::setprecision(5) << (float)(rxFrequency / 1000000.0f);
m_rxFreq.setText(ss.str()); m_rxFreq.setText(ss.str());

@ -85,12 +85,12 @@ public:
uint32_t txFrequency = (uint32_t)((entry.baseFrequency() + ((calcSpace * 125) * channelNo))); uint32_t txFrequency = (uint32_t)((entry.baseFrequency() + ((calcSpace * 125) * channelNo)));
std::stringstream ss; std::stringstream ss;
ss << std::fixed << std::setprecision(4) << (float)(txFrequency / 1000000.0f); ss << std::fixed << std::setprecision(5) << (float)(txFrequency / 1000000.0f);
m_txFreq.setText(ss.str()); m_txFreq.setText(ss.str());
ss.str(std::string()); ss.str(std::string());
ss << std::fixed << std::setprecision(4) << (float)(rxFrequency / 1000000.0f); ss << std::fixed << std::setprecision(5) << (float)(rxFrequency / 1000000.0f);
m_rxFreq.setText(ss.str()); m_rxFreq.setText(ss.str());
@ -335,7 +335,7 @@ private:
m_txFreqLabel.setGeometry(FPoint(2, 4), FSize(4, 1)); m_txFreqLabel.setGeometry(FPoint(2, 4), FSize(4, 1));
m_txFreqLabel.setForegroundColor(FColor::Black); // why? m_txFreqLabel.setForegroundColor(FColor::Black); // why?
m_txFreqLabel.setBackgroundColor(FColor::LightGray); // why? m_txFreqLabel.setBackgroundColor(FColor::LightGray); // why?
m_txFreq.setGeometry(FPoint(6, 4), FSize(8, 1)); m_txFreq.setGeometry(FPoint(6, 4), FSize(9, 1));
m_txFreq.setForegroundColor(FColor::Black); // why? m_txFreq.setForegroundColor(FColor::Black); // why?
m_txFreq.setBackgroundColor(FColor::LightGray); // why? m_txFreq.setBackgroundColor(FColor::LightGray); // why?
m_txFreq.setText(""); m_txFreq.setText("");
@ -343,7 +343,7 @@ private:
m_rxFreqLabel.setGeometry(FPoint(2, 5), FSize(4, 1)); m_rxFreqLabel.setGeometry(FPoint(2, 5), FSize(4, 1));
m_rxFreqLabel.setForegroundColor(FColor::Black); // why? m_rxFreqLabel.setForegroundColor(FColor::Black); // why?
m_rxFreqLabel.setBackgroundColor(FColor::LightGray); // why? m_rxFreqLabel.setBackgroundColor(FColor::LightGray); // why?
m_rxFreq.setGeometry(FPoint(6, 5), FSize(8, 1)); m_rxFreq.setGeometry(FPoint(6, 5), FSize(9, 1));
m_rxFreq.setForegroundColor(FColor::Black); // why? m_rxFreq.setForegroundColor(FColor::Black); // why?
m_rxFreq.setBackgroundColor(FColor::LightGray); // why? m_rxFreq.setBackgroundColor(FColor::LightGray); // why?
m_rxFreq.setText(""); m_rxFreq.setText("");

Loading…
Cancel
Save

Powered by TurnKey Linux.