Added #ifdef BARICUDA around the BariCUDA changes

This commit is contained in:
Erik van der Zalm
2013-05-14 23:56:32 +02:00
parent 37f3199df3
commit bd2cd4903e
6 changed files with 53 additions and 32 deletions

View File

@ -439,18 +439,22 @@ void check_axes_activity()
unsigned char z_active = 0;
unsigned char e_active = 0;
unsigned char tail_fan_speed = fanSpeed;
#ifdef BARICUDA
unsigned char valve_pressure = 0;
unsigned char e_to_p_pressure = 0;
unsigned char tail_valve_pressure = 0;
unsigned char tail_e_to_p_pressure = 0;
#endif
block_t *block;
if(block_buffer_tail != block_buffer_head)
{
uint8_t block_index = block_buffer_tail;
tail_fan_speed = block_buffer[block_index].fan_speed;
#ifdef BARICUDA
tail_valve_pressure = block_buffer[block_index].valve_pressure;
tail_e_to_p_pressure = block_buffer[block_index].e_to_p_pressure;
#endif
while(block_index != block_buffer_head)
{
block = &block_buffer[block_index];
@ -493,7 +497,8 @@ void check_axes_activity()
getHighESpeed();
#endif
#if HEATER_1_PIN > -1
#ifdef BARICUDA
#if HEATER_1_PIN > -1
if (ValvePressure != 0){
analogWrite(HEATER_1_PIN,ValvePressure); // If buffer is empty use current valve pressure
}
@ -505,9 +510,9 @@ void check_axes_activity()
if (ValvePressure != 0 && tail_valve_pressure !=0) {
analogWrite(HEATER_1_PIN,tail_valve_pressure);
}
#endif
#endif
#if HEATER_2_PIN > -1
#if HEATER_2_PIN > -1
if (EtoPPressure != 0){
analogWrite(HEATER_2_PIN,EtoPPressure); // If buffer is empty use current EtoP pressure
}
@ -519,6 +524,7 @@ void check_axes_activity()
if (EtoPPressure != 0 && tail_e_to_p_pressure !=0) {
analogWrite(HEATER_2_PIN,tail_e_to_p_pressure);
}
#endif
#endif
}
@ -593,8 +599,10 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
}
block->fan_speed = fanSpeed;
#ifdef BARICUDA
block->valve_pressure = ValvePressure;
block->e_to_p_pressure = EtoPPressure;
#endif
// Compute direction bits for this block
block->direction_bits = 0;