Fix TypeError altitude null + erreurs affichées dans l'UI
- float(cmd.get("altitude") or 15) : gère altitude=null retourné
par Gemini pour les commandes sans altitude (land, rtl, status…)
- /command attrape les exceptions et retourne JSON 500 avec le
message d'erreur, évite le "Erreur réseau" opaque dans la page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -96,7 +96,7 @@ async def interpret_command(text):
|
||||
async def execute_command(drone, cmd):
|
||||
global drone_armed
|
||||
action = cmd.get("action")
|
||||
alt = float(cmd.get("altitude", 15))
|
||||
alt = float(cmd.get("altitude") or 15)
|
||||
msg = cmd.get("message", "OK")
|
||||
|
||||
if action == "position":
|
||||
|
||||
Reference in New Issue
Block a user