| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							| 
									
										
										
										
											2023-11-18 13:12:18 +01:00
										 |  |  | // Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
 | 
					
						
							|  |  |  | // written by Christian Daniel                                                   //
 | 
					
						
							|  |  |  | // Copyright (C) 2015-2022 Edouard Griffiths, F4EXB <f4exb06@gmail.com>          //
 | 
					
						
							| 
									
										
										
										
											2024-02-16 16:31:12 +00:00
										 |  |  | // Copyright (C) 2020-2021, 2024 Jon Beniston, M7RCE <jon@beniston.com>          //
 | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // This program is free software; you can redistribute it and/or modify          //
 | 
					
						
							|  |  |  | // it under the terms of the GNU General Public License as published by          //
 | 
					
						
							|  |  |  | // the Free Software Foundation as version 3 of the License, or                  //
 | 
					
						
							|  |  |  | // (at your option) any later version.                                           //
 | 
					
						
							|  |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // This program is distributed in the hope that it will be useful,               //
 | 
					
						
							|  |  |  | // but WITHOUT ANY WARRANTY; without even the implied warranty of                //
 | 
					
						
							|  |  |  | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                  //
 | 
					
						
							|  |  |  | // GNU General Public License V3 for more details.                               //
 | 
					
						
							|  |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // You should have received a copy of the GNU General Public License             //
 | 
					
						
							|  |  |  | // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | 
					
						
							|  |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef INCLUDE_FEATURE_GS232CONTROLLERSETTINGS_H_
 | 
					
						
							|  |  |  | #define INCLUDE_FEATURE_GS232CONTROLLERSETTINGS_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QByteArray>
 | 
					
						
							|  |  |  | #include <QString>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-05 12:33:01 +01:00
										 |  |  | #include "inputcontrollersettings.h"
 | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class Serializable; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct GS232ControllerSettings | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2021-05-30 12:38:07 +01:00
										 |  |  |     float m_azimuth; | 
					
						
							|  |  |  |     float m_elevation; | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  |     QString m_serialPort; | 
					
						
							|  |  |  |     int m_baudRate; | 
					
						
							| 
									
										
										
										
											2021-11-23 12:13:24 +00:00
										 |  |  |     QString m_host; | 
					
						
							|  |  |  |     int m_port; | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  |     bool m_track; | 
					
						
							| 
									
										
										
										
											2021-10-03 23:15:15 +02:00
										 |  |  |     QString m_source;           // Plugin to get az/el from. E.g: "R0:0 ADSBDemod". Use a string, so can be set via WebAPI
 | 
					
						
							| 
									
										
										
										
											2023-07-27 14:57:57 +01:00
										 |  |  |     float m_azimuthOffset; | 
					
						
							|  |  |  |     float m_elevationOffset; | 
					
						
							| 
									
										
										
										
											2021-02-26 20:27:35 +00:00
										 |  |  |     int m_azimuthMin; | 
					
						
							|  |  |  |     int m_azimuthMax; | 
					
						
							|  |  |  |     int m_elevationMin; | 
					
						
							|  |  |  |     int m_elevationMax; | 
					
						
							| 
									
										
										
										
											2021-10-05 14:03:31 +01:00
										 |  |  |     float m_tolerance; | 
					
						
							| 
									
										
										
										
											2023-04-03 16:47:13 +01:00
										 |  |  |     enum Protocol { GS232, SPID, ROTCTLD, DFM } m_protocol; | 
					
						
							| 
									
										
										
										
											2021-11-23 12:13:24 +00:00
										 |  |  |     enum Connection { SERIAL, TCP } m_connection; | 
					
						
							| 
									
										
										
										
											2023-04-03 16:47:13 +01:00
										 |  |  |     int m_precision; | 
					
						
							|  |  |  |     enum Coordinates { AZ_EL, X_Y_85, X_Y_30 } m_coordinates; | 
					
						
							| 
									
										
										
										
											2023-04-23 19:52:02 +01:00
										 |  |  |     QString m_inputController; | 
					
						
							| 
									
										
										
										
											2023-08-05 12:33:01 +01:00
										 |  |  |     InputControllerSettings m_inputControllerSettings; | 
					
						
							|  |  |  |     bool m_targetControlEnabled; | 
					
						
							|  |  |  |     bool m_offsetControlEnabled; | 
					
						
							|  |  |  |     bool m_highSensitivity; | 
					
						
							| 
									
										
										
										
											2023-04-03 16:47:13 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     bool m_dfmTrackOn; | 
					
						
							|  |  |  |     bool m_dfmLubePumpsOn; | 
					
						
							|  |  |  |     bool m_dfmBrakesOn; | 
					
						
							|  |  |  |     bool m_dfmDrivesOn; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-09 05:27:12 +01:00
										 |  |  |     Serializable *m_rollupState; | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  |     QString m_title; | 
					
						
							|  |  |  |     quint32 m_rgbColor; | 
					
						
							|  |  |  |     bool m_useReverseAPI; | 
					
						
							|  |  |  |     QString m_reverseAPIAddress; | 
					
						
							|  |  |  |     uint16_t m_reverseAPIPort; | 
					
						
							|  |  |  |     uint16_t m_reverseAPIFeatureSetIndex; | 
					
						
							|  |  |  |     uint16_t m_reverseAPIFeatureIndex; | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |     int m_workspaceIndex; | 
					
						
							|  |  |  |     QByteArray m_geometryBytes; | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     GS232ControllerSettings(); | 
					
						
							|  |  |  |     void resetToDefaults(); | 
					
						
							|  |  |  |     QByteArray serialize() const; | 
					
						
							|  |  |  |     bool deserialize(const QByteArray& data); | 
					
						
							| 
									
										
										
										
											2022-01-09 05:27:12 +01:00
										 |  |  |     void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; } | 
					
						
							| 
									
										
										
										
											2021-10-05 14:03:31 +01:00
										 |  |  |     void calcTargetAzEl(float& targetAz, float& targetEl) const; | 
					
						
							| 
									
										
										
										
											2022-11-24 16:40:36 +01:00
										 |  |  |     void applySettings(const QStringList& settingsKeys, const GS232ControllerSettings& settings); | 
					
						
							|  |  |  |     QString getDebugString(const QStringList& settingsKeys, bool force=false) const; | 
					
						
							| 
									
										
										
										
											2021-01-13 19:44:53 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     static const QStringList m_pipeURIs; | 
					
						
							| 
									
										
										
										
											2020-10-27 16:22:10 +00:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // INCLUDE_FEATURE_GS232CONTROLLERSETTINGS_H_
 |