Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chip check using pinctrl doesn't work on Libre Computer Le Potato #151

Open
alexlobrano opened this issue Jan 3, 2025 · 2 comments
Open
Labels
Available on next Release Coded on dev brach bug Something isn't working

Comments

@alexlobrano
Copy link

In the gpiodDetect function of pirLib.js, the chip checking if (label.includes("pinctrl-")) { doesn't work for Le Potato AML-S905X-CC because none of the chip labels begin with pinctrl.

The logs show the following chip labels:

[2025-01-03 00:09:36.224] [LOG] [MMM-Pir] [LIB] [PIR] [GPIOD] Check chip 0: aobus-banks
[2025-01-03 00:09:36.226] [LOG] [MMM-Pir] [LIB] [PIR] [GPIOD] Check chip 1: periphs-banks

I'm using GPIO8 on the board which corresponds to chip 1 line 91 and I was able to get the module working by just changing the check to if (label.includes("periphs-")) {, but it'd be nice if there was a way in the config to directly specify your chip+line to configure a board, that way it's easier to stay updated with master without having to make the change each time.

@bugsounet
Copy link
Owner

bugsounet commented Jan 5, 2025

Hi, I will see what can i do for this :)

Actually it's coded for any pi

Be back to you

@bugsounet bugsounet added the bug Something isn't working label Jan 5, 2025
@bugsounet bugsounet mentioned this issue Jan 5, 2025
@bugsounet bugsounet added the Available on next Release Coded on dev brach label Jan 5, 2025
@bugsounet
Copy link
Owner

just added chip feature in Pir configuration on dev branch (#153)

    Pir: {
      mode: 0,
      gpio: 21,
      chip: "auto"
    },
Option Description Type Default
mode Detection mode (see bellow) Number 0
gpio BCM-number of the sensor pin. Number 21
chip -mode 0 Only- Define your GPIO Chip label (auto for automatic chip search) String "auto"

in your case: chip: "periphs-"

just wait next release (v2.4.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Available on next Release Coded on dev brach bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants