fix-MFS_INVERT_DIGIT_SELECT#24
Merged
hpsaturn merged 2 commits intoJun 8, 2026
Merged
Conversation
hpsaturn
requested changes
Jun 8, 2026
Owner
|
Thanks for your PR. Please only resolve these only code review comments that I did to merge it. |
Contributor
Author
|
Done. I removed the separate README file and added a short note in the main README. I also kept the default value as 0 to preserve backward compatibility. |
hpsaturn
approved these changes
Jun 8, 2026
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.
Pull Request: Add compatibility option for active-low digit select displays
Description
This PR adds a compatibility option for Multi Function Shield clones whose 4-digit display uses active-low digit select.
Some shield clones use the same 74HC595 display pins as the classic board:
but their digit select lines are active LOW. With the current behavior, the display lights up but shows malformed characters instead of values such as
1234.The classic display behavior is preserved by default. The new option can be enabled with:
For the original/classic behavior, keep:
This PR adds small helper functions to normalize the segment byte and the digit-select byte depending on the selected hardware profile:
normalizeSegmentValue(...) normalizeDigitSelect(...)For active-low digit select displays, the working digit values are:
This keeps the compatibility behavior isolated, documented, and does not require changes to the public API.
Additional changes
This PR also includes a small update to the
Alarm_Clockexample.The previous example used the older initialization style:
However, the current hpsaturn
MultiFuncShieldlibrary exposes:MFS.initialize();and does not accept a
TimerOne*parameter. The example was adjusted to remove the directTimerOnedependency and use the current initialization style:This avoids compilation errors such as:
Documentation
This PR adds a new documentation file:
The new README documents:
MFS_INVERT_DIGIT_SELECT;Related Issues
No related issue yet.
This PR is based on a hardware compatibility issue found while testing a Multi Function Shield clone with a 4-digit display driven by two
74HC595shift registers.Tests
I tested the change on an Arduino UNO with a Multi Function Shield clone using two
74HC595shift registers.The display pins were confirmed as:
The display was tested manually and worked correctly with active-low digit select values:
Display test sketch
Expected and observed output:
Alarm Clock example test
The
Alarm_Clockexample was also checked with the current initialization style:This avoids the previous
TimerOne-based initialization error and keeps the example compatible with the current library API.Suggested PR title