mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-06 21:28:26 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Commit: 8a75efa81a
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-03-19 (Sun, 19 Mar 2017)
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
|
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
|
-I$(top_builddir) \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_srcdir)/src \
|
||||||
|
-I$(top_srcdir)/src/zapit/include \
|
||||||
|
-I$(top_srcdir)/lib \
|
||||||
|
-I$(top_srcdir)/lib/libconfigfile \
|
||||||
|
-I$(top_srcdir)/lib/libeventserver \
|
||||||
@HWLIB_CFLAGS@
|
@HWLIB_CFLAGS@
|
||||||
|
|
||||||
noinst_LIBRARIES = libhwcaps.a
|
noinst_LIBRARIES = libhwcaps.a
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hardware_caps.h"
|
#include "hardware_caps.h"
|
||||||
|
|
||||||
|
#include <zapit/femanager.h>
|
||||||
|
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
static hw_caps_t caps;
|
static hw_caps_t caps;
|
||||||
|
|
||||||
@@ -19,7 +21,7 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
return ∩︀
|
return ∩︀
|
||||||
int rev = cs_get_revision();
|
int rev = cs_get_revision();
|
||||||
int chip = cs_get_chip_type();
|
int chip = cs_get_chip_type();
|
||||||
caps.has_fan = (rev < 8);
|
caps.has_fan = (rev < 8 && CFEManager::getInstance()->getFE(0)->hasSat()); // only SAT-HD1 before rev 8 has fan
|
||||||
caps.has_HDMI = 1;
|
caps.has_HDMI = 1;
|
||||||
caps.has_SCART = (rev != 10);
|
caps.has_SCART = (rev != 10);
|
||||||
caps.has_SCART_input = 0;
|
caps.has_SCART_input = 0;
|
||||||
@@ -34,15 +36,23 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
caps.can_ps_14_9 = 1;
|
caps.can_ps_14_9 = 1;
|
||||||
caps.force_tuner_2G = 0;
|
caps.force_tuner_2G = 0;
|
||||||
strcpy(caps.boxvendor, "Coolstream");
|
strcpy(caps.boxvendor, "Coolstream");
|
||||||
strcpy(caps.boxarch, "Nevis");
|
|
||||||
switch (rev) {
|
switch (rev) {
|
||||||
case 6:
|
case 6:
|
||||||
case 7: // Black Stallion Edition
|
case 7: // Black Stallion Edition
|
||||||
strcpy(caps.boxname, "HD1");
|
strcpy(caps.boxname, "HD1");
|
||||||
|
strcpy(caps.boxarch, "Nevis");
|
||||||
caps.force_tuner_2G = 1;
|
caps.force_tuner_2G = 1;
|
||||||
break;
|
break;
|
||||||
case 8: // TODO: Neo2 - Twin
|
case 8:
|
||||||
strcpy(caps.boxname, "Neo");
|
if (CFEManager::getInstance()->getFrontendCount() < 2)
|
||||||
|
{
|
||||||
|
strcpy(caps.boxname, "Neo");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strcpy(caps.boxname, "Neo Twin");
|
||||||
|
}
|
||||||
|
strcpy(caps.boxarch, "Nevis");
|
||||||
caps.force_tuner_2G = 1;
|
caps.force_tuner_2G = 1;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
@@ -51,6 +61,7 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
strcpy(caps.boxname, "Zee");
|
strcpy(caps.boxname, "Zee");
|
||||||
|
strcpy(caps.boxarch, "Nevis");
|
||||||
caps.force_tuner_2G = 1;
|
caps.force_tuner_2G = 1;
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
|
@@ -341,6 +341,7 @@ void CLCD::setlcdparameter(int dimm, const int contrast, const int power, const
|
|||||||
perror("[lcdd] set invert failed!");
|
perror("[lcdd] set invert failed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (g_info.box_Type == CControld::TUXBOX_MAKER_PHILIPS)
|
if (g_info.box_Type == CControld::TUXBOX_MAKER_PHILIPS)
|
||||||
{
|
{
|
||||||
if (ioctl(fd, LCD_IOCTL_BIAS, &bias) < 0)
|
if (ioctl(fd, LCD_IOCTL_BIAS, &bias) < 0)
|
||||||
@@ -348,6 +349,7 @@ void CLCD::setlcdparameter(int dimm, const int contrast, const int power, const
|
|||||||
perror("[lcdd] set bias failed!");
|
perror("[lcdd] set bias failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -326,7 +326,7 @@ void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general)
|
|||||||
ms_general->addItem(mc);
|
ms_general->addItem(mc);
|
||||||
|
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.has_fan)
|
if (g_info.hw_caps->has_fan)
|
||||||
{
|
{
|
||||||
CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 1, 14, fanNotifier, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF);
|
CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 1, 14, fanNotifier, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF);
|
||||||
mn->setHint("", LOCALE_MENU_HINT_FAN_SPEED);
|
mn->setHint("", LOCALE_MENU_HINT_FAN_SPEED);
|
||||||
|
@@ -2377,13 +2377,9 @@ TIMER_START();
|
|||||||
|
|
||||||
cpuFreq = new cCpuFreqManager();
|
cpuFreq = new cCpuFreqManager();
|
||||||
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
cpuFreq->SetCpuFreq(g_settings.cpufreq * 1000 * 1000);
|
||||||
#if HAVE_COOL_HARDWARE
|
|
||||||
/* only SAT-hd1 before rev 8 has fan */
|
|
||||||
g_info.has_fan = (cs_get_revision() < 8 && CFEManager::getInstance()->getFE(0)->hasSat());
|
|
||||||
#endif
|
|
||||||
dprintf(DEBUG_NORMAL, "g_info.has_fan: %d\n", g_info.has_fan);
|
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.has_fan)
|
if (g_info.hw_caps->has_fan)
|
||||||
CFanControlNotifier::setSpeed(g_settings.fan_speed);
|
CFanControlNotifier::setSpeed(g_settings.fan_speed);
|
||||||
|
|
||||||
dvbsub_init();
|
dvbsub_init();
|
||||||
@@ -3989,7 +3985,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
|||||||
delete g_RCInput;
|
delete g_RCInput;
|
||||||
//NI my_system("/etc/init.d/rcK");
|
//NI my_system("/etc/init.d/rcK");
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.has_fan) {
|
if (g_info.hw_caps->has_fan) {
|
||||||
CFanControlNotifier::setSpeed(0);
|
CFanControlNotifier::setSpeed(0);
|
||||||
}
|
}
|
||||||
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_REBOOT));
|
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_REBOOT));
|
||||||
@@ -4207,7 +4203,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
|
|||||||
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
|
cpuFreq->SetCpuFreq(g_settings.standby_cpufreq * 1000 * 1000);
|
||||||
|
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.has_fan)
|
if (g_info.hw_caps->has_fan)
|
||||||
CFanControlNotifier::setSpeed(1);
|
CFanControlNotifier::setSpeed(1);
|
||||||
|
|
||||||
frameBuffer->setActive(false);
|
frameBuffer->setActive(false);
|
||||||
@@ -4239,7 +4235,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
|
|||||||
}
|
}
|
||||||
frameBuffer->setActive(true);
|
frameBuffer->setActive(true);
|
||||||
//fan speed
|
//fan speed
|
||||||
if (g_info.has_fan)
|
if (g_info.hw_caps->has_fan)
|
||||||
CFanControlNotifier::setSpeed(g_settings.fan_speed);
|
CFanControlNotifier::setSpeed(g_settings.fan_speed);
|
||||||
|
|
||||||
puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT ".");
|
puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT ".");
|
||||||
|
@@ -821,7 +821,15 @@ void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
|||||||
std::string eth_id = netadapter.getMacAddr();
|
std::string eth_id = netadapter.getMacAddr();
|
||||||
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
|
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
|
||||||
|
|
||||||
hh->printf("%s %s (%s)\nMAC:%s\n", g_info.hw_caps->boxvendor, g_info.hw_caps->boxname, g_info.hw_caps->boxarch, eth_id.c_str());
|
std::string boxvendor(g_info.hw_caps->boxvendor);
|
||||||
|
/*
|
||||||
|
I don't know the current legal situation.
|
||||||
|
So better let's change the vendor's name to CST.
|
||||||
|
*/
|
||||||
|
if (boxvendor.compare("Coolstream") == 0)
|
||||||
|
boxvendor = "CST";
|
||||||
|
|
||||||
|
hh->printf("%s %s (%s)\nMAC:%s\n", boxvendor.c_str(), g_info.hw_caps->boxname, g_info.hw_caps->boxarch, eth_id.c_str());
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
||||||
|
@@ -851,14 +851,16 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str
|
|||||||
std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
||||||
{
|
{
|
||||||
std::string boxvendor(g_info.hw_caps->boxvendor);
|
std::string boxvendor(g_info.hw_caps->boxvendor);
|
||||||
/* stay compatible with present code in Y_Blocks.txt */
|
/*
|
||||||
|
I don't know the current legal situation.
|
||||||
|
So better let's change the vendor's name to CST.
|
||||||
|
|
||||||
|
After change this, you'll have to align code in Y_Blocks.txt
|
||||||
|
*/
|
||||||
if (boxvendor.compare("Coolstream") == 0)
|
if (boxvendor.compare("Coolstream") == 0)
|
||||||
boxvendor = "CST";
|
boxvendor = "CST";
|
||||||
|
|
||||||
std::string boxname(g_info.hw_caps->boxname);
|
std::string boxname(g_info.hw_caps->boxname);
|
||||||
/* workaround for Neo2 */
|
|
||||||
if ((boxname.compare("Neo") == 0) && (CFEManager::getInstance()->getFrontendCount() > 1))
|
|
||||||
boxname += " Twin";
|
|
||||||
|
|
||||||
return boxvendor + " " + boxname;
|
return boxvendor + " " + boxname;
|
||||||
}
|
}
|
||||||
|
@@ -999,9 +999,6 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
|
|||||||
|
|
||||||
struct SglobalInfo
|
struct SglobalInfo
|
||||||
{
|
{
|
||||||
unsigned char box_Type;
|
|
||||||
delivery_system_t delivery_system;
|
|
||||||
bool has_fan;
|
|
||||||
hw_caps_t *hw_caps;
|
hw_caps_t *hw_caps;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user