interactive: rework setting of tx and rx frequencies

The previous implementation had a bug where unless you entered 7
characters, including newlines, it would forever loop. Instead we now
set a timeout of 10 seconds, and use Serial.parseInt which reads an
integer from the serial port until a non-numeric character is found.

While we're here, split out common functionality into helper functions.
This saves us a few hundred bytes of flash. It remains to be seen if
this is a bad trade off for stack consumption at runtime. Execution time
may suffer slightly, but it is not important here.

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: move serial input into function

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: rework rx_vfo

Use a switch statement instead of a series of if elses, so we don't need
to evaluate every option.

No functional change.

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: clean up menu

Code cleanups.

We no longer double-print the status when displaying the status.

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: rework calibrate

Use switch statement, and record the offset instead of doing the maths
to reduce code size.

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: refactor print_state

Output values are now aligned to make it easier to read.

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: Introduce settings structure

This will be used to save the settings to EEPROM.

Signed-off-by: Joel Stanley <joel@jms.id.au>
interactive: Save settings to EEPROM

This adds a menu option for saving and restoring of settings.

A magic number is saved in the first word position; this should be
incremented when making backwards incompatible changes to the settings
structure.

If the magic is incorrect, which includes the first time the firmware is
run, a message will be printed and the settings reset to their default.

Signed-off-by: Joel Stanley <joel@jms.id.au>