Skip to content

Commit

Permalink
Fixes to Broadlink*formatter, to accomplish to RF support.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtmartensson committed Aug 27, 2023
1 parent aa2e2cb commit 01053c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import org.harctoolbox.girr.Command;
import org.harctoolbox.harchardware.ir.Broadlink;
import org.harctoolbox.ircore.IrSequence;
import org.harctoolbox.ircore.IrSignal;
import org.harctoolbox.ircore.ModulatedIrSequence;

public class BroadlinkBase64Formatter implements Command.CommandTextFormat {

Expand All @@ -37,7 +37,7 @@ public String format(IrSignal irSignal, int count) {
if (irSignal.repeatOnly())
return Broadlink.broadlinkBase64String(irSignal.getRepeatSequence(), count);

IrSequence irSequence = irSignal.getRepeatLength() > 0 ? irSignal.toModulatedIrSequence(true, count, true) : irSignal.getIntroSequence();
ModulatedIrSequence irSequence = irSignal.getRepeatLength() > 0 ? irSignal.toModulatedIrSequence(true, count, true) : irSignal.getIntroSequence();
return Broadlink.broadlinkBase64String(irSequence, 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import org.harctoolbox.girr.Command;
import org.harctoolbox.harchardware.ir.Broadlink;
import org.harctoolbox.ircore.IrSequence;
import org.harctoolbox.ircore.IrSignal;
import org.harctoolbox.ircore.ModulatedIrSequence;

public class BroadlinkHexFormatter implements Command.CommandTextFormat {

Expand All @@ -37,7 +37,7 @@ public String format(IrSignal irSignal, int count) {
if (irSignal.repeatOnly())
return Broadlink.broadlinkHexString(irSignal.getRepeatSequence(), count);

IrSequence irSequence = irSignal.getRepeatLength() > 0 ? irSignal.toModulatedIrSequence(true, count, true) : irSignal.getIntroSequence();
ModulatedIrSequence irSequence = irSignal.getRepeatLength() > 0 ? irSignal.toModulatedIrSequence(true, count, true) : irSignal.getIntroSequence();
return Broadlink.broadlinkHexString(irSequence, 1);
}
}

0 comments on commit 01053c9

Please sign in to comment.