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

setFocus: Attempt to call a nil value (global 'SendVR') #171

Open
greezybacon opened this issue Aug 4, 2021 · 1 comment
Open

setFocus: Attempt to call a nil value (global 'SendVR') #171

greezybacon opened this issue Aug 4, 2021 · 1 comment

Comments

@greezybacon
Copy link

With the Arducam USB 3.0 plus shield, UC-593, Rev C; and an IMX230 MIPI camera connected, I am able to build the Streaming demo (on ARM64 platform using the source in the Nvidia_Jetson folder).

Extending the code to work the focus motor, when I call the "setFocus" control with ArduCam_setCtrl(cameraHandle, "setFocus", focus);, I get no effect and this output on the console:

=[string "function setFocus(val)..."]:7: attempt to call a nil value (global 'SendVR')

Is there something I should setup prior to calling the setFocus control?

@greezybacon
Copy link
Author

greezybacon commented Aug 5, 2021

I was able to control the focus motor with this code (interpreted from the setFocus Lua code in the config file):

uint16_t val = (focus << 4) & 0x3ff0;
uint16_t high = (val >> 8) & 0x3f;
uint8_t data[] = { val & 0xf0 };
ArduCam_setboardConfig(cameraHandle, 0xD7, 0x1800, high << 8, 1, data);

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

1 participant