Modifications to get rid of device index arrays#175
Modifications to get rid of device index arrays#175GioCC wants to merge 12 commits intoMobiFlight:mainfrom
Conversation
3d1bf96 to
cabaff5
Compare
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Additional to my comment above, changes in config.cpp are required. Can't do it in the code, as this file is not changed within this Pull Request. Revert Back from pullrequest #173 is not merged here: I am not completly sure about Nevertheless my mega2560 crashes even with this changes (I tested them before reverting the main branch and they were OK). W/o them the config gets not loaded and the mega2560 doesn't crash. |
|
Hmhm, tested it again. Now the mega does not crash!?! Please don't ask me what I did wrong before. Sorry. |
Ok, I think I'll have to take a step back and review it again myself first. I have been trying to follow late changes (basically PRs from #171 on) and it's getting a little confusing; I'd like to have a look to last-minute changes because there's definitely something that doesn't add up. Thanks for your effort so far, I will get back to you all once I figure out where it's at. BTW, both the changes you pointed out are clearly correct! |
12be5fb to
0dbea35
Compare
|
Firmware for this pull request: |
|
What I found so far, edit:/ checking |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
Description of changes
Addresses issue #174 (which in turn refers to discussion #154).
The "index" arrays for each device type are suppressed, and devices are allocated completely in the already existing object buffer; this way, there is no longer a limit to the number of devices of a given type that can be allocated (e.g.: one can allocate exclusively shift registers, as many as the avaliable space allows). The max amounts need no longer to be defined.
Notes
Also, the refactoring contributes IMHO to a certain "modularization" of the structure of device-related code.
allocateMemclass is replaced by a slightly more complexstowManager, which has the same basic purpose but with more extended functions.NOTE: This is a draft PR; the code, albeit complete, still requires testing and cleanup (and obviously also review).
If interested, please don't forget to have a look at the comments in the
IODeviceclass, which is pivotal.I will greatly appreciate any checking effort and suggestions.