MCPcopy Create free account
hub / github.com/ON4QZ/QSSTV / init

Method init

src/sstv/syncprocessor.cpp:128–170  ·  view source on GitHub ↗

* @brief initialize sync processor * idxStart and idxEnd are set for narrow or wide modes in Auto mode, else idxStart=idxEnd= selected mode * enableSyncDetection is set to false for AVT modes. * */

Source from the content-addressed store, hash-verified

126 *
127 */
128void syncProcessor::init()
129{
130 enableSyncDetection=true;
131 // syncAvg=0;
132
133 if(detectNarrow)
134 {
135 idxStart=STARTNARROW;
136 idxEnd=ENDNARROW;
137 }
138 else
139 {
140 idxStart=STARTWIDE;
141 idxEnd=ENDWIDE;
142 }
143
144 if(sstvModeIndexRx!=0)
145 {
146 // if((sstvModeIndexRx>=idxStart) && (sstvModeIndexRx<=idxEnd))
147 {
148 idxEnd=idxStart=(esstvMode)(sstvModeIndexRx-1);
149 if((idxStart>=AVT24)&&(idxStart<=AVT94))
150 {
151 enableSyncDetection=false;
152 }
153 }
154 }
155 visMode=NOTVALID; // and reset the visMode
156 syncProcesState=MODEDETECT;
157 modifiedClock=rxClock/SUBSAMPLINGFACTOR;
158 syncArrayIndex=0;
159 syncArray[0].init();
160 retraceFlag=false;
161 syncState=SYNCOFF;
162 displaySyncEvent* ce;
163 ce = new displaySyncEvent(0); // reset sync vuMeter
164 QApplication::postEvent(dispatcherPtr, ce);
165 addToLog("init called",LOGSYNCSTATE);
166 clearMatchArray();
167 currentMode=NOTVALID;
168 lineTolerance=LINETOLERANCEMODEDETECT;
169 minMatchedLines=sensitivityArray[sensitivity].minMatchedLines;
170}
171
172/**
173 * @brief process the data buffer to extract syncs

Callers 2

syncprocessor.cppFile · 0.45
createModeBaseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected