From b88b6a12795cdcf6a2b6e9093e3a327c4ffb44cc Mon Sep 17 00:00:00 2001 From: Frank Neumann Date: Sun, 21 May 2017 21:07:24 +0200 Subject: Commit text2skin-signal.patch (thx tomas@vdr-portal.de) --- HISTORY | 1 + common.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/HISTORY b/HISTORY index 18ecee4..0ef542a 100644 --- a/HISTORY +++ b/HISTORY @@ -11,6 +11,7 @@ VDR Plugin 'text2skin' Revision History - Commit common_c.diff most probably by Christian Winninger (unknown source) - Commit status_c.diff most probably by Gerald Dachs (unknown source) - Commit static-std-string.diff by Lars Hanisch (unknown source) +- Commit text2skin-signal.patch by tomas@vdr-portal.de (unknown source) 2011-11-06: Version 1.3.2 diff --git a/common.c b/common.c index b078e14..dbe61f9 100644 --- a/common.c +++ b/common.c @@ -87,6 +87,8 @@ const cRecording *GetRecordingByFileName(const char *FileName) return (FileName) ? Recordings.GetByName(FileName) : NULL; } +#if VDRVERSNUM < 20000 + int GetFrontendSTR(void) { uint16_t value = 0; @@ -114,6 +116,27 @@ int GetFrontendSNR(void) return value / 655; } +#endif + +#if VDRVERSNUM >= 20000 +int GetFrontendSTR(void) +{ + int SignalStrength = cDevice::ActualDevice()->SignalStrength(); + if ( SignalStrength < 0) + return 0; + + return SignalStrength; +} + +int GetFrontendSNR(void) +{ + int SignalQuality = cDevice::ActualDevice()->SignalQuality(); + if ( SignalQuality < 0) + return 0; + + return SignalQuality; +} +#endif bool GetFrontendHasLock(void) { -- cgit v1.2.3