diff --git a/src/camera/TarisCameraSource.cpp b/src/camera/TarisCameraSource.cpp index 1e08e8f..fd9c1c7 100644 --- a/src/camera/TarisCameraSource.cpp +++ b/src/camera/TarisCameraSource.cpp @@ -408,12 +408,6 @@ struct TarisCameraSource::Impl { } } - float rate = static_cast(o.frame_rate_hz); - r = api->dev_setparam(dev, param::kFramerateHz, &rate, kTypeSingle); - if (!ok(r)) - LOG_WARN << "thermal camera: cannot set " << o.frame_rate_hz - << " Hz: " << describe(r) << "; it runs at its own rate"; - // Polling, before and again after starting: the SDK resets it on startgrab. setInt32(param::kPollingEnable, 1); r = api->dev_startgrab(dev, 0); @@ -424,6 +418,16 @@ struct TarisCameraSource::Impl { } setInt32(param::kPollingEnable, 1); + // The frame rate only once grabbing: set before the first startgrab after + // connecting, the camera answers ok and keeps sending what it sent before + // - 50 fps from power-up, 31 MB/s and 22 000 packets a second for the SDK + // and the CPU to take in (measured on tower 111). Set now, it holds. + float rate = static_cast(o.frame_rate_hz); + r = api->dev_setparam(dev, param::kFramerateHz, &rate, kTypeSingle); + if (!ok(r)) + LOG_WARN << "thermal camera: cannot set " << o.frame_rate_hz + << " Hz: " << describe(r) << "; it runs at its own rate"; + std::string model; getString(param::kCameraName, model); {