Skip to content

Tuple for touch #12

Closed
Closed
@caternuson

Description

@caternuson

Consider having a function that returns a tuple of touched pads. Allows for iterating over all touched pads:

for pad in cpx.touched:
    print("pad {0} touched!".format(pad))

Also allows using the in syntax to check if a pad is touched. Can return ints:

if 1 in cpx.touched:
    print("pad 1 touched!")

or maybe strings:

if 'A1' in cpx.touched:
    print("pad A1 touched!")

or something else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions