Hello guys,
so.. here is a litte help for all of you searching for snr/agc/ber in your skin..
it is a working version... but infact you should use your own brain.. so it is only the code for the "static" version.. the "dynamic" isnt much more harder.. lol
enigma_main.cpp - changes required in eZapMain::eZapMain() and eZapMain::showInfobar():
Kód:
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:
Kód:
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:
ok.. here no diff.. its up to u where u want it... lol
you need following lines... pls be free 2 change the XXX:YY with the position where you need it..
Kód:
<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
Záložky