Skip to content

Commit

Permalink
Try to set UDP format and use echo for handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Mar 27, 2020
1 parent 5a9de37 commit c18244d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions indi-armadillo-platypus/dragonfly_dome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ bool DragonFlyDome::initProperties()
///////////////////////////////////////////////////////////////////////////////////////////////
// #5 Misc.
///////////////////////////////////////////////////////////////////////////////////////////////
tcpConnection->setDefaultHost("192.168.1.1");
tcpConnection->setDefaultPort(10000);
tcpConnection->setConnectionType(Connection::TCP::TYPE_UDP);
tty_set_skywatcher_udp_format(1);
tty_set_debug(1);
addDebugControl();
return true;
}
Expand Down Expand Up @@ -242,8 +246,7 @@ bool DragonFlyDome::updateProperties()

bool DragonFlyDome::Handshake()
{
LOG_INFO("Error communicating with the DragonFly Dome. Please ensure it is powered and the port is correct.");
return false;
return echo();
}

const char *DragonFlyDome::getDefaultName()
Expand Down Expand Up @@ -612,10 +615,7 @@ bool DragonFlyDome::sendCommand(const char * cmd, int32_t &res)

LOGF_DEBUG("CMD <%s>", cmd);

char formatted_command[DRIVER_LEN] = {0};
snprintf(formatted_command, DRIVER_LEN, "%s\r", cmd);
int rc = tty_write_string(PortFD, formatted_command, &nbytes_written);

int rc = tty_write_string(PortFD, cmd, &nbytes_written);

if (rc != TTY_OK)
{
Expand Down

0 comments on commit c18244d

Please sign in to comment.