wip for buzzer
mode does not exist anymore in function. Removed from logDeveloper()
Merge branch 'feature/dynaconfig' of https://github.com/BrewPi/brewpi-avr into feature/dynaconfig
Fix braces AGAIN. Do tempcontrol init after resetting EEPROM
Merge branch 'feature/dynaconfig' of github.com:m-mcgowan/brewpi-avr into feature/dynaconfig
fixed another late at night coding error: int16/int does not fit into uint8_t ;)
Merge branch 'feature/dynaconfig' of https://github.com/BrewPi/brewpi-avr into feature/dynaconfig
Removed STARTUP state, set lastHeatTime and lastIdleTime to -3200 at init instead. This will be removed when WAITING_FOR_COOL and WAITING_FOR_HEAT states  are introduced.
Refactored Tempcontrol.updateState(). Fixed bug that beer temp was also checked in fridge mode and prevented heating.
fix for menu so that beer temp is displayed
Merge branch 'feature/dynaconfig' of https://github.com/BrewPi/brewpi-avr into feature/dynaconfig
Merge branch 'feature/megasupport' into feature/dynaconfig

Buzzer support for meag2560
1. Fix for negative overshoot estimator: substract overshoot from temperature when cooling. This error was introduced by an earlier optimization.
2. Introduced new states:
WAITING_TO_COOL, WAITING_TO_HEAT:  waiting in 'idle' due to one of the minimum off times
WAITING_FOR_PEAK_ESTIMATE: off times allow switching to heat/cool, but waiting for a peak detect
 COOLING_MIN_TIME, HEATING_MIN_TIME: minimum cooling and heating time not reached yet.
3. Refactored tempControl.updateState(). Fixed error that beerTemp was checked even in fridge constant mode. UpdateState() now also calculatres the waitTime, which is printed on the LCD as countdown timer.
4. Added printing of new states + countdown timer to DisplayLCD. Removed printing 's', doesnt fit with some of the new states and is redundant if you see it update every second.

To the new states: after reset, set to fridge constant low/high. Keep in mind that the idleRanges are in effect, so set the temp at least 1C from current temp. Then set to just below setpoint. Try setting it to heat, just after cooling. Try manipulating the sensor so it needs to heat first, then cool, etc.
You can get the state with 's' and the current estimated peak with 'v'.

Next step: space optimize some of the new code, especially LCD printing (common substrings/spaces)
Merge branch 'feature/dynaconfig' of https://github.com/BrewPi/brewpi-avr into feature/dynaconfig
Fix: always go to IDLE in idle range. Could not return from waiting states otherwise when fridge setting changed.
Added else in heating case to match cooling case. Doesnt really matter because of the break in corresponding if statement, but more readable.
Size optimizations in LcdDisplay.printState(). Re-used common substrings  and removed spaces.
Before optimization (RevA, leonardo)
    Program Memory Usage  : 28850 bytes   88,0 % Full
    Data Memory Usage   : 698 bytes   27,3 % Full
After optimization
    Program Memory Usage  : 28790 bytes   87,9 % Full
    Data Memory Usage   : 698 bytes   27,3 % Full
Merge branch 'feature/dynaconfig' of https://github.com/BrewPi/brewpi-avr into feature/dynaconfig
Re-used common substrings in LCD.
Added function printSpacesToRestOfLine()
Only saves 4 bytes... :( Needs more attention
Forgot to include file in previous commit, sorry!
Merge branch 'feature/dynaconfig' of https://github.com/BrewPi/brewpi-avr into feature/dynaconfig
printTemperature is always called with INT_MIN for invalid temperature - getBeerTemp()/getFridgeTemp()/getBeerSet()/getFridgeSet() and tempSensor->read() all return INT_MIN on disconnected, so the repepated checks for disconnected can be factored out.