kopia lustrzana https://github.com/Hamlib/Hamlib
Bug report from Chris (G3WIE), with fix in ars_set_position(az),
and fresh acquisition in ars_get_position. git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2905 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.11
rodzic
a76e8fc6bd
commit
44b5bb78c9
19
ars/ars.c
19
ars/ars.c
|
@ -333,7 +333,7 @@ ars_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
|||
if (curr_az < (az-AZ_RANGE))
|
||||
az_move = ROT_MOVE_RIGHT;
|
||||
else if (curr_az > (az+AZ_RANGE))
|
||||
az_move = ROT_MOVE_RIGHT;
|
||||
az_move = ROT_MOVE_LEFT;
|
||||
else
|
||||
az_move = 0;
|
||||
|
||||
|
@ -388,6 +388,23 @@ ars_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
|
|||
|
||||
par_lock (pport);
|
||||
|
||||
/* flush last sampled value, with a "short" read */
|
||||
CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN_CLK));
|
||||
usleep (PP_IO_PERIOD);
|
||||
|
||||
CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN_CS));
|
||||
usleep (PP_IO_PERIOD);
|
||||
|
||||
CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN_CLK));
|
||||
usleep (PP_IO_PERIOD);
|
||||
|
||||
CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN_CLK));
|
||||
usleep (PP_IO_PERIOD);
|
||||
|
||||
CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN_CS));
|
||||
/* end of "short" read */
|
||||
|
||||
|
||||
for (num_sample=0; num_sample < NUM_SAMPLES; num_sample++) {
|
||||
|
||||
/* read ADC value TLC(1)549 (8/10 bits), by SPI bitbanging */
|
||||
|
|
Ładowanie…
Reference in New Issue