Fixed occasional corruption (Windows Only)

Also small fix for doubled sample rate.
This commit is contained in:
EspoTek 2017-04-09 15:28:18 +10:00
parent 82913bfb45
commit 642f0c6d7f
9 changed files with 17 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.1.0, 2017-03-26T13:41:00. --> <!-- Written by QtCreator 4.1.0, 2017-04-09T15:06:27. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

Binary file not shown.

View File

@ -669,7 +669,7 @@ void isoDriver::frameActionGeneric(char CH1_mode, char CH2_mode) //0 for off, 1
if(CH2_mode) readData375_CH2 = internalBuffer375_CH2->readBuffer(window,GRAPH_SAMPLES,CH1_mode==2, delay + (triggerEnabled ? triggerDelay + window/2 : 0)); if(CH2_mode) readData375_CH2 = internalBuffer375_CH2->readBuffer(window,GRAPH_SAMPLES,CH1_mode==2, delay + (triggerEnabled ? triggerDelay + window/2 : 0));
if(CH1_mode == -1) readData750 = internalBuffer750->readBuffer(window,GRAPH_SAMPLES,false, delay + (triggerEnabled ? triggerDelay + window/2 : 0)); if(CH1_mode == -1) readData750 = internalBuffer750->readBuffer(window,GRAPH_SAMPLES,false, delay + (triggerEnabled ? triggerDelay + window/2 : 0));
qDebug() << "Trigger Delay =" << triggerDelay; //qDebug() << "Trigger Delay =" << triggerDelay;
QVector<double> x(GRAPH_SAMPLES), CH1(GRAPH_SAMPLES), CH2(GRAPH_SAMPLES); QVector<double> x(GRAPH_SAMPLES), CH1(GRAPH_SAMPLES), CH2(GRAPH_SAMPLES);

View File

@ -37,6 +37,10 @@ void bufferControl::scopeIn_CH1(bool state){ //What about DSR!?
scopeUncheck(0); scopeUncheck(0);
} }
if(!state){
scopeDsrUncheck(0);
}
scopeDsrOut(state); scopeDsrOut(state);
scopeOut_CH2(state); scopeOut_CH2(state);

View File

@ -253,6 +253,17 @@ void winUsbDriver::isoTimerTick(void){
bufferLengths[currentWriteBuffer] = packetLength; bufferLengths[currentWriteBuffer] = packetLength;
currentWriteBuffer = !currentWriteBuffer; currentWriteBuffer = !currentWriteBuffer;
//Check for incorrect setup and kill if that were the case.
UINT ep0frame = isoCtx[0][earliest]->StartFrame;
UINT epkframe = isoCtx[NUM_ISO_ENDPOINTS-1][earliest]->StartFrame;
UINT framePhaseError = epkframe - ep0frame;
if(framePhaseError){
qDebug("Frame phase error of %d", framePhaseError);
killMe();
}
UINT oldStart; UINT oldStart;
//Setup transfer for resubmission //Setup transfer for resubmission
for(unsigned char k=0; k<NUM_ISO_ENDPOINTS; k++){ for(unsigned char k=0; k<NUM_ISO_ENDPOINTS; k++){