Skip to content

Beta - New 7 segment type gets loaded correctly #267

Merged
DocMoebiuz merged 1 commit intoMobiFlight:mainfrom
elral:Fix_for_PR253
Nov 6, 2023
Merged

Beta - New 7 segment type gets loaded correctly #267
DocMoebiuz merged 1 commit intoMobiFlight:mainfrom
elral:Fix_for_PR253

Conversation

@elral
Copy link
Collaborator

@elral elral commented Nov 5, 2023

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 kTypeLedSegmentDeprecated for the 7 segments are passed to the function LedSegment::setupArray() as one bracket is at the wrong position. Furthermore the if clause gets true and 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 if clause to pass the number of old and new 7 segment devices to the function for setting up the array.

Fixes #266

@elral elral requested a review from DocMoebiuz as a code owner November 5, 2023 13:56
@DocMoebiuz DocMoebiuz changed the title bracket on wrong position Beta - New 7 segment type gets loaded correctly Nov 5, 2023
@github-actions
Copy link

github-actions bot commented Nov 5, 2023

Firmware for this pull request:
Firmware.zip

@DocMoebiuz DocMoebiuz merged commit 0b3a8f1 into MobiFlight:main Nov 6, 2023
@elral elral deleted the Fix_for_PR253 branch November 7, 2023 05:20
elral added a commit to elral/MobiFlight-FirmwareSource that referenced this pull request Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New 7 segment type gets not loaded

2 participants