Skip to content

Conversation

@schacon
Copy link

@schacon schacon commented Jan 18, 2012

visca_cli only accepts up to a 1024 zoom value, but my D70p will accept values in excess of 15000 - 1024 is barely zoomed in at all.

@joshirupesh1987
Copy link

Dear Hi
I am using PIC MICROCONTROLLER

In this function I can't understand WriteFile function,because of this
function your code in not working in my compiler.

uint32_t
_VISCA_write_packet_data(VISCAInterface_t iface, VISCACamera_t camera,
VISCAPacket_t packet)
{
DWORD iBytesWritten;

WriteFile(iface->port_fd, packet->bytes, packet->length,
&iBytesWritten, NULL);
if ( iBytesWritten < packet->length )
return VISCA_FAILURE;
else
return VISCA_SUCCESS;
}
2nd doubt In this function I can't understand ReadFile *function,because
of this function your code in not working in my compiler.

uint32_t
_VISCA_get_packet(VISCAInterface_t *iface)
{
int pos=0;
BOOL rc;
DWORD iBytesRead;

// wait for message
rc=ReadFile(iface->port_fd, iface->ibuf, 1, &iBytesRead, NULL);
if ( !rc || iBytesRead==0 )
{
// Obtain the error code
//m_lLastError = ::GetLastError();
_RPTF0(_CRT_WARN,"ReadFile failed.\n");
return VISCA_FAILURE;
}
while (iface->ibuf[pos]!=VISCA_TERMINATOR) {
if ( ++pos >= VISCA_INPUT_BUFFER_SIZE )
{
// Obtain the error code
//m_lLastError = ::GetLastError();
_RPTF0(_CRT_WARN,"illegal reply packet.\n");
return VISCA_FAILURE;
}
rc=ReadFile(iface->port_fd, iface->ibuf + pos, 1, &iBytesRead, NULL);
if ( !rc || iBytesRead==0 )
{
// Obtain the error code
//m_lLastError = ::GetLastError();
_RPTF0(_CRT_WARN,"ReadFile failed.\n");
return VISCA_FAILURE;
}
}
iface->bytes=pos+1;

return VISCA_SUCCESS;
}
rest of thing are understandable

Please give response on my email id [email protected]

Thanks

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

Successfully merging this pull request may close these issues.

2 participants