kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			Frequency Tracker: REST API: added spectrum span log2 control: generated code
							rodzic
							
								
									30153a54b7
								
							
						
					
					
						commit
						23cebe596f
					
				|  | @ -3871,6 +3871,9 @@ margin-bottom: 20px; | |||
|     "title" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "spanLog2" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "alphaEMA" : { | ||||
|       "type" : "number", | ||||
|       "format" : "float", | ||||
|  | @ -40052,7 +40055,7 @@ except ApiException as e: | |||
|           </div> | ||||
|           <div id="generator"> | ||||
|             <div class="content"> | ||||
|               Generated 2020-10-27T06:18:18.403+01:00 | ||||
|               Generated 2020-10-27T06:29:00.746+01:00 | ||||
|             </div> | ||||
|           </div> | ||||
|       </div> | ||||
|  |  | |||
|  | @ -19,6 +19,8 @@ FreqTrackerSettings: | |||
|       type: integer | ||||
|     title: | ||||
|       type: string | ||||
|     spanLog2: | ||||
|       type: integer | ||||
|     alphaEMA: | ||||
|       description: Alpha factor for delta frequency EMA | ||||
|       type: number | ||||
|  |  | |||
|  | @ -3871,6 +3871,9 @@ margin-bottom: 20px; | |||
|     "title" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "spanLog2" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "alphaEMA" : { | ||||
|       "type" : "number", | ||||
|       "format" : "float", | ||||
|  | @ -40052,7 +40055,7 @@ except ApiException as e: | |||
|           </div> | ||||
|           <div id="generator"> | ||||
|             <div class="content"> | ||||
|               Generated 2020-10-27T06:18:18.403+01:00 | ||||
|               Generated 2020-10-27T06:29:00.746+01:00 | ||||
|             </div> | ||||
|           </div> | ||||
|       </div> | ||||
|  |  | |||
|  | @ -40,6 +40,8 @@ SWGFreqTrackerSettings::SWGFreqTrackerSettings() { | |||
|     m_rgb_color_isSet = false; | ||||
|     title = nullptr; | ||||
|     m_title_isSet = false; | ||||
|     span_log2 = 0; | ||||
|     m_span_log2_isSet = false; | ||||
|     alpha_ema = 0.0f; | ||||
|     m_alpha_ema_isSet = false; | ||||
|     tracking = 0; | ||||
|  | @ -86,6 +88,8 @@ SWGFreqTrackerSettings::init() { | |||
|     m_rgb_color_isSet = false; | ||||
|     title = new QString(""); | ||||
|     m_title_isSet = false; | ||||
|     span_log2 = 0; | ||||
|     m_span_log2_isSet = false; | ||||
|     alpha_ema = 0.0f; | ||||
|     m_alpha_ema_isSet = false; | ||||
|     tracking = 0; | ||||
|  | @ -133,6 +137,7 @@ SWGFreqTrackerSettings::cleanup() { | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     if(reverse_api_address != nullptr) {  | ||||
|         delete reverse_api_address; | ||||
|     } | ||||
|  | @ -164,6 +169,8 @@ SWGFreqTrackerSettings::fromJsonObject(QJsonObject &pJson) { | |||
|      | ||||
|     ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&span_log2, pJson["spanLog2"], "qint32", ""); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&alpha_ema, pJson["alphaEMA"], "float", ""); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&tracking, pJson["tracking"], "qint32", ""); | ||||
|  | @ -224,6 +231,9 @@ SWGFreqTrackerSettings::asJsonObject() { | |||
|     if(title != nullptr && *title != QString("")){ | ||||
|         toJsonValue(QString("title"), title, obj, QString("QString")); | ||||
|     } | ||||
|     if(m_span_log2_isSet){ | ||||
|         obj->insert("spanLog2", QJsonValue(span_log2)); | ||||
|     } | ||||
|     if(m_alpha_ema_isSet){ | ||||
|         obj->insert("alphaEMA", QJsonValue(alpha_ema)); | ||||
|     } | ||||
|  | @ -327,6 +337,16 @@ SWGFreqTrackerSettings::setTitle(QString* title) { | |||
|     this->m_title_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGFreqTrackerSettings::getSpanLog2() { | ||||
|     return span_log2; | ||||
| } | ||||
| void | ||||
| SWGFreqTrackerSettings::setSpanLog2(qint32 span_log2) { | ||||
|     this->span_log2 = span_log2; | ||||
|     this->m_span_log2_isSet = true; | ||||
| } | ||||
| 
 | ||||
| float | ||||
| SWGFreqTrackerSettings::getAlphaEma() { | ||||
|     return alpha_ema; | ||||
|  | @ -480,6 +500,9 @@ SWGFreqTrackerSettings::isSet(){ | |||
|         if(title && *title != QString("")){ | ||||
|             isObjectUpdated = true; break; | ||||
|         } | ||||
|         if(m_span_log2_isSet){ | ||||
|             isObjectUpdated = true; break; | ||||
|         } | ||||
|         if(m_alpha_ema_isSet){ | ||||
|             isObjectUpdated = true; break; | ||||
|         } | ||||
|  |  | |||
|  | @ -60,6 +60,9 @@ public: | |||
|     QString* getTitle(); | ||||
|     void setTitle(QString* title); | ||||
| 
 | ||||
|     qint32 getSpanLog2(); | ||||
|     void setSpanLog2(qint32 span_log2); | ||||
| 
 | ||||
|     float getAlphaEma(); | ||||
|     void setAlphaEma(float alpha_ema); | ||||
| 
 | ||||
|  | @ -121,6 +124,9 @@ private: | |||
|     QString* title; | ||||
|     bool m_title_isSet; | ||||
| 
 | ||||
|     qint32 span_log2; | ||||
|     bool m_span_log2_isSet; | ||||
| 
 | ||||
|     float alpha_ema; | ||||
|     bool m_alpha_ema_isSet; | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 f4exb
						f4exb