mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-09 22:58:28 +02:00
neutrino: remove special Tripledragon input handling
With the new input device, no need for special casing in neutrino.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2052 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 0fa97c1652
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-01-09 (Mon, 09 Jan 2012)
This commit is contained in:
@@ -19,6 +19,11 @@
|
|||||||
#include <dmx.h>
|
#include <dmx.h>
|
||||||
#include <video.h>
|
#include <video.h>
|
||||||
|
|
||||||
|
/* same as in rcinput.h... */
|
||||||
|
#define KEY_TTTV KEY_FN_1
|
||||||
|
#define KEY_TTZOOM KEY_FN_2
|
||||||
|
#define KEY_REVEAL KEY_FN_D
|
||||||
|
|
||||||
extern cVideo * videoDecoder;
|
extern cVideo * videoDecoder;
|
||||||
|
|
||||||
static pthread_t ttx_sub_thread;
|
static pthread_t ttx_sub_thread;
|
||||||
@@ -6334,7 +6339,7 @@ void DecodePage()
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* GetRCCode *
|
* GetRCCode *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#if !HAVE_TRIPLEDRAGON
|
#if 1
|
||||||
int GetRCCode()
|
int GetRCCode()
|
||||||
{
|
{
|
||||||
struct input_event ev;
|
struct input_event ev;
|
||||||
@@ -6378,7 +6383,17 @@ int GetRCCode()
|
|||||||
case KEY_VOLUMEUP: RCCode = RC_PLUS; break;
|
case KEY_VOLUMEUP: RCCode = RC_PLUS; break;
|
||||||
case KEY_VOLUMEDOWN: RCCode = RC_MINUS; break;
|
case KEY_VOLUMEDOWN: RCCode = RC_MINUS; break;
|
||||||
case KEY_MUTE: RCCode = RC_MUTE; break;
|
case KEY_MUTE: RCCode = RC_MUTE; break;
|
||||||
|
#if !HAVE_TRIPLEDRAGON
|
||||||
|
/* on CS, change transparent mode with TEXT key */
|
||||||
case KEY_TEXT: RCCode = RC_TEXT; break;
|
case KEY_TEXT: RCCode = RC_TEXT; break;
|
||||||
|
#else
|
||||||
|
/* on TD, cycle split screen mode with TTX key
|
||||||
|
* - the TD has a special key for transparent mode */
|
||||||
|
case KEY_TEXT: RCCode = RC_MINUS; break;
|
||||||
|
#endif
|
||||||
|
case KEY_TTTV: RCCode = RC_MUTE; break;
|
||||||
|
case KEY_TTZOOM: RCCode = RC_PLUS; break;
|
||||||
|
case KEY_REVEAL: RCCode = RC_HELP; break;
|
||||||
//case KEY_HELP: RCCode = RC_HELP; break;
|
//case KEY_HELP: RCCode = RC_HELP; break;
|
||||||
case KEY_INFO: RCCode = RC_HELP; break;
|
case KEY_INFO: RCCode = RC_HELP; break;
|
||||||
case KEY_MENU: RCCode = RC_DBOX; break;
|
case KEY_MENU: RCCode = RC_DBOX; break;
|
||||||
@@ -6402,6 +6417,7 @@ printf("[tuxtxt] new key, code %X\n", RCCode);
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
/* this is obsolete and can soon be removed */
|
||||||
int GetRCCode()
|
int GetRCCode()
|
||||||
{
|
{
|
||||||
static unsigned short LastKey = -1;
|
static unsigned short LastKey = -1;
|
||||||
|
@@ -62,14 +62,7 @@
|
|||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
|
|
||||||
//const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"};
|
//const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"};
|
||||||
#if !HAVE_TRIPLEDRAGON
|
|
||||||
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"};
|
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"};
|
||||||
#else
|
|
||||||
#include <tdpanel/ir_ruwido.h>
|
|
||||||
#include <hardware/avs/avs_inf.h>
|
|
||||||
#include <hardware/avs/bios_system_config.h>
|
|
||||||
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/stb/tdremote"};
|
|
||||||
#endif
|
|
||||||
typedef struct input_event t_input_event;
|
typedef struct input_event t_input_event;
|
||||||
|
|
||||||
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
|
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
|
||||||
@@ -499,9 +492,7 @@ void CRCInput::getMsg_ms(neutrino_msg_t * msg, neutrino_msg_data_t * data, int T
|
|||||||
getMsg_us(msg, data, (uint64_t) Timeout * 1000, bAllowRepeatLR);
|
getMsg_us(msg, data, (uint64_t) Timeout * 1000, bAllowRepeatLR);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !HAVE_TRIPLEDRAGON
|
|
||||||
#define ENABLE_REPEAT_CHECK
|
#define ENABLE_REPEAT_CHECK
|
||||||
#endif
|
|
||||||
void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t Timeout, bool bAllowRepeatLR)
|
void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t Timeout, bool bAllowRepeatLR)
|
||||||
{
|
{
|
||||||
static uint64_t last_keypress = 0ULL;
|
static uint64_t last_keypress = 0ULL;
|
||||||
@@ -1156,24 +1147,11 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n");
|
|||||||
|
|
||||||
for (int i = 0; i < NUMBER_OF_EVENT_DEVICES; i++) {
|
for (int i = 0; i < NUMBER_OF_EVENT_DEVICES; i++) {
|
||||||
if ((fd_rc[i] != -1) && (FD_ISSET(fd_rc[i], &rfds))) {
|
if ((fd_rc[i] != -1) && (FD_ISSET(fd_rc[i], &rfds))) {
|
||||||
#ifdef HAVE_TRIPLEDRAGON
|
|
||||||
int count = 0;
|
|
||||||
/* clear the input queue and process only the latest event
|
|
||||||
hack to improve the behaviour of the TD remote
|
|
||||||
otherwise we lose key_up events due to CRCInput::clearRCMsg() */
|
|
||||||
while (read(fd_rc[i], &ev.code, sizeof(ev.code)) == sizeof(ev.code))
|
|
||||||
count++;
|
|
||||||
if (!count)
|
|
||||||
continue;
|
|
||||||
ev.value = ((ev.code & 0xff00) != 0x8000); /* 0x8000 is release bit */
|
|
||||||
ev.code &= 0x00FF; /* clear release bit */
|
|
||||||
#else
|
|
||||||
int ret;
|
int ret;
|
||||||
ret = read(fd_rc[i], &ev, sizeof(t_input_event));
|
ret = read(fd_rc[i], &ev, sizeof(t_input_event));
|
||||||
|
|
||||||
if(ret != sizeof(t_input_event))
|
if(ret != sizeof(t_input_event))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
|
||||||
SHTDCNT::getInstance()->resetSleepTimer();
|
SHTDCNT::getInstance()->resetSleepTimer();
|
||||||
uint32_t trkey = translate(ev.code, i);
|
uint32_t trkey = translate(ev.code, i);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -1517,7 +1495,6 @@ std::string CRCInput::getKeyName(const unsigned int key)
|
|||||||
* transforms the rc-key to generic - internal use only!
|
* transforms the rc-key to generic - internal use only!
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#if !HAVE_TRIPLEDRAGON
|
|
||||||
int CRCInput::translate(int code, int /*num*/)
|
int CRCInput::translate(int code, int /*num*/)
|
||||||
{
|
{
|
||||||
if(code == 0x100) code = RC_up;
|
if(code == 0x100) code = RC_up;
|
||||||
@@ -1527,68 +1504,6 @@ int CRCInput::translate(int code, int /*num*/)
|
|||||||
else
|
else
|
||||||
return RC_nokey;
|
return RC_nokey;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int CRCInput::translate(int code, int)
|
|
||||||
{
|
|
||||||
switch (code&0xFF)
|
|
||||||
{
|
|
||||||
case 0x01: return RC_standby;
|
|
||||||
case 0x02: return RC_1;
|
|
||||||
case 0x03: return RC_2;
|
|
||||||
case 0x04: return RC_3;
|
|
||||||
case 0x05: return RC_4;
|
|
||||||
case 0x06: return RC_5;
|
|
||||||
case 0x07: return RC_6;
|
|
||||||
case 0x08: return RC_timer;
|
|
||||||
case 0x09: return RC_7;
|
|
||||||
case 0x0a: return RC_8;
|
|
||||||
case 0x0b: return RC_9;
|
|
||||||
case 0x0c: return RC_zoomin;
|
|
||||||
case 0x0d: return RC_favorites; // blue heart
|
|
||||||
case 0x0e: return RC_0;
|
|
||||||
// case 0x0f: return RC_recall; // red hand
|
|
||||||
case 0x0f: return RC_next; // red hand. RC_next is used by neutrino for
|
|
||||||
// switching Panscan / letterbox
|
|
||||||
case 0x10: return RC_zoomout;
|
|
||||||
case 0x11: return RC_spkr; // MUTE
|
|
||||||
case 0x12: return RC_setup; // menu
|
|
||||||
case 0x13: return RC_epg;
|
|
||||||
case 0x14: return RC_help; // INFO
|
|
||||||
case 0x15: return RC_home; // EXIT
|
|
||||||
case 0x16: return RC_page_down; // vv
|
|
||||||
case 0x17: return RC_page_up; // ^^
|
|
||||||
case 0x18: return RC_up;
|
|
||||||
case 0x19: return RC_left;
|
|
||||||
case 0x1a: return RC_ok;
|
|
||||||
case 0x1b: return RC_right;
|
|
||||||
case 0x1c: return RC_down;
|
|
||||||
case 0x1d: return RC_minus;
|
|
||||||
case 0x1e: return RC_plus;
|
|
||||||
case 0x1f: return RC_red;
|
|
||||||
case 0x20: return RC_green;
|
|
||||||
case 0x21: return RC_yellow;
|
|
||||||
case 0x22: return RC_blue;
|
|
||||||
case 0x23: return RC_tv; // TV/RADIO
|
|
||||||
case 0x24: return RC_video; // MP3/PVR
|
|
||||||
case 0x25: return RC_audio; // CD/DVD
|
|
||||||
case 0x26: return RC_aux; // AUX
|
|
||||||
case 0x27: return RC_text; // [=]
|
|
||||||
case 0x28: return RC_tttv; // [ /=]
|
|
||||||
case 0x29: return RC_ttzoom; // [=x=]
|
|
||||||
case 0x2a: return RC_ttreveal; // [=?]
|
|
||||||
case 0x2b: return RC_rewind; // <<
|
|
||||||
case 0x2c: return RC_stop; // X
|
|
||||||
case 0x2d: return RC_pause; // ||>
|
|
||||||
case 0x2e: return RC_forward; // >>
|
|
||||||
// case 0x2f: return RC_prev; // |<<
|
|
||||||
case 0x30: return RC_eject;
|
|
||||||
case 0x31: return RC_record;
|
|
||||||
// case 0x32: return RC_next; // >>|
|
|
||||||
// RC_prev/next are abused by neutrino for videomode switch
|
|
||||||
}
|
|
||||||
return RC_nokey;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CRCInput::close_click()
|
void CRCInput::close_click()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user