readGPIOs function

Offen
#775 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
25/100
Issue-Typ
Dokumentation
Klarheit
Muss geklärt werden
Aktivitätsstatus
Ruhig
Tech-Stack
embedded-iot, python
Bereich
api, embedded-iot

Rechercherichtung

The question is how to get the value returned by readGPIOs(id, mask) in the remote_hardware.py module, which is called after watchGPIOs and writeGPIOs in the snippet. Read those three methods and the response handling around them to see how the GPIO value reaches the caller. Done means the usage is confirmed against the code and a documentation or example change explains how to retrieve the value.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Not sure if this should be an issue. I'm trying to get a value back from the readGPIOs(id, mask) function in the remote_hardware.py module. I'm not sure if I'm using it correctly.

iface = MagicMock(autospec=SerialInterface)
rhw = RemoteHardwareClient(iface)

rhc = remote_hardware.RemoteHardwareClient(interface)

destination_node_id = 1128161828
bitmask = 16
value = 1
rhw.watchGPIOs(destination_node_id, bitmask)
rhw.writeGPIOs(destination_node_id, bitmask, value)
rhw.readGPIOs(destination_node_id,bitmask,True)

How do I get the gpio_value from the read function?

Or should I be doing this some other way?

Vorherrschende Sprache
Python
Sterne
855
Forks
355
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus meshtastic/python

Alle Issues in meshtastic/python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.