mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
driver/rcinput: minor cleanup
This commit is contained in:
@@ -1229,7 +1229,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
|
|||||||
firstKey = false;
|
firstKey = false;
|
||||||
CTimerManager::getInstance()->cancelShutdownOnWakeup();
|
CTimerManager::getInstance()->cancelShutdownOnWakeup();
|
||||||
}
|
}
|
||||||
uint32_t trkey = translate(ev.code, i);
|
uint32_t trkey = translate(ev.code);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str());
|
printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str());
|
||||||
#endif
|
#endif
|
||||||
@@ -1583,14 +1583,14 @@ 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!
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
int CRCInput::translate(int code, int /*num*/)
|
int CRCInput::translate(int code)
|
||||||
{
|
{
|
||||||
if(code == 0x100) code = RC_up;
|
if(code == 0x100) code = RC_up;
|
||||||
else if(code == 0x101) code = RC_down;
|
else if(code == 0x101) code = RC_down;
|
||||||
if ((code >= 0) && (code <= KEY_MAX))
|
if ((code >= 0) && (code <= KEY_MAX))
|
||||||
return code;
|
return code;
|
||||||
else
|
|
||||||
return ( unsigned int)RC_nokey;
|
return (int)RC_nokey;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRCInput::close_click()
|
void CRCInput::close_click()
|
||||||
|
@@ -157,7 +157,7 @@ class CRCInput
|
|||||||
|
|
||||||
void open();
|
void open();
|
||||||
void close();
|
void close();
|
||||||
int translate(int code, int num);
|
int translate(int code);
|
||||||
void calculateMaxFd(void);
|
void calculateMaxFd(void);
|
||||||
int checkTimers();
|
int checkTimers();
|
||||||
#ifdef IOC_IR_SET_PRI_PROTOCOL
|
#ifdef IOC_IR_SET_PRI_PROTOCOL
|
||||||
|
Reference in New Issue
Block a user