ir: Stop setting duty cycle
Change-Id: Ibafc8877123abf26d8007ffdb2a7b3c9cfead2c8
This commit is contained in:
parent
5a47da0c4f
commit
424428e9b5
@ -21,8 +21,6 @@ namespace ir {
|
||||
|
||||
static const std::string kIrDevice = "/dev/lirc0";
|
||||
|
||||
static const int kDutyCycle = 33;
|
||||
|
||||
static vector<ConsumerIrFreqRange> kRangeVec{
|
||||
{.minHz = 30000, .maxHz = 60000},
|
||||
};
|
||||
@ -56,15 +54,6 @@ static vector<ConsumerIrFreqRange> kRangeVec{
|
||||
return ::ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||
}
|
||||
|
||||
rc = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &kDutyCycle);
|
||||
if (rc < 0) {
|
||||
LOG(ERROR) << "Failed to set duty cycle " << kDutyCycle << ", error: " << errno;
|
||||
|
||||
close(fd);
|
||||
|
||||
return ::ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
||||
}
|
||||
|
||||
if ((entries & 1) != 0) {
|
||||
rc = write(fd, pattern.data(), entries * sizeof(int32_t));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user