0

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 ?

p.deman
  • 584
  • 2
  • 10
  • 24

1 Answers1

0

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))
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Slvdr05
  • 11
  • 4