CUB-228: Add battery_calibration_offset to cameras table #7

Closed
Otto wants to merge 1 commits from agent/hex/CUB-228-battery-calibration-offset into dev
Owner

Summary

Adds battery_calibration_offset (REAL) column to the cameras table for GoPro Hero 3 battery calibration.

Changes

  • Schema: New column in 001_create_tables.sql for fresh databases
  • Migration 002: 002_add_camera_calibration.sql — idempotent ALTER TABLE guarded by pragma_table_info check in db.go
  • Model: BatteryCalibrationOffset *float64 added to models.Camera (omitempty JSON)
  • Queries: All SELECT * FROM cameras queries updated in:
    • internal/api/cameras.goGetCameraDetail
    • internal/mqtt/subscriber.gogetCamera

Validation

go vet ./pkg/models/ ./internal/db/ ./internal/api/ → PASS
go vet ./internal/mqtt/ → PASS (pre-existing go.sum issue unrelated)

Closes

CUB-228

## Summary Adds `battery_calibration_offset` (REAL) column to the `cameras` table for GoPro Hero 3 battery calibration. ## Changes - **Schema**: New column in `001_create_tables.sql` for fresh databases - **Migration 002**: `002_add_camera_calibration.sql` — idempotent ALTER TABLE guarded by `pragma_table_info` check in `db.go` - **Model**: `BatteryCalibrationOffset *float64` added to `models.Camera` (omitempty JSON) - **Queries**: All `SELECT * FROM cameras` queries updated in: - `internal/api/cameras.go` — `GetCameraDetail` - `internal/mqtt/subscriber.go` — `getCamera` ## Validation ``` go vet ./pkg/models/ ./internal/db/ ./internal/api/ → PASS go vet ./internal/mqtt/ → PASS (pre-existing go.sum issue unrelated) ``` ## Closes CUB-228
Otto added 1 commit 2026-05-22 22:32:13 -04:00
CUB-228: add battery_calibration_offset to cameras table
CI/CD / lint-and-typecheck (pull_request) Successful in 6s
CI/CD / test (pull_request) Successful in 6s
CI/CD / build (pull_request) Failing after 4m47s
CI/CD / deploy (pull_request) Has been skipped
1704d8a833
- Add column to 001_create_tables.sql for fresh databases
- Add migration 002 for existing databases (idempotent via
  pragma_table_info check)
- Implement runIncrementalMigrations in db.go
- Add BatteryCalibrationOffset to Camera model
- Update all camera SELECT queries (cameras List, detail, MQTT
  subscriber getCamera, register)
overseer closed this pull request 2026-05-23 07:37:12 -04:00
Some checks are pending
CI/CD / lint-and-typecheck (pull_request) Successful in 6s
CI/CD / test (pull_request) Successful in 6s
CI/CD / build (pull_request) Failing after 4m47s
CI/CD / deploy (pull_request) Has been skipped
openclaw/grimm-review
Required

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CubeCraft-Creations/remote-rig#7