reflow/profile.h

88 lines
1.4 KiB
C
Raw Normal View History

2012-11-10 14:27:43 +00:00
#ifndef _H_PROFILE
#define _H_PROFILE
#include <Arduino.h>
class LiquidCrystal;
class DFR_Key;
#define PI_TS_MIN 0
#define PI_TS_MAX 1
#define PI_TL 2
#define PI_TP_MIN 3
#define PI_TP_MAX 4
#define PI_TIME_MAX 5
// profile temp per second rates
#define PI_TS_RAMP_UP_MIN 6
#define PI_TS_RAMP_UP_MAX 7
#define PI_TP_RAMP_UP_MIN 8
#define PI_TP_RAMP_UP_MAX 9
#define PI_RAMP_DOWN_MIN 10
#define PI_RAMP_DOWN_MAX 11
// profile temp durations
#define PI_TS_DURATION_MIN 12
#define PI_TS_DURATION_MAX 13
#define PI_TL_DURATION_MIN 14
#define PI_TL_DURATION_MAX 15
#define PI_TP_DURATION_MIN 16
#define PI_TP_DURATION_MAX 17
#define PI_END 18
// config states
#define CS_MENU 0
#define CS_EDIT 1
#define CS_END 2
class LiquidCrystal;
class DFR_Key;
extern LiquidCrystal lcd;
extern DFR_Key keypad;
class Profile {
public:
int data[18];
unsigned int config_index;
int config_state;
int key;
Profile();
boolean handle_config_state();
void print_config_state();
void print_config_state_0();
};
class ProfileState {
public:
int temp_min;
int duration;
int temp_max;
String name;
ProfileState() : temp_min(0), duration(0), temp_max(0) {}
ProfileState(int min, int dur, int max = -1, const char & name = NULL) : temp_min(min), duration(dur), temp_max(max), name(name) {}
};
class SolderType {};
class Profile2 {
public:
ProfileState states[3];
};
extern Profile2 std_profile;
void set_std_profile();
#endif