Conversation
SensorADC raises range-3 codes below GSR_UNCAL_LIMIT_RANGE3_SR68 to it before calibration so that an open circuit reads as open. The limit was 1134, below the 0.4986 V this decode divides by for the gen-2 front end (code 1134.3 at 1.8 V). So 1134, and every code clamped up to it, decoded to a negative resistance. The nudge turned that into 8 kOhm in auto-range (125 uS, the highest conductance there is) and 680 kOhm on fixed range 3. An SR68-9 with its electrodes open (DEV-793 dataset B6) reads range-3 codes peaking at 1126-1136. The limit is now 1138, the first code above 0.5 V at 1.8 V. That clears 0.4986 V and the Java driver's 0.5 V alike, and it is the value the Java driver and the C# API get under the same ticket. The existing clamp test asserted only that a clamped sample decoded like one at the limit. It passed at 1134 because both came out at the 8 kOhm floor. It now uses 1138, and two tests are added: codes 1134-1138 on range 3 must read at least 4.7 MOhm on an SR61-5 and an SR68-9, in auto-range and on fixed range 3; and the limit must be the first code above 0.5 V. At 1134 four tests fail, and at 1138 the suite passes (1892). Typecheck, lint and prettier are clean. Not changed here: in auto-range the nudge caps resistance at 4.7 MOhm, so an open circuit now reads 0.213 uS. That is still above the 0.03 uS connectivity threshold, so the connectivity flag cannot say 'Disconnected'. Recorded in the CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DEV-1067
Problem
SensorADCraises range-3 codes belowGSR_UNCAL_LIMIT_RANGE3_SR68to that limit before calibration, so that an open circuit reads as open. The limit was 1134, which is below the 0.4986 V this decode divides by for the gen-2 front end (code 1134.3 at 1.8 V). So 1134, and every code clamped up to it, decodes to a negative resistance. The nudge turns that into 8 kΩ in auto-range — 125 µS, the highest conductance there is — and 680 kΩ on fixed range 3. An SR68-9 with its electrodes open (DEV-793 dataset B6) reads range-3 codes peaking at 1126–1136.Fix
The limit is now 1138, the first code above 0.5 V at 1.8 V. That clears this decode's 0.4986 V and the Java driver's 0.5 V alike, and it is the value the Java driver and C# API get in the PRs below.
CHANGELOG.mdhas an entry under[Unreleased].Tests
The existing clamp test asserted only that a clamped sample decoded like one at the limit. It passed at 1134 because both sides came out at the 8 kΩ floor. It now uses 1138, and two tests are added:
typecheck,lintand prettier are clean.Release
No version bump here. The consoles pick this up at the next vendoring bump or release.
Not changed here
In auto-range the nudge also caps resistance at 4.7 MΩ, so an open circuit now reads 0.213 µS. That is still above the 0.03 µS threshold, so
connectivitystill says'Connected'. Java and C# only floor at 8 kΩ in auto-range (ASM-2156). This needs its own change, and the CHANGELOG entry says so.Sibling PRs (same constant, same ticket)
🤖 Generated with Claude Code