Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armhf support #4

Open
amm385 opened this issue May 21, 2019 · 2 comments
Open

armhf support #4

amm385 opened this issue May 21, 2019 · 2 comments

Comments

@amm385
Copy link

amm385 commented May 21, 2019

I found a .so library supposedly supporting armhf here: http://www.touptek.com/download/showdownload.php?lang=en&id=32
but am currently unable to get things working completely.

Specifically, the Toupcam_StartPullModeWithCallback function is returning a non-zero value and Toupcam_PullImage is returning an array of zeroes. Other simple functions are also returning non-zero response codes (e.g. Toupcam_get_HwVersion, Toupcam_get_SerialNumber). Relevant code below.

Unsure given the lack of error if this is user error on my part or some more legitimate bug, however

# Camera Initialization
class HToupCam(ctypes.Structure):
    _fields_ = [('unused', ctypes.c_int)]
...
func = lib.Toupcam_OpenByIndex
func.restype = ctypes.POINTER(HToupCam)
cam = func(index)

# Start Pull Mode
CB = ctypes.CFUNCTYPE(None, ctypes.c_uint, ctypes.c_void_p)
def dummy_fn():
    return True
frame_fn = CB(dummy_fn)
result = lib.Toupcam_StartPullModeWithCallback(cam, frame_fn)
# result = -2147467259
@jirhiker
Copy link
Member

Have you looked at https://github.com/NMGRL/toupcam/blob/master/camera.py to see how Ive been using
Toupcam_StartPullModeWithCallback, Toupcam_get_HwVersion, Toupcam_get_SerialNumber.

for the most part your code looks correct. Id stick with trying to get Toupcam_get_HwVersion, Toupcam_get_SerialNumber to return correct results before moving on to getting the image data.

@amm385
Copy link
Author

amm385 commented May 24, 2019

Yep, that's where I've been getting the inspiration for my code from. Unfortunately I opted to just go with a different camera so sent my camera back in the mail today and won't be able to debug further :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants