Skip to content

Commit

Permalink
These cases can be encoded
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Young <[email protected]>
  • Loading branch information
seanyoung committed Mar 9, 2024
1 parent c3cbc2b commit ed5402a
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions tests/lircd_conf_encode.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cir::lircd_conf::{parse, Flags};
use cir::lircd_conf::parse;
use irp::Message;
use liblircd::LircdConf;
use num_integer::Integer;
Expand Down Expand Up @@ -61,30 +61,6 @@ fn lircd_encode(path: &Path) {
continue;
}

if our_remote.bit[0].0 == our_remote.bit[1].0
&& our_remote.ptrail == 0
&& our_remote.flags == Flags::SPACE_ENC | Flags::CONST_LENGTH
{
// SPACE encoding without ptrail and same pulse => cannot be decoded
// e.g. creative/livedrive.lircd.conf
println!(
"SKIP: {} because lircd.conf is missing trail",
lircd_remote.name()
);
continue;
}

if !our_remote.flags.contains(Flags::RAW_CODES)
&& (our_remote.bit[0].0 == 0 || our_remote.bit[0].1 == 0)
&& (our_remote.bit[1].0 == 0 || our_remote.bit[1].1 == 0)
{
println!(
"SKIP: {} because lircd.conf is contains zero-length bit encoding",
lircd_remote.name()
);
continue;
}

if lircd_remote.is_raw() {
for (our_code, lircd_code) in our_remote.raw_codes.iter().zip(lircd_remote.codes_iter())
{
Expand Down

0 comments on commit ed5402a

Please sign in to comment.