Bi-monthly release with minor bug fixes and improvements
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
git checkout celestron_work
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
ioctl(t_fd, TIOCEXCL)
t_fd = open(device, O_RDWR | O_NOCTTY | O_CLOEXEC);
Please Log in or Create an account to join the conversation.
void AuxCommunicator::Connect(int portFD)
{
serialPort = portFD;
}
bool AuxCommunicator::sendPacket(AuxTarget dest, AuxCommand cmd, buffer data)
{
AuxPacket pkt = AuxPacket(cmd, src, dest, data);
buffer txbuff;
pkt.fillBuf(txbuff);
int br;
int tty;
int len = txbuff.size();
char buf[len];
fprintf(stderr, "buff len %x:", len);
for (int i = 0; i < len; i++)
{
buf[i] = txbuff[i];
fprintf(stderr,"%2X ", buf[i]);
}
fprintf(stderr, "\n");
tcflush(serialPort, TCIOFLUSH);
tty = tty_write(serialPort, (const char *)buf, len, &br);
fprintf(stderr, "sendPacket br %x tty %x\n", br, tty);
return tty == TTY_OK;
}
Please Log in or Create an account to join the conversation.