Skip to content

IR send example in wiki no longer works #47

Description

@ethagnawl

The IR send example in the wiki no longer works using firmware version 1.3.4.

The current example causes the build to fail with the following error:

scons: Entering directory `/home/peter/.ufbt/current/scripts/ufbt'
CC /home/peter/projects/flipper/flipper-zero-tutorial-app/test_app.c
CDB /home/peter/projects/flipper/flipper-zero-tutorial-app/.vscode/compile_commands.json
/home/peter/projects/flipper/flipper-zero-tutorial-app/test_app.c:12:10: fatal error: infrared/infrared_signal.h: No such file or directory
12 | #include <infrared/infrared_signal.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [/home/peter/.ufbt/build/test_app/test_app.o] Error 1

I think the entry should be modified to use the new (even simpler!) infrared_send function. (I was testing with Unleashed unlshd-082 but I believe they're API compatible as far as this feature goes.)

#include <infrared.h>
#include <infrared_transmit.h>
...
InfraredMessage message = {
    .protocol = InfraredProtocolSamsung32
    .address = 0x07,
    .command = 0x0F,
    .repeat = false,
};
infrared_send(&message, 1);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions