Start the scan thread!
| 162 | |
| 163 | // Start the scan thread! |
| 164 | void Cameras::StartScan() |
| 165 | { |
| 166 | if (GetInitialData() == true) |
| 167 | { |
| 168 | myScanThread = new ScanThread(window, captureThread, scanStatus, noLaserImage, laserCenteredImage, distanceToReferenceWall); |
| 169 | if ( myScanThread->Create() != wxTHREAD_NO_ERROR ) |
| 170 | { |
| 171 | m_pMemo->AppendText(wxT("\nFailed to create scan thread.")); |
| 172 | } else { |
| 173 | scanStatus->SetScanning(true); |
| 174 | myScanThread->SetThresholdPixelValue(thresholdPixelValue); |
| 175 | myScanThread->SetBrightnessThreshold(brightnessFilterValue); |
| 176 | myScanThread->Run(); |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | // Shutdown the thread |
| 182 | void Cameras::StopCaptureThread() |
no test coverage detected