Open mattreba opened 9 years ago
I think this is a pretty important one trying to clean up the BTNIC/code as well (consistent units in code). Would this also mean changing all the EEPROM setpoints/etc to 16bit?
Yes, I had planned on using 16-but variables for all temperature setpoint stores in EEPROM.
Can you elaborate on the impact to BTNIC? I would expect it to return the converted value (Imperial or Metric depending on setting) as values in runtime are already converted and EEPROM values are converted in the EEPROM getters and setters.
Store all temps/volumes in metric in hundreths degrees C and thousandths of litres. If imperial units are active, convert to F/gallons at EEPROM read. Runtime variables will contain values for the active unit type. This will avoid constant conversions on UI updates etc which would add overhead to the system. Conversion from imperial back to metric take place at EEPROM write only which are already limited to protect EEPROM life. Imperial units will be set in UI functions with one degree less precision. Temps will be in tenths of a degree F and volumes as hundreths of a gallon. This will prevent conversion back and forth between units from "walking"