mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- pick mipsbox code from DDT, TangoCash and max10
Conflicts: src/gui/cam_menu.cpp src/gui/update.cpp src/neutrino.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -57,7 +57,7 @@ static bool usb_icon = false;
|
||||
static bool timer_icon = false;
|
||||
#endif
|
||||
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
#define DISPLAY_DEV "/dev/dbox/oled0"
|
||||
#include <zapit/zapit.h>
|
||||
static bool usb_icon = false;
|
||||
@@ -239,7 +239,7 @@ void CLCD::showServicename(std::string name, bool)
|
||||
strncpy(display_text, servicename.c_str(), sizeof(display_text) - 1);
|
||||
display_text[sizeof(display_text) - 1] = '\0';
|
||||
upd_display = true;
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
wake_up();
|
||||
#endif
|
||||
}
|
||||
@@ -323,7 +323,7 @@ void CLCD::showTime(bool force)
|
||||
if (force || last_display || (switch_name_time_cnt == 0 && ((hour != t->tm_hour) || (minute != t->tm_min)))) {
|
||||
hour = t->tm_hour;
|
||||
minute = t->tm_min;
|
||||
#if !HAVE_SPARK_HARDWARE && !HAVE_ARM_HARDWARE
|
||||
#if !HAVE_SPARK_HARDWARE && !HAVE_ARM_HARDWARE && !HAVE_MIPS_HARDWARE
|
||||
int ret = -1;
|
||||
#endif
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
@@ -334,7 +334,7 @@ void CLCD::showTime(bool force)
|
||||
#endif
|
||||
if ((g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) || (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM))
|
||||
{
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
if (mode == MODE_STANDBY || (g_settings.lcd_info_line && mode == MODE_TVRADIO))
|
||||
#else
|
||||
if (ret < 0 && servicename.empty())
|
||||
@@ -414,12 +414,12 @@ void CLCD::showVolume(const char vol, const bool update)
|
||||
SetIcons(SPARK_MUTE, 0);
|
||||
sprintf(s, vol_fmt[type], volume);
|
||||
}
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT)
|
||||
sprintf(s,"%.*s", volume*g_info.hw_caps->display_xres/100, "================");
|
||||
#endif
|
||||
ShowText(s);
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
wake_up();
|
||||
#endif
|
||||
vol_active = true;
|
||||
@@ -436,7 +436,7 @@ void CLCD::showMenuText(const int, const char *text, const int, const bool)
|
||||
std::string tmp = text;
|
||||
replace_umlauts(tmp);
|
||||
ShowText(tmp.c_str());
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
wake_up();
|
||||
#endif
|
||||
}
|
||||
@@ -448,7 +448,7 @@ void CLCD::showAudioTrack(const std::string &, const std::string & title, const
|
||||
std::string tmp = title;
|
||||
replace_umlauts(tmp);
|
||||
ShowText(tmp.c_str());
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
wake_up();
|
||||
#endif
|
||||
}
|
||||
@@ -506,7 +506,7 @@ void CLCD::setMode(const MODES m, const char * const title)
|
||||
showclock = true;
|
||||
showTime();
|
||||
}
|
||||
#if HAVE_ARM_HARDWARE
|
||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
wake_up();
|
||||
#endif
|
||||
}
|
||||
@@ -553,6 +553,9 @@ void CLCD::setBrightness(int dimm)
|
||||
#elif HAVE_ARM_HARDWARE
|
||||
std::string value = to_string(255/15*dimm);
|
||||
proc_put("/proc/stb/lcd/oled_brightness", value.c_str(), value.length());
|
||||
#elif HAVE_MIPS_HARDWARE
|
||||
std::string value = to_string(255/15*dimm);
|
||||
proc_put("/proc/stb/fp/oled_brightness", value.c_str(), value.length());
|
||||
#else
|
||||
(void)dimm; // avoid compiler warning
|
||||
#endif
|
||||
@@ -755,7 +758,7 @@ void CLCD::SetIcons(int, bool)
|
||||
|
||||
void CLCD::ShowDiskLevel()
|
||||
{
|
||||
#if !HAVE_GENERIC_HARDWARE && !HAVE_ARM_HARDWARE
|
||||
#if !HAVE_GENERIC_HARDWARE && !HAVE_ARM_HARDWARE && !HAVE_MIPS_HARDWARE
|
||||
int hdd_icons[9] ={24, 23, 21, 20, 19, 18, 17, 16, 22};
|
||||
int percent, digits, i, j;
|
||||
uint64_t t, u;
|
||||
@@ -794,7 +797,7 @@ void CLCD::UpdateIcons()
|
||||
ShowDiskLevel();
|
||||
SetIcons(SPARK_USB, usb_icon);
|
||||
#endif
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_ARM_HARDWARE
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||
CZapitChannel * chan = CZapit::getInstance()->GetCurrentChannel();
|
||||
if (chan)
|
||||
{
|
||||
|
Reference in New Issue
Block a user