mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	BFM demod: RDS: radio text on two lines with the bottom one keeping the previously decoded text
This commit is contained in:
		
							parent
							
								
									1a977c4ce2
								
							
						
					
					
						commit
						46b11086b7
					
				| @ -213,6 +213,8 @@ void BFMDemodGUI::on_clearData_clicked(bool checked) | ||||
| 	{ | ||||
| 		m_bfmDemod->getRDSParser().clearAllFields(); | ||||
| 
 | ||||
| 		ui->go2Text->clear(); | ||||
| 		ui->go2PrevText->clear(); | ||||
| 		ui->g14ProgServiceNames->clear(); | ||||
| 		ui->g14MappedFrequencies->clear(); | ||||
| 		ui->g14AltFrequencies->clear(); | ||||
| @ -277,6 +279,11 @@ void BFMDemodGUI::on_g00AltFrequenciesBox_activated(int index) | ||||
| 	changeFrequency(f); | ||||
| } | ||||
| 
 | ||||
| void BFMDemodGUI::on_go2ClearPrevText_clicked() | ||||
| { | ||||
| 	ui->go2PrevText->clear(); | ||||
| } | ||||
| 
 | ||||
| void BFMDemodGUI::on_g14MappedFrequencies_activated(int index) | ||||
| { | ||||
|     (void) index; | ||||
| @ -353,6 +360,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban | ||||
| 	m_deviceUISet(deviceUISet), | ||||
| 	m_channelMarker(this), | ||||
| 	m_rdsTimerCount(0), | ||||
|     m_radiotext_AB_flag(false), | ||||
| 	m_rate(625000) | ||||
| { | ||||
| 	ui->setupUi(this); | ||||
| @ -684,7 +692,16 @@ void BFMDemodGUI::rdsUpdate(bool force) | ||||
| 	{ | ||||
| 		ui->g02Label->setStyleSheet("QLabel { background-color : green; }"); | ||||
| 		ui->g02CountText->setNum((int) m_bfmDemod->getRDSParser().m_g2_count); | ||||
|         bool radiotext_AB_flag = m_bfmDemod->getRDSParser().m_radiotext_AB_flag; | ||||
| 
 | ||||
|         if (!m_radiotext_AB_flag && radiotext_AB_flag) // B -> A transiition is start of new text
 | ||||
|         { | ||||
|             QString oldText = ui->go2Text->text(); | ||||
|             ui->go2PrevText->setText(oldText); | ||||
|         } | ||||
| 
 | ||||
| 		ui->go2Text->setText(QString(m_bfmDemod->getRDSParser().m_g2_radiotext)); | ||||
|         m_radiotext_AB_flag = radiotext_AB_flag; | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
|  | ||||
| @ -62,6 +62,7 @@ private: | ||||
| 	BFMDemodSettings m_settings; | ||||
| 	bool m_doApplySettings; | ||||
| 	int m_rdsTimerCount; | ||||
|     bool m_radiotext_AB_flag; | ||||
| 
 | ||||
| 	SpectrumVis* m_spectrumVis; | ||||
| 
 | ||||
| @ -99,6 +100,7 @@ private slots: | ||||
| 	void on_g14ProgServiceNames_currentIndexChanged(int index); | ||||
| 	void on_clearData_clicked(bool checked); | ||||
| 	void on_g00AltFrequenciesBox_activated(int index); | ||||
| 	void on_go2ClearPrevText_clicked(); | ||||
| 	void on_g14MappedFrequencies_activated(int index); | ||||
| 	void on_g14AltFrequencies_activated(int index); | ||||
| 	void onWidgetRolled(QWidget* widget, bool rollDown); | ||||
|  | ||||
| @ -7,7 +7,7 @@ | ||||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>798</width> | ||||
|     <height>472</height> | ||||
|     <height>755</height> | ||||
|    </rect> | ||||
|   </property> | ||||
|   <property name="sizePolicy"> | ||||
| @ -551,7 +551,7 @@ | ||||
|      <x>10</x> | ||||
|      <y>170</y> | ||||
|      <width>791</width> | ||||
|      <height>301</height> | ||||
|      <height>281</height> | ||||
|     </rect> | ||||
|    </property> | ||||
|    <property name="minimumSize"> | ||||
| @ -565,7 +565,7 @@ | ||||
|    </property> | ||||
|    <layout class="QVBoxLayout" name="rdsLayout"> | ||||
|     <property name="spacing"> | ||||
|      <number>3</number> | ||||
|      <number>1</number> | ||||
|     </property> | ||||
|     <item> | ||||
|      <layout class="QHBoxLayout" name="reportLayout"> | ||||
| @ -1602,8 +1602,52 @@ | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="go2Text"> | ||||
|         <property name="toolTip"> | ||||
|          <string>Current radio text</string> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string>Radiotext</string> | ||||
|          <string/> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|      </layout> | ||||
|     </item> | ||||
|     <item> | ||||
|      <layout class="QHBoxLayout" name="row4pDataLayout"> | ||||
|       <item> | ||||
|        <widget class="QPushButton" name="go2ClearPrevText"> | ||||
|         <property name="maximumSize"> | ||||
|          <size> | ||||
|           <width>30</width> | ||||
|           <height>16777215</height> | ||||
|          </size> | ||||
|         </property> | ||||
|         <property name="toolTip"> | ||||
|          <string>Clear previous text</string> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string/> | ||||
|         </property> | ||||
|         <property name="icon"> | ||||
|          <iconset resource="../../../sdrgui/resources/res.qrc"> | ||||
|           <normaloff>:/sweep.png</normaloff>:/sweep.png</iconset> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="Line" name="row4Separator1_2"> | ||||
|         <property name="orientation"> | ||||
|          <enum>Qt::Vertical</enum> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="go2PrevText"> | ||||
|         <property name="toolTip"> | ||||
|          <string>Previous radio text</string> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string/> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|  | ||||
| @ -80,6 +80,7 @@ public: | ||||
| 	bool           m_g2_updated; | ||||
| 	unsigned int   m_g2_count; | ||||
| 	char           m_g2_radiotext[64+1]; | ||||
| 	bool           m_radiotext_AB_flag; | ||||
| 
 | ||||
| 	// G3 data
 | ||||
| 	bool           m_g3_updated; | ||||
| @ -193,7 +194,6 @@ private: | ||||
| 	unsigned char  pi_country_identification; | ||||
| 	unsigned char  pi_program_reference_number; | ||||
| 
 | ||||
| 	bool           m_radiotext_AB_flag; | ||||
| 	bool           debug; | ||||
| 	bool           log; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user