feat(vision): il server esegue tramite worker e salva misure vere
Aggiunge POST /api/vision/execute: route l'immagine al worker di visione, mappa le uscite del grafo sulle quote e le salva con save_measurement - stesso verdetto, stesso gate del fuori tolleranza di ogni altra misura. Nuova tabella vision_results (una riga per acquisizione, non per quota) e input_method 'camera' su measurements. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BBnuACZSCJqXrMYC3LUMU
This commit is contained in:
@@ -38,11 +38,17 @@ class Measurement(Base):
|
||||
|
||||
# Input method
|
||||
input_method: Mapped[str] = mapped_column(
|
||||
Enum("usb_caliper", "manual", name="input_method_enum"),
|
||||
Enum("usb_caliper", "manual", "camera", name="input_method_enum"),
|
||||
nullable=False,
|
||||
default="manual",
|
||||
)
|
||||
|
||||
# The vision execution that produced this value, when there was one. Null for
|
||||
# everything taken by caliper or typed by hand.
|
||||
vision_result_id: Mapped[Optional[int]] = mapped_column(
|
||||
Integer, ForeignKey("vision_results.id"), nullable=True
|
||||
)
|
||||
|
||||
# Time spent by the operator entering this value (client-reported)
|
||||
input_duration_ms: Mapped[Optional[int]] = mapped_column(
|
||||
Integer, nullable=True
|
||||
|
||||
Reference in New Issue
Block a user