kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
64babdb361
commit
e4716be366
|
@ -229,6 +229,14 @@
|
|||
* The GS232_GENERIC backend can be used with rotators that support the
|
||||
* generic (even if not coded correctly) GS-232 protocol.
|
||||
*/
|
||||
/**
|
||||
* \brief A macro that returns the model number of the GS232 backend.
|
||||
*
|
||||
* \def ROT_MODEL_AF6SA_WRC
|
||||
*
|
||||
* The GS232_GENERIC backend can be used with rotators that support the
|
||||
* generic (even if not coded correctly) GS-232 protocol.
|
||||
*/
|
||||
/**
|
||||
* \brief A macro that returns the model number of the GS232B backend.
|
||||
*
|
||||
|
@ -326,6 +334,7 @@
|
|||
#define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11)
|
||||
#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)
|
||||
#define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13)
|
||||
#define ROT_MODEL_AF6SA_WRC ROT_MAKE_MODEL(ROT_GS232A, 14)
|
||||
|
||||
#define ROT_ARRAYSOLUTIONS 7
|
||||
#define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions"
|
||||
|
|
|
@ -141,6 +141,33 @@ gs232_wo_transaction(ROT *rot, const char *cmdstr,
|
|||
strlen(cmdstr));
|
||||
}
|
||||
|
||||
static int
|
||||
wrc_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
||||
{
|
||||
char cmdstr[64];
|
||||
int retval;
|
||||
unsigned u_az, u_el;
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
|
||||
|
||||
if (az < 0.0)
|
||||
{
|
||||
az = az + 360.0;
|
||||
}
|
||||
|
||||
u_az = (unsigned)rint(az);
|
||||
u_el = (unsigned)rint(el);
|
||||
|
||||
SNPRINTF(cmdstr, sizeof(cmdstr), "W%03u" EOM, u_az);
|
||||
retval = gs232_wo_transaction(rot, cmdstr, NULL, 0);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
gs232_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
||||
|
@ -392,3 +419,38 @@ const struct rot_caps f1tetracker_rot_caps =
|
|||
#endif
|
||||
};
|
||||
|
||||
/* ************************************************************************* */
|
||||
/*
|
||||
* AF6SA WRC
|
||||
*/
|
||||
|
||||
const struct rot_caps gs232_af6sa_wrc_caps =
|
||||
{
|
||||
ROT_MODEL(ROT_MODEL_AF6SA_WRC),
|
||||
.model_name = "WRC",
|
||||
.mfg_name = "AF6SA",
|
||||
.version = "20250707.0",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_STABLE,
|
||||
.rot_type = ROT_TYPE_AZEL,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 150,
|
||||
.serial_rate_max = 9600,
|
||||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 1,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = 0,
|
||||
.post_write_delay = 0,
|
||||
.timeout = 400,
|
||||
.retry = 1,
|
||||
|
||||
.min_az = -180.0,
|
||||
.max_az = 450.0, /* vary according to rotator type */
|
||||
.min_el = 0.0,
|
||||
.max_el = 180.0,
|
||||
|
||||
.get_position = gs232_rot_get_position,
|
||||
.set_position = wrc_rot_set_position,
|
||||
.stop = gs232_rot_stop,
|
||||
};
|
||||
|
|
|
@ -661,6 +661,7 @@ DECLARE_INITROT_BACKEND(gs232a)
|
|||
rot_register(&gs232_rot_caps);
|
||||
rot_register(&amsat_lvb_rot_caps);
|
||||
rot_register(&st2_rot_caps);
|
||||
rot_register(&gs232_af6sa_wrc_caps);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -37,5 +37,6 @@ extern const struct rot_caps gs23_az_rot_caps;
|
|||
extern const struct rot_caps gs232_rot_caps;
|
||||
extern const struct rot_caps amsat_lvb_rot_caps;
|
||||
extern const struct rot_caps st2_rot_caps;
|
||||
extern const struct rot_caps gs232_af6sa_wrc_caps;
|
||||
|
||||
#endif /* _ROT_GS232A_H */
|
||||
|
|
Ładowanie…
Reference in New Issue