Cause:
- Preadjustment Completion and TBF Q3 calibration results required configurable database persistence.
- Both write operations required diagnostics and simulation support.
Solution:
1. Added independent database writer configurations
- Added PreadjustmentCompletionWriter and Q3CalibrationWriter to gci_config.
- Support SQL commands, stored procedures and parameter mappings.
- Added SQL table creation and verification scripts.
2. Added Preadjustment Completion storage
- Store PCB ID, meter size, amplitude settings, temperature offsets, zero-flow offsets, timestamp and overall result.
- Use captured Completion readout values.
- Preserve the original HTTP reporting.
- Report SQL connection and write status in the corresponding slot diagnostics.
3. Added Q3 calibration storage
- Forward TBF results through GCI Bridge to the GCI database API.
- Store signed deviations and written calibration factors for all three paths.
- Write to SQL after successful calibration register writes and StoreCalibration.
- Include PCB ID and UTC timestamp.
4. Added simulation support
- Generate sample Completion and Q3 records for simulated slots.
- Perform real SQL writes when the corresponding writer is enabled.
- Log connection progress, write outcomes and generated record IDs.
5. Separated calibration and database outcomes
- Preserve meter operation results when database storage fails.
- Expose database write status independently.
6. Increased revision
- Updated revision from 3.9.3146.108 to 3.9.3146.109.
Validation:
- Confirmed successful SQL storage for simulated Completion.
- Confirmed successful Q3 calibration result storage.
ToDo:
- Use the GCI Q3 storage API as the foundation for future migration of Q3 calibration from the direct TBF communication branch to GCI.
Cause:
- Temperature calibration results lacked measured meter temperatures and comparison details.
- Diagnostics closed immediately after a phase, preventing inspection of failures.
- Push Temperature remained visible when temperature was supplied directly from T1/T2.
- Automatic phase transitions provided insufficient settling time before temperature calibration, causing temperature checks to fail.
Solution:
1. Added structured temperature calibration results
- Return reference temperature, meter temperature, absolute difference, effective limit and sample count per slot.
- Distinguish temperature check status from overall calibration completion.
- Preserve existing API signatures and add typed result methods.
2. Improved temperature diagnostics
- Log sample count, invalid values, minimum, maximum and mean for each path.
- Add bounded TEMP-RAW capture with raw temperature, scaling factor, decoded temperature, timestamps and frame content.
- Attach diagnostic capture only during the temperature check and detach it afterwards, including on cancellation.
- Preserve the original streaming handler used during Amplitude Test.
- Keep the original comparison algorithm and temperature deviation limit.
- Remove configurable deviation from the GCI Bridge component dialog.
3. Added optional hold after preadjustment
- Add the Hold after preadjustment procedure parameter.
- Keep completed results and diagnostics visible until Continue is pressed.
- Process STOP during hold and exclude hold time from measurement duration.
4. Updated phase display
- Hide Push Temperature in sensor mode unless that action is explicitly running.
- Keep failed slots and their exclusion status visible during hold.
5. Corrected settling time
- Remove initialization overrides that forced OffsetTestSettlingTime to zero.
- Set OffsetTestSettlingTime to 20 seconds.
- Apply settling before temperature calibration and during Offset Test.
- Preserve STOP handling during the wait.
- The existing inclusive countdown produces approximately 21 seconds of waiting.
6. Aligned project versions
- Update TBF revision to 3.9.3146.107.
- The corresponding Laatzen PreadjustmentUI project state matches this TBF revision exactly.
- Build and deploy these matching project versions together.
Validation:
- Compared raw temperature frames from GCI GUI and GenesisCommunication.
- Confirmed that decoded Meter temperatures matched the raw frame values.
- Confirmed that adding a pause after Amplitude Test allowed temperature calibration to pass.