diff options
author | kliment <kliment.yanev@gmail.com> | 2011-10-27 12:43:46 -0700 |
---|---|---|
committer | kliment <kliment.yanev@gmail.com> | 2011-10-27 12:43:46 -0700 |
commit | 02f659a09c0b850616d7fc447461261a82970458 (patch) | |
tree | 10133d076405d1dfcde42eb2cdcea4a4c7584935 /Sprinter/Sprinter.h | |
parent | 5869358f65cb6304978d7b34faa9b5747f90a20e (diff) | |
parent | 6752615acab181186d6915a5d33b72d83ca0867b (diff) |
Merge pull request #106 from kliment/experimental
Merge Experimental into master
Diffstat (limited to 'Sprinter/Sprinter.h')
-rw-r--r-- | Sprinter/Sprinter.h | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/Sprinter/Sprinter.h b/Sprinter/Sprinter.h index d612b5d..2ac9163 100644 --- a/Sprinter/Sprinter.h +++ b/Sprinter/Sprinter.h @@ -8,33 +8,47 @@ void get_command(); void process_commands(); void manage_inactivity(byte debug); +void setup_acceleration(); void manage_heater(); -int temp2analogu(int celsius, const short table[][2], int numtemps, int source); -int analog2tempu(int raw, const short table[][2], int numtemps, int source); -#ifdef HEATER_USES_THERMISTOR - #define HEATERSOURCE 1 -#endif -#ifdef HEATER_USES_AD595 - #define HEATERSOURCE 2 + +#if defined HEATER_USES_THERMISTOR +#define temp2analogh( c ) temp2analog_thermistor(c,temptable,NUMTEMPS) +#define analog2temp( c ) analog2temp_thermistor(c,temptable,NUMTEMPS) +#elif defined HEATER_USES_AD595 +#define temp2analogh( c ) temp2analog_ad595(c) +#define analog2temp( c ) analog2temp_ad595(c) +#elif defined HEATER_USES_MAX6675 +#define temp2analogh( c ) temp2analog_max6675(c) +#define analog2temp( c ) analog2temp_max6675(c) #endif -#ifdef HEATER_USES_MAX6675 - #define HEATERSOURCE 3 + +#if defined BED_USES_THERMISTOR +#define temp2analogBed( c ) temp2analog_thermistor((c),bedtemptable,BNUMTEMPS) +#define analog2tempBed( c ) analog2temp_thermistor((c),bedtemptable,BNUMTEMPS) +#elif defined BED_USES_AD595 +#define temp2analogBed( c ) temp2analog_ad595(c) +#define analog2tempBed( c ) analog2temp_ad595(c) +#elif defined BED_USES_MAX6675 +#define temp2analogBed( c ) temp2analog_max6675(c) +#define analog2tempBed( c ) analog2temp_max6675(c) #endif -#ifdef BED_USES_THERMISTOR - #define BEDSOURCE 1 + +#if defined (HEATER_USES_THERMISTOR) || defined (BED_USES_THERMISTOR) +int temp2analog_thermistor(int celsius, const short table[][2], int numtemps); +int analog2temp_thermistor(int raw,const short table[][2], int numtemps); #endif -#ifdef BED_USES_AD595 - #define BEDSOURCE 2 + +#if defined (HEATER_USES_AD595) || defined (BED_USES_AD595) +int temp2analog_ad595(int celsius); +int analog2temp_ad595(int raw); #endif -#ifdef BED_USES_MAX6675 - #define BEDSOURCE 3 + +#if defined (HEATER_USES_MAX6675) || defined (BED_USES_MAX6675) +int temp2analog_max6675(int celsius); +int analog2temp_max6675(int raw); #endif -#define temp2analogh( c ) temp2analogu((c),temptable,NUMTEMPS,HEATERSOURCE) -#define temp2analogBed( c ) temp2analogu((c),bedtemptable,BNUMTEMPS,BEDSOURCE) -#define analog2temp( c ) analog2tempu((c),temptable,NUMTEMPS,HEATERSOURCE) -#define analog2tempBed( c ) analog2tempu((c),bedtemptable,BNUMTEMPS,BEDSOURCE) #if X_ENABLE_PIN > -1 #define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON) #define disable_x() WRITE(X_ENABLE_PIN,!X_ENABLE_ON) |