Development Day 34
-start of flat rotor selection logic
-couple of bugs when returning rotor to box or returning from plugboard when flat rotor is visible
-Rotor type/position goes correctly from upper or lower box to center-need to delete it from the top when selected
-fixed bug in Uhr related to changing ints to bytes, if (p < 0), p needs to be char (char is signed, byte is not)
-previously fixed bug in GUI(), d = sqrt(...pow(y-yc,2)), d needed to be int since y can be > 255
-bugs related to int(16b) to byte(8b) conversion seem to be caught
-logic to move rotor from bottom to middle to top and top to middle to bottom works
-rotor can be extracted from top to examine ring setting and put back with same wheel setting.
-verified enigma algorithm works with different wheels, wheel settings, rotor settings, plugs and uhr
-machine can not be closed if rotors are missing, all settings saved to eeprom
This is the last version with verbose enigma algorithm, will remove Serial.prints in next version
before Serial.print cleanup:
Sketch uses 25,396 bytes (78%) of program storage space. Maximum is 32,256 bytes.
Global variables use 673 bytes (32%) of dynamic memory, leaving 1,375 bytes for local variables. Maximum is 2,048 bytes.
Sketch uses 23,982 bytes (74%) of program storage space. Maximum is 32,256 bytes.
Global variables use 497 bytes (24%) of dynamic memory, leaving 1,551 bytes for local variables. Maximum is 2,048 bytes.
-only beta or gamma rotor can be placed next to thin reflector
-only rotors 1..8 can be placed on the next three positions
-machine cannot be closed if rotors are missing