brew.h 2.21 KB
Newer Older
João Lino's avatar
João Lino committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
#ifndef __BREW
#define __BREW

void xSetupRotaryEncoder( eRotaryEncoderMode newMode, int newPosition, int newMaxPosition, int newMinPosition, int newSingleStep, int newMultiStep );

// ######################### START #########################

void xSafeHardwarePowerOff();

void xWelcomeUser();

// ######################### FUNCTIONS ########################

void runMenu();

void runSettingsSelection();

void runMaltSelection();

void runStageSelection();

void runBeerProfileSelection();

void runStartFromStageSelection_Processor( unsigned long *stageTime, int *stageTemperature, eCookingStages nextStage );

void runStartFromStageSelection();

void runMainMenuSelection();

void xCountTheTime( int temperatureRange, boolean bAverageUpDown );

bool isTimeLeft();

double ulWattToWindowTime( double ulAppliedWatts );

bool xRegulateTemperature( boolean bAverageUpDown );

void xPurgePump();

bool xRegulatePumpSpeed();

void xWarnClockEnded();

void xWarnCookEnded();

void xStageFirstRun( int stageTime, int stageTemperature, int stagePumpSpeed, eCookingStages stage );

void xSetupGlobalVariablesForStage(eCookingStages nextStage);

void xTransitionIntoStage(eCookingStages nextStage);

void xBasicStageOperation( int iStageTime, int iStageTemperature, int iStageTemperatureRange, eCookingStages nextStage, boolean bAverageUpDown );

void xManageMachineSystems();

// #################################################### Helpers ##################################################################

void startBrewing();

void stopBrewing();

void resetMenu( boolean requestRepaintPaint );

void backToStatus();

// #################################################### Set Variables ##################################################################

int getTimer( int initialValue, int defaultValue );

int getTimer( int initialValue );

int getTemperature(int initialValue);

int xSetGenericValue(int initialValue, int minimumValue, int maximumValue, char *valueName, char *unit);

int xSetTemperature( int initialValue );

int xSetFinalYield( int initialValue );

// ###################### Set Variables ##################################################

void xWaitForAction(String title, String message);

boolean gotButtonPress(int iPin);

#endif //__BREW