MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / UpdateExplorerData

Method UpdateExplorerData

src/gui/explorerpanel.cc:145–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 }
144
145 void UpdateExplorerData()
146 {
147 if (!IsQueueEmpty())
148 {
149 _explorerUpdatePending = true;
150 return;
151 }
152
153 _explorerUpdatePending = false;
154 QueueJob(
155 [this]()
156 {
157 int desiredTrack = explorerTrackSpinCtrl->GetValue();
158 int desiredSide = explorerSideSpinCtrl->GetValue();
159 if (!_explorerFluxmap || (desiredTrack != _explorerTrack) ||
160 (desiredSide != _explorerSide))
161 {
162 _explorerFluxmap = GetContext()
163 .GetFluxSource()
164 ->readFlux(desiredTrack, desiredSide)
165 ->next();
166 _explorerTrack = desiredTrack;
167 _explorerSide = desiredSide;
168 }
169
170 runOnUiThread(
171 [&]()
172 {
173 _state = STATE_IDLE;
174 UpdateState();
175
176 FluxmapReader fmr(*_explorerFluxmap);
177 fmr.seek(explorerStartTimeSpinCtrl->GetValue() * 1e6);
178
179 nanoseconds_t clock =
180 explorerClockSpinCtrl->GetValue() * 1e3;
181 FluxDecoder fluxDecoder(&fmr, clock, DecoderProto());
182 fluxDecoder.readBits(
183 explorerBitOffsetSpinCtrl->GetValue());
184 auto bits = fluxDecoder.readBits();
185
186 Bytes bytes;
187 switch (explorerDecodeChoice->GetSelection())
188 {
189 case 0:
190 bytes = fakeBits(bits);
191 break;
192
193 case 1:
194 bytes = toBytes(bits);
195 break;
196
197 case 2:
198 bytes = decodeFmMfm(bits.begin(), bits.end());
199 break;
200 }
201
202 if (explorerReverseCheckBox->GetValue())

Callers

nothing calls this directly

Calls 15

fakeBitsFunction · 0.85
hexdumpFunction · 0.85
GetValueMethod · 0.80
GetFluxSourceMethod · 0.80
reverseBitsMethod · 0.80
SetValueMethod · 0.80
runOnUiThreadFunction · 0.70
DecoderProtoClass · 0.50
toBytesFunction · 0.50
decodeFmMfmFunction · 0.50
nextMethod · 0.45
readFluxMethod · 0.45

Tested by

no test coverage detected