documentation/MultiConverter.md
An expanded version of my previous Dec/Hex Converter, this time allowing more units and a (probably poorly made from a design-point-of-view) selector mode to swap between different unit groups.
I wrote it with the idea of expanding the unit list on mind, so adding new ones it's a matter of increasing an array of constants + defining the proper conversion functions.
(Actually the whole project is more about "making the framework" rather than providing ALL of the possible units : D)
Decimal / Hexadecimal / BinaryCelsius / Fahrenheit / KelvinKilometers / Meters / Centimeters / Miles / Feet / InchesDegree / RadianBase keyboard allows numbers from 0 to F, being disabled (or not) according to the current selected unit.
Long press on 0 toggles a negative value; long press on 1 sets a decimal point (only if allowed by the current selected unit).
< removes the last character; # changes to Unit Select Mode.
Left and Right to swap between origin unit and destination unit (notice the destination will change according to the current selected origin).
Ok to save the changes and go back to the Display Mode; Back to go back without changing any unit.
Add the new units in the MultiConverterUnitType enum on multi_converter_definitions.h (basic definitions header). Notice each enum element will be used as an array index later.
Increase the MULTI_CONVERTER_AVAILABLE_UNITS constant on multi_converter_units.h (units main header file).
Set a pair of functions for converting units and to check if a target unit is allowed to work with the destination unit (both on multi_converter_units.h
and multi_converter_units.c; follow the already built-in units for more info).
Add the proper MultiConverterUnit structs for each new unit.
Add each new struct to the main multi_converter_available_units array.
And that's it! The system will fetch the new units and display it!
This is an initial release, so expect some bugs and issues (also I don't work with C that much, so there're probably lots of things that can be improved and/or changed!).