summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2019-07-09 08:35:00 +0200
committerMarcus Meissner <marcus@jet.franken.de>2019-07-09 08:35:00 +0200
commitf124228ff6bc592cc80aa0afe943ab0aa37373ee (patch)
tree21f093fa551f6609c0e6404f8a4afb871543bf9d
parent4bcbb27564bf2a246fdb03b642fbfa940b315db6 (diff)
downloadlibgphoto2-f124228ff6bc592cc80aa0afe943ab0aa37373ee.tar.gz
added bulb config that just starts / ends captuzre
-rw-r--r--camlibs/lumix/lumix.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c
index e3b999ccc..cb374576b 100644
--- a/camlibs/lumix/lumix.c
+++ b/camlibs/lumix/lumix.c
@@ -1187,6 +1187,11 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, "12800");
gp_widget_append (section, widget);
+ gp_widget_new (GP_WIDGET_TOGGLE, _("Bulb"), &widget);
+ gp_widget_set_name (widget, "bulb");
+ gp_widget_set_value (widget, 2);
+ gp_widget_append (section, widget);
+
gp_widget_new (GP_WIDGET_TEXT, _("Autofocus Mode"), &widget);
gp_widget_set_name (widget, "afmode");
@@ -1341,6 +1346,20 @@ camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
sprintf(buf,"cam.cgi?mode=setsetting&type=device_name&value=%s", val);
loadCmd(camera,buf);
}
+ if ((GP_OK == gp_widget_get_child_by_name(window, "bulb", &widget)) && gp_widget_changed (widget)) {
+ int val;
+
+ if (GP_OK != (ret = gp_widget_get_value (widget, &val)))
+ return ret;
+
+ if (val) {
+ ret = startCapture (camera);
+ if (ret != GP_OK)
+ return ret;
+ } else {
+ stopCapture(camera);
+ }
+ }
return GP_OK;
}