Lack of documentation/Help for settings options

Offen
#819 2 Kommentare 1 Reaktion 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
42/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
cli

Rechercherichtung

The payload names only the CLI commands --set, --get, --info and the settings list shown by --set with no argument, so start by finding where those commands are handled in the Python CLI. Decide where the acceptable values for each setting would come from, since the issue does not say, and confirm with a maintainer before coding. Done means --set or --get also prints a human-readable description of allowed values, such as the bluetooth.mode options, and the existing output stays unchanged.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Related to https://github.com/meshtastic/meshtastic/issues/2005

There is a lack of built-in documentation for what settings accept what values. for example if you list the settings with --set you just get a list of settable settings, but not what acceptable inputs are:

Image

Once you read or set something you only get the raw value ie:

Image

And the --info returns in a JSON with no acceptable input values.

I'm recommending two changes:

Change 1:

Add an option to display the acceptable input for a given command. taking the bluetooth settings from https://github.com/meshtastic/meshtastic/issues/2005:

bluetooth:
    bluetooth.enabled
             0 = Bluetooth Disabled
             1 = Bluetooth Enabled
    bluetooth.fixed_pin
            xxxxxx = 6 digits for pin
    bluetooth.mode
           0 = Random Pin
           1 = Fixed pin (Requires fixed_pin to be set)
           2 = No Pin

Change 2:

Modify how the --set and --get command respond to include a human readable format as well. Something like this:

Image
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.