Example #1
0
  ThermalScannerApp()
    : readingsTree(
        0.0, 0.0, 360.0, thermalObservedPitchRange, 4
      )
    , scannerThread(&ThermalScannerApp::scannerThreadFunc, this)
    , httpdThread(&ThermalScannerApp::httpdThreadFunc, this)
    , wsdThread(&ThermalScannerApp::wsdThreadFunc, this)
  {
    isRunning = true;

    viewPitch = thermalViewPitchRange/2.0;
    viewYaw = 180.0;
    isViewLockedToDeviceOrientation = false;

    prevThermalUpdateTime = 0.0;

    viewImage.create(windowWidth, windowHeight);

    for(int i = 0; i < 0; i++) {
      RectTree<SensorReading>::Rect rect(
        (double)rand()/(double)RAND_MAX*360.0,
        (double)rand()/(double)RAND_MAX*thermalObservedPitchRange,
        (double)rand()/(double)RAND_MAX*50.0,
        (double)rand()/(double)RAND_MAX*50.0,
        SensorReading((double)rand()/(double)RAND_MAX*30.0, 5)
      );
      readingsTree.add(rect);
    }

    if(!font.loadFromFile("Arial Black.ttf")) {
      throw std::runtime_error("Unable to load font!");
    }

    sensorUpdateDelay = 35;
    scannerThread.launch();

    httpdThread.launch();

    //wsdThread.launch();
    wsdThread.launch();
  }
Example #2
0
		/// starts the thread.
		void start()
		{
			if(!m_isRunning)
			{
				m_isRunning = true;
				std::cout << "Started thread " << m_name << std::endl;
				m_thread.launch();
			}
			else
				std::cout << "WARNING: AThread::run: already running "
					<< m_name << std::endl;
		}
Example #3
0
void FeVideoImp::play()
{
	run_video_thread = true;
	video_timer.restart();
	m_video_thread.launch();
}