Skip to content
Snippets Groups Projects

Allow configuration of wifi credentials + hostname via settings.json

Merged Woazboat requested to merge Woazboat/flow3r-firmware:feature/wifi-config-base into main
2 unresolved threads

What it says on the tin.

  • Replaces the hardcoded camp wifi credentials with ssid + psk read from settings.json. Also allows configuration of the badge network hostname.
  • Adds barebones code for string type 'tunables'/settings. (Read only, can only be set via settings.json at the moment)
  • Declaratively define hierarchical settings (sub-)menu structure
    • Only WiFi settings have their own submenu for now

Known issues: Display of string settings values in the settings screen is a bit glitchy. Not quite sure why, but I also haven't spent much time debugging it since this is just a barebones implementation for the functionality and the display issue is purely cosmetic and doesn't affect the core features of this patch.

Edited by Woazboat

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Woazboat added 2 commits

    added 2 commits

    • 5438cfb7 - Add Union type annotation to goose.py
    • ef24fd0d - Declaratively define settings (sub-)menu structure

    Compare with previous version

  • Woazboat added 1 commit

    added 1 commit

    • aafcb969 - Declaratively define settings (sub-)menu structure

    Compare with previous version

  • Woazboat added 1 commit

    added 1 commit

    • 72f3323e - Declaratively define settings (sub-)menu structure

    Compare with previous version

  • Woazboat added 9 commits

    added 9 commits

    • 72f3323e...0dde01e1 - 6 commits from branch flow3r:main
    • b4a9c56b - Allow configuration of wifi credentials + hostname via settings.json
    • f1b7a5a4 - Add Union type annotation to goose.py
    • 8f5fe023 - Declaratively define settings (sub-)menu structure

    Compare with previous version

  • Woazboat added 1 commit

    added 1 commit

    • 50e4d699 - Declaratively define settings (sub-)menu structure

    Compare with previous version

  • Woazboat added 1 commit

    added 1 commit

    • 0641569f - Use obfuscated rendering for wifi password setting value

    Compare with previous version

  • Woazboat changed the description

    changed the description

  • Woazboat resolved all threads

    resolved all threads

  • Woazboat added 16 commits

    added 16 commits

    • 0641569f...e0b6bd75 - 12 commits from branch flow3r:main
    • c3f25ef7 - Allow configuration of wifi credentials + hostname via settings.json
    • 15f262e5 - Add Union type annotation to goose.py
    • 5232fead - Declaratively define settings (sub-)menu structure
    • 43e35b38 - Use obfuscated rendering for wifi password setting value

    Compare with previous version

  • Woazboat added 1 commit

    added 1 commit

    • c9ea10be - Use obfuscated rendering for wifi password setting value

    Compare with previous version

  • yogan mentioned in issue #75 (closed)

    mentioned in issue #75 (closed)

  • Timon changed milestone to %Release 1.3

    changed milestone to %Release 1.3

  • q3k
    q3k @q3k started a thread on the diff
  • 389 str_wifi_psk = ObfuscatedStringTunable("WiFi Password", "system.wifi.psk", None)
    390 str_hostname = StringTunable("Hostname", "system.hostname", "flow3r")
    391
    392 # List of all settings to be loaded/saved
    393 load_save_settings: List[UnaryTunable] = [
    394 onoff_show_tray,
    395 onoff_button_swap,
    396 onoff_debug,
    397 onoff_debug_touch,
    398 onoff_wifi,
    399 str_wifi_ssid,
    400 str_wifi_psk,
    401 str_hostname,
    402 ]
    403
    404 if TYPE_CHECKING:
    • Contributor

      I'd probably try to handle this with some 'tagged union' style thing here instead of a Union and isinstance call, but this is good enough. I'll fix it up to make myself happy some other day.

    • Please register or sign in to reply
  • q3k approved this merge request

    approved this merge request

  • Woazboat added 8 commits

    added 8 commits

    • c9ea10be...bcd57529 - 4 commits from branch flow3r:main
    • 4ec0a6de - Allow configuration of wifi credentials + hostname via settings.json
    • bbee3451 - Add Union type annotation to goose.py
    • cf318ef4 - Declaratively define settings (sub-)menu structure
    • fbcd38ca - Use obfuscated rendering for wifi password setting value

    Compare with previous version

  • q3k merged

    merged

  • Please register or sign in to reply
    Loading