diff options
-rw-r--r-- | plugins/ufo/uca-ufo-camera.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c index 551e5f0..3f6d42c 100644 --- a/plugins/ufo/uca-ufo-camera.c +++ b/plugins/ufo/uca-ufo-camera.c @@ -86,6 +86,7 @@ static gint base_overrideables[] = { PROP_SENSOR_MAX_FRAME_RATE, PROP_SENSOR_BITDEPTH, PROP_EXPOSURE_TIME, + PROP_FRAMES_PER_SECOND, PROP_ROI_X, PROP_ROI_Y, PROP_ROI_WIDTH, @@ -495,6 +496,25 @@ uca_ufo_camera_get_property(GObject *object, guint property_id, GValue *value, G g_value_set_double (value, read_register_value (priv->handle, "cmosis_exp_time") * 129.0 / frequency / 1e6); } break; + case PROP_FRAMES_PER_SECOND: + { + gdouble exposure_time; + gdouble fps; + guint trigger_period; + guint roi_height; + + g_object_get (object, + "exposure-time", &exposure_time, + "ufo-trigger-period", &trigger_period, + "roi-height", &roi_height, + NULL); + + fps = 1. / (exposure_time + + (roi_height / 1088. * 2924. * 1e-6)+ + (trigger_period * 8. * 1e-9)); + g_value_set_double(value, fps); + } + break; case PROP_HAS_STREAMING: g_value_set_boolean(value, TRUE); break; |