Skip to content
Snippets Groups Projects
Commit ce10d407 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Setting pixel clock, modifies frame_rate

parent 2eb941d5
No related branches found
No related tags found
No related merge requests found
...@@ -340,10 +340,13 @@ void CMvbluefox3::SetConfig(CParams &params, bool ini) ...@@ -340,10 +340,13 @@ void CMvbluefox3::SetConfig(CParams &params, bool ini)
// Request time out // Request time out
if (ini || this->params_.req_timeout != params.req_timeout) if (ini || this->params_.req_timeout != params.req_timeout)
SetTimeoutMS(params.req_timeout); SetTimeoutMS(params.req_timeout);
// Pixel Clock // Pixel Clock
if (ini || this->params_.pixel_clock != params.pixel_clock) if (ini || this->params_.pixel_clock != params.pixel_clock)
{
SetPixelClock(params.pixel_clock); SetPixelClock(params.pixel_clock);
params.frame_rate = this->params_.frame_rate;
}
// Frame rate // Frame rate
if (ini || this->params_.frame_rate != params.frame_rate) if (ini || this->params_.frame_rate != params.frame_rate)
...@@ -638,6 +641,7 @@ void CMvbluefox3::SetPixelClock(int &pclk_khz) ...@@ -638,6 +641,7 @@ void CMvbluefox3::SetPixelClock(int &pclk_khz)
WriteProperty(this->dev_ctrl_->mvDeviceClockFrequency,pclk_khz); WriteProperty(this->dev_ctrl_->mvDeviceClockFrequency,pclk_khz);
int fps = PixelClockToFrameRate(pclk_khz, params_.width, params_.height, params_.expose_us); int fps = PixelClockToFrameRate(pclk_khz, params_.width, params_.height, params_.expose_us);
SetFrameRate(fps); SetFrameRate(fps);
this->params_.frame_rate=fps;
}catch (CmvBlueFOX3Exception& e) { }catch (CmvBlueFOX3Exception& e) {
throw CmvBlueFOX3Exception(_HERE_, "Unable to set pixel clock: " + e.what() ); throw CmvBlueFOX3Exception(_HERE_, "Unable to set pixel clock: " + e.what() );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment