Push down some global variables, and remove 'msglen' (always 26).
'logfilename' will be set to NULL by get_config_value() if needed.
Rename some 'i' variables to a more descriptive 'bp'.
Fold init_hardware() into set_mode_live(). Produces unreadable diff :(
No need to calculate this twice...