From 13da145b7f837a7960b19d07f40c0ef68ee59846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Thu, 27 May 2010 21:16:15 +0000 Subject: [PATCH] - set adc resolution to 10 bits - fix EL watchdog git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2925 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- ars/ars.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ars/ars.c b/ars/ars.c index 8f91cee76..e7599a4b5 100644 --- a/ars/ars.c +++ b/ars/ars.c @@ -157,7 +157,9 @@ ars_init(ROT *rot) priv->pp_control = 0; priv->pp_data = 0; - priv->adc_res = 8; /* 8 bits vs. 10 bits ADC */ + /* Always use 10 bit resolution, which supports also 8 bits + * at the cost of 2 potentialy wrong lsb */ + priv->adc_res = 10; /* 8 bits vs. 10 bits ADC */ priv->brake_off = 0; /* i.e. brake is ON */ priv->curr_move = 0; @@ -496,7 +498,7 @@ ars_set_position_sync(ROT *rot, azimuth_t az, elevation_t el) if (el_move != 0 && ars_has_el(rot) && angle_in_range(curr_el, prev_el, EL_RANGE)) { - if (rig_check_cache_timeout(&last_pos_az_tv, EL_WATCHDOG)) { + if (rig_check_cache_timeout(&last_pos_el_tv, EL_WATCHDOG)) { ars_stop(rot); return -RIG_ETIMEOUT; }