From e3795d880e37990ae1cfb3269201461d6ce5df02 Mon Sep 17 00:00:00 2001 From: AirplaneGoBrr Date: Sun, 12 Nov 2023 19:16:57 -0800 Subject: [PATCH 1/2] Fixed bugs + "Typo" fix Added import of `PropertyEvent` and also added index to GetPropertyData as well as a "typo" fix to the SetCapacity comment --- examples/save_image.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/save_image.py b/examples/save_image.py index 3eaa126..bf045fe 100644 --- a/examples/save_image.py +++ b/examples/save_image.py @@ -11,6 +11,7 @@ Access, SaveTo, EdsObject, + PropertyEvent ) if os.name == "nt": @@ -62,7 +63,7 @@ def callback_object(event: ObjectEvent, object_handle: EdsObject) -> int: edsdk.SetPropertyData(cam, PropID.SaveTo, 0, SaveTo.Host) print(edsdk.GetPropertyData(cam, PropID.SaveTo)) - # Sets HD Capacity to an arbitrary big value + # Sets (Computer's) Capacity to an arbitrary big value edsdk.SetCapacity( cam, {"reset": True, "bytesPerSector": 512, "numberOfFreeClusters": 2147483647} ) From cad80b03a1206688ebd0bce2fe1d865fe0ffc5a8 Mon Sep 17 00:00:00 2001 From: AirplaneGoBrr Date: Sun, 12 Nov 2023 19:19:18 -0800 Subject: [PATCH 2/2] Forgot to add index Added index to `GetPropertyData` function --- examples/save_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/save_image.py b/examples/save_image.py index bf045fe..9e53b61 100644 --- a/examples/save_image.py +++ b/examples/save_image.py @@ -61,7 +61,7 @@ def callback_object(event: ObjectEvent, object_handle: EdsObject) -> int: edsdk.OpenSession(cam) edsdk.SetObjectEventHandler(cam, ObjectEvent.All, callback_object) edsdk.SetPropertyData(cam, PropID.SaveTo, 0, SaveTo.Host) - print(edsdk.GetPropertyData(cam, PropID.SaveTo)) + print(edsdk.GetPropertyData(cam, PropID.SaveTo, 0)) # Sets (Computer's) Capacity to an arbitrary big value edsdk.SetCapacity(