Add ability to combine conditional filters of the same type in config.txt

Open
#1,291 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
raspberry-pi
Domain
embedded-iot

Research direction

The issue names config.txt and shows the existing cross-type filter syntax plus proposed same-type and boolean forms. Start by locating the config.txt filter parser and its current filter-combination behavior; done means same-type GPIO filters support the requested AND and OR semantics with coverage for the examples.

Written by the indexing model from the issue text.

Description

Currently it is only possible to combine filters of differing types in config.txt (ie: [pi4][gpio24=0] will only run on a Pi 4 if GPIO 24 is low). Please add the ability to combine filters of the same type by either using the same method of combining filters of different types or using boolean operators.

Combining similar filters using paradigm of combining different filters:

[gpio24=0]
[gpio27=1]
# This will only run if GPIO 24 is low and GPIO 27 is high
[all]

Combining similar filters using boolean logic:

[gpio24=0 && gpio27=1]
# This will only run if GPIO 24 is low **and** GPIO 27 is high
[all]
[gpio24=0 || gpio27=1]
# This will only run if GPIO 24 is low **or** GPIO 27 is high
[all]

Thank you for taking the time to consider this request.

Dominant language
No language data
Stars
5.6k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/firmware

All issues in raspberrypi/firmware

Similar issues

More Embedded & IoT issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.