KcsisV, that's a lot of work, great to see someone contributing. I have a lot to review!
Just some thoughts:
- Before doing so much work at your own, it might be a good idea to talk, it's not the first time I'm developing something, not published yet into git, and someone makes a PR for the same stuff!
Also, there's some code you might think it's dirty or redundant, and while it might be true in some cases, others are actually small patches to address very specific issues that took a lot of effort to catch.
I've tried to comment the code in the best way, otherwise I would forget myself how it worked! But not everything is properly described, so be careful when optimizing.
- Not sure about the separate main. The current main had very few lines of code, and didn't cause any issues. You still need a custom main to call the second one. To me, that's just overcomplicate things.
- I don't think IRON and SYSTEM are confusing, it's been clearly stated that IRON stores settings that are unique and private for each profile, while SYSTEM stores global settings applied at all times.
- The temperature was saved long time ago, later removed to reduce flash wear, actually you'll use the same temps for 99% of the time, ex. 350ºC. That was a real Flash punisher
- I don't understand what you did
here?
The used tip is currently saved in the profile itself. Each profile has it's own currentTIP. Then the current selected profile is saved in systemSettings.
But now you're saving it globally to systemsettings.currentTIP, so if last T12 tip was "2" and you load C210, it will also load "2" ?.
Anyways the profile type is a rarely changed setting, not nearly as often as the temperature does, so I don't think the "save last tip" option is necessary?
But if saving to the external eeprom, then save currentTips for all profiles, not just current one.
- I *want* to preserve CubeMX code generation instead manually copying the HAL. Why? Because it's exactly that, a HAL, constantly being enhanced and fixed.
Thus, that way I can always generate the latest fresh HAL. When a new one appears, all I need is to press "Migrate". If I hardcode it, updating the HAL will need to be done manually. More work!
- I'm not a big fan of hardware mods because interfacing new functions will usually require soldering to the small stm32 pins, which is not a thing for the 90% of the users.
Sure, you can add anything, but please also add detailed instructions / explanations in the docs, I don't want to start answering questions every 5 minutes
- Yes, some screens are embeded in other files, because they're very small and sub-screens of the main one, also because it recycles several common variables.
Otherwise, most screens use separate files.
- It's all nice to improve, it also keep in mind that I'm not going to debug your work, so take all the time you need to ensure everything works correctly.
- Yes, I know I should make releases, however, the few times I did, there were few firmware bugs, causing even further confusion between users on which to use, needing to explain everythig.
So I just removed them, adding the latest binary instead. Doesn't work? Just use the latest version. I don't want to keep track of every single release!
- Picture generation etc? I have no idea. Given there're just a few images, I simply converted them manually. Converting them to XBM and copying the contents is nothing complicated.
Of course if I had hundreds of pictures, it would be a heavy task.
- The best storing solution would be a
FRAM, no wear issues!
- I though many times on adding usb OTG to export/restore the settings, wouldn't be hard. Again, it requires hw modifying, but also more RAM usage, which would be impossible for STM32F101 devices, they have only ~250 bytes left.
- Ensure to check latest code, there were several changes lately... there's a new batch building script, much easier to handle.
Yes, it might still not that good as fully integrated project, but works, let's you build any or all profiles with a single keypress, not requiring to setup the ide, it finds and invoques everything by itself, making it *much* easier for people not used with this things.
I just hate when someone publishes a project that requires a lot of intermediate steps, setting up the toolchain, dependencies, importing... 95% of the time there'll be issues before you can build anything! So I don't want that pain for anyone if it's not specifically required.
Whenever I want to build new firmware, I simply open _Building_script-> Build all. Three minutes later, I open git and upload the new binaries that were automatically placed in their folders. That's all the work it takes, and I don't want it to be more complicated!
looks really good in person
Is everything working with that screen? Is contrast, etc, being saved and restored correctly on boot?
Never corrupting/glitching? Sure, if 9V went into it, cannot trust it anymore!
Keep trying that one and ensure nothing breaks down.
Are these your definitive settings? 42,0,on,off ...
You forgot thet resistor ratio! What are the effect of adjusting it?