Skip to content

4.6.0 sendRC5ext() to sendRC5() conversion: only works when toggleBit is 1 #1347

@leres

Description

@leres

Please specify "FQBN" (Fully Qualified Board Name). It is the first line in the compiler output in the Arduino IDE 2.x. E.g. "esp32:esp32:featheresp32:FlashFreq=80". The FQBN starts with the core name, which is essential for bugfixing. For example, at least two prominent cores are available for the Bluepill board, namely STMicroelectronics and STM32duino. Without the FQBN we are most likely not able to fix the the issue.

atmega1284

The board manager URL used for exotic cores.

No response

What IDE are you using?

Other - please specify below

What IR protocol are you using?

RC5, RC6

Pin(s) used for IR-receive, if not default.

Arduino pin number: 14

Example(s) you have checked while hunting the bug.

  • SimpleReceiver
  • ReceiveDemo
  • SendRawDemo
  • ReceiverTimingAnalysis
  • ReceiveDump
  • TinyReceiver
  • TinySender
  • ReceiveAndSend
  • SimpleSender
  • SendDemo
  • UnitTest
  • Other - please specify below
  • I checked, whether at least one of the examples was working.

Example(s) to reproduce the issue.

  • SimpleReceiver
  • ReceiveDemo
  • SendRawDemo
  • ReceiverTimingAnalysis
  • ReceiveDump
  • TinyReceiver
  • TinySender
  • ReceiveAndSend
  • SimpleSender
  • SendDemo
  • UnitTest
  • Other - please specify below

The library version you are working with.

What are the steps to reproduce this issue?

I just attempted to upgrade a sketch that works with 4.5.0 to 4.6.0. I saw the new deprecated warning and made this change:

<       IrSender.sendRC5ext(device, obc, false);
---
>       IrSender.sendRC5(device, obc, NO_REPEATS, false);

(sendRC5ext() does not appear to repeat commands so NO_REPEATS looked appropriate.)

What happens?

The device (a siriusxm onyx plus) no longer obeys any IR commands after building with 4.6.0 and sendRC5().

I have another sketch that decodes IR commands (atmega1284p @ 16 MHz) that still uses 4.5.0. It correctly decodes both versions (sendRC5ext() and sendRC5()).

The output which indicates the error happened.

What were you expecting to happen?

No response

Additional context.

I updated the FreeBSD arduino-irremote port from 4.5.0 to 4.6.0 today. I build my sketches with make from the command line (no ide).

I am using arduino 1.8.19 (i.e. the most recent 1.X).

I am using an atmega1284 clocked at 20 MHz.

I have a different sketch (atmega328 @ 16 MHz) that sends commands to the onyx plus and works with 4.6.0.

I found that the atmega1284 will work every other attempt if I enable toggle:

IrSender.sendRC5(device, obc, NO_REPEATS, true);

Looking at the code in sendRC5ext(), I see toggleBit defaults to "1" when toggle is false. I thought this might explain why using toggle=1 with sendRC5() works every other time.

I verified (on the atmega1284 @ 20 MHz) that delay(1) takes ~1010 us and delayMicroseconds(1) takes 3-6 us (pretty much the same with/without a delay).

I wonder if the non-default F_CPU factors into this issue?

Final checklist for the bug report.

  • I have read the README.md file thoroughly
  • I have browsed the examples for one that matches my use case.
  • The title of the issue is helpful and relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions