Skip to content

Set single segment on 7 Segment displays#295

Merged
DocMoebiuz merged 25 commits intoMobiFlight:mainfrom
elral:set_single_Segment
Sep 4, 2024
Merged

Set single segment on 7 Segment displays#295
DocMoebiuz merged 25 commits intoMobiFlight:mainfrom
elral:set_single_Segment

Conversation

@elral
Copy link
Collaborator

@elral elral commented Dec 19, 2023

Description of changes

An additional function to control a single segment is added. This requires an additional buffer for all Digits for the MAX7219. The already available rawdata buffer is still used for the TM1637 display.

The setSingleSegment(uint8_t subModule, uint8_t segment, uint8_t value) function requires the subModule, the segment number and the value. Segment numbers are in the range from 0 to 63, 8 bits per Digit, starting with the most right digit. For switching the segment off value must be 0x00, all other values are switching the segment on.

This can also be used for controlling 64 LED's arranged in a matrix.

Additionally the existing rawdata buffer is initialized dynamically and not anymore statically. So the max number of submodules is not fixed anymore to 8 and only the required memory for the number of displays is reserved in the device buffer.

As this is for now only tested with a MAX7219 display, this PR is a draft one until it is tested with TM1637 displays.

Fixes #294

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@elral elral marked this pull request as ready for review December 25, 2023 12:53
@elral elral requested a review from DocMoebiuz as a code owner December 25, 2023 12:53
@elral
Copy link
Collaborator Author

elral commented Dec 25, 2023

It's now also tested for the TM1637 displays.

Bitorder is dABCDEFG and from the most right digit (digit 0!) to most left digit for both display types (MAX and TM).

E.g. to lit segment C from digit 3 set bit (((3 - 1) * 8) + 4) = 20 to 1 -> 33,0,0,20,1 would be the command from the connector with module = 0 and submodule = 0.

@github-actions
Copy link

github-actions bot commented Jan 5, 2024

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

github-actions bot commented Jan 8, 2024

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

Copy link
Collaborator

@DocMoebiuz DocMoebiuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment and suggestion

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

github-actions bot commented May 6, 2024

Firmware for this pull request:
Firmware.zip

@github-actions
Copy link

Board and firmware folder for this pull request:
Mobiflight-Connector.zip

@github-actions
Copy link

Board and firmware folder for this pull request:
Mobiflight-Connector.zip

@DocMoebiuz DocMoebiuz merged commit 52dba44 into MobiFlight:main Sep 4, 2024
@elral elral deleted the set_single_Segment branch September 5, 2024 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set a single Segment on 7 Segment Displays missing

2 participants