A small point, worth keeping in mind for some future date:
There are no flags currently being set when the system is executing
the 'set and remember' operation. I think a flag should be set, given
the possible change in gain. A more sophisticated approach would be to
set a flag only if the attenuators are in fact changed...