fix(labdb): cycleToRecord 에 alignment metadata 보존
이전: rowIndex/datetime/commandType/sensor/channels 만 → align_phase 등 drop
변경: align_phase / align_score / align_hint / align_icon / align_detected /
align_urine_lens 도 record 에 포함 (alignment session 일 때만)
→ labdb 서버 raw.json export 에 cycle 별 V2 phase 표기 (INITIAL_ACCUM /
VERTICAL_CLIMB / CH3_STABILIZE / LR_BALANCE / STEP_0_BASELINE) 가 들어가
분석 PC 에서 phase 별 frame 분석 가능.
⚠ 이미 업로드된 sessions 는 phase 없음 (재업로드 필요).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -181,6 +181,16 @@ object LabdbUploader {
|
||||
put("commandType", "MTB")
|
||||
put("sensor", sensor)
|
||||
put("channels", channelsArr)
|
||||
// Alignment metadata (alignment session 의 cycle 일 때만 채워짐) — labdb 서버가
|
||||
// raw.json export 시 함께 내려줘 분석 PC 에서 phase 별 frame 분석 가능.
|
||||
if (cycle.has("align_phase")) {
|
||||
put("align_phase", cycle.optString("align_phase"))
|
||||
put("align_score", cycle.optInt("align_score"))
|
||||
cycle.optString("align_hint").takeIf { it.isNotBlank() }?.let { put("align_hint", it) }
|
||||
cycle.optString("align_icon").takeIf { it.isNotBlank() }?.let { put("align_icon", it) }
|
||||
cycle.optJSONArray("align_detected")?.let { put("align_detected", it) }
|
||||
cycle.optJSONArray("align_urine_lens")?.let { put("align_urine_lens", it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user