Meshtastic-gui-installer icon indicating copy to clipboard operation
Meshtastic-gui-installer copied to clipboard

Go thru fields.json description and add validation for various fields

Open mkinney opened this issue 3 years ago • 3 comments

There should be some validations added to settings. If so, write a generic function in util.py and call it in the form.

For example, if a valid range is from 0-64, then add something like "min" field and "max" field to fields.json and write a function that will validate that input.

mkinney avatar Feb 23 '22 02:02 mkinney

For example, auto_screen_carousel_secs should be >= 15 seconds.

mkinney avatar Mar 07 '22 21:03 mkinney

These fields should have these minimums:

    "auto_screen_carousel_secs": min:15
    "ls_secs": min:60
    "mesh_sds_timeout_secs": min: 15
    "min_wake_secs": min: 15
    "on_battery_shutdown_after_secs": min: 15
    "phone_timeout_secs": min: 15
    "phone_sds_timeout_sec": min 15
    "position_broadcast_secs":  min: 15
    "screen_on_secs": min 15
    "sds_secs":  min: 15
    "wait_bluetooth_secs": min: 15
    "serialplugin_timeout": min:50

mkinney avatar Mar 07 '22 22:03 mkinney

Also, move the smart_position as the first input field. Add to tooltip: "This is the most mesh efficient option while broadcasting position changes."

mkinney avatar Mar 07 '22 22:03 mkinney