fix: NVS Generator. cosmetic: Changed CloudFlash page a bit

This commit is contained in:
2026-03-19 21:01:17 +02:00
parent 29bbaead86
commit d8ba64da55
3 changed files with 52 additions and 20 deletions

View File

@@ -123,6 +123,11 @@ class NvsRequest(BaseModel):
serial_number: str
hw_type: str
hw_revision: str
nvs_schema: str = "new" # "legacy" | "new"
@property
def legacy(self) -> bool:
return self.nvs_schema == "legacy"
@router.post("/cloudflash/nvs.bin")
@@ -149,6 +154,7 @@ async def generate_public_nvs(body: NvsRequest):
serial_number=sn,
hw_family=hw_type,
hw_revision=hw_revision,
legacy=body.legacy,
)
except Exception as e:
raise HTTPException(status_code=500, detail=f"NVS generation failed: {str(e)}")