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

Elral/issue127 #147

Merged
merged 20 commits into from
Feb 6, 2022
Merged

Elral/issue127 #147

merged 20 commits into from
Feb 6, 2022

Conversation

elral
Copy link
Collaborator

@elral elral commented Jan 24, 2022

Fixes #127 and fixes #140

These are modifications to save as much RAM as possible (I think so), increase stability and have full control on required memory for all devives which are now initialized dynamically.

Following changes are implemented:

  • used pins not checked anymore (delete pinsRegistered)
  • configBuffer contains only names from input devices
  • MFEEPROM function getLength returns the size of the EEPROM
  • Issue Mega/ProMicro/Uno can crash after upload if 4 7Segments are configured #140
  • analogwrite changed to function from class
  • debug printout to connector (should we stay with this approach?)
  • outputs, buttons, encoders, anlogIn, OutputShifter and InputShifter dynamically _initialized
  • MFStepper dynamically initialized in MFStepper.cpp like other devices which use a library
  • if config for steppers are (pin2 == pin4 && pin1 == pin3), stepper lib will be initialized for external drivers (proposal, would require changes in the connector)
  • MFLCDDisplay dynamically initialized
  • MFSegments dynamically initialized
  • MFServo dynamically initialized

This results in following memory saving:
image

The memory consumption for the device is as above mentioned:

  • Encoder: 31 Byte
  • Button: 4 Byte
  • 7Segment: 24 Byte
  • Stepper: 68 Byte
  • Servo: 3 Byte
  • LCD: 14 Byte
  • Analog: 29 Byte
  • Output: 2 Byte
  • Output Shift Register: 9 Byte
  • Input Shift Register: 11 Byte

Worst Case calculation for deviceBuffer:
image

So considering the available pins per board every configuration should fit into the new deviceBuffer.

@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

@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

github-actions bot commented Feb 5, 2022

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.

Woohoo!!!! THANKS FOR THE EFFORT - YOU ARE A GREAT TEAM!!!

@DocMoebiuz DocMoebiuz merged commit 46969ca into MobiFlight:main Feb 6, 2022
GioCC added a commit to GioCC/MobiFlight-FirmwareSource that referenced this pull request Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants