Don't send EasyComm I commands to EasyComm II rotators.

When setting position, an EasyComm I command sequence was being
sent to EasyComm II controllers. Since this sequence is not valid
for EasyComm II, controllers were forced to implement the older
format to work with rotctl. Instead, send the EasyComm I command
sequence only to EasyComm I controllers, and send a valid sequence
to EasyComm II controllers.
pull/127/head
Martin Cooper 2019-09-09 17:54:51 -07:00
rodzic 7909dda4ae
commit e820138748
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -93,7 +93,12 @@ easycomm_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);
sprintf(cmdstr, "AZ%.1f EL%.1f UP000 XXX DN000 XXX\n", az, el);
if (rot->caps->rot_model == ROT_MODEL_EASYCOMM1) {
sprintf(cmdstr, "AZ%.1f EL%.1f UP000 XXX DN000 XXX\n", az, el);
}
else { // for easycomm 2 & 3 and upwards
sprintf(cmdstr, "AZ%.1f EL%.1f\n", az, el);
}
retval = easycomm_transaction(rot, cmdstr, NULL, 0);
if (retval != RIG_OK) {
return retval;