mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	XTRX output: REST API fixes
This commit is contained in:
		
							parent
							
								
									919c88b0ce
								
							
						
					
					
						commit
						8d4dc0c8ff
					
				| @ -1171,8 +1171,8 @@ int XTRXOutput::webapiSettingsGet( | ||||
|                 QString& errorMessage) | ||||
| { | ||||
|     (void) errorMessage; | ||||
|     response.setXtrxInputSettings(new SWGSDRangel::SWGXtrxInputSettings()); | ||||
|     response.getXtrxInputSettings()->init(); | ||||
|     response.setXtrxOutputSettings(new SWGSDRangel::SWGXtrxOutputSettings()); | ||||
|     response.getXtrxOutputSettings()->init(); | ||||
|     webapiFormatDeviceSettings(response, m_settings); | ||||
|     return 200; | ||||
| } | ||||
| @ -1280,7 +1280,7 @@ int XTRXOutput::webapiReportGet( | ||||
| { | ||||
|     (void) errorMessage; | ||||
|     response.setXtrxOutputReport(new SWGSDRangel::SWGXtrxOutputReport()); | ||||
|     response.getXtrxInputReport()->init(); | ||||
|     response.getXtrxOutputReport()->init(); | ||||
|     webapiFormatDeviceReport(response); | ||||
|     return 200; | ||||
| } | ||||
|  | ||||
| @ -2085,6 +2085,21 @@ bool WebAPIRequestMapper::validateDeviceSettings( | ||||
|             return false; | ||||
|         } | ||||
|     } | ||||
|     else if ((*deviceHwType == "XTRX") && (deviceSettings.getTx() != 0)) | ||||
|     { | ||||
|         if (jsonObject.contains("xtrxOutputSettings") && jsonObject["xtrxOutputSettings"].isObject()) | ||||
|         { | ||||
|             QJsonObject xtrxOutputSettingsJsonObject = jsonObject["xtrxOutputSettings"].toObject(); | ||||
|             deviceSettingsKeys = xtrxOutputSettingsJsonObject.keys(); | ||||
|             deviceSettings.setXtrxOutputSettings(new SWGSDRangel::SWGXtrxOutputSettings()); | ||||
|             deviceSettings.getXtrxOutputSettings()->fromJsonObject(xtrxOutputSettingsJsonObject); | ||||
|             return true; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         return false; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user