driver/rcinput: minor cleanup

This commit is contained in:
martii
2014-02-17 21:25:15 +01:00
committed by Jacek Jendrzej
parent f1c7e9002e
commit 088a75b6e2
2 changed files with 5 additions and 5 deletions

View File

@@ -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()

View File

@@ -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