Add P1-04THMS (isolated K-type thermocouple module) support#32
Open
smittysmee wants to merge 2 commits into
Open
Add P1-04THMS (isolated K-type thermocouple module) support#32smittysmee wants to merge 2 commits into
smittysmee wants to merge 2 commits into
Conversation
The P1-04THMS (module ID 0x34608C82) is the isolated variant of the P1-04THM, but it has no entry in the library. When the base controller signs on a P1-04THMS, its ID is absent from Module_List.h, so the library assigns it 0 analog-input bytes and readTemperature() returns nothing (the sign-on diagnostics report "This module has no Analog Input bytes"). This adds the missing table entry and config mapping, mirroring the existing P1-04THM (same 4-channel K-type byte layout and default config): - Module_List.h: new row for 0x34608C82 / "P1-04THMS" - P1AM.cpp loadConfigBuf(): case 0x34608C82 falls through to the P1_04THM default config The module ID was read off a physical P1-04THMS during sign-on. No change to any existing module's behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
The P1-04THMS (module ID
0x34608C82) — the isolated variant of the P1-04THM — has no entry in the library. When the base controller signs on a P1-04THMS, its ID isn't found inModule_List.h, so the library assigns it 0 analog-input bytes:readTemperature()returns nothing and the sign-on diagnostics printThis module has no Analog Input bytes. Only the older P1-04THM (0x34608C81) is recognized.This adds the missing module so the P1-04THMS enumerates and reads like the P1-04THM it mirrors.
Changes
src/Module_List.h— new row for0x34608C82/"P1-04THMS", using the same 4-channel K-type byte layout as the P1-04THM.src/P1AM.cpp(loadConfigBuf()) —case 0x34608C82:falls through toP1_04THM_DEFAULT_CONFIG.Two lines; no change to any existing module's behavior.
How it was found / verified
The module ID
0x34608C82was read directly off a physical P1-04THMS during sign-on (temporarySerial.printof the raw module ID). After adding these entries, all four K-type channels read correctly on the bench. The P1-04THMS shares the P1-04THM's channel configuration, so the existing THM default config applies unchanged.Happy to adjust the comment wording or split if you'd prefer.