V124 1.修正功率配置过程,避免升功率或降功率时配置瞬间可能超出目标功率值的问题;2.修正上一版本配置功率时按下确认键,导致瞬间功率下降问题;3.调整LCD配置功率上限为衰减器最大上限;4.修正RS485通讯问题;
This commit is contained in:
+40
-6
@@ -88,6 +88,8 @@
|
||||
*/
|
||||
#define GT_BLK 64
|
||||
#define PILOT_DC 1.25f
|
||||
#define IQ_VSB_LOG_WINDOW_SEC 30
|
||||
#define IQ_VSB_LOG_MAX_COUNT 2
|
||||
|
||||
/* ---- working storage (BSS; the app already runs at ~143 MB RSS) ---- */
|
||||
static float xi[NSAMP], xq[NSAMP]; /* window as float, 2 MB */
|
||||
@@ -105,6 +107,35 @@ static pthread_mutex_t snr_mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||
static float snr_db_pub;
|
||||
static time_t snr_stamp;
|
||||
|
||||
/* iq_vsb_analyse() runs on one worker thread, so no lock is required here. */
|
||||
static int iq_vsb_log_allowed(void)
|
||||
{
|
||||
static struct timespec log_times[IQ_VSB_LOG_MAX_COUNT];
|
||||
static unsigned int log_count;
|
||||
struct timespec current;
|
||||
time_t elapsed_sec;
|
||||
long elapsed_nsec;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, ¤t);
|
||||
if(log_count < IQ_VSB_LOG_MAX_COUNT)
|
||||
{
|
||||
log_times[log_count++] = current;
|
||||
return 1;
|
||||
}
|
||||
|
||||
elapsed_sec = current.tv_sec - log_times[0].tv_sec;
|
||||
elapsed_nsec = current.tv_nsec - log_times[0].tv_nsec;
|
||||
if((elapsed_sec > IQ_VSB_LOG_WINDOW_SEC) ||
|
||||
((elapsed_sec == IQ_VSB_LOG_WINDOW_SEC) && (elapsed_nsec >= 0)))
|
||||
{
|
||||
log_times[0] = log_times[1];
|
||||
log_times[1] = current;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iq_get_snr(float *snr_db)
|
||||
{
|
||||
int fresh;
|
||||
@@ -710,10 +741,13 @@ void iq_vsb_analyse(const unsigned char *win, int wid)
|
||||
|
||||
minh = eyeh[0];
|
||||
for (j = 1; j < 7; j++) if (eyeh[j] < minh) minh = eyeh[j];
|
||||
printf("[iq_vsb] win %d: SNR %.2f dB (raw %.2f, ORx AGC jitter %.2f%%) tau %.4f theta %+.1f deg coff %+.3f Hz "
|
||||
"segsync %.1f@%d eye_w %.3f UI min_eye_h %.2f %s "
|
||||
"[ms: unpack %d tau %d demod %d stats %d eye %d total %d]\n",
|
||||
wid, snr, snr_raw, 100.0f * gjit, tau, th * 180.0f / (float)M_PI, coff, ratio, off, eye_w,
|
||||
minh, sync ? "SYNC" : "NOSYNC",
|
||||
ms(t0, t1), ms(t1, t2), ms(t2, t3), ms(t3, t4), ms(t4, t5), ms(t0, t5));
|
||||
if(iq_vsb_log_allowed())
|
||||
{
|
||||
printf("[iq_vsb] win %d: SNR %.2f dB (raw %.2f, ORx AGC jitter %.2f%%) tau %.4f theta %+.1f deg coff %+.3f Hz "
|
||||
"segsync %.1f@%d eye_w %.3f UI min_eye_h %.2f %s "
|
||||
"[ms: unpack %d tau %d demod %d stats %d eye %d total %d]\n",
|
||||
wid, snr, snr_raw, 100.0f * gjit, tau, th * 180.0f / (float)M_PI, coff, ratio, off, eye_w,
|
||||
minh, sync ? "SYNC" : "NOSYNC",
|
||||
ms(t0, t1), ms(t1, t2), ms(t2, t3), ms(t3, t4), ms(t4, t5), ms(t0, t5));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user