diff --git a/src/input.c b/src/input.c index 7952cf2f..cdac24f9 100644 --- a/src/input.c +++ b/src/input.c @@ -75,10 +75,10 @@ tvh_input_stream_create_msg htsmsg_add_str(m, "stream", st->stream_name); htsmsg_add_u32(m, "subs", st->subs_count); htsmsg_add_u32(m, "weight", st->max_weight); - htsmsg_add_u32(m, "signal", st->stats.signal); + htsmsg_add_s32(m, "signal", st->stats.signal); htsmsg_add_u32(m, "signal_scale", st->stats.signal_scale); htsmsg_add_u32(m, "ber", st->stats.ber); - htsmsg_add_u32(m, "snr", st->stats.snr); + htsmsg_add_s32(m, "snr", st->stats.snr); htsmsg_add_u32(m, "snr_scale", st->stats.snr_scale); htsmsg_add_u32(m, "unc", st->stats.unc); htsmsg_add_u32(m, "bps", st->stats.bps); diff --git a/src/tvheadend.h b/src/tvheadend.h index 04a18c4a..a4b04f4e 100644 --- a/src/tvheadend.h +++ b/src/tvheadend.h @@ -252,7 +252,7 @@ typedef enum { typedef enum { SIGNAL_STATUS_SCALE_UNKNOWN = 0, SIGNAL_STATUS_SCALE_RELATIVE, // value is unsigned, where 0 means 0% and 65535 means 100% - SIGNAL_STATUS_SCALE_DECIBEL // value is measured in dB + SIGNAL_STATUS_SCALE_DECIBEL // value is measured in dB * 1000 } signal_status_scale_t; /** diff --git a/src/webui/static/app/status.js b/src/webui/static/app/status.js index f937b86f..819032f8 100644 --- a/src/webui/static/app/status.js +++ b/src/webui/static/app/status.js @@ -363,7 +363,7 @@ tvheadend.status_streams = function(panel, index) if (scale == 1) return v; if (scale == 2 && v > 0) { - var snr = v * 0.0001; + var snr = v * 0.001; return snr.toFixed(1) + " dB"; } return 'Unknown'; @@ -382,8 +382,8 @@ tvheadend.status_streams = function(panel, index) var scale = record.get('snr_scale'); if (scale == 1) return v; - if (scale == 2 && v > 0) { - var snr = v * 0.0001; + if (scale == 2) { + var snr = v * 0.001; return snr.toFixed(1) + " dBm"; } return 'Unknown';