diff --git a/data/cables.xml b/data/cables.xml index 777088793..2a3ed0c75 100644 --- a/data/cables.xml +++ b/data/cables.xml @@ -1343,6 +1343,7 @@ + diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index f1bb962c6..72b73dd4b 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -487,9 +487,11 @@ flashupdate.squashfs.noversion Bei Updates werden Versionsüberprüfungen derzei flashupdate.titlereadflash Flash auslesen flashupdate.titlewriteflash Flash schreiben flashupdate.update_with_settings_del_skipped Ordner [%s] kann nicht gelöscht werden. Eintrag wird übersprungen. +flashupdate.update_with_settings_error Error Flashspeicher!\n \nIm neuen Image sind nur noch %ld KB (von %ld KB) frei,\ndas ist zu wenig, um einen sicheren Betrieb zu gewährleisten.\n \nDer Vorgang wird abgebrochen! flashupdate.update_with_settings_processed Image wird bearbeitet... flashupdate.update_with_settings_skipped Ordner [%s] kann nicht gesichert werden. Eintrag wird übersprungen. flashupdate.update_with_settings_successfully Settingsübernahme erfolgreich.\nDas Image kann jetzt geflasht werden. +flashupdate.update_with_settings_warning Warnung Flashspeicher!\n \nIm neuen Image sind nur noch %ld KB (von %ld KB) frei,\ndas ist möglicherweise zu wenig, um einen sicheren Betrieb zu gewährleisten.\n \nSoll der Vorgang trotzdem fortgesetzt werden? flashupdate.updatemode Updatemodus flashupdate.updatemode_internet Internet flashupdate.updatemode_manual von lokalem Update-Verzeichnis @@ -911,7 +913,7 @@ menu.hint_osd_preset Hier können Sie zwischen Röhren-TV (CRT) oder Flachbildsc menu.hint_parentallock_changepin Hier wird der 4 stellige PIN Code eingegeben,\nder dann ggf. abgefragt wird menu.hint_parentallock_lockage Hier wird festgelegt, bei welcher Altersklasse\ndie PIN Abfrage kommt menu.hint_parentallock_prompt Hier wird definiert, wann eine PIN Eingabe erfolgen soll -menu.hint_personalize aktivieren, deaktivieren, schützen von Menüpunkten\nkonfigurieren der Farb-Tasten in den Benutzermenüs +menu.hint_personalize Personalisieren Sie ihre Menüs, konfigurieren Sie die Farb-Tasten in den Benutzermenüs menu.hint_pictureviewer_defdir Hier wählen Sie das Startverzeichnis für den Bildbetrachter menu.hint_pictureviewer_scaling Hier kann die Bildauflösung eingestellt werden menu.hint_pictureviewer_slide_time Hier kann der Slideshow-Intervall geändert werden,\nStandardmässig ist ein Intervall von 10 Sekunden eingstellt @@ -1437,21 +1439,18 @@ personalize.visible sichtbar pictureviewer.defdir Start-Verz. pictureviewer.head Bildbetrachter pictureviewer.help1 Menü-Modus -pictureviewer.help10 Anzeige-Modus -pictureviewer.help11 Bild neu einlesen -pictureviewer.help12 vorheriges Bild -pictureviewer.help13 nächstes Bild -pictureviewer.help14 Zoom out -pictureviewer.help15 Zoom in -pictureviewer.help16 Scroll hoch -pictureviewer.help17 Scroll links -pictureviewer.help18 Scroll rechts -pictureviewer.help19 Scroll herunter +pictureviewer.help10 Bild neu einlesen +pictureviewer.help11 vorheriges Bild +pictureviewer.help12 nächstes Bild +pictureviewer.help13 Zoom out +pictureviewer.help14 Zoom in +pictureviewer.help15 Scroll hoch +pictureviewer.help16 Scroll links +pictureviewer.help17 Scroll rechts +pictureviewer.help18 Scroll herunter +pictureviewer.help19 Bild unskaliert einlesen pictureviewer.help2 Bild anzeigen -pictureviewer.help20 Sortierung andern -pictureviewer.help21 Bild unskaliert einlesen -pictureviewer.help22 Modus verlassen -pictureviewer.help3 Sortierung andern +pictureviewer.help3 Sortierung ändern pictureviewer.help30 Audioplayer-Modus pictureviewer.help31 Startet die Wiedergabe pictureviewer.help32 Pausiert die Wiedergabe @@ -1462,8 +1461,8 @@ pictureviewer.help4 Bild unskaliert einlesen pictureviewer.help5 Diashow-Modus pictureviewer.help6 vorheriges Bild pictureviewer.help7 nächstes Bild -pictureviewer.help8 Sortierung ändern -pictureviewer.help9 Modus verlassen +pictureviewer.help8 Modus verlassen +pictureviewer.help9 Anzeige-Modus pictureviewer.resize.color_average aufwendig pictureviewer.resize.none keine pictureviewer.resize.simple einfach @@ -1569,6 +1568,8 @@ satsetup.satellite Satellit satsetup.select_sat Auswahl Satellit satsetup.smatvremote SMATV Remote Tuning satsetup.uncomm_input Uncommitted +satsetup.uni_settings Unicable Einstellungen +satsetup.unicable Unicable satsetup.usals_repeat USALS wiederholen satsetup.use_bat Benutze BAT satsetup.use_fta_flag nur FTA Kanäle @@ -1759,6 +1760,9 @@ timing.infobar_movieplayer Infobar (Filmwiedergabe) timing.infobar_radio Infobar (Radiobetrieb) timing.menu Menü timing.numericzap Umschalten mit Zifferntasten +unicable.lnb Unicable Eingang +unicable.qrg Unicable Frequenz +unicable.scr Unicable SCR upnpbrowser.head UPnP Browser upnpbrowser.noservers Kein UPnP-Server gefunden upnpbrowser.rescan Neue Suche diff --git a/data/locale/english.locale b/data/locale/english.locale index 61d741f00..56a54d1f3 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -487,9 +487,11 @@ flashupdate.squashfs.noversion SquashFS version checks are currently only suppor flashupdate.titlereadflash Reading Flash flashupdate.titlewriteflash Writing Flash flashupdate.update_with_settings_del_skipped Folder [%s] can not be deleted. Entry is skipped. +flashupdate.update_with_settings_error Flash Error!\n \nNew Image only has %ld KB (out of %ld KB) left. Not\nenough space to complete this operation.\n \nCanceling operation! flashupdate.update_with_settings_processed Image is being processed... flashupdate.update_with_settings_skipped Folder [%s] can not be saved. Entry is skipped. flashupdate.update_with_settings_successfully Setting takeover successfully.\nThe image can now be flashed. +flashupdate.update_with_settings_warning Flash Warning!\n \nNew Image only has %ld KB (out of %ld KB) left. Probably not\nenough space to complete this operation...\n \nDo you really want to proceed? flashupdate.updatemode Updatemode flashupdate.updatemode_internet internet flashupdate.updatemode_manual from local update directory @@ -1437,20 +1439,17 @@ personalize.visible Visible pictureviewer.defdir start dir. pictureviewer.head Picture viewer pictureviewer.help1 menu mode -pictureviewer.help10 show mode -pictureviewer.help11 reread image -pictureviewer.help12 previous image -pictureviewer.help13 next image -pictureviewer.help14 Zoom out -pictureviewer.help15 Zoom in -pictureviewer.help16 scroll up -pictureviewer.help17 scroll left -pictureviewer.help18 scroll right -pictureviewer.help19 scroll down +pictureviewer.help10 reread image +pictureviewer.help11 previous image +pictureviewer.help12 next image +pictureviewer.help13 Zoom out +pictureviewer.help14 Zoom in +pictureviewer.help15 scroll up +pictureviewer.help16 scroll left +pictureviewer.help17 scroll right +pictureviewer.help18 scroll down +pictureviewer.help19 reread image (no scaling) pictureviewer.help2 display image -pictureviewer.help20 change sort order -pictureviewer.help21 reread image (no scaling) -pictureviewer.help22 exit pictureviewer.help3 change sort order pictureviewer.help30 audioplayer mode pictureviewer.help31 starts the playback @@ -1462,8 +1461,8 @@ pictureviewer.help4 do not scale picture pictureviewer.help5 diashow mode pictureviewer.help6 previous image pictureviewer.help7 next image -pictureviewer.help8 change sort order -pictureviewer.help9 exit +pictureviewer.help8 exit +pictureviewer.help9 show mode pictureviewer.resize.color_average advanced pictureviewer.resize.none none pictureviewer.resize.simple simple @@ -1570,6 +1569,8 @@ satsetup.satellite Satellite satsetup.select_sat Select satellites satsetup.smatvremote SMATV Remote Tuning satsetup.uncomm_input Uncommited input +satsetup.uni_settings Unicable Settings +satsetup.unicable Unicable satsetup.usals_repeat USALS command repeat satsetup.use_bat Use BAT satsetup.use_fta_flag just free Channels @@ -1760,6 +1761,9 @@ timing.infobar_movieplayer Infobar (movie mode) timing.infobar_radio Infobar (radio mode) timing.menu Menu timing.numericzap Numeric Zap +unicable.lnb Unicable Input +unicable.qrg Unicable Frequency +unicable.scr Unicable SCR upnpbrowser.head UPnP Browser upnpbrowser.noservers No UPnP servers found upnpbrowser.rescan Scan again diff --git a/data/satellites.xml b/data/satellites.xml index 739e4d754..3c9add451 100755 --- a/data/satellites.xml +++ b/data/satellites.xml @@ -1624,7 +1624,7 @@ - + diff --git a/data/settingsupdate.conf b/data/settingsupdate.conf index 45eafcac9..5234dc041 100644 --- a/data/settingsupdate.conf +++ b/data/settingsupdate.conf @@ -21,7 +21,17 @@ ## Die Verzeichnisse "/", "/dev", "/proc", "/sys", "/mnt", "/tmp" können nicht gesichert werden!! #------------------------------------------------------------------------------------------------ +#--------------------------------------------------------------------------- +## vor der Sicherung aus dem neuen Image zu löschende Dateien/Verzeichnisse, +## gekennzeichnet durch ein vorangestelltes ~ +# z.B. +# ~/share/tuxbox/neutrino/themes/Classic.theme +#--------------------------------------------------------------------------- + + +#------------- ## Sicherungen +#------------- /etc/hostname /etc/hosts /etc/network @@ -30,6 +40,7 @@ /var/etc /var/tuxbox/config + #---------------------------------------------------------------------------------------- ## von der Sicherung auszuschließende Dateien, gekennzeichnet durch ein vorangestelltes - #---------------------------------------------------------------------------------------- @@ -41,10 +52,3 @@ -/var/tuxbox/config/satellites.xml -/var/tuxbox/config/settingsupdate.conf -/var/tuxbox/config/tobackup.conf - -#---------------------------------------------------------------------------- -## nach der Sicherung aus dem neuen Image zu löschende Dateien/Verzeichnisse, -## gekennzeichnet durch ein vorangestelltes ~ -# z.B. -# ~/share/tuxbox/neutrino/themes/Classic.theme -#---------------------------------------------------------------------------- diff --git a/lib/libcoolstream/control.h b/lib/libcoolstream/control.h new file mode 100644 index 000000000..cc41c6c72 --- /dev/null +++ b/lib/libcoolstream/control.h @@ -0,0 +1,67 @@ +/******************************************************************** +* Description: Control driver for PWM and Scart +* Author: CoolStream Dev. Team +* Created at: Fri Jun 26 08:11:43 CEST 2009 +* +* Copyright (c) 2009 CoolStream International Ltd. All rights reserved. +* +********************************************************************/ + +#ifndef __CONTROL_H +#define __CONTROL_H + +#ifndef __KERNEL__ +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +#include + +#else +#include +#include +#endif + +#include "tsrouter.h" + +typedef struct _scart_status { + bool widescreen; + bool function; + bool fastblank; +} scart_status_t; + +typedef struct _pwm_status { + u16 pwm_pulse_first; + u16 pwm_pulse_second; + u32 pwm_clock; +} pwm_status_t; + +typedef struct cs_control_data { + scart_status_t scart_status; + pwm_status_t pwm_status; + bool hdd_power; + u32 readers; + u32 sys_serial_high, sys_serial_low; + u32 sys_revision; +} cs_control_data_t; + +/* ioctls */ +#define CS_CONTROL_MAGIC 0xDE +#define IOC_CONTROL_WIDESCREEN _IOW(CS_CONTROL_MAGIC, 20, unsigned int) +#define IOC_CONTROL_TVAV _IOW(CS_CONTROL_MAGIC, 21, unsigned int) +#define IOC_CONTROL_RGB _IOW(CS_CONTROL_MAGIC, 22, unsigned int) +#define IOC_CONTROL_SCART_STATUS _IOR(CS_CONTROL_MAGIC, 23, scart_status_t *) +#define IOC_CONTROL_PWM_SPEED _IOW(CS_CONTROL_MAGIC, 24, unsigned int) +#define IOC_CONTROL_HDDPOWER _IOW(CS_CONTROL_MAGIC, 25, unsigned int) + +/* ioctl for getting board serial and revision */ +#define IOC_CONTROL_BOARD_SERIAL_LOW _IOR(CS_CONTROL_MAGIC, 26, unsigned int *) +#define IOC_CONTROL_BOARD_SERIAL_HIGH _IOR(CS_CONTROL_MAGIC, 27, unsigned int *) +#define IOC_CONTROL_BOARD_REV _IOR(CS_CONTROL_MAGIC, 28, unsigned int *) + +/* ioctl for setting TS routing */ +#define IOC_CONTROL_TSROUTE_GET_HSDP_CONFIG _IOR(CS_CONTROL_MAGIC, 29, tsrouter_hsdp_config_t *) +#define IOC_CONTROL_TSROUTE_SET_HSDP_CONFIG _IOW(CS_CONTROL_MAGIC, 30, tsrouter_tsp_config_t *) +#define IOC_CONTROL_TSROUTE_GET_TSP_CONFIG _IOR(CS_CONTROL_MAGIC, 31, tsrouter_hsdp_config_t *) +#define IOC_CONTROL_TSROUTE_SET_TSP_CONFIG _IOW(CS_CONTROL_MAGIC, 32, tsrouter_tsp_config_t *) + +#endif /* __CONTROL_H */ diff --git a/lib/libcoolstream/cs_api.h b/lib/libcoolstream/cs_api.h index dbf585dc8..01ba53ceb 100644 --- a/lib/libcoolstream/cs_api.h +++ b/lib/libcoolstream/cs_api.h @@ -12,6 +12,8 @@ #include #include +#include +#include typedef void (*cs_messenger) (unsigned int msg, unsigned int data); @@ -63,6 +65,8 @@ int cs_set_ts_ci_clock(unsigned int speed); int cs_get_ts_ci_clock(unsigned int *speed); int cs_set_ts_config(unsigned int port, tsrouter_hsdp_config_t *hsdp_config); int cs_get_ts_config(unsigned int port, tsrouter_hsdp_config_t *hsdp_config); +int cs_set_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config); +int cs_get_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config); // Serial nr and revision accessors unsigned long long cs_get_serial(void); diff --git a/lib/libcoolstream/cs_vfd.h b/lib/libcoolstream/cs_vfd.h new file mode 100755 index 000000000..13b4b933d --- /dev/null +++ b/lib/libcoolstream/cs_vfd.h @@ -0,0 +1,102 @@ +/* + * Driver for the Samsung HCR-13SS22 VF-Display connected to the Conexant + * CX2450x (Nevis) SoC via Coolstream VFD-Controller - public definititons. + * + * Copyright (C) 2008 Coolstream International Limited + */ + +#ifndef __CS_VFD__ +#define __CS_VFD__ + +typedef enum +{ + VFD_ICON_BAR8 = 0x00000004, + VFD_ICON_BAR7 = 0x00000008, + VFD_ICON_BAR6 = 0x00000010, + VFD_ICON_BAR5 = 0x00000020, + VFD_ICON_BAR4 = 0x00000040, + VFD_ICON_BAR3 = 0x00000080, + VFD_ICON_BAR2 = 0x00000100, + VFD_ICON_BAR1 = 0x00000200, + VFD_ICON_FRAME = 0x00000400, + VFD_ICON_HDD = 0x00000800, + VFD_ICON_MUTE = 0x00001000, + VFD_ICON_DOLBY = 0x00002000, + VFD_ICON_POWER = 0x00004000, + VFD_ICON_TIMESHIFT = 0x00008000, + VFD_ICON_SIGNAL = 0x00010000, + VFD_ICON_TV = 0x00020000, + VFD_ICON_RADIO = 0x00040000, + VFD_ICON_HD = 0x01000001, + VFD_ICON_1080P = 0x02000001, + VFD_ICON_1080I = 0x03000001, + VFD_ICON_720P = 0x04000001, + VFD_ICON_480P = 0x05000001, + VFD_ICON_480I = 0x06000001, + VFD_ICON_USB = 0x07000001, + VFD_ICON_MP3 = 0x08000001, + VFD_ICON_PLAY = 0x09000001, + VFD_ICON_COL1 = 0x09000002, + VFD_ICON_PAUSE = 0x0A000001, + VFD_ICON_CAM1 = 0x0B000001, + VFD_ICON_COL2 = 0x0B000002, + VFD_ICON_CAM2 = 0x0C000001 +} vfd_icon; + +typedef enum +{ + VFD_FLAG_NONE = 0x00, + VFD_FLAG_SCROLL_ON = 0x01, /* switch scrolling on */ + VFD_FLAG_SCROLL_LTR = 0x02, /* scroll from left to rightinstead of default right to left direction (i.e. for arabic text) */ + VFD_FLAG_SCROLL_SIO = 0x04, /* start/stop scrolling with empty screen (scroll in/out) */ + VFD_FLAG_SCROLL_DELAY = 0x08, /* delayed scroll start */ + VFD_FLAG_ALIGN_LEFT = 0x10, /* align the text in display from the left (default) */ + VFD_FLAG_ALIGN_RIGHT = 0x20, /* align the text in display from the right (arabic) */ + VFD_FLAG_UPDATE_SCROLL_POS = 0x40, /* update the current position for scrolling */ +} vfd_flag; + +typedef struct { + unsigned char brightness; + unsigned char flags; + unsigned char current_hour; + unsigned char current_minute; + unsigned char timer_minutes_hi; + unsigned char timer_minutes_lo; +} standby_data_t; + +typedef enum { + VFD_LED_1_ON = 0x81, + VFD_LED_2_ON = 0x82, + VFD_LED_3_ON = 0x83, + VFD_LED_1_OFF = 0x01, + VFD_LED_2_OFF = 0x02, + VFD_LED_3_OFF = 0x03, +} vfd_led_ctrl_t; + +typedef struct { + unsigned char source; + unsigned char time_minutes_hi; + unsigned char time_minutes_lo; +} wakeup_data_t; + +typedef enum +{ + WAKEUP_SOURCE_TIMER = 0x01, + WAKEUP_SOURCE_BUTTON = 0x02, + WAKEUP_SOURCE_REMOTE = 0x04, + WAKEUP_SOURCE_PWLOST = 0x7F, + WAKEUP_SOURCE_POWER = 0xFF +} wakeup_source; + +#define IOC_VFD_SET_BRIGHT _IOW(0xDE, 1, unsigned char) /* set the display brighness in 16 steps between 0 to 15 */ +#define IOC_VFD_CLEAR_ALL _IOW(0xDE, 2, unsigned int) /* clear the entire display (both text and icons) */ +#define IOC_VFD_SET_TEXT _IOW(0xDE, 3, char*) /* set a text to be displayed on the display. If arg == NULL, the text is cleared */ +#define IOC_VFD_SET_ICON _IOW(0xDE, 4, vfd_icon) /* switch the given icon on */ +#define IOC_VFD_CLEAR_ICON _IOW(0xDE, 5, vfd_icon) /* switch the given icon off */ +#define IOC_VFD_SET_OUTPUT _IOW(0xDE, 6, unsigned char) /* switch the given output on (supported by the controller, but not used in the hardware) */ +#define IOC_VFD_CLEAR_OUTPUT _IOW(0xDE, 7, unsigned char) /* switch the given output off (supported by the controller, but not used in the hardware) */ +#define IOC_VFD_STANDBY _IOW(0xDE, 8, standby_data_t *)/* switch the vfd/psu in standby (NEO and above only) */ +#define IOC_VFD_LED_CTRL _IOW(0xDE, 9, unsigned char) /* control the Frontpanles LED's (NEO and above only) */ +#define IOC_VFD_GET_WAKEUP _IOW(0xDE, 10,wakeup_data_t *) /* get wakeup data (NEO and above only) */ + +#endif /* __CS_VFD__ */ diff --git a/lib/libcoolstream/nevis_ir.h b/lib/libcoolstream/nevis_ir.h new file mode 100644 index 000000000..0774a150c --- /dev/null +++ b/lib/libcoolstream/nevis_ir.h @@ -0,0 +1,84 @@ +/* + * public definitions for the CX2450x Infrared receiver driver + * + * Copyright (C) 2008-2011 Coolstream International Limited + * + */ + +#ifndef __NEVIS_IR_H__ +#define __NEVIS_IR_H__ + +typedef enum +{ + IR_PROTOCOL_UNKNOWN = 0x00000, + IR_PROTOCOL_RMAP = 0x00001, /* Ruwido rMAP */ + IR_PROTOCOL_RMAP_E = 0x00002, /* Ruwido rMAP with extension for MNC Ltd sp. z o.o. */ + IR_PROTOCOL_NRC17 = 0x00004, /* Nokia NRC17 */ + IR_PROTOCOL_JVC = 0x00008, /* JVC */ + IR_PROTOCOL_RCA = 0x00010, /* RCA */ + IR_PROTOCOL_PSD = 0x00020, /* Precision Squared (not yet supported) */ + IR_PROTOCOL_RC5 = 0x00040, /* Philips RC5 */ + IR_PROTOCOL_RCMM = 0x00080, /* Philips RCMM */ + IR_PROTOCOL_RECS80 = 0x00100, /* Philips RECS80 */ + IR_PROTOCOL_NEC = 0x00200, /* NEC */ + IR_PROTOCOL_NECE = 0x00400, /* NEC with 16 bit address capability */ + IR_PROTOCOL_SCA = 0x00800, /* Scientific Atlanta */ + IR_PROTOCOL_MATSUSHITA = 0x01000, /* Matsushita (Technics/Panasonics) */ + IR_PROTOCOL_SONY = 0x02000, /* Sony SIRC 12 bit */ + IR_PROTOCOL_SONY15 = 0x04000, /* Sony SIRC 15 bit */ + IR_PROTOCOL_SONY20 = 0x08000, /* Sony SIRC 20 bit */ + IR_PROTOCOL_SONY24 = 0x10000, /* Sony SIRC 24 bit */ + IR_PROTOCOL_ALL = 0x1FFFF +} ir_protocol_t; + +typedef enum +{ + FP_MODE_KEYS_DISABLED = 0, + FP_MODE_KEYS_ENABLED = 1 +} fp_mode_t; + +#define EVENT_KEY_UP 0 +#define EVENT_KEY_DOWN 1 +#define NEVIS_IR_DEVICE_NAME "IR_NEVIS" + +/*******************************************************************************/ +/* DEBUG options */ +/*******************************************************************************/ + +#define DBG_NONE 0x00000000 /* no debug at all */ + +#define DBG_IR_SYSTEM 0x00000001 /* IR: low level informations */ +#define DBG_IR_DECODE 0x00000002 /* IR: informations from the IR protocol decoder */ +#define DBG_OUTPUT_QUEUE 0x00000004 /* IR: show data from the outgoing queue (from driver to the client(s) ) */ +#define DBG_IR_FOPS 0x00000008 /* IR: informations about filoe operations (ioctl's) */ + +#define DBG_VFD_SYSTEM 0x00010000 /* VFD: low level informations */ +#define DBG_VFD_FOPS 0x00080000 /* VFD: informations about filoe operations (ioctl's) */ + +/*******************************************************************************/ +/* ioctl's */ +/*******************************************************************************/ + +/* set the IR-protocols to listen for. */ +#define IOC_IR_SET_PRI_PROTOCOL _IOW(0xDD, 1, ir_protocol_t) /* set the primary IR-protocol */ +#define IOC_IR_SET_SEC_PROTOCOL _IOW(0xDD, 2, ir_protocol_t) /* set the secondary IR-protocol */ + +/* some IR-protocols can handle different device addresses. */ +#define IOC_IR_SET_PRI_ADDRESS _IOW(0xDD, 3, unsigned int) /* set the primary IR-address */ +#define IOC_IR_SET_SEC_ADDRESS _IOW(0xDD, 4, unsigned int) /* set the secondary IR-address */ + +/* defines the delay time between two pulses in milliseconds */ +#define IOC_IR_SET_F_DELAY _IOW(0xDD, 5, unsigned int) /* set the delay time before the first repetition */ +#define IOC_IR_SET_X_DELAY _IOW(0xDD, 6, unsigned int) /* set the delay time between all other repetitions */ + +/* load key mappings to translate from raw IR to Linux Input */ +#define IOC_IR_SET_PRI_KEYMAP _IOW(0xDD, 7, unsigned short *) /* set the primary keymap [num entries],[entry 1],[entry 2],...,[entry n] (max 0xFFFF entries) */ +#define IOC_IR_SET_SEC_KEYMAP _IOW(0xDD, 8, unsigned short *) /* set the secondary keymap [num entries],[entry 1],[entry 2],...,[entry n] (max 0xFFFF entries) */ + +/* frontpanel button options */ +#define IOC_IR_SET_FP_MODE _IOW(0xDD, 9, fp_mode_t) /* enable/disable frontpanel buttons */ + +/* informative stuff */ +#define IOC_IR_GET_PROTOCOLS _IOR(0xDD, 10, ir_protocol_t) /* reports a bitmask of all supported ir_protocols */ + +#endif /* __NEVIS_IR_H__ */ diff --git a/lib/libcoolstream/tsrouter.h b/lib/libcoolstream/tsrouter.h new file mode 100644 index 000000000..672d6721d --- /dev/null +++ b/lib/libcoolstream/tsrouter.h @@ -0,0 +1,32 @@ +#ifndef __TSROUTER_H +#define __TSROUTER_H + +typedef struct _tsrouter_hsdp_config { + u8 port; + u32 port_ctrl; + u32 pkt_ctrl; + u32 clk_ctrl; + u32 mux; + u32 int_en; + /* more ? */ +} tsrouter_hsdp_config_t; + +typedef struct _tsrouter_tsp_config { + u8 port; + u32 port_ctrl; + u32 mux; +} tsrouter_tsp_config_t; + +extern int cs_tsrouter_init(void); +extern void cs_tsrouter_exit(void); + +extern void cs_tsx_hsdp_init_port(u32 port, u32 ctrl); +extern void cs_tsx_tsp_init_port(u32 port, u32 hsdp_port); + +extern void cs_tsx_hsdp_get_port_config(tsrouter_hsdp_config_t *conf); +extern void cs_tsx_tsp_get_port_config(tsrouter_tsp_config_t *conf); + +extern void cs_tsx_hsdp_set_port_config(const tsrouter_hsdp_config_t *conf); +extern void cs_tsx_tsp_set_port_config(const tsrouter_tsp_config_t *conf); + +#endif /* __TSROUTER_H */ diff --git a/lib/libdvbsub/tools.h b/lib/libdvbsub/tools.h index 24c72bcfb..caa9bbe14 100644 --- a/lib/libdvbsub/tools.h +++ b/lib/libdvbsub/tools.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index aea036ed2..b4f1e9728 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -637,7 +637,9 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int int corner_bl = (type & CORNER_BOTTOM_LEFT) ? 1 : 0; int corner_br = (type & CORNER_BOTTOM_RIGHT) ? 1 : 0; -#ifndef USE_NEVIS_GXA +#ifdef USE_NEVIS_GXA + OpenThreads::ScopedLock m_lock(mutex); +#else int swidth = stride / sizeof(fb_pixel_t); fb_pixel_t *fbp = getFrameBufferPointer() + (swidth * y); #endif @@ -801,6 +803,7 @@ void CFrameBuffer::paintVLineRel(int x, int y, int dy, const fb_pixel_t col) fillrect.rop = ROP_COPY; ioctl(fd, FBIO_FILL_RECT, &fillrect); #elif defined(USE_NEVIS_GXA) + OpenThreads::ScopedLock m_lock(mutex); /* draw a single vertical line from point x/y with hight dx */ unsigned int cmd = GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(2) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2) | GXA_CMD_NOT_ALPHA; @@ -833,6 +836,7 @@ void CFrameBuffer::paintHLineRel(int x, int dx, int y, const fb_pixel_t col) fillrect.rop = ROP_COPY; ioctl(fd, FBIO_FILL_RECT, &fillrect); #elif defined(USE_NEVIS_GXA) + OpenThreads::ScopedLock m_lock(mutex); /* draw a single horizontal line from point x/y with width dx */ unsigned int cmd = GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(2) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2) | GXA_CMD_NOT_ALPHA; @@ -1660,6 +1664,7 @@ void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32 //printf("CFrameBuffer::blit2FB: data %x Kva %x\n", (int) fbbuff, (int) uKva); if(uKva != NULL) { + OpenThreads::ScopedLock m_lock(mutex); cmd = GXA_CMD_BLT | GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(1) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(3); _write_gxa(gxa_base, GXA_BMP1_TYPE_REG, (3 << 16) | width); diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index c9d94a792..7797374e7 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -32,6 +32,8 @@ #include #include +#include +#include #define fb_pixel_t uint32_t @@ -57,6 +59,7 @@ class CFrameBuffer private: CFrameBuffer(); + OpenThreads::Mutex mutex; struct rgbData { diff --git a/src/eitd/SIevents.hpp b/src/eitd/SIevents.hpp index 398f384b5..c1af74493 100644 --- a/src/eitd/SIevents.hpp +++ b/src/eitd/SIevents.hpp @@ -89,10 +89,13 @@ struct descr_linkage_header { struct descr_pdc_header { unsigned descriptor_tag : 8; +#if 0 + // unused unsigned descriptor_length : 8; unsigned pil0 : 8; unsigned pil1 : 8; unsigned pil2 : 8; +#endif } __attribute__ ((packed)) ; class SIlinkage { diff --git a/src/eitd/SIsections.hpp b/src/eitd/SIsections.hpp index 21b4df4b2..5862e1717 100644 --- a/src/eitd/SIsections.hpp +++ b/src/eitd/SIsections.hpp @@ -65,7 +65,8 @@ struct SI_section_EIT_header { unsigned segment_last_section_number : 8; unsigned last_table_id : 8; } __attribute__ ((packed)) ; // 14 bytes - +#if 0 +// unused struct SI_section_header { unsigned table_id : 8; #if __BYTE_ORDER == __BIG_ENDIAN @@ -94,7 +95,7 @@ struct SI_section_header { unsigned section_number : 8; unsigned last_section_number : 8; } __attribute__ ((packed)) ; // 8 bytes - +#endif class SIsectionEIT #ifdef USE_DVBSI_EVENTS : public EventInformationSection diff --git a/src/eitd/SIservices.hpp b/src/eitd/SIservices.hpp index 80f1f3f1b..4d6796c0a 100644 --- a/src/eitd/SIservices.hpp +++ b/src/eitd/SIservices.hpp @@ -51,7 +51,8 @@ public: { return uniqueKey() < ref.uniqueKey(); } - +#if 0 +//unused void toStream(char * &p) const { *(t_service_id *)p = service_id; p += sizeof(t_service_id); @@ -63,7 +64,7 @@ public: { return service_id; } - +#endif t_channel_id uniqueKey(void) const { return CREATE_CHANNEL_ID(service_id, original_network_id, transport_stream_id); // cf. zapittypes.h } @@ -115,11 +116,16 @@ public: is_actual = 0; } +#if 0 +// unused int eitScheduleFlag(void) { return (int)flags.EIT_schedule_flag; } int eitPresentFollowingFlag(void) { return (int)flags.EIT_present_following_flag; } +#endif int runningStatus(void) { return (int)flags.running_status; } +#if 0 +// unused int freeCAmode(void) { return (int)flags.free_CA_mode; } - +#endif bool operator < (const SIservice& s) const { return uniqueKey() < s.uniqueKey(); } diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 34071faec..7a8317d4d 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -332,7 +332,7 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(sptr, strlen(sptr), 0).c_str(), false)); } } - for(i = 0; i < pMenu->choice_nb; i++) { + for(i = 0; (i < pMenu->choice_nb) && (i < MAX_MMI_ITEMS); i++) { snprintf(cnt, sizeof(cnt), "%d", i); if(sublevel) menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(pMenu->choice_item[i], strlen(pMenu->choice_item[i]), 0).c_str(), true, NULL, selector, cnt)); diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 84e4d42df..0aed608ff 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -694,8 +694,8 @@ void EpgPlus::init() CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h); CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &h2); - if(icol_h < h2) - icol_h = h2; +// if(icol_h < h2) +// icol_h = h2; int buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8; //TODO get height from buttons/*std::max (icol_h+8, fonts[EPGPlus_footer_fontbuttons]->getHeight());*/ int footerHeight = Footer::getUsedHeight() + buttonHeight; diff --git a/src/gui/ext_update.cpp b/src/gui/ext_update.cpp index 7e4d430e4..4c4ffe169 100644 --- a/src/gui/ext_update.cpp +++ b/src/gui/ext_update.cpp @@ -5,7 +5,7 @@ and some other guys Homepage: http://dbox.cyberphoria.org/ - Copyright (C) 2012 M. Liebmann (micha-bbg) + Copyright (C) 2012-2013 M. Liebmann (micha-bbg) License: GPL @@ -73,6 +73,10 @@ CExtUpdate::CExtUpdate() fLogfile = "/tmp/update.log"; mountPkt = "/tmp/image_mount"; FileHelpers = NULL; + flashErrorFlag = false; + total = bsize = used = 0; + free1 = free2 = free3 = 0; + copyList.clear(); blackList.clear(); deleteList.clear(); @@ -130,6 +134,7 @@ bool CExtUpdate::ErrorReset(bool modus, const std::string & msg1, const std::str bool CExtUpdate::applySettings(const std::string & filename, int mode) { +#define ORGFILE_EXT ".org" if(!FileHelpers) FileHelpers = new CFileHelpers(); @@ -139,11 +144,19 @@ bool CExtUpdate::applySettings(const std::string & filename, int mode) imgFilename = FILESYSTEM_ENCODING_TO_UTF8_STRING(filename); DBG_TIMER_START() + + // make backup file + FileHelpers->copyFile(imgFilename.c_str(), (imgFilename + ORGFILE_EXT).c_str(), 0644); + bool ret = applySettings(); DBG_TIMER_STOP("Image editing") if (!ret) { - if (mtdRamError != "") + if ((mtdRamError != "") && (!flashErrorFlag)) DisplayErrorMessage(mtdRamError.c_str()); + + // error, restore original file + unlink(imgFilename.c_str()); + rename((imgFilename + ORGFILE_EXT).c_str(), imgFilename.c_str()); } else { if (mode == MODE_EXPERT) { @@ -300,8 +313,14 @@ bool CExtUpdate::applySettings() if (res) return ErrorReset(RESET_UNLOAD, "mount error"); - if (!readBackupList(mountPkt)) + if (get_fs_usage(mountPkt.c_str(), total, used, &bsize)) + free1 = (total * bsize) / 1024 - (used * bsize) / 1024; + + if (!readBackupList(mountPkt)) { + if (flashErrorFlag) + return false; return ErrorReset(0, "error readBackupList"); + } res = umount(mountPkt.c_str()); if (res) @@ -497,6 +516,7 @@ bool CExtUpdate::readBackupList(const std::string & dstPath) { char buf[PATH_MAX]; static struct stat FileInfo; + vector::iterator it; f1 = fopen(backupList.c_str(), "r"); if (f1 == NULL) { @@ -573,8 +593,33 @@ bool CExtUpdate::readBackupList(const std::string & dstPath) } fclose(f1); + // read DeleteList + for(it = deleteList.begin(); it != deleteList.end(); ++it) { + line = *it; + if (lstat(line.c_str(), &FileInfo) != -1) { + if ((line.find("*") != std::string::npos) || (line.find("?") != std::string::npos)) { + // Wildcards + WRITE_UPDATE_LOG("delete file list: %s\n", line.c_str()); + deleteFileList(line.c_str()); + } + else if (S_ISREG(FileInfo.st_mode)) { + // File + WRITE_UPDATE_LOG("delete file: %s\n", line.c_str()); + unlink(line.c_str()); + } + else if (S_ISDIR(FileInfo.st_mode)){ + // Directory + WRITE_UPDATE_LOG("delete directory: %s\n", line.c_str()); + FileHelpers->removeDir(line.c_str()); + } + } + } + sync(); + + if (get_fs_usage(mountPkt.c_str(), total, used, &bsize)) + free2 = (total * bsize) / 1024 - (used * bsize) / 1024; + // read copyList - vector::iterator it; for(it = copyList.begin(); it != copyList.end(); ++it) { line = *it; line = trim(line); @@ -619,29 +664,30 @@ bool CExtUpdate::readBackupList(const std::string & dstPath) } } + sync(); - // read DeleteList - for(it = deleteList.begin(); it != deleteList.end(); ++it) { - line = *it; - if (lstat(line.c_str(), &FileInfo) != -1) { - if ((line.find("*") != std::string::npos) || (line.find("?") != std::string::npos)) { - // Wildcards - WRITE_UPDATE_LOG("delete file list: %s\n", line.c_str()); - deleteFileList(line.c_str()); - } - else if (S_ISREG(FileInfo.st_mode)) { - // File - WRITE_UPDATE_LOG("delete file: %s\n", line.c_str()); - unlink(line.c_str()); - } - else if (S_ISDIR(FileInfo.st_mode)){ - // Directory - WRITE_UPDATE_LOG("delete directory: %s\n", line.c_str()); - FileHelpers->removeDir(line.c_str()); - } + if (get_fs_usage(mountPkt.c_str(), total, used, &bsize)) { + long flashWarning = 1000; // 1MB + long flashError = 600; // 600KB + char buf1[1024]; + total = (total * bsize) / 1024; + free3 = total - (used * bsize) / 1024; + printf("##### [%s] %ld KB free org, %ld KB free after delete, %ld KB free now\n", __FUNCTION__, free1, free2, free3); + memset(buf1, '\0', sizeof(buf1)); + if (free3 <= flashError) { + snprintf(buf1, sizeof(buf1)-1, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_ERROR), free3, total); + ShowMsgUTF(LOCALE_MESSAGEBOX_ERROR, buf1, CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_ERROR); + flashErrorFlag = true; + return false; + } + else if (free3 <= flashWarning) { + snprintf(buf1, sizeof(buf1)-1, g_Locale->getText(LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_WARNING), free3, total); + if (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, buf1, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO) != CMessageBox::mbrYes) { + flashErrorFlag = true; + return false; + } } } - sync(); return true; } diff --git a/src/gui/ext_update.h b/src/gui/ext_update.h index e0291641b..2999c9fa2 100644 --- a/src/gui/ext_update.h +++ b/src/gui/ext_update.h @@ -5,7 +5,7 @@ and some other guys Homepage: http://dbox.cyberphoria.org/ - Copyright (C) 2012 M. Liebmann (micha-bbg) + Copyright (C) 2012-2013 M. Liebmann (micha-bbg) License: GPL @@ -56,6 +56,10 @@ class CExtUpdate CFileHelpers* FileHelpers; std::vector copyList, blackList, deleteList; + bool flashErrorFlag; + long total, bsize, used; + long free1, free2, free3; + bool applySettings(void); bool readBackupList(const std::string & dstPath); bool copyFileList(const std::string & fileList, const std::string & dstPath); diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index e1292fd5d..b495afb1f 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -567,21 +567,24 @@ void CInfoViewer::check_channellogo_ca_SettingsChange() void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap, int epgpos) { if(channel) { + showTitle(channel->number, channel->getName(), channel->getSatellitePosition(), - channel->getChannelID(), calledFromNumZap, epgpos); + channel->getChannelID(), calledFromNumZap, epgpos, channel->pname); } } void CInfoViewer::showTitle(t_channel_id chid, const bool calledFromNumZap, int epgpos) { + CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(chid); + if(channel) { showTitle(channel->number, channel->getName(), channel->getSatellitePosition(), - channel->getChannelID(), calledFromNumZap, epgpos); + channel->getChannelID(), calledFromNumZap, epgpos, channel->pname); } } -void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, const t_satellite_position satellitePosition, const t_channel_id new_channel_id, const bool calledFromNumZap, int epgpos) +void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, const t_satellite_position satellitePosition, const t_channel_id new_channel_id, const bool calledFromNumZap, int epgpos, char *pname) { check_channellogo_ca_SettingsChange(); aspectRatio = 0; @@ -709,6 +712,19 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con ChanNameX + 10 + ChanNumWidth, ChanNameY + time_height, BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth, ChannelName, color /*COL_INFOBAR*/, 0, true); // UTF-8 + //provider name + if(g_settings.infobar_show_channeldesc && pname){ + std::string prov_name = pname; + prov_name=prov_name.substr(prov_name.find_first_of("]")+1); + + int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName); + chname_width += (chname_width/(ChannelName.size()-1)/2); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString( + ChanNameX + 10 + ChanNumWidth + chname_width, ChanNameY + time_height -SHADOW_OFFSET/2, + BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth - chname_width, + prov_name, color /*COL_INFOBAR*/, 0, true); // UTF-8 + } + } } diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index e2d5a9b95..c1860b4d6 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -155,7 +155,7 @@ class CInfoViewer void start(); void showEpgInfo(); - void showTitle(const int ChanNum, const std::string & Channel, const t_satellite_position satellitePosition, const t_channel_id new_channel_id = 0, const bool calledFromNumZap = false, int epgpos = 0); // Channel must be UTF-8 encoded + void showTitle(const int ChanNum, const std::string & Channel, const t_satellite_position satellitePosition, const t_channel_id new_channel_id = 0, const bool calledFromNumZap = false, int epgpos = 0, char *pname=NULL); // Channel must be UTF-8 encoded void showTitle(CZapitChannel * channel, const bool calledFromNumZap = false, int epgpos = 0); void showTitle(t_channel_id channel_id, const bool calledFromNumZap = false, int epgpos = 0); void lookAheadEPG(const int ChanNum, const std::string & Channel, const t_channel_id new_channel_id = 0, const bool calledFromNumZap = false); //alpha: fix for nvod subchannel update diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index c1bd9c746..9cb4d2692 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -309,19 +309,19 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) mc1->setHint("", LOCALE_MENU_HINT_EPG_SAVE_STANDBY); CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &g_settings.epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, g_settings.epg_save, g_settings.epg_cache, miscSettings_epg_cache); + CMenuForwarder * mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, true, g_settings.epg_cache, miscSettings_epg_cache); mf->setHint("", LOCALE_MENU_HINT_EPG_CACHE); CStringInput * miscSettings_epg_cache_e = new CStringInput(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, &g_settings.epg_extendedcache, 3,LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT1, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, g_settings.epg_save, g_settings.epg_extendedcache, miscSettings_epg_cache_e); + CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, g_settings.epg_extendedcache, miscSettings_epg_cache_e); mf1->setHint("", LOCALE_MENU_HINT_EPG_EXTENDEDCACHE); CStringInput * miscSettings_epg_old_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, &g_settings.epg_old_events, 3,LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, g_settings.epg_save, g_settings.epg_old_events, miscSettings_epg_old_events); + CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, g_settings.epg_old_events, miscSettings_epg_old_events); mf2->setHint("", LOCALE_MENU_HINT_EPG_OLD_EVENTS); CStringInput * miscSettings_epg_max_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, &g_settings.epg_max_events, 6,LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, g_settings.epg_save, g_settings.epg_max_events, miscSettings_epg_max_events); + CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, g_settings.epg_max_events, miscSettings_epg_max_events); mf3->setHint("", LOCALE_MENU_HINT_EPG_MAX_EVENTS); CMenuForwarder * mf4 = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, g_settings.epg_save, g_settings.epg_dir, this, "epgdir"); @@ -329,10 +329,10 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) miscEpgNotifier = new COnOffNotifier(); miscEpgNotifier->addItem(mc1); - miscEpgNotifier->addItem(mf); - miscEpgNotifier->addItem(mf1); - miscEpgNotifier->addItem(mf2); - miscEpgNotifier->addItem(mf3); + //miscEpgNotifier->addItem(mf); + //miscEpgNotifier->addItem(mf1); + //miscEpgNotifier->addItem(mf2); + //miscEpgNotifier->addItem(mf3); miscEpgNotifier->addItem(mf4); CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true,miscEpgNotifier); diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index adc0e056a..8ed92f2a4 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1235,7 +1235,12 @@ void CMovieBrowser::refreshMovieInfo(void) int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight); int pich = m_cBoxFrameInfo.iHeight; std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name); - logo_ok = (fname != ""); + if(fname.empty()) { + std::string cover = m_movieSelectionHandler->file.Name; + cover.replace((cover.length()-18),15,""); //covername without yyyymmdd_hhmmss + fname = getScreenshotName(cover); + } + logo_ok = (!fname.empty()); int flogo_w = 0, flogo_h = 0; if(logo_ok) { g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h); diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 866f2813a..4dbd38422 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -860,22 +860,22 @@ void CPictureViewerGui::showHelp() helpbox.addLine(g_Locale->getText(LOCALE_PICTUREVIEWER_HELP5)); helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP6)); helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP7)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_5, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP8)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_HOME, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP9)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_5, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP3)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_HOME, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP8)); helpbox.addPagebreak(); - helpbox.addLine(g_Locale->getText(LOCALE_PICTUREVIEWER_HELP10)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP11)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP12)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP13)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_1, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP14)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_3, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP15)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_2, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP16)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_4, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP17)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_6, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP18)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_8, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP19)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_5, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP20)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_0, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP21)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_HOME, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP22)); + helpbox.addLine(g_Locale->getText(LOCALE_PICTUREVIEWER_HELP9)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP10)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP11)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP12)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_1, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP13)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_3, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP14)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_2, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP15)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_4, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP16)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_6, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP17)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_8, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP18)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_5, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP3)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_0, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP19)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_HOME, g_Locale->getText(LOCALE_PICTUREVIEWER_HELP8)); if(audioplayer) { helpbox.addPagebreak(); diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 80836e7a1..2698ad2f7 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -156,7 +156,7 @@ void CPlugins::loadPlugins() frameBuffer = CFrameBuffer::getInstance(); number_of_plugins = 0; plugin_list.clear(); - + sindex = 100; scanDir(g_settings.plugin_hdd_dir.c_str()); scanDir(PLUGINDIR_USB); scanDir(PLUGINDIR_VAR); @@ -184,7 +184,7 @@ bool CPlugins::parseCfg(plugin *plugin_data) while (linecount < 20 && getline(inFile, line[linecount++])) {}; - plugin_data->index = 0; + plugin_data->index = sindex++; plugin_data->key = 0; //CRCInput::RC_nokey plugin_data->fb = false; plugin_data->rc = false; diff --git a/src/gui/plugins.h b/src/gui/plugins.h index f37cc0704..501e6172c 100644 --- a/src/gui/plugins.h +++ b/src/gui/plugins.h @@ -88,7 +88,7 @@ class CPlugins }; int number_of_plugins; - + int sindex; std::vector plugin_list; std::string plugin_dir; std::string scriptOutput; diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index d3d26211a..65c07d900 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -96,7 +96,8 @@ const CMenuOptionChooser::keyval SATSETUP_DISEQC_OPTIONS[SATSETUP_DISEQC_OPTION_ { DISEQC_1_1, LOCALE_SATSETUP_DISEQC11 }, /*{ DISEQC_1_2, LOCALE_SATSETUP_DISEQC12 },*/ { DISEQC_ADVANCED, LOCALE_SATSETUP_DISEQC_ADVANCED }, - { SMATV_REMOTE_TUNING, LOCALE_SATSETUP_SMATVREMOTE } + { DISEQC_UNICABLE, LOCALE_SATSETUP_UNICABLE } +// { SMATV_REMOTE_TUNING, LOCALE_SATSETUP_SMATVREMOTE } }; #define SATSETUP_SCANTP_FEC_COUNT 21 @@ -254,6 +255,10 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey) { return showScanMenuLnbSetup(); } + else if(actionKey=="unisetup") + { + return showUnicableSetup(); + } else if(actionKey=="satfind") { return showScanMenuSatFind(); @@ -548,6 +553,7 @@ int CScanSetup::showFrontendSetup(int number) CMenuWidget * setupMenu = new CMenuWidget(name, NEUTRINO_ICON_SETTINGS, width); setupMenu->setSelected(feselected); setupMenu->addIntroItems(); +//<<<<<<< HEAD int fecount = CFEManager::getInstance()->getFrontendCount(); @@ -616,6 +622,16 @@ int CScanSetup::showFrontendSetup(int number) /* diseqc repeats */ ojDiseqcRepeats = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQCREPEAT, (int *)&fe_config.diseqcRepeats, allow_moptions && (dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED), 0, 2, NULL); +#if 0 //======= + + bool option_onoff = (number > 0 && fe_config.diseqcType == DISEQC_UNICABLE && femode == CFEManager::FE_MODE_TWIN) ? false : true; + + CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&dmode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT, allow_start && option_onoff, this, CRCInput::convertDigitToKey(shortcut++), "", true); + mc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCTYPE); + setupMenu->addItem(mc); + + ojDiseqcRepeats = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQCREPEAT, (int *)&fe_config.diseqcRepeats, (dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED) && (dmode != DISEQC_UNICABLE), 0, 2, NULL); +#endif //>>>>>>> dvbsi++ ojDiseqcRepeats->setHint("", LOCALE_MENU_HINT_SCAN_DISEQCREPEAT); setupMenu->addItem(ojDiseqcRepeats); @@ -638,6 +654,9 @@ int CScanSetup::showFrontendSetup(int number) fsatSetup->setHint("", LOCALE_MENU_HINT_SCAN_SATSETUP); setupMenu->addItem(fsatSetup); + uniSetup = new CMenuForwarder(LOCALE_SATSETUP_UNI_SETTINGS, (dmode == DISEQC_UNICABLE), NULL, this, "unisetup", CRCInput::convertDigitToKey(shortcut++)); + setupMenu->addItem(uniSetup); + setupMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SATSETUP_EXTENDED_MOTOR)); CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_MOTOR_SPEED, (int *)&fe_config.motorRotationSpeed, true, 0, 64, NULL); nc->setHint("", LOCALE_MENU_HINT_SCAN_MOTOR_SPEED); @@ -671,6 +690,35 @@ int CScanSetup::showFrontendSetup(int number) return res; } +int CScanSetup::showUnicableSetup() +{ + printf("[neutrino] CScanSetup call %s fe %d\n", __func__, fenumber); + + int res = menu_return::RETURN_REPAINT; + CFrontend *fe = CFEManager::getInstance()->getFE(fenumber); + frontend_config_t &fe_config = fe->getConfig(); + int unicable_scr = fe_config.uni_scr; + int unicable_qrg = fe_config.uni_qrg; + + CMenuOptionNumberChooser *uniscr = new CMenuOptionNumberChooser(LOCALE_UNICABLE_SCR, &unicable_scr, true, 0, 7); + CIntInput *uniqrg = new CIntInput(LOCALE_UNICABLE_QRG, unicable_qrg, 4, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); + + CMenuWidget *uni_setup = new CMenuWidget(LOCALE_SATSETUP_UNI_SETTINGS, NEUTRINO_ICON_SETTINGS, width); + uni_setup->addIntroItems(); + + uni_setup->addItem(uniscr); + CMenuForwarder *mf = new CMenuForwarder(LOCALE_UNICABLE_QRG, true, uniqrg->getValue(), uniqrg); + uni_setup->addItem(mf); + res = uni_setup->exec(NULL, ""); + delete uni_setup; + if (res) { + fe_config.uni_scr = unicable_scr; + fe_config.uni_qrg = unicable_qrg; + printf("%s: scr: %d qrg: %d\n", __func__, unicable_scr, unicable_qrg); + } + return res; +} + int CScanSetup::showScanMenuLnbSetup() { printf("[neutrino] CScanSetup call %s fe %d\n", __FUNCTION__, fenumber); @@ -850,18 +898,31 @@ int CScanSetup::showScanMenuSatFind() void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satconfig) { temp_sat->addIntroItems(); + CMenuOptionNumberChooser *diseqc; + CMenuOptionNumberChooser *comm; + CMenuOptionNumberChooser *uncomm; + CMenuOptionNumberChooser *unilnb; + CMenuOptionNumberChooser *motor; + CMenuOptionChooser *usals; + CMenuForwarder *mf; + bool unicable = (dmode == DISEQC_UNICABLE); - CMenuOptionNumberChooser *diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); - diseqc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQC); - CMenuOptionNumberChooser *comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); - comm->setHint("", LOCALE_MENU_HINT_SCAN_COMMITED); - CMenuOptionNumberChooser *uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); - uncomm->setHint("", LOCALE_MENU_HINT_SCAN_UNCOMMITED); - CMenuOptionNumberChooser *motor = new CMenuOptionNumberChooser(LOCALE_SATSETUP_MOTOR_POS, &satconfig.motor_position, true /*dmode == DISEQC_ADVANCED*/, 0, 64, NULL, 0, 0, LOCALE_OPTIONS_OFF); - motor->setHint("", LOCALE_MENU_HINT_SCAN_MOTORPOS); - CMenuOptionChooser *usals = new CMenuOptionChooser(LOCALE_EXTRA_USE_GOTOXX, &satconfig.use_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true /*dmode == DISEQC_ADVANCED*/); - usals->setHint("", LOCALE_MENU_HINT_SCAN_USEUSALS); - + if (!unicable) { + diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); + diseqc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQC); + comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); + comm->setHint("", LOCALE_MENU_HINT_SCAN_COMMITED); + uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF); + uncomm->setHint("", LOCALE_MENU_HINT_SCAN_UNCOMMITED); + motor = new CMenuOptionNumberChooser(LOCALE_SATSETUP_MOTOR_POS, &satconfig.motor_position, true /*dmode == DISEQC_ADVANCED*/, 0, 64, NULL, 0, 0, LOCALE_OPTIONS_OFF); + motor->setHint("", LOCALE_MENU_HINT_SCAN_MOTORPOS); + usals = new CMenuOptionChooser(LOCALE_EXTRA_USE_GOTOXX, &satconfig.use_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true /*dmode == DISEQC_ADVANCED*/); + usals->setHint("", LOCALE_MENU_HINT_SCAN_USEUSALS); + }else{ + if (satconfig.diseqc < 0) + satconfig.diseqc = 0; + unilnb = new CMenuOptionNumberChooser(LOCALE_UNICABLE_LNB, &satconfig.diseqc, true, 0, 1); + } if(!satconfig.use_usals) all_usals = 0; @@ -869,13 +930,17 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon CIntInput* lofH = new CIntInput(LOCALE_SATSETUP_LOFH, (int&) satconfig.lnbOffsetHigh, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput* lofS = new CIntInput(LOCALE_SATSETUP_LOFS, (int&) satconfig.lnbSwitch, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); - temp_sat->addItem(diseqc); - temp_sat->addItem(comm); - temp_sat->addItem(uncomm); - temp_sat->addItem(motor); - temp_sat->addItem(usals); + if (!unicable) { + temp_sat->addItem(diseqc); + temp_sat->addItem(comm); + temp_sat->addItem(uncomm); + temp_sat->addItem(motor); + temp_sat->addItem(usals); + } else { + temp_sat->addItem(unilnb); + } - CMenuForwarder * mf = new CMenuDForwarder(LOCALE_SATSETUP_LOFL, true, lofL->getValue(), lofL); + mf = new CMenuDForwarder(LOCALE_SATSETUP_LOFL, true, lofL->getValue(), lofL); mf->setHint("", LOCALE_MENU_HINT_SCAN_LOFL); temp_sat->addItem(mf); mf = new CMenuDForwarder(LOCALE_SATSETUP_LOFH, true, lofH->getValue(), lofH); @@ -1178,27 +1243,51 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data* } } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_DISEQC)) { - printf("[neutrino] CScanSetup::%s: diseqc %d \n", __FUNCTION__, dmode); - //FIXME 2 frontends ?? + printf("[neutrino] CScanSetup::%s: diseqc %d fenumber %d\n", __FUNCTION__, dmode, fenumber); + CFrontend * fe = CFEManager::getInstance()->getFE(fenumber); + fe->setDiseqcType((diseqc_t) dmode); + + if(femode != CFEManager::FE_MODE_ALONE) + CFEManager::getInstance()->saveSettings(true); + fautoScanAll->setActive(dmode != NO_DISEQC); - if(dmode == NO_DISEQC) { + uniSetup->setActive(dmode == DISEQC_UNICABLE); + if (dmode == NO_DISEQC || dmode == DISEQC_UNICABLE) { ojDiseqcRepeats->setActive(false); + if(frontendSetup){ + if(femode == CFEManager::FE_MODE_TWIN && dmode == DISEQC_UNICABLE){ + frontendSetup->setActive(true); + } + else if( femode != CFEManager::FE_MODE_ALONE){ + frontendSetup->setActive(false); + } + } } else if(dmode < DISEQC_ADVANCED) { ojDiseqcRepeats->setActive(true); + if(frontendSetup && femode != CFEManager::FE_MODE_ALONE){ + frontendSetup->setActive(false); + } } else if(dmode == DISEQC_ADVANCED) { + if(frontendSetup && femode != CFEManager::FE_MODE_ALONE){ + frontendSetup->setActive(false); + } ojDiseqcRepeats->setActive(true); } - CFrontend * fe = CFEManager::getInstance()->getFE(fenumber); - fe->setDiseqcType((diseqc_t) dmode); + } else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_FE_MODE)) { printf("[neutrino] CScanSetup::%s: fe%d mode %d master %d\n", __FUNCTION__, fenumber, femode, femaster); #if 0 /* cable dont have this menu */ - if(frontendSetup) - frontendSetup->setActive(femode == CFEManager::FE_MODE_ALONE); + bool twin_unicabel = false; + if(frontendSetup){ + CFrontend * fe = CFEManager::getInstance()->getLiveFE(); + frontend_config_t & fe_config = fe->getConfig(); + twin_unicabel = (femode == CFEManager::FE_MODE_TWIN && fe_config.diseqcType == DISEQC_UNICABLE); + frontendSetup->setActive(femode == CFEManager::FE_MODE_ALONE || twin_unicabel); + } CFEManager::getInstance()->setMode((CFEManager::fe_mode_t) femode); /* to copy settings from fe0 */ if(femode != CFEManager::FE_MODE_ALONE) diff --git a/src/gui/scan_setup.h b/src/gui/scan_setup.h index 46b4f842c..c565cbe69 100644 --- a/src/gui/scan_setup.h +++ b/src/gui/scan_setup.h @@ -59,6 +59,7 @@ class CScanSetup : public CMenuTarget, public CChangeObserver CMenuForwarder *fsatSetup; CMenuForwarder *fsatSelect; CMenuOptionChooser * dtype; + CMenuForwarder *uniSetup; CMenuOptionNumberChooser * ojDiseqcRepeats; CIntInput * nid; CMenuOptionChooser * lcnhd; @@ -93,6 +94,7 @@ class CScanSetup : public CMenuTarget, public CChangeObserver int showFrontendSetup(int number); int showFrontendSelect(int number); int showScanMenuLnbSetup(); + int showUnicableSetup(); int showScanMenuSatFind(); void fillSatSelect(CMenuOptionStringChooser *select); void fillCableSelect(CMenuOptionStringChooser *select); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index c0c15595a..2491ddcc3 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -776,7 +776,7 @@ void CTimerList::paintItem(int pos) { zAddData += sep; zAddData += "AC3"; - sep = "/"; +// sep = "/"; } zAddData += ')'; } diff --git a/src/gui/widget/hintboxext.cpp b/src/gui/widget/hintboxext.cpp index acec30040..8684e6899 100644 --- a/src/gui/widget/hintboxext.cpp +++ b/src/gui/widget/hintboxext.cpp @@ -108,6 +108,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c int maxLineWidth = 0; int scrollWidth = 0; textStartX = 0; + bgPainted = false; m_caption = Caption; @@ -147,6 +148,11 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c m_maxEntriesPerPage = m_startEntryOfPage[page] - m_startEntryOfPage[page-1]; } } + else { + if (m_height > maxOverallHeight) + maxOverallHeight = m_height; + m_maxEntriesPerPage = maxOverallHeight / m_fheight; + } line++; } @@ -209,6 +215,7 @@ void CHintBoxExt::paint(bool toround) return; } + bgPainted = false; CFrameBuffer* frameBuffer = CFrameBuffer::getInstance(); m_window = new CFBWindow(frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - m_width ) >> 1), frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - m_height) >> 2), @@ -225,8 +232,11 @@ void CHintBoxExt::refresh(bool toround) return; } - // bottom, right shadow - m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT); + if (!bgPainted) { + // bottom, right shadow + m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT); + bgPainted = true; + } // title bar m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round diff --git a/src/gui/widget/hintboxext.h b/src/gui/widget/hintboxext.h index 64dc907c9..9cec2bd8b 100644 --- a/src/gui/widget/hintboxext.h +++ b/src/gui/widget/hintboxext.h @@ -63,6 +63,7 @@ class CHintBoxExt char * m_message; ContentLines m_lines; std::string m_iconfile; + bool bgPainted; void refresh(bool toround = 1); diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index fa8dff4e4..0e06617e7 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -166,7 +166,7 @@ void CProgressWindow::paint() ypos+= mheight; globalstatusY = ypos+ mheight-20; - ypos+= mheight >>1; + //ypos+= mheight >>1; showGlobalStatus(global_progress); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 955a77fa5..1e1f16f4d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -378,6 +378,7 @@ int CNeutrinoApp::loadSetup(const char * fname) strcpy(g_settings.shutdown_min, configfile.getString("shutdown_min","180").c_str()); g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true ); + g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false ); g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos" , 0 ); g_settings.progressbar_color = configfile.getBool("progressbar_color", true ); g_settings.infobar_show = configfile.getInt32("infobar_show", 1); @@ -833,6 +834,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString("shutdown_count" , g_settings.shutdown_count); configfile.setString("shutdown_min" , g_settings.shutdown_min ); configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display ); + configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc ); configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos ); configfile.setBool("progressbar_color" , g_settings.progressbar_color ); configfile.setInt32("infobar_show", g_settings.infobar_show); @@ -1817,6 +1819,12 @@ TIMER_START(); cpuFreq = new cCpuFreqManager(); cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000); + + g_info.delivery_system = DVB_S; + if(CFEManager::getInstance()->getLiveFE() != NULL){ + g_info.delivery_system = CFEManager::getInstance()->getLiveFE()->getInfo()->type == FE_QPSK ? DVB_S : DVB_C; + } + g_info.delivery_system = CFEManager::getInstance()->getLiveFE()->getInfo()->type == FE_QPSK ? DVB_S : DVB_C; #if HAVE_TRIPLEDRAGON /* only SAT-hd1 before rev 8 has fan, rev 1 is TD (compat hack) */ @@ -1953,7 +1961,16 @@ void CNeutrinoApp::numericZap(int msg) void CNeutrinoApp::showInfo() { StopSubtitles(); - g_InfoViewer->showTitle(channelList->getActiveChannelNumber(), channelList->getActiveChannelName(), channelList->getActiveSatellitePosition(), channelList->getActiveChannel_ChannelID()); + + char *pname = NULL; + if(g_settings.infobar_show_channeldesc){ + CZapitChannel* channel = channelList->getActiveChannel(); + if(channel->pname){ + pname = channel->pname; + } + } + + g_InfoViewer->showTitle(channelList->getActiveChannelNumber(), channelList->getActiveChannelName(), channelList->getActiveSatellitePosition(), channelList->getActiveChannel_ChannelID(), false, 0, pname); StartSubtitles(); } diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index c2c078a67..f212fab5f 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -163,6 +163,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]= {"epg", &CControlAPI::EpgCGI, ""}, {"zapto", &CControlAPI::ZaptoCGI, "text/plain"}, {"getonidsid", &CControlAPI::GetChannel_IDCGI, "text/plain"}, + {"currenttpchannels", &CControlAPI::GetTPChannel_IDCGI, "text/plain"}, // boxcontrol - system {"standby", &CControlAPI::StandbyCGI, "text/plain"}, {"shutdown", &CControlAPI::ShutdownCGI, "text/plain"}, @@ -531,6 +532,12 @@ void CControlAPI::GetChannel_IDCGI(CyhookHandler *hh) hh->printf("%x%04x%04x\n",current_pids.tsid, current_pids.onid, current_pids.sid); } +// get actual channel_id +void CControlAPI::GetTPChannel_IDCGI(CyhookHandler *hh) +{ + SendChannelList(hh, true); +} + //----------------------------------------------------------------------------- void CControlAPI::MessageCGI(CyhookHandler *hh) { @@ -561,7 +568,7 @@ void CControlAPI::MessageCGI(CyhookHandler *hh) if (event != 0) { - message=decodeString(message); + //message=decodeString(message); NeutrinoAPI->EventServer->sendEvent(event, CEventServer::INITID_HTTPD, (void *) message.c_str(), message.length() + 1); hh->SendOk(); } @@ -1562,7 +1569,7 @@ void CControlAPI::StartPluginCGI(CyhookHandler *hh) if (hh->ParamList["name"] != "") { pluginname = hh->ParamList["name"]; - pluginname=decodeString(pluginname); + //pluginname=decodeString(pluginname); NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::EVT_START_PLUGIN, CEventServer::INITID_HTTPD, (void *) pluginname.c_str(), @@ -1597,17 +1604,22 @@ void CControlAPI::SendEventList(CyhookHandler *hh, t_channel_id channel_id) } //----------------------------------------------------------------------------- -void CControlAPI::SendChannelList(CyhookHandler *hh) +void CControlAPI::SendChannelList(CyhookHandler *hh, bool currentTP) { + t_channel_id current_channel = 0; + if(currentTP){ + current_channel = CZapit::getInstance()->GetCurrentChannelID(); + current_channel=(current_channel>>16); + } + int mode = NeutrinoAPI->Zapit->getMode(); hh->SetHeader(HTTP_OK, "text/plain; charset=UTF-8"); CBouquetManager::ChannelIterator cit = mode == CZapitClient::MODE_RADIO ? g_bouquetManager->radioChannelsBegin() : g_bouquetManager->tvChannelsBegin(); for (; !(cit.EndOfChannels()); cit++) { CZapitChannel * channel = *cit; - hh->printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS - " %s\n", - channel->channel_id, - channel->getName().c_str()); + if(!currentTP || (channel->channel_id >>16) == current_channel){ + hh->printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " %s\n", channel->channel_id, channel->getName().c_str()); + } } } @@ -2119,6 +2131,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) alarmTimeT = 0, tnull = 0; unsigned int repCount = 0; + int alHour=0; // if alarm given then in parameters im time_t format if(hh->ParamList["alarm"] != "") @@ -2137,13 +2150,16 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) tnull = time(NULL); struct tm *alarmTime=localtime(&tnull); alarmTime->tm_sec = 0; - strptime(hh->ParamList["alDate"].c_str(), "%d.%m.%Y", alarmTime); + if(sscanf(hh->ParamList["alDate"].c_str(),"%2d.%2d.%4d",&(alarmTime->tm_mday), &(alarmTime->tm_mon), &(alarmTime->tm_year)) == 3) + { + alarmTime->tm_mon -= 1; + alarmTime->tm_year -= 1900; + } // Alarm Time - Format exact! HH:MM if(hh->ParamList["alTime"] != "") - strptime(hh->ParamList["alTime"].c_str(), "%H:%M", alarmTime); - int alHour = alarmTime->tm_hour; - + sscanf(hh->ParamList["alTime"].c_str(),"%2d.%2d",&(alarmTime->tm_hour), &(alarmTime->tm_min)); + alHour = alarmTime->tm_hour; correctTime(alarmTime); alarmTimeT = mktime(alarmTime); announceTimeT = alarmTimeT; @@ -2151,12 +2167,15 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) stopTime->tm_sec = 0; // Stop Time - Format exact! HH:MM if(hh->ParamList["stTime"] != "") - strptime(hh->ParamList["stTime"].c_str(), "%H:%M", stopTime); + sscanf(hh->ParamList["stTime"].c_str(),"%2d.%2d",&(stopTime->tm_hour), &(stopTime->tm_min)); // Stop Date - Format exact! DD.MM.YYYY if(hh->ParamList["stDate"] != "") - strptime(hh->ParamList["stDate"].c_str(), "%d.%m.%Y", stopTime); - stopTime->tm_sec = 0; + if(sscanf(hh->ParamList["stDate"].c_str(),"%2d.%2d.%4d",&(stopTime->tm_mday), &(stopTime->tm_mon), &(stopTime->tm_year)) == 3) + { + stopTime->tm_mon -= 1; + stopTime->tm_year -= 1900; + } correctTime(stopTime); stopTimeT = mktime(stopTime); if(hh->ParamList["stDate"] == "" && alHour > stopTime->tm_hour) @@ -2218,9 +2237,9 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) rep = (CTimerd::CTimerEventRepeat) atoi(hh->ParamList["rep"].c_str()); else // default: no repeat rep = (CTimerd::CTimerEventRepeat)0; - if(((int)rep) >= ((int)CTimerd::TIMERREPEAT_WEEKDAYS) && hh->ParamList["wd"] != "") NeutrinoAPI->Timerd->getWeekdaysFromStr(&rep, hh->ParamList["wd"].c_str()); + // apids bool changeApids=false; unsigned char apids=0; @@ -2247,6 +2266,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) apids |= TIMERD_APIDS_AC3; } } + CTimerd::RecordingInfo recinfo; CTimerd::EventInfo eventinfo; eventinfo.epgID = 0; @@ -2257,8 +2277,8 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) // channel by Id or name if(hh->ParamList["channel_id"] != "") sscanf(hh->ParamList["channel_id"].c_str(), - SCANF_CHANNEL_ID_TYPE, - &eventinfo.channel_id); + SCANF_CHANNEL_ID_TYPE, + &eventinfo.channel_id); else eventinfo.channel_id = NeutrinoAPI->ChannelNameToChannelId(hh->ParamList["channel_name"]); @@ -2281,7 +2301,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) CConfigFile *Config = new CConfigFile(','); Config->loadConfig(NEUTRINO_CONFIGFILE); _rec_dir = Config->getString("network_nfs_recordingdir", "/mnt/filme"); - delete Config;//Memory leak: Config + delete Config; } if(changeApids) eventinfo.apids = apids; @@ -2309,7 +2329,13 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) if(hh->ParamList["id"] != "") { unsigned modyId = atoi(hh->ParamList["id"].c_str()); - NeutrinoAPI->Timerd->removeTimerEvent(modyId); + if(type == CTimerd::TIMER_RECORD) + NeutrinoAPI->Timerd->modifyRecordTimerEvent(modyId, announceTimeT, alarmTimeT, stopTimeT, rep,repCount,_rec_dir.c_str()); + else + NeutrinoAPI->Timerd->modifyTimerEvent(modyId, announceTimeT, alarmTimeT, stopTimeT, rep,repCount); +// NeutrinoAPI->Timerd->removeTimerEvent(modyId); + if(changeApids) + NeutrinoAPI->Timerd->modifyTimerAPid(modyId,apids); } else { @@ -2327,15 +2353,18 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) real_alarmTimeT -= pre; } - for(; timer != timerlist.end(); ++timer) + for(; timer != timerlist.end();++timer) if(timer->alarmTime == real_alarmTimeT) { NeutrinoAPI->Timerd->removeTimerEvent(timer->eventID); break; } + NeutrinoAPI->Timerd->addTimerEvent(type,data,announceTimeT,alarmTimeT,stopTimeT,rep,repCount); } } - NeutrinoAPI->Timerd->addTimerEvent(type,data,announceTimeT,alarmTimeT,stopTimeT,rep,repCount); + else + NeutrinoAPI->Timerd->addTimerEvent(type,data,announceTimeT,alarmTimeT,stopTimeT,rep,repCount); + hh->SendOk(); } //------------------------------------------------------------------------- diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.h b/src/nhttpd/tuxboxapi/coolstream/controlapi.h index db8670cd3..151dbf160 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.h +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.h @@ -36,7 +36,7 @@ private: void SendStreamInfo(CyhookHandler *hh); void SendBouquets(CyhookHandler *hh); void SendBouquet(CyhookHandler *hh,int BouquetNr); - void SendChannelList(CyhookHandler *hh); + void SendChannelList(CyhookHandler *hh, bool currentTP = false); void SendTimers(CyhookHandler *hh); void SendTimersXML(CyhookHandler *hh); void epgDetailList(CyhookHandler *hh); @@ -70,6 +70,7 @@ private: void GetServicesxmlCGI(CyhookHandler *hh); void GetBouquetsxmlCGI(CyhookHandler *hh); void GetChannel_IDCGI(CyhookHandler *hh); + void GetTPChannel_IDCGI(CyhookHandler *hh); void MessageCGI(CyhookHandler *hh); void InfoCGI(CyhookHandler *hh); void HWInfoCGI(CyhookHandler *hh); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index cf02c5473..0da2265af 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -223,7 +223,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *, st sel=(nr==(i+1)) ? "selected=\"selected\"" : ""; if(!channels->empty() && (!g_bouquetManager->Bouquets[i]->bHidden || do_show_hidden == "true")) yresult += string_printf("\n", i + 1, sel.c_str(), - (encodeString(std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) :g_bouquetManager->Bouquets[i]->Name.c_str()))).c_str()); + std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) :g_bouquetManager->Bouquets[i]->Name.c_str()).c_str()); //yresult += string_printf("\n", i + 1, sel.c_str(), (encodeString(std::string(g_bouquetManager->Bouquets[i]->Name.c_str()))).c_str()); } return yresult; @@ -557,7 +557,7 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *, { if(!(isalnum(tags[i].component[0]))) tags[i].component=tags[i].component.substr(1,tags[i].component.length()-1); - yresult += string_printf("\r\n",idx_as_id ? j : pids.APIDs[j].pid,encodeString(tags[i].component).c_str()); + yresult += string_printf("\r\n",idx_as_id ? j : pids.APIDs[j].pid,tags[i].component.c_str()); } else { @@ -565,7 +565,7 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *, { strcpy( pids.APIDs[j].desc, _getISO639Description( pids.APIDs[j].desc ) ); } - yresult += string_printf("\r\n",idx_as_id ? j : pids.APIDs[j].pid,encodeString(std::string(pids.APIDs[j].desc)).c_str(),pids.APIDs[j].is_ac3 ? " (AC3)": " "); + yresult += string_printf("\r\n",idx_as_id ? j : pids.APIDs[j].pid,std::string(pids.APIDs[j].desc).c_str(),pids.APIDs[j].is_ac3 ? " (AC3)": " "); } eit_not_ok=false; break; diff --git a/src/nhttpd/web/scripts/Y_Tools.sh b/src/nhttpd/web/scripts/Y_Tools.sh index bd81a8b0e..06925d3bc 100755 --- a/src/nhttpd/web/scripts/Y_Tools.sh +++ b/src/nhttpd/web/scripts/Y_Tools.sh @@ -530,7 +530,7 @@ case "$1" in bootlogo_lcd_upload) bootlogo_lcd_upload ;; zapit_upload) zapit_upload $2 ;; kernel-stack) msg=`dmesg`; y_format_message_html ;; - ps) msg=`ps`; y_format_message_html ;; + ps) msg=`ps aux`; y_format_message_html ;; free) f=`free`; p=`df -h`; msg="RAM Memory use\n-------------------\n$f\n\nPartitions\n-------------------\n$p" y_format_message_html ;; yreboot) reboot; echo "Reboot..." ;; diff --git a/src/nhttpd/yhttpd_core/helper.cpp b/src/nhttpd/yhttpd_core/helper.cpp index e2449fbbd..d8a6630aa 100644 --- a/src/nhttpd/yhttpd_core/helper.cpp +++ b/src/nhttpd/yhttpd_core/helper.cpp @@ -214,7 +214,7 @@ std::string decodeString(std::string encodedString) { return result; } //----------------------------------------------------------------------------- -// Encode URLEncoded std::string +// HTMLEncode std::string //----------------------------------------------------------------------------- std::string encodeString(std::string decodedString) { unsigned int len = sizeof(char) * decodedString.length() * 5 + 1; diff --git a/src/nhttpd/yhttpd_core/ylogging.cpp b/src/nhttpd/yhttpd_core/ylogging.cpp index 2d93bc9e3..a61a863ff 100644 --- a/src/nhttpd/yhttpd_core/ylogging.cpp +++ b/src/nhttpd/yhttpd_core/ylogging.cpp @@ -77,7 +77,10 @@ void CLogging::printf(const char *fmt, ...) { va_end(arglist); pthread_mutex_lock(&Log_mutex); - ::printf(buffer); + buffer[bufferlen-1]='\0'; + ::printf("%s",buffer); + fflush(stdout); + if (LogToFile) { ; //FIXME Logging to File } diff --git a/src/nhttpd/yhttpd_core/yrequest.cpp b/src/nhttpd/yhttpd_core/yrequest.cpp index 999903915..679b5c1ce 100644 --- a/src/nhttpd/yhttpd_core/yrequest.cpp +++ b/src/nhttpd/yhttpd_core/yrequest.cpp @@ -75,9 +75,8 @@ bool CWebserverRequest::HandleRequest(void) { return false; if (Connection->Method == M_GET || Connection->Method == M_HEAD) { - std::string tmp_line; //read header (speed up: read rest of request in blockmode) - tmp_line = Connection->sock->ReceiveBlock(); + std::string tmp_line = Connection->sock->ReceiveBlock(); if (!Connection->sock->isValid) { Connection->Response.SendError(HTTP_INTERNAL_SERVER_ERROR); return false; @@ -116,7 +115,7 @@ bool CWebserverRequest::HandleRequest(void) { // Split URL into path, filename, fileext .. UrlData[] //----------------------------------------------------------------------------- bool CWebserverRequest::ParseStartLine(std::string start_line) { - std::string method, url, tmp; + std::string method = "", url = "", tmp = ""; log_level_printf(8, ": line: %s\n", start_line.c_str()); if (ySplitString(start_line, " ", method, tmp)) { @@ -155,12 +154,13 @@ bool CWebserverRequest::ParseStartLine(std::string start_line) { //----------------------------------------------------------------------------- bool CWebserverRequest::ParseParams(std::string param_string) { bool ende = false; - std::string param, name = "", value, number; + std::string param, name = "", value = "", number = ""; while (!ende) { if (!ySplitStringExact(param_string, "&", param, param_string)) ende = true; if (ySplitStringExact(param, "=", name, value)) { + name = decodeString(name); value = trim(decodeString(value)); if (ParameterList[name].empty()) ParameterList[name] = value; @@ -169,6 +169,8 @@ bool CWebserverRequest::ParseParams(std::string param_string) { ParameterList[name] += value; } } + else + name = trim(decodeString(name)); number = string_printf("%d", ParameterList.size() + 1); log_level_printf(7, "ParseParams: name: %s value: %s\n", name.c_str(), value.c_str()); ParameterList[number] = name; @@ -188,8 +190,9 @@ bool CWebserverRequest::ParseParams(std::string param_string) { //----------------------------------------------------------------------------- bool CWebserverRequest::ParseHeader(std::string header) { bool ende = false; - std::string sheader, name, value; - HeaderList.clear(); + std::string sheader = "", name = "", value = ""; + if(!HeaderList.empty()) + HeaderList.clear(); while (!ende) { if (!ySplitStringExact(header, "\r\n", sheader, header)) @@ -209,17 +212,23 @@ bool CWebserverRequest::ParseHeader(std::string header) { // query data is splitted and stored in ParameterList //----------------------------------------------------------------------------- void CWebserverRequest::analyzeURL(std::string url) { - ParameterList.clear(); + std::string fullurl = ""; + if(!ParameterList.empty()) + ParameterList.clear(); + // URI decode - url = decodeString(url); - url = trim(url, "\r\n"); // non-HTTP-Standard: allow \r or \n in URL. Delete it. - UrlData["fullurl"] = url; + fullurl = decodeString(url); + fullurl = trim(fullurl, "\r\n"); // non-HTTP-Standard: allow \r or \n in URL. Delete it. + UrlData["fullurl"] = fullurl; + // split Params - if (ySplitString(url, "?", UrlData["url"], UrlData["paramstring"])) // split pure URL and all Params + if (ySplitString(url, "?", UrlData["url"], UrlData["paramstring"])){ // split pure URL and all Params + UrlData["url"] = decodeString(UrlData["url"]); ParseParams( UrlData["paramstring"]); // split params to ParameterList - else + }else{ // No Params - UrlData["url"] = url; + UrlData["url"] = fullurl; + } if (!ySplitStringLast(UrlData["url"], "/", UrlData["path"], UrlData["filename"])) { @@ -240,7 +249,7 @@ void CWebserverRequest::analyzeURL(std::string url) { //----------------------------------------------------------------------------- bool CWebserverRequest::HandlePost() { //read header: line by line - std::string raw_header, tmp_line; + std::string raw_header = "", tmp_line = ""; do { tmp_line = Connection->sock->ReceiveLine(); if (tmp_line == "") // Socket empty @@ -270,7 +279,6 @@ bool CWebserverRequest::HandlePost() { { #ifdef Y_CONFIG_FEATURE_UPLOAD std::string boundary = "--" + HeaderList["Content-Type"].substr(t.length(),HeaderList["Content-Type"].length() - t.length()); - std::string post_header; do { content_len = HandlePostBoundary(boundary, content_len); @@ -285,9 +293,9 @@ bool CWebserverRequest::HandlePost() { { // handle normal form POST log_level_printf(6, "Handle POST application/x-www-form-urlencoded\n"); - std::string post_header; + // get message-body - post_header = Connection->sock->ReceiveBlock(); + std::string post_header = Connection->sock->ReceiveBlock(); while (post_header.length() < content_len) { post_header += Connection->sock->ReceiveBlock(); /* aprintf("POST form less data then expected\n"); @@ -384,10 +392,9 @@ bool CWebserverRequest::HandlePost() { //----------------------------------------------------------------------------- unsigned int CWebserverRequest::HandlePostBoundary(std::string boundary, unsigned int content_len) { - std::string tmp_line; // read boundary - tmp_line = Connection->sock->ReceiveLine(); + std::string tmp_line = Connection->sock->ReceiveLine(); content_len -= tmp_line.length(); log_level_printf(2, " Start\n"); @@ -412,7 +419,7 @@ unsigned int CWebserverRequest::HandlePostBoundary(std::string boundary, log_level_printf(2," disposition !!this is a file!! found. line:(%s)\n", tmp_line.c_str()); // get para from 'content-disposition: form-data; name="pics"; filename="file1.txt"' // set to ParameterList[""]="" - std::string left, right, var_name, var_value; + std::string left = "", right = "", var_name = "", var_value = ""; if(!ySplitStringExact(tmp_line, "name=\"", left, right)) { log_level_printf(7," no var_name START found. line:(%s)\n", tmp_line.c_str()); @@ -461,8 +468,7 @@ unsigned int CWebserverRequest::HandlePostBoundary(std::string boundary, } log_level_printf(7," read file Start\n"); - std::string upload_filename; - upload_filename = UPLOAD_TMP_FILE; + std::string upload_filename = UPLOAD_TMP_FILE; // Hook for Filename naming Connection->HookHandler.Hooks_UploadSetFilename(upload_filename); // Set upload filename to ParameterList["_upload_filename"]="" @@ -543,7 +549,7 @@ unsigned int CWebserverRequest::HandlePostBoundary(std::string boundary, // this part is a POST variable/parameter { // get var_name from 'content-disposition: form-data; name="var_name"' - std::string left, right, var_name, var_value; + std::string left = "", right = "", var_name = "", var_value = ""; if (!ySplitStringExact(tmp_line, "name=\"", left, right)) { log_level_printf(7, " no var_name START found. line:(%s)\n", tmp_line.c_str()); return 0; diff --git a/src/nhttpd/yhttpd_mods/mod_auth.cpp b/src/nhttpd/yhttpd_mods/mod_auth.cpp index 8e747243c..89dc65f1b 100644 --- a/src/nhttpd/yhttpd_mods/mod_auth.cpp +++ b/src/nhttpd/yhttpd_mods/mod_auth.cpp @@ -65,6 +65,8 @@ bool CmAuth::CheckAuth(CyhookHandler *hh) { // decode Base64 buffer to String //----------------------------------------------------------------------------- std::string CmAuth::decodeBase64(const char *b64buffer) { + if(b64buffer==NULL) + return ""; char *newString; //shorter then b64buffer std::string result; if ((newString = (char *) malloc(sizeof(char) * strlen(b64buffer) + 1)) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 23708b752..700f374b8 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -193,7 +193,7 @@ int check_dir(const char * dir) return ret; } -bool get_fs_usage(const char * dir, long &btotal, long &bused) +bool get_fs_usage(const char * dir, long &btotal, long &bused, long *bsize/*=NULL*/) { btotal = bused = 0; struct statfs s; @@ -201,6 +201,8 @@ bool get_fs_usage(const char * dir, long &btotal, long &bused) if (::statfs(dir, &s) == 0 && s.f_blocks) { btotal = s.f_blocks; bused = s.f_blocks - s.f_bfree; + if (bsize != NULL) + *bsize = s.f_bsize; //printf("fs (%s): total %ld used %ld\n", dir, btotal, bused); return true; } diff --git a/src/system/helpers.h b/src/system/helpers.h index 2d9731494..59d04a8bb 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -31,7 +31,7 @@ int safe_mkdir(char * path); bool file_exists(const char *filename); void wakeup_hdd(const char *hdd_dir); int check_dir(const char * dir); -bool get_fs_usage(const char * dir, long &total, long &used); +bool get_fs_usage(const char * dir, long &total, long &used, long *bsize=NULL); bool get_mem_usage(unsigned long &total, unsigned long &free); std::string trim(std::string &str, const std::string &trimChars = " \n\r\t"); diff --git a/src/system/locals.h b/src/system/locals.h index 9228509b7..0d9a87465 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -514,9 +514,11 @@ typedef enum LOCALE_FLASHUPDATE_TITLEREADFLASH, LOCALE_FLASHUPDATE_TITLEWRITEFLASH, LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_DEL_SKIPPED, + LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_ERROR, LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_PROCESSED, LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SKIPPED, LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_SUCCESSFULLY, + LOCALE_FLASHUPDATE_UPDATE_WITH_SETTINGS_WARNING, LOCALE_FLASHUPDATE_UPDATEMODE, LOCALE_FLASHUPDATE_UPDATEMODE_INTERNET, LOCALE_FLASHUPDATE_UPDATEMODE_MANUAL, @@ -1475,9 +1477,6 @@ typedef enum LOCALE_PICTUREVIEWER_HELP18, LOCALE_PICTUREVIEWER_HELP19, LOCALE_PICTUREVIEWER_HELP2, - LOCALE_PICTUREVIEWER_HELP20, - LOCALE_PICTUREVIEWER_HELP21, - LOCALE_PICTUREVIEWER_HELP22, LOCALE_PICTUREVIEWER_HELP3, LOCALE_PICTUREVIEWER_HELP30, LOCALE_PICTUREVIEWER_HELP31, @@ -1597,6 +1596,8 @@ typedef enum LOCALE_SATSETUP_SELECT_SAT, LOCALE_SATSETUP_SMATVREMOTE, LOCALE_SATSETUP_UNCOMM_INPUT, + LOCALE_SATSETUP_UNI_SETTINGS, + LOCALE_SATSETUP_UNICABLE, LOCALE_SATSETUP_USALS_REPEAT, LOCALE_SATSETUP_USE_BAT, LOCALE_SATSETUP_USE_FTA_FLAG, @@ -1787,6 +1788,9 @@ typedef enum LOCALE_TIMING_INFOBAR_RADIO, LOCALE_TIMING_MENU, LOCALE_TIMING_NUMERICZAP, + LOCALE_UNICABLE_LNB, + LOCALE_UNICABLE_QRG, + LOCALE_UNICABLE_SCR, LOCALE_UPNPBROWSER_HEAD, LOCALE_UPNPBROWSER_NOSERVERS, LOCALE_UPNPBROWSER_RESCAN, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 8e8614727..8f5b1fa76 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -514,9 +514,11 @@ const char * locale_real_names[] = "flashupdate.titlereadflash", "flashupdate.titlewriteflash", "flashupdate.update_with_settings_del_skipped", + "flashupdate.update_with_settings_error", "flashupdate.update_with_settings_processed", "flashupdate.update_with_settings_skipped", "flashupdate.update_with_settings_successfully", + "flashupdate.update_with_settings_warning", "flashupdate.updatemode", "flashupdate.updatemode_internet", "flashupdate.updatemode_manual", @@ -1475,9 +1477,6 @@ const char * locale_real_names[] = "pictureviewer.help18", "pictureviewer.help19", "pictureviewer.help2", - "pictureviewer.help20", - "pictureviewer.help21", - "pictureviewer.help22", "pictureviewer.help3", "pictureviewer.help30", "pictureviewer.help31", @@ -1597,6 +1596,8 @@ const char * locale_real_names[] = "satsetup.select_sat", "satsetup.smatvremote", "satsetup.uncomm_input", + "satsetup.uni_settings", + "satsetup.unicable", "satsetup.usals_repeat", "satsetup.use_bat", "satsetup.use_fta_flag", @@ -1787,6 +1788,9 @@ const char * locale_real_names[] = "timing.infobar_radio", "timing.menu", "timing.numericzap", + "unicable.lnb", + "unicable.qrg", + "unicable.scr", "upnpbrowser.head", "upnpbrowser.noservers", "upnpbrowser.rescan", diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index bd11537d6..266190155 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -47,10 +47,6 @@ #include #include -#if HAVE_COOL_HARDWARE -#include -#endif - #include #include diff --git a/src/system/settings.h b/src/system/settings.h index 2ca0ddd42..29c9ee2fb 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -63,6 +63,7 @@ struct SNeutrinoSettings char record_safety_time_after[3]; int zapto_pre_time; int infobar_sat_display; + int infobar_show_channeldesc; int infobar_subchan_disp_pos; int fan_speed; int infobar_show; diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index db1e2c5da..5eb5c509e 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -61,7 +61,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) rspGetSleeptimer.eventID = 0; if (CTimerManager::getInstance()->listEvents(events)) { - for (pos = events.begin(); pos != events.end(); pos++) + for (pos = events.begin(); pos != events.end(); ++pos) { printf("ID: %u type: %u\n",pos->second->eventID,pos->second->eventType); if(pos->second->eventType == CTimerd::TIMER_SLEEPTIMER) diff --git a/src/zapit/include/zapit/client/zapittypes.h b/src/zapit/include/zapit/client/zapittypes.h index 50d7a0859..3c472f14e 100644 --- a/src/zapit/include/zapit/client/zapittypes.h +++ b/src/zapit/include/zapit/client/zapittypes.h @@ -39,7 +39,8 @@ typedef enum { DISEQC_1_0, DISEQC_1_1, DISEQC_1_2, - DISEQC_ADVANCED + DISEQC_ADVANCED, + DISEQC_UNICABLE #if 0 , DISEQC_2_0, DISEQC_2_1, diff --git a/src/zapit/include/zapit/frontend_c.h b/src/zapit/include/zapit/frontend_c.h index b5f8f1ac8..dd15b998f 100644 --- a/src/zapit/include/zapit/frontend_c.h +++ b/src/zapit/include/zapit/frontend_c.h @@ -200,8 +200,7 @@ class CFrontend repeatUsals = _repeatUsals; }; void configRotor(int _motorRotationSpeed, bool _highVoltage) - { config.motorRotationSpeed = _motorRotationSpeed; config.highVoltage = _highVoltage; }; - void configUnicable(int scr, int qrg) { config.uni_scr = scr; config.uni_qrg = qrg; }; + { config.motorRotationSpeed = _motorRotationSpeed; config.highVoltage = _highVoltage; }; frontend_config_t& getConfig() { return config; }; void setConfig(frontend_config_t cfg) { setDiseqcType((diseqc_t) cfg.diseqcType); config = cfg; }; diff --git a/src/zapit/include/zapit/frontend_types.h b/src/zapit/include/zapit/frontend_types.h index e703f9b52..1e8fa6a88 100644 --- a/src/zapit/include/zapit/frontend_types.h +++ b/src/zapit/include/zapit/frontend_types.h @@ -34,6 +34,7 @@ typedef struct frontend_config { int diseqcType; int uni_scr; int uni_qrg; + int uni_lnb; int motorRotationSpeed; int highVoltage; } frontend_config_t; diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index aa32ae0b9..7325d8c53 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -70,7 +70,8 @@ typedef struct Zapit_config { int highVoltage; int motorRotationSpeed; int uni_scr; - int uni_qrg; + int uni_qrg; /* the unicable frequency in MHz */ + int uni_lnb; /* the input (0/1) of a twin-position switch */ } t_zapit_config; diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index fff1cda08..6b3047fe0 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -265,8 +265,12 @@ void CFEManager::saveSettings(bool write) #if 0 if(fe->fenumber && mode != FE_MODE_ALONE) { CFrontend * fe0 = getFE(0); - fe->setConfig(fe0->getConfig()); fe->setSatellites(fe0->getSatellites()); + //fe->setConfig(fe0->getConfig()); + fe->config.diseqcType = fe0->config.diseqcType; + fe->config.diseqcRepeats = fe0->config.diseqcRepeats; + fe->config.motorRotationSpeed = fe0->config.motorRotationSpeed; + fe->config.highVoltage = fe0->config.highVoltage; } #endif diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 7a77f095e..b11737941 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -162,8 +162,9 @@ CFrontend::CFrontend(int Number, int Adapter) config.diseqcType = NO_DISEQC; config.diseqcRepeats = 0; - config.uni_scr = -1; /* the unicable SCR address, -1 == no unicable */ - config.uni_qrg = 0; /* the unicable frequency in MHz, 0 == from spec */ + config.uni_scr = 0; /* the unicable SCR address 0-7 */ + config.uni_qrg = 0; /* the unicable frequency in MHz */ + config.uni_lnb = 0; /* for two-position switches */ config.highVoltage = false; config.motorRotationSpeed = 0; //in 0.1 degrees per second @@ -702,11 +703,11 @@ bool CFrontend::buildProperties(const FrontendParameters *feparams, struct dtv_p } - if (config.uni_scr >= 0) + if (config.diseqcType == DISEQC_UNICABLE) cmdseq.props[FREQUENCY].u.data = sendEN50494TuningCommand(feparams->dvb_feparams.frequency, currentToneMode == SEC_TONE_ON, currentVoltage == SEC_VOLTAGE_18, - 0); /* bank 0/1, like mini-diseqc a/b, not impl.*/ + !!config.uni_lnb); cmdseq.num += nrOfProps; @@ -770,7 +771,7 @@ void CFrontend::secSetTone(const fe_sec_tone_mode_t toneMode, const uint32_t ms) if (currentToneMode == toneMode) return; - if (config.uni_scr >= 0) { + if (config.diseqcType == DISEQC_UNICABLE) { /* this is too ugly for words. the "currentToneMode" is the only place where the global "highband" state is saved. So we need to fake it for unicable and still set the tone on... */ @@ -799,7 +800,7 @@ void CFrontend::secSetVoltage(const fe_sec_voltage_t voltage, const uint32_t ms) return; printf("[fe%d] voltage %s\n", fenumber, voltage == SEC_VOLTAGE_OFF ? "OFF" : voltage == SEC_VOLTAGE_13 ? "13" : "18"); - if (config.uni_scr >= 0) { + if (config.diseqcType == DISEQC_UNICABLE) { /* see my comment in secSetTone... */ currentVoltage = voltage; /* need to know polarization for unicable */ fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_13); /* voltage must not be 18V */ @@ -857,6 +858,9 @@ void CFrontend::setDiseqcType(const diseqc_t newDiseqcType, bool force) case DISEQC_ADVANCED: INFO("fe%d: DISEQC_ADVANCED", fenumber); break; + case DISEQC_UNICABLE: + INFO("fe%d: DISEQC_UNICABLE", fenumber); + break; #if 0 case DISEQC_2_0: INFO("DISEQC_2_0"); @@ -873,7 +877,11 @@ void CFrontend::setDiseqcType(const diseqc_t newDiseqcType, bool force) return; } - if ((force && (newDiseqcType != NO_DISEQC)) || ((config.diseqcType <= MINI_DISEQC) + if (newDiseqcType == DISEQC_UNICABLE) { + secSetTone(SEC_TONE_OFF, 0); + secSetVoltage(SEC_VOLTAGE_13, 0); + } + else if ((force && (newDiseqcType != NO_DISEQC)) || ((config.diseqcType <= MINI_DISEQC) && (newDiseqcType > MINI_DISEQC))) { secSetTone(SEC_TONE_OFF, 15); sendDiseqcPowerOn(); @@ -975,7 +983,14 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque { sat_iterator_t sit = satellites.find(satellitePosition); + /* unicable uses diseqc parameter for input selection */ + config.uni_lnb = sit->second.diseqc; + setLnbOffsets(sit->second.lnbOffsetLow, sit->second.lnbOffsetHigh, sit->second.lnbSwitch); + if (config.diseqcType == DISEQC_UNICABLE) + return; + + if (config.diseqcType != DISEQC_ADVANCED) { setDiseqc(sit->second.diseqc, polarization, frequency); return; @@ -997,24 +1012,19 @@ void CFrontend::setInput(t_satellite_position satellitePosition, uint32_t freque uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int high_band, const int horizontal, const int bank) { - uint32_t uni_qrgs[] = { 1284, 1400, 1516, 1632, 1748, 1864, 1980, 2096 }; - uint32_t bpf; - if (config.uni_qrg == 0) - bpf = uni_qrgs[config.uni_scr]; - else - bpf = config.uni_qrg; - + uint32_t bpf = config.uni_qrg; struct dvb_diseqc_master_cmd cmd = { {0xe0, 0x10, 0x5a, 0x00, 0x00, 0x00}, 5 }; unsigned int t = (frequency / 1000 + bpf + 2) / 4 - 350; if (t < 1024 && config.uni_scr >= 0 && config.uni_scr < 8) { - INFO("VOLT18=%d TONE_ON=%d, freq=%d bpf=%d ret=%d", currentVoltage == SEC_VOLTAGE_18, currentToneMode == SEC_TONE_ON, frequency, bpf, (t + 350) * 4000 - frequency); + uint32_t ret = (t + 350) * 4000 - frequency; + INFO("[unicable] 18V=%d TONE=%d, freq=%d qrg=%d scr=%d bank=%d ret=%d", currentVoltage == SEC_VOLTAGE_18, currentToneMode == SEC_TONE_ON, frequency, bpf, config.uni_scr, bank, ret); if (!slave && info.type == FE_QPSK) { cmd.msg[3] = (t >> 8) | /* highest 3 bits of t */ (config.uni_scr << 5) | /* adress */ - (bank << 4) | /* not implemented yet */ + (bank << 4) | /* input 0/1 */ (horizontal << 3) | /* horizontal == 0x08 */ (high_band) << 2; /* high_band == 0x04 */ cmd.msg[4] = t & 0xFF; @@ -1023,7 +1033,7 @@ uint32_t CFrontend::sendEN50494TuningCommand(const uint32_t frequency, const int sendDiseqcCommand(&cmd, 50); /* en50494 says: >2ms and < 60 ms */ fop(ioctl, FE_SET_VOLTAGE, SEC_VOLTAGE_13); } - return (t + 350) * 4000 - frequency; + return ret; } WARN("ooops. t > 1024? (%d) or uni_scr out of range? (%d)", t, config.uni_scr); return 0; diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index 4255a35bf..0aa479238 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -591,6 +591,9 @@ bool CServiceManager::InitSatPosition(t_satellite_position position, char * name bool CServiceManager::LoadServices(bool only_current) { + if(CFEManager::getInstance()->getLiveFE() == NULL) + return false; + xmlDocPtr parser; static bool satcleared = 0;//clear only once, because menu is static service_count = 0; diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 4ed17fae1..8e29bad9a 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -192,8 +192,6 @@ void CZapit::SaveSettings(bool write) configfile.setInt32("diseqcRepeats", live_fe->getDiseqcRepeats()); configfile.setInt32("diseqcType", live_fe->getDiseqcType()); configfile.setInt32("motorRotationSpeed", config.motorRotationSpeed); - configfile.setInt32("uni_scr", config.uni_scr); - configfile.setInt32("uni_qrg", config.uni_qrg); #endif if (configfile.getModifiedFlag()) configfile.saveConfig(CONFIGFILE); @@ -309,8 +307,6 @@ void CZapit::LoadSettings() /* FIXME FE specific, to be removed */ diseqcType = (diseqc_t)configfile.getInt32("diseqcType", NO_DISEQC); config.motorRotationSpeed = configfile.getInt32("motorRotationSpeed", 18); // default: 1.8 degrees per second - config.uni_scr = configfile.getInt32("uni_scr", -1); - config.uni_qrg = configfile.getInt32("uni_qrg", 0); printf("[zapit.cpp] diseqc type = %d\n", diseqcType); @@ -336,7 +332,6 @@ void CZapit::ConfigFrontend() if(!CFEManager::getInstance()->configExist()) { INFO("New frontend config not exist"); fe->configRotor(config.motorRotationSpeed, config.highVoltage); - fe->configUnicable(config.uni_scr, config.uni_qrg); fe->setDiseqcType(diseqcType); fe->setDiseqcRepeats(configfile.getInt32("diseqcRepeats", 0)); fe->setRotorSatellitePosition(configfile.getInt32("lastSatellitePosition", 0)); @@ -416,6 +411,9 @@ audio_map_set_t * CZapit::GetSavedPids(const t_channel_id channel_id) bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &transponder_change) { + if(channel == NULL || frontend == NULL) + return false; + transponder_change = frontend->setInput(channel, current_is_nvod); if(transponder_change && !current_is_nvod) { int waitForMotor = frontend->driveToSatellitePosition(channel->getSatellitePosition()); @@ -443,6 +441,9 @@ bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &tr bool CZapit::ParsePatPmt(CZapitChannel * channel) { + if(channel == NULL) + return false; + CPat pat(channel->getRecordDemux()); CPmt pmt(channel->getRecordDemux()); DBG("looking up pids for channel_id " PRINTF_CHANNEL_ID_TYPE "\n", channel->getChannelID());