esp32 S3 DevKit C1 case

This commit is contained in:
sam.hadow committed 2026-10-09 19:51:17 +02:00
1 parent c8df6abdef
commit f6ecc63254
4 files changed
+268 -4

No files matched your search

+16
View File
@@ -28,6 +28,22 @@ def ask_float(prompt: str) -> float:
except ValueError:
print("Please enter a valid number.")
def ask_optional_float(prompt: str) -> float | None:
"""Prompt user for an optional positive float."""
while True:
raw = input(f"{prompt} [Enter = keep default]: ").strip().replace(",", ".")
if not raw:
return None
try:
value = float(raw)
except ValueError:
print("Please enter a number.")
continue
if value <= 0:
print("Value must be greater than 0.")
continue
return value
def ask_yes_no(prompt: str) -> bool:
"""Prompt the user for a yes/no answer."""
while True: