Put more conplex datatype definitions in separate file.
This commit is contained in:
parent
e76ca05674
commit
a0a25f05e2
@ -3,10 +3,10 @@
|
||||
#include <SPI.h>
|
||||
#include <Ethernet.h>
|
||||
#include <EEPROM.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
// Additoinal Libraries
|
||||
#include <PubSubClient.h>
|
||||
#include <cJSON.h>
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#include <LiquidMenu.h> // LiquidMenu_config.h needs to be modified to use I2C.
|
||||
#include <MD_REncoder.h>
|
||||
@ -14,6 +14,7 @@
|
||||
// My Includes
|
||||
#include "config.h"
|
||||
#include "globals.h"
|
||||
#include "src/datatypes.h"
|
||||
#include "src/button.h"
|
||||
#include "src/slowPWM.h"
|
||||
#include "src/thermoControl.h"
|
||||
|
@ -4,9 +4,9 @@
|
||||
#include "src/button.h"
|
||||
#include "src/slowPWM.h"
|
||||
#include "src/thermoControl.h"
|
||||
#include "src/datatypes.h"
|
||||
|
||||
const uint8_t CompileTimeP[] PROGMEM = __DATE__ " " __TIME__;
|
||||
const size_t ConfAddress = sizeof(CompileTimeP);
|
||||
const byte ConfAddress = 0;
|
||||
|
||||
void ConnectMQTT();
|
||||
static void SendSensorData();
|
||||
@ -17,37 +17,6 @@ char* ShowKettleSetting();
|
||||
void doEncoder();
|
||||
void UpdateBoilKettle();
|
||||
|
||||
struct Vessel {
|
||||
char name[16];
|
||||
char setpoint[20];
|
||||
char sensor[20];
|
||||
double Rref;
|
||||
double RNominal;
|
||||
};
|
||||
|
||||
struct Topic {
|
||||
char root[10];
|
||||
Vessel mash;
|
||||
Vessel boil;
|
||||
};
|
||||
|
||||
struct Mqtt {
|
||||
IPAddress broker;
|
||||
char user[10];
|
||||
char password[21];
|
||||
Topic topic;
|
||||
};
|
||||
|
||||
struct ConfigData {
|
||||
Mqtt mqtt;
|
||||
byte mac[6];
|
||||
IPAddress ip;
|
||||
int interval;
|
||||
int period;
|
||||
double threshold;
|
||||
double hysteresis;
|
||||
};
|
||||
|
||||
uint8_t KettleDuty = 0;
|
||||
bool SettingChanged = false;
|
||||
const int UpdateInterval = 5000;
|
||||
|
35
boil_kettle/src/datatypes.h
Normal file
35
boil_kettle/src/datatypes.h
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef DATATYPES_h
|
||||
#define DATATYPES_h
|
||||
|
||||
struct Vessel {
|
||||
char name[16];
|
||||
char setpoint[20];
|
||||
char sensor[20];
|
||||
double Rref;
|
||||
double RNominal;
|
||||
};
|
||||
|
||||
struct Topic {
|
||||
char root[10];
|
||||
Vessel mash;
|
||||
Vessel boil;
|
||||
};
|
||||
|
||||
struct Mqtt {
|
||||
IPAddress broker;
|
||||
char user[10];
|
||||
char password[21];
|
||||
Topic topic;
|
||||
};
|
||||
|
||||
struct ConfigData {
|
||||
Mqtt mqtt;
|
||||
byte mac[6];
|
||||
IPAddress ip;
|
||||
int interval;
|
||||
int period;
|
||||
double threshold;
|
||||
double hysteresis;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user