pyueye set the pixel clock

714 Views Asked by At

I am trying to set the pixel clock using pyueye. to get it I do:

from ctypes import *
from pyueye import ueye
PIXELCLOCK_CMD_GET=5
pc = c_int()
ueye.is_PixelClock(self._hcam, PIXELCLOCK_CMD_GET, byref(pc), sizeof(pc))

and it works to set it I tried:

PIXELCLOCK_CMD_SET=6
pc = c_int(100)
ueye.is_PixelClock(self._hcam, PIXELCLOCK_CMD_SET, byref(pc), sizeof(pc))

but it returns 125 (wrong input type apparently)

I tried pointer(pc) instead of byref etc ... but I haven't found any solutions.

any idea ?

1

There are 1 best solutions below

0
On

I'm not working on that project right now so I can't test it but did you try to declare it as a pointer?

PIXELCLOCK_CMD_SET=6
pc = (c_int * 1)(100)
ueye.is_PixelClock(self._hcam, PIXELCLOCK_CMD_SET, pc, sizeof(pc))