1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00

Added signal level units (Thanks to Winfried).

This commit is contained in:
Rolf Ahrenberg 2019-10-27 16:50:01 +02:00
parent d366856c71
commit ff59839f7d
24 changed files with 293 additions and 36 deletions

View File

@ -547,3 +547,7 @@ VDR Plugin 'femon' Revision History
2018-04-15: Version 2.4.0 2018-04-15: Version 2.4.0
- Updated for vdr-2.4.0. - Updated for vdr-2.4.0.
2019-xx-xx: Version 2.4.1
- Added signal level units (Thanks to Winfried).

2
README
View File

@ -38,7 +38,7 @@ Terminology:
| [LOCK] [SIGNAL] [CARRIER] [VITERBI] [SYNC] | | [LOCK] [SIGNAL] [CARRIER] [VITERBI] [SYNC] |
-------------------------------------------------------------- --------------------------------------------------------------
STR - Signal strength in dBm STR - Signal strength in dBm/dBuV/dbV
CNR - Signal-to-noise ratio of the main carrier in dB CNR - Signal-to-noise ratio of the main carrier in dB
BER - Bit error rate after the forward error correction (FEC) done by inner code block BER - Bit error rate after the forward error correction (FEC) done by inner code block
PER - Block error rate after the outer forward error correction coding PER - Block error rate after the outer forward error correction coding

View File

@ -20,6 +20,7 @@ cFemonConfig::cFemonConfig()
themeM(0), themeM(0),
positionM(1), positionM(1),
downscaleM(0), downscaleM(0),
signalUnitM(0),
redLimitM(33), redLimitM(33),
greenLimitM(66), greenLimitM(66),
updateIntervalM(5), updateIntervalM(5),

View File

@ -19,6 +19,14 @@ enum eFemonModes
eFemonModeMaxNumber eFemonModeMaxNumber
}; };
enum eFemonSignalUnit
{
eFemonSignalUnitdBm,
eFemonSignalUnitdBuV,
eFemonSignalUnitdBV,
eFemonSignalUnitMaxNumber
};
class cFemonConfig class cFemonConfig
{ {
private: private:
@ -29,6 +37,7 @@ private:
int themeM; int themeM;
int positionM; int positionM;
int downscaleM; int downscaleM;
int signalUnitM;
int redLimitM; int redLimitM;
int greenLimitM; int greenLimitM;
int updateIntervalM; int updateIntervalM;
@ -68,6 +77,7 @@ public:
int GetTheme(void) const { return themeM; } int GetTheme(void) const { return themeM; }
int GetPosition(void) const { return positionM; } int GetPosition(void) const { return positionM; }
int GetDownscale(void) const { return downscaleM; } int GetDownscale(void) const { return downscaleM; }
int GetSignalUnit(void) const { return signalUnitM; }
int GetRedLimit(void) const { return redLimitM; } int GetRedLimit(void) const { return redLimitM; }
int GetGreenLimit(void) const { return greenLimitM; } int GetGreenLimit(void) const { return greenLimitM; }
int GetUpdateInterval(void) const { return updateIntervalM; } int GetUpdateInterval(void) const { return updateIntervalM; }
@ -84,6 +94,7 @@ public:
void SetTheme(int themeP) { themeM = themeP; } void SetTheme(int themeP) { themeM = themeP; }
void SetPosition(int positionP) { positionM = positionP; } void SetPosition(int positionP) { positionM = positionP; }
void SetDownscale(int downscaleP) { downscaleM = downscaleP; } void SetDownscale(int downscaleP) { downscaleM = downscaleP; }
void SetSignalUnit(int signalUnitP) { signalUnitM = signalUnitP; }
void SetRedLimit(int redLimitP) { redLimitM = redLimitP; } void SetRedLimit(int redLimitP) { redLimitM = redLimitP; }
void SetGreenLimit(int greenLimitP) { greenLimitM = greenLimitP; } void SetGreenLimit(int greenLimitP) { greenLimitM = greenLimitP; }
void SetUpdateInterval(int updateIntervalP) { updateIntervalM = updateIntervalP; } void SetUpdateInterval(int updateIntervalP) { updateIntervalM = updateIntervalP; }

View File

@ -25,7 +25,7 @@
#define GITVERSION "" #define GITVERSION ""
#endif #endif
static const char VERSION[] = "2.4.0" GITVERSION; static const char VERSION[] = "2.4.1" GITVERSION;
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)"); static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
static const char MAINMENUENTRY[] = trNOOP("Signal Information"); static const char MAINMENUENTRY[] = trNOOP("Signal Information");
@ -165,6 +165,8 @@ bool cPluginFemon::SetupParse(const char *nameP, const char *valueP)
FemonConfig.SetSvdrpPort(atoi(valueP)); FemonConfig.SetSvdrpPort(atoi(valueP));
else if (!strcasecmp(nameP, "ServerIp")) else if (!strcasecmp(nameP, "ServerIp"))
FemonConfig.SetSvdrpIp(valueP); FemonConfig.SetSvdrpIp(valueP);
else if (!strcasecmp(nameP, "SignalUnit"))
FemonConfig.SetSignalUnit(atoi(valueP));
else else
return false; return false;
@ -292,7 +294,7 @@ cString cPluginFemon::SVDRPCommand(const char *commandP, const char *optionP, in
return cString::sprintf("%d on device #%d", dev->SignalQuality(), dev->CardIndex()); return cString::sprintf("%d on device #%d", dev->SignalQuality(), dev->CardIndex());
} }
else if (strcasecmp(commandP, "SGNL") == 0) { else if (strcasecmp(commandP, "SGNL") == 0) {
return cString::sprintf("%.2f dBm on device #%d", getSignal(dev), dev->CardIndex()); return cString::sprintf("%s on device #%d", *getSignalStrength(getSignal(dev)), dev->CardIndex());
} }
else if (strcasecmp(commandP, "CNRA") == 0) { else if (strcasecmp(commandP, "CNRA") == 0) {
return cString::sprintf("%.2f dB on device #%d", getCNR(dev), dev->CardIndex()); return cString::sprintf("%.2f dB on device #%d", getCNR(dev), dev->CardIndex());

2
osd.c
View File

@ -371,7 +371,7 @@ void cFemonOsd::DrawStatusWindow(void)
if (qualityValidM) if (qualityValidM)
OSDDRAWSTATUSBAR(qualityM); OSDDRAWSTATUSBAR(qualityM);
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
OSDDRAWSTATUSVALUES(signalValidM ? *cString::sprintf("STR: %.2f dBm", signalM) : "STR: ---", OSDDRAWSTATUSVALUES(signalValidM ? *cString::sprintf("STR: %s", *getSignalStrength(signalM)) : "STR: ---",
cnrValidM ? *cString::sprintf("CNR: %.2f dB", cnrM) : "CNR: ---", cnrValidM ? *cString::sprintf("CNR: %.2f dB", cnrM) : "CNR: ---",
berValidM ? *cString::sprintf("BER: %.0f", berM) : "BER: ---", berValidM ? *cString::sprintf("BER: %.0f", berM) : "BER: ---",
perValidM ? *cString::sprintf("PER: %.0f", perM) : "PER: ---", perValidM ? *cString::sprintf("PER: %.0f", perM) : "PER: ---",

View File

@ -1,9 +1,10 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Peter Marquardt # Peter Marquardt
# Andreas Brachold # Andreas Brachold
# Christian Wieninger # Christian Wieninger
# Winfried
# #
msgid "" msgid ""
msgstr "" msgstr ""
@ -129,6 +130,15 @@ msgstr "Transponder"
msgid "stream" msgid "stream"
msgstr "Stream" msgstr "Stream"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Klassischer" msgstr "Klassischer"
@ -189,6 +199,12 @@ msgstr "OSD Größe verkleinern [%]"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Definiert den Verkleinerungsfaktor der OSD-Größe." msgstr "Definiert den Verkleinerungsfaktor der OSD-Größe."
msgid "Signal level unit"
msgstr "Signalpegel Einheiten"
msgid "Define the used signal level unit."
msgstr "Definiert der Einheit für Signalpegel."
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Grenze Rot [%]" msgstr "Grenze Rot [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Luis Palacios # Luis Palacios
# #
@ -127,6 +127,15 @@ msgstr "Transpondedor"
msgid "stream" msgid "stream"
msgstr "Flujo" msgstr "Flujo"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Clásico" msgstr "Clásico"
@ -187,6 +196,12 @@ msgstr ""
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "" msgstr ""
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Límite de rojo [%s]" msgstr "Límite de rojo [%s]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Arthur Konovalov # Arthur Konovalov
# #
@ -127,6 +127,15 @@ msgstr "transponder"
msgid "stream" msgid "stream"
msgstr "voog" msgstr "voog"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Classic" msgstr "Classic"
@ -187,6 +196,12 @@ msgstr "Ekraanimen
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Ekraanimenüü suuruse vähendamise määritlemine" msgstr "Ekraanimenüü suuruse vähendamise määritlemine"
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Punase limiit [%]" msgstr "Punase limiit [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Rolf Ahrenberg # Rolf Ahrenberg
# #
@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-femon 2.4.0\n" "Project-Id-Version: vdr-femon 2.4.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-04-15 04:15+0300\n" "POT-Creation-Date: 2019-10-27 16:29+0200\n"
"PO-Revision-Date: 2018-04-15 04:15+0300\n" "PO-Revision-Date: 2018-04-15 04:15+0300\n"
"Last-Translator: Rolf Ahrenberg\n" "Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n" "Language-Team: Finnish <vdr@linuxtv.org>\n"
@ -127,8 +127,17 @@ msgstr "transponderi"
msgid "stream" msgid "stream"
msgstr "lähete" msgstr "lähete"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Klassinen" msgstr ""
msgid "Elchi" msgid "Elchi"
msgstr "Elchi" msgstr "Elchi"
@ -187,6 +196,12 @@ msgstr "Pienennä näytön kokoa [%]"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Määrittele näytön pienennyssuhde." msgstr "Määrittele näytön pienennyssuhde."
msgid "Signal level unit"
msgstr "Signaalitason yksikkö"
msgid "Define the used signal level unit."
msgstr "Määrittele yksikkö signaalin tasolle."
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Punaisen taso [%]" msgstr "Punaisen taso [%]"
@ -390,3 +405,6 @@ msgstr "Mbit/s"
msgid "kbit/s" msgid "kbit/s"
msgstr "kbit/s" msgstr "kbit/s"
#~ msgid "Clasxsic"
#~ msgstr "Klassinen"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Nicolas Huillard # Nicolas Huillard
# Michaël Nival <mnival@club-internet.fr>, 2010 # Michaël Nival <mnival@club-internet.fr>, 2010
@ -129,6 +129,15 @@ msgstr "transpondeur"
msgid "stream" msgid "stream"
msgstr "flux" msgstr "flux"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Classique" msgstr "Classique"
@ -189,6 +198,12 @@ msgstr "Réduit la taille de l'OSD (%)"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Définit le ration de réduction de l'OSD." msgstr "Définit le ration de réduction de l'OSD."
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Limite du rouge (%)" msgstr "Limite du rouge (%)"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Füley István <ifuley at tigercomp dot ro>, 2011 # Füley István <ifuley at tigercomp dot ro>, 2011
# #
@ -130,6 +130,15 @@ msgstr "transponder"
msgid "stream" msgid "stream"
msgstr "adatfolyam (stream)" msgstr "adatfolyam (stream)"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Klasszikus" msgstr "Klasszikus"
@ -190,6 +199,12 @@ msgstr "Az OSD lem
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Az OSD méretének leméretezése százalékban." msgstr "Az OSD méretének leméretezése százalékban."
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Piros színt határa [%]" msgstr "Piros színt határa [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Sean Carlos # Sean Carlos
# Diego Pierotto <vdr-italian@tiscali.it> # Diego Pierotto <vdr-italian@tiscali.it>
@ -131,6 +131,15 @@ msgstr "transponder"
msgid "stream" msgid "stream"
msgstr "flusso" msgstr "flusso"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Classico" msgstr "Classico"
@ -191,6 +200,12 @@ msgstr "Riduci dimensione OSD [%]"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Definisci il rapporto di riduzione della dimensione OSD." msgstr "Definisci il rapporto di riduzione della dimensione OSD."
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Limite rosso [%]" msgstr "Limite rosso [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Valdemaras Pipiras # Valdemaras Pipiras
# #
@ -127,6 +127,15 @@ msgstr "Siųstuvas"
msgid "stream" msgid "stream"
msgstr "Srautas" msgstr "Srautas"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Klasikinis" msgstr "Klasikinis"
@ -187,6 +196,12 @@ msgstr "Sumažinti ekrano užsklandos (OSD) dydį [%]"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Nustatyti ekrano užsklandos (OSD) mažinimo santykį." msgstr "Nustatyti ekrano užsklandos (OSD) mažinimo santykį."
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Raudonoji ribą [%]" msgstr "Raudonoji ribą [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the vdr-femon package. # This file is distributed under the same license as the vdr-femon package.
# Tomasz Maciej Nowak, 2017. # Tomasz Maciej Nowak, 2017.
# #
@ -128,6 +128,15 @@ msgstr "transponder"
msgid "stream" msgid "stream"
msgstr "strumień" msgstr "strumień"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Klasyczna" msgstr "Klasyczna"
@ -188,6 +197,12 @@ msgstr "Zmniejsz rozmiar OSD [%]"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Określa procent zmniejszenia OSD." msgstr "Określa procent zmniejszenia OSD."
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Czerwony - zakres [%]" msgstr "Czerwony - zakres [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Vyacheslav Dikonov # Vyacheslav Dikonov
# #
@ -127,6 +127,15 @@ msgstr ""
msgid "stream" msgid "stream"
msgstr "" msgstr ""
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "" msgstr ""
@ -187,6 +196,12 @@ msgstr ""
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "" msgstr ""
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "ºàÐáÝÐï ×ÞÝÐ áÛÐÑÞÓÞ áØÓÝÐÛÐ ÔÞ (%)" msgstr "ºàÐáÝÐï ×ÞÝÐ áÛÐÑÞÓÞ áØÓÝÐÛÐ ÔÞ (%)"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Milan Hrala # Milan Hrala
# #
@ -127,6 +127,15 @@ msgstr "Transpond
msgid "stream" msgid "stream"
msgstr "dátový tok" msgstr "dátový tok"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Klasický" msgstr "Klasický"
@ -187,6 +196,12 @@ msgstr "Zmen
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Zadajte zmen¹enie pomeru pre OSD veµkosti." msgstr "Zadajte zmen¹enie pomeru pre OSD veµkosti."
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Èervený limit [%]" msgstr "Èervený limit [%]"

View File

@ -127,6 +127,15 @@ msgstr "транспондер"
msgid "stream" msgid "stream"
msgstr "потік" msgstr "потік"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "Класичний" msgstr "Класичний"
@ -187,6 +196,12 @@ msgstr "Масштаб розміру повідомлень [%]"
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "Визначити коефіцієнт масштабування розміру повідомлень" msgstr "Визначити коефіцієнт масштабування розміру повідомлень"
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "Червона границя [%]" msgstr "Червона границя [%]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Nan Feng VDR <nfgx@21cn.com>, 2009.2 # Nan Feng VDR <nfgx@21cn.com>, 2009.2
# #
@ -127,6 +127,15 @@ msgstr "转发器"
msgid "stream" msgid "stream"
msgstr "数据流" msgstr "数据流"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "经典" msgstr "经典"
@ -187,6 +196,12 @@ msgstr ""
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "" msgstr ""
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "红限制[ ]" msgstr "红限制[ ]"

View File

@ -1,5 +1,5 @@
# VDR plugin language source file. # VDR plugin language source file.
# Copyright (C) 2007-2018 Rolf Ahrenberg # Copyright (C) 2007-2019 Rolf Ahrenberg
# This file is distributed under the same license as the femon package. # This file is distributed under the same license as the femon package.
# Nan Feng VDR <nfgx@21cn.com>, 2009.2 # Nan Feng VDR <nfgx@21cn.com>, 2009.2
# #
@ -127,6 +127,15 @@ msgstr "轉發器"
msgid "stream" msgid "stream"
msgstr "數據流" msgstr "數據流"
msgid "dBm"
msgstr "dBm"
msgid "dBuV"
msgstr "dBuV"
msgid "dBV"
msgstr "dBV"
msgid "Classic" msgid "Classic"
msgstr "經典" msgstr "經典"
@ -187,6 +196,12 @@ msgstr ""
msgid "Define the downscale ratio for OSD size." msgid "Define the downscale ratio for OSD size."
msgstr "" msgstr ""
msgid "Signal level unit"
msgstr ""
msgid "Define the used signal level unit."
msgstr ""
msgid "Red limit [%]" msgid "Red limit [%]"
msgstr "紅限制[ ]" msgstr "紅限制[ ]"

10
setup.c
View File

@ -19,6 +19,7 @@ cMenuFemonSetup::cMenuFemonSetup()
themeM(FemonConfig.GetTheme()), themeM(FemonConfig.GetTheme()),
positionM(FemonConfig.GetPosition()), positionM(FemonConfig.GetPosition()),
downscaleM(FemonConfig.GetDownscale()), downscaleM(FemonConfig.GetDownscale()),
signalUnitM(FemonConfig.GetSignalUnit()),
redLimitM(FemonConfig.GetRedLimit()), redLimitM(FemonConfig.GetRedLimit()),
greenLimitM(FemonConfig.GetGreenLimit()), greenLimitM(FemonConfig.GetGreenLimit()),
updateIntervalM(FemonConfig.GetUpdateInterval()), updateIntervalM(FemonConfig.GetUpdateInterval()),
@ -35,6 +36,10 @@ cMenuFemonSetup::cMenuFemonSetup()
dispModesM[eFemonModeStream] = tr("stream"); dispModesM[eFemonModeStream] = tr("stream");
dispModesM[eFemonModeAC3] = tr("AC-3"); dispModesM[eFemonModeAC3] = tr("AC-3");
signalUnitsM[eFemonSignalUnitdBm] = tr("dBm");
signalUnitsM[eFemonSignalUnitdBuV] = tr("dBuV");
signalUnitsM[eFemonSignalUnitdBV] = tr("dBV");
skinsM[eFemonSkinClassic] = tr("Classic"); skinsM[eFemonSkinClassic] = tr("Classic");
skinsM[eFemonSkinElchi] = tr("Elchi"); skinsM[eFemonSkinElchi] = tr("Elchi");
@ -78,6 +83,9 @@ void cMenuFemonSetup::Setup(void)
Add(new cMenuEditIntItem(tr("Downscale OSD size [%]"), &downscaleM, 0, 20)); Add(new cMenuEditIntItem(tr("Downscale OSD size [%]"), &downscaleM, 0, 20));
helpM.Append(tr("Define the downscale ratio for OSD size.")); helpM.Append(tr("Define the downscale ratio for OSD size."));
Add(new cMenuEditStraItem(tr("Signal level unit"), &signalUnitM, eFemonSignalUnitMaxNumber, signalUnitsM));
helpM.Append(tr("Define the used signal level unit."));
Add(new cMenuEditIntItem(tr("Red limit [%]"), &redLimitM, 1, 50)); Add(new cMenuEditIntItem(tr("Red limit [%]"), &redLimitM, 1, 50));
helpM.Append(tr("Define a limit for red bar, which is used to indicate a bad signal.")); helpM.Append(tr("Define a limit for red bar, which is used to indicate a bad signal."));
@ -120,6 +128,7 @@ void cMenuFemonSetup::Store(void)
SetupStore("Theme", themeM); SetupStore("Theme", themeM);
SetupStore("Position", positionM); SetupStore("Position", positionM);
SetupStore("Downscale", downscaleM); SetupStore("Downscale", downscaleM);
SetupStore("SignalUnit", signalUnitM);
SetupStore("RedLimit", redLimitM); SetupStore("RedLimit", redLimitM);
SetupStore("GreenLimit", greenLimitM); SetupStore("GreenLimit", greenLimitM);
SetupStore("UpdateInterval", updateIntervalM); SetupStore("UpdateInterval", updateIntervalM);
@ -135,6 +144,7 @@ void cMenuFemonSetup::Store(void)
FemonConfig.SetTheme(themeM); FemonConfig.SetTheme(themeM);
FemonConfig.SetPosition(positionM); FemonConfig.SetPosition(positionM);
FemonConfig.SetDownscale(downscaleM); FemonConfig.SetDownscale(downscaleM);
FemonConfig.SetSignalUnit(signalUnitM);
FemonConfig.SetRedLimit(redLimitM); FemonConfig.SetRedLimit(redLimitM);
FemonConfig.SetGreenLimit(greenLimitM); FemonConfig.SetGreenLimit(greenLimitM);
FemonConfig.SetUpdateInterval(updateIntervalM); FemonConfig.SetUpdateInterval(updateIntervalM);

View File

@ -11,6 +11,7 @@
class cMenuFemonSetup : public cMenuSetupPage { class cMenuFemonSetup : public cMenuSetupPage {
private: private:
const char *dispModesM[eFemonModeMaxNumber]; const char *dispModesM[eFemonModeMaxNumber];
const char *signalUnitsM[eFemonSignalUnitMaxNumber];
const char *skinsM[eFemonSkinMaxNumber]; const char *skinsM[eFemonSkinMaxNumber];
const char *themesM[eFemonThemeMaxNumber]; const char *themesM[eFemonThemeMaxNumber];
cVector<const char*> helpM; cVector<const char*> helpM;
@ -20,6 +21,7 @@ private:
int themeM; int themeM;
int positionM; int positionM;
int downscaleM; int downscaleM;
int signalUnitM;
int redLimitM; int redLimitM;
int greenLimitM; int greenLimitM;
int updateIntervalM; int updateIntervalM;

12
tools.c
View File

@ -14,6 +14,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include "config.h"
#include "osd.h" #include "osd.h"
#include "receiver.h" #include "receiver.h"
#include "tools.h" #include "tools.h"
@ -197,6 +198,17 @@ double getPER(cDevice *deviceP)
return 0; return 0;
} }
cString getSignalStrength(double strengthP)
{
switch (FemonConfig.GetSignalUnit()) {
case eFemonSignalUnitdBm: return cString::sprintf("%.2f %s", strengthP, tr("dBm"));
case eFemonSignalUnitdBuV: return cString::sprintf("%.2f %s", strengthP + (120 - 11.25), tr("dBuV"));
case eFemonSignalUnitdBV: return cString::sprintf("%.2f %s", strengthP - 11.25, tr("dBV"));
default: break;
}
return cString::sprintf("---");
}
cString getApids(const cChannel *channelP) cString getApids(const cChannel *channelP)
{ {
int value = 0; int value = 0;

View File

@ -29,6 +29,7 @@ double getSignal(cDevice *deviceP);
double getBER(cDevice *deviceP); double getBER(cDevice *deviceP);
double getPER(cDevice *deviceP); double getPER(cDevice *deviceP);
cString getSignalStrength(double strengthP);
cString getApids(const cChannel *channelP); cString getApids(const cChannel *channelP);
cString getDpids(const cChannel *channelP); cString getDpids(const cChannel *channelP);
cString getSpids(const cChannel *channelP); cString getSpids(const cChannel *channelP);