hier eine kleine Lösung wie man SNR/AGC/Ber in den skin bekommt...
aber.. da selbst denken schlau macht.. hab ich mal den code für ne "statische" version gepostet.. lol aber keine angst.. das teil "dynamisch" zu machen ist kein akt... lol
enigma_main.cpp - änderungen in eZapMain::eZapMain() and eZapMain::showInfobar(): erforderlich
Code: Alles auswählen
diff -Naur tuxbox-rel/apps/tuxbox/enigma/src/enigma_main.cpp tuxbox-my/apps/tuxbox/enigma/src/enigma_main.cpp
--- tuxbox-rel/apps/tuxbox/enigma/src/enigma_main.cpp
+++ tuxbox-my/apps/tuxbox/enigma/src/enigma_main.cpp
@@ -1626,6 +1626,15 @@
lcdmain.show();
#endif
+// SNR Patch by luke_s & spacy
+ ASSIGN(p_snr, eProgress, "snr");
+ ASSIGN(p_agc, eProgress, "agc");
+ ASSIGN(p_ber, eProgress, "ber");
+ ASSIGN(lsnr_num, eLabel, "snr_num");
+ ASSIGN(lsync_num, eLabel, "agc_num");
+ ASSIGN(lber_num, eLabel, "ber_num");
+// SNR Patch by luke_s & spacy
+
ASSIGN(ChannelNumber, eLabel, "ch_number");
ASSIGN(ChannelName, eLabel, "ch_name");
@@ -2868,6 +2877,18 @@
void eZapMain::showInfobar()
{
+// SNR Patch by luke_s and spacy
+ int snr=eFrontend::getInstance()->SNR()*100/65536,
+ agc=eFrontend::getInstance()->SignalStrength()*100/65536,
+ ber=eFrontend::getInstance()->BER();
+ p_agc->setPerc((agc));
+ p_snr->setPerc((snr));
+ p_ber->setPerc((int)log2(ber));
+ lsnr_num->setText(eString().sprintf("%d%%",snr));
+ lsync_num->setText(eString().sprintf("%d%%",agc));
+ lber_num->setText(eString().sprintf("%d",ber));
+// SNR Patch by luke_s and spacy
+
if ( !isVisible() && eApp->looplevel() == 1 &&
(
!currentFocus ||
enigma_main.h:
Code: Alles auswählen
diff -Naur tuxbox-rel/apps/tuxbox/enigma/src/enigma_main.h tuxbox-my/apps/tuxbox/enigma/src/enigma_main.h
--- tuxbox-rel/apps/tuxbox/enigma/src/enigma_main.h
+++ tuxbox-my/apps/tuxbox/enigma/src/enigma_main.h
@@ -325,7 +325,7 @@
enum { pathBouquets=1, pathProvider=2, pathRecordings=4, pathPlaylist=8, pathAll=16, pathRoot=32, pathSatellites=64 };
enum { listAll, listSatellites, listProvider, listBouquets };
private:
- eLabel *ChannelNumber, *ChannelName, *Clock,
+ eLabel *ChannelNumber, *ChannelName, *Clock, *lsnr_num, *lsync_num, *lber_num,
*EINow, *EINext, *EINowDuration, *EINextDuration,
*EINowTime, *EINextTime, *Description, *fileinfos,
*ButtonRedEn, *ButtonRedDis,
@@ -356,7 +356,7 @@
#else
eProgress *Progress;
#endif
- eProgress *VolumeBar;
+ eProgress *VolumeBar, *p_snr, *p_agc, *p_ber;
eMessageBox *pMsg, *pRotorMsg;
eLock messagelock;
skin:
hier kein diff.. weil jeder skin braucht es ja wo anders.. seid bitte so nett und änder das XXX:YY in die Position ab, an der ihr es braucht..
Code: Alles auswählen
<eLabel text="SNR:" position="XXX:YY" size="40:18" name="snr_" font="Nimbus;16" />
<eLabel text="AGC:" position="XXX:YY" size="40:18" name="agc_" font="Nimbus;16" />
<eLabel text="BER:" position="XXX:YY" size="40:18" name="agc_" font="Nimbus;16" />
<eLabel position="XXX:YY" size="35:18" name="snr_num" font="Nimbus;16" />
<eLabel position="XXX:YY" size="35:18" name="agc_num" font="Nimbus;16" />
<eLabel position="XXX:YY" size="35:18" name="ber_num" font="Nimbus;16" />
<eProgress position="XXX:YY" size="75:9" name="snr" foregroundColor="mittel+4" border="1" />
<eProgress position="XXX:YY" size="75:9" name="agc" foregroundColor="mittel+4" border="1" />
<eProgress position="XXX:YY" size="75:9" name="ber" foregroundColor="mittel+4" border="1" />
greetinx from Luke_S
from the DBF Image Team