osiweb / unified_retro_keyboard

Project to provide keyboard replacements for various classic computers, as well as classic ASCII keyboard
99 stars 12 forks source link

Initialization is too decentralized and prone to errors #22

Open dfnr2 opened 4 years ago

dfnr2 commented 4 years ago

Initialization is coordinated at startup from main(), and also from the logic init code in asdf.c, as well as from the keymap module, when a new keymap is initialized. These need to be coordinated and initialization consolidated to prevent incomplete initialization (see issue #21 for example); redundant initialization from different modules, or inifinite recursion if different init modules call each other.

dfnr2 commented 2 years ago

I am leaning toward pulling the responsibility for the initial keymap setup into main. The main() function should be responsible for determining the current keymap (either a default or reading from EEPROM).