start_fvr_tmp_adc return value discarded - FVR timeout unhandled #4
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wait-to-fix
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
daru/PICsense#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
start_fvr_tmp_adc returns 0 on success, 1 on FVR timeout, but main.c discards the return value. If FVR fails to stabilize, ADC readings will be garbage.
Fix: check return value and handle timeout case.
Fixed in PR #21: check return value of
start_fvr_tmp_adc, skip transmission cycle if FVR fails to stabilize.Updated PR #21: instead of skipping transmission on FVR timeout, now sets bit 15 of TX_STATUS and continues transmitting. Decoder extracts this flag and reports fvr_error=1 with temp=-999.0°C.