Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
brew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
João Lino
brew
Commits
d5ea03fd
Commit
d5ea03fd
authored
Jun 22, 2017
by
João Lino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menu system restructure - initial commit
menu system restructure
parent
9f46351c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1075 additions
and
1014 deletions
+1075
-1014
CustomDataStructures.h
CustomDataStructures.h
+4
-2
brew.h
brew.h
+25
-0
brew.ino
brew.ino
+1009
-1012
config.h
config.h
+37
-0
No files found.
CustomDataStructures.h
View file @
d5ea03fd
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
#ifndef CustomDataStructures_h
#ifndef CustomDataStructures_h
#define CustomDataStructures_h
#define CustomDataStructures_h
#define SYS_MAX_MENU_ELEMENTS 16
enum
eRotaryEncoderMode
{
enum
eRotaryEncoderMode
{
eRotaryEncoderMode_Menu
,
eRotaryEncoderMode_Menu
,
eRotaryEncoderMode_Time
,
eRotaryEncoderMode_Time
,
...
@@ -111,10 +113,10 @@ enum eBeerProfile {
...
@@ -111,10 +113,10 @@ enum eBeerProfile {
};
};
typedef
struct
menuData_
{
typedef
struct
menuData_
{
char
*
_title
;
const
char
*
_title
;
const
char
*
_dialog
[
SYS_MAX_MENU_ELEMENTS
];
int
_position
;
int
_position
;
int
_selection
;
int
_selection
;
char
**
_dialog
;
bool
_repaint
;
bool
_repaint
;
}
MenuData
;
}
MenuData
;
...
...
brew.h
View file @
d5ea03fd
#ifndef __BREW
#ifndef __BREW
#define __BREW
#define __BREW
// ++++++++++++++++++++++++ LiquidCrystal_I2C ++++++++++++++++++++++++
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
// ++++++++++++++++++++++++ PT100 +++++++++++++++++++++++++++++++++
//#include <PT100.h>
// ++++++++++++++++++++++++ Defines +++++++++++++++++++++++++++++++++
#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
// ++++++++++++++++++++++++ OTHER +++++++++++++++++++++++++++++++++
#include "CustomDataStructures.h"
#include "debug.h"
#include "config.h"
#include "Melody.h"
#include "Display.h"
#include "Temperature.h"
#include "Profiles.h"
// ++++++++++++++++++++++++ FUNCTIONS +++++++++++++++++++++++++++++++++
void
xSetupRotaryEncoder
(
eRotaryEncoderMode
newMode
,
int
newPosition
,
int
newMaxPosition
,
int
newMinPosition
,
int
newSingleStep
,
int
newMultiStep
);
void
xSetupRotaryEncoder
(
eRotaryEncoderMode
newMode
,
int
newPosition
,
int
newMaxPosition
,
int
newMinPosition
,
int
newSingleStep
,
int
newMultiStep
);
// ######################### START #########################
// ######################### START #########################
...
...
brew.ino
View file @
d5ea03fd
This diff is collapsed.
Click to expand it.
config.h
View file @
d5ea03fd
...
@@ -89,6 +89,43 @@
...
@@ -89,6 +89,43 @@
#define MENU_SIZE_MALT_MENU 4
#define MENU_SIZE_MALT_MENU 4
#define MENU_SIZE_SETTINGS_MENU 6
#define MENU_SIZE_SETTINGS_MENU 6
// ++++++++++++++++++++++++ Menus ++++++++++++++++++++++++
#define MENU_MAIN_TITLE "Brewery Menu"
#define MENU_MAIN_DIALOG { "", "-> GO ", "-> GO from stage", "-> STOP ", "-> SKIP ", "-> BeerProfile ", "-> Stages ", "-> Malt ", "-> Hops ", "-> Clean ", "-> Purge ", "-> Settings ", "-> Back " }
#define MENU_MAIN_INIT_POSITION eMainMenu_GO
#define MENU_MAIN_INIT_SELECTION eMainMenu_NULL
#define MENU_MAIN_INIT_REPAINT false
#define MENU_PROFILE_TITLE "Profile Menu"
#define MENU_PROFILE_DIALOG {"", "-> Basic ", "-> Trigo ", "-> IPA ", "-> Belga ", "-> Red ", "-> APA ", "-> Custom ", "-> Back " }
#define MENU_PROFILE_INIT_POSITION eBeerProfileMenu_Basic
#define MENU_PROFILE_INIT_SELECTION eBeerProfileMenu_NULL
#define MENU_PROFILE_INIT_REPAINT false
#define MENU_STAGE_TITLE "Stage Menu"
#define MENU_STAGE_DIALOG {"", "-> Startpoint ", "-> BetaGlucanase", "-> Debranching ", "-> Proteolytic ", "-> Beta Amylase ", "-> Alpha Amylase", "-> Mashout ", "-> Recirculation", "-> Sparge ", "-> Boil ", "-> Cooling ", "-> Back " }
#define MENU_STAGE_INIT_POSITION eStageMenu_Startpoint
#define MENU_STAGE_INIT_SELECTION eStageMenu_NULL
#define MENU_STAGE_INIT_REPAINT false
#define MENU_MALT_TITLE "Malt Menu"
#define MENU_MALT_DIALOG {"", "-> CM Ch. Pilsen", "-> CM Wheat Blan", "-> Back " }
#define MENU_MALT_INIT_POSITION eMaltMenu_CastleMalting_Chteau_Pilsen_2RS
#define MENU_MALT_INIT_SELECTION eMaltMenu_NULL
#define MENU_MALT_INIT_REPAINT false
#define MENU_SETTINGS_TITLE "Settings Menu"
#define MENU_SETTINGS_DIALOG {"", "-> PT100 Element", "-> PT100 Up ", "-> PT100 Down ", "-> Back " }
#define MENU_SETTINGS_INIT_POSITION eSettingsMenu_PT100_Element
#define MENU_SETTINGS_INIT_SELECTION eSettingsMenu_NULL
#define MENU_SETTINGS_INIT_REPAINT false
#define MENU_START_TITLE MENU_STAGE_TITLE
#define MENU_START_DIALOG MENU_STAGE_DIALOG
#define MENU_START_INIT_POSITION MENU_STAGE_INIT_POSITION
#define MENU_START_INIT_SELECTION MENU_STAGE_INIT_SELECTION
#define MENU_START_INIT_REPAINT MENU_STAGE_INIT_REPAINT
// ++++++++++++++++++++++++ Serial Monotor ++++++++++++++++++++++++
// ++++++++++++++++++++++++ Serial Monotor ++++++++++++++++++++++++
#define SETTING_SERIAL_MONITOR_BAUD_RATE 9600
#define SETTING_SERIAL_MONITOR_BAUD_RATE 9600
#define SETTING_SERIAL_MONITOR_WELCOME_MESSAGE "Let's start Brewing!"
#define SETTING_SERIAL_MONITOR_WELCOME_MESSAGE "Let's start Brewing!"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment