Beta - New 7 segment type gets loaded correctly #267
Merged
DocMoebiuz merged 1 commit intoMobiFlight:mainfrom Nov 6, 2023
Merged
Beta - New 7 segment type gets loaded correctly #267DocMoebiuz merged 1 commit intoMobiFlight:mainfrom
DocMoebiuz merged 1 commit intoMobiFlight:mainfrom
Conversation
|
Firmware for this pull request: |
DocMoebiuz
approved these changes
Nov 6, 2023
elral
added a commit
to elral/MobiFlight-FirmwareSource
that referenced
this pull request
Nov 7, 2023
This reverts commit 0b3a8f1.
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.
Description of changes
With PR #253 the max numbers of devices with changed to a variable use of the device buffer.
Before the config gets loaded, it is checked if the devices will still fit into the device buffer.
For the 7 Segment device it is done like:
if (!LedSegment::setupArray(numberDevices[kTypeLedSegmentDeprecated]) + numberDevices[kTypeLedSegmentMulti]) sendFailureMessage("7Segment");But only the numbers of the old type
kTypeLedSegmentDeprecatedfor the 7 segments are passed to the functionLedSegment::setupArray()as one bracket is at the wrong position. Furthermore theifclause getstrueand a status message gets generated. Unfortunately this status message gets not into the log of the connector (but this is another topic).The fix is to move the first closing bracket to the end of the
ifclause to pass the number of old and new 7 segment devices to the function for setting up the array.Fixes #266