Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed "pin" type to uint to extend max pin number #1768

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Ragot-Pierre
Copy link

I'm not used to git and pull-requests so if I'm doing something wrong, please tell me :)

MobiFlight is a great piece of software but for my project I am limited by the 255 maximum pin per module.
I forked the repository, looked at the code and changed each "pin" type definition to uint instead of byte to get rid of this limitation.

I understand that is something only few (if any) people encounter but I think this change would not break anything for people who don't need it.
Not a C# pro so I might have missed something but everything seems to work fine on my end with both local and Git builds.

Extended max pin number from the 255 limit with byte.
Hopefully the only reference / limit
Update MobiFlightPin.cs to extend pin number limit
Changed RunTests badge to local repo
Improved UI handling of pins numbers over 255
# Conflicts:
#	Base/ComboBoxHelper.cs
#	MobiFlight/MobiFlightModule.cs
#	Properties/Settings.Designer.cs
#	UI/Panels/Output/DisplayPinPanel.cs
Changed "byte" definitions to "uint" for more than 255 pin per module
Reversed github links to original MobiFlight repo
@elral
Copy link
Contributor

elral commented Apr 25, 2024

Hmhm, within the firmware the pins are also defined as byte (uint8_t), so limited to 255.

How do you get more than 255 pins per board?

@Ragot-Pierre
Copy link
Author

Hmhm, within the firmware the pins are also defined as byte (uint8_t), so limited to 255.

How do you get more than 255 pins per board?

With a custom firmware (and hardware, too). I made the A32X/A33X/A34X MCDU with an RP2040 but it's not a simple button matrix board :
1 core handles USB, the 74 button matrix, the 8 announciators LEDs, buttons / frame backlight, and even the screen controls (not tested yet, but the hardware is here).
The other core orchestrates 2 custom data bus going to other panels that will be "Plug & Play" (without going back to the config) and can be daisy-chained.
The MCDU will act as a hub, piping all the data through 1 USB cable, even with a full cockpit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants