diff --git a/Makefile-ARM b/Makefile-ARM index a36f6bd..9703c88 100644 --- a/Makefile-ARM +++ b/Makefile-ARM @@ -100,10 +100,10 @@ TARGET = $(PROGRAM).hex SOURCES = mendel.c cpu.c serial.c sermsg.c sersendf.c delay.c SOURCES += gcode_parse.c gcode_process.c pinio.c timer.c clock.c SOURCES += dda_queue.c dda_maths.c dda_kinematics.c dda.c dda_lookahead.c -SOURCES += analog.c +SOURCES += analog.c temp.c # Sources left: # home.c crc.c intercom.c debug.c spi.c usb_serial.c -# graycode.c pff.c temp.c watchdog.c heater.c pff_diskio.c +# graycode.c pff.c watchdog.c heater.c pff_diskio.c ifeq ($(MCU), lpc1114) SOURCES += cmsis-system_lpc11xx.c diff --git a/clock.c b/clock.c index e003ec7..61f92fd 100644 --- a/clock.c +++ b/clock.c @@ -118,9 +118,7 @@ static void clock_10ms(void) { // reset watchdog wd_reset(); - #ifndef __ARMEL_NOTYET__ temp_sensor_tick(); - #endif /* __ARMEL_NOTYET__ */ ifclock(clock_flag_250ms) { clock_250ms(); diff --git a/dda_queue.c b/dda_queue.c index 9cb8b9d..9dae2c5 100644 --- a/dda_queue.c +++ b/dda_queue.c @@ -81,7 +81,6 @@ void queue_step() { if (current_movebuffer->live) { if (current_movebuffer->waitfor_temp) { timer_set(HEATER_WAIT_TIMEOUT, 0); - #ifndef __ARMEL_NOTYET__ if (temp_achieved()) { current_movebuffer->live = current_movebuffer->done = 0; serial_writestr_P(PSTR("Temp achieved\n")); @@ -89,7 +88,6 @@ void queue_step() { else { temp_print(TEMP_SENSOR_none); } - #endif /* __ARMEL_NOTYET__ */ } else { dda_step(current_movebuffer); diff --git a/gcode_process.c b/gcode_process.c index da46b89..d2e3fb3 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -346,9 +346,7 @@ void process_gcode_command() { } } else if (next_target.seen_M) { - #ifndef __ARMEL_NOTYET__ uint8_t i; - #endif /* __ARMEL_NOTYET__ */ switch (next_target.M) { case 0: @@ -369,10 +367,8 @@ void process_gcode_command() { //? http://linuxcnc.org/handbook/RS274NGC_3/RS274NGC_33a.html#1002379 //? queue_wait(); - #ifndef __ARMEL_NOTYET__ for (i = 0; i < NUM_HEATERS; i++) temp_set(i, 0); - #endif /* __ARMEL_NOTYET__ */ power_off(); serial_writestr_P(PSTR("\nstop\n")); break; @@ -466,10 +462,10 @@ void process_gcode_command() { //? --- M101: extruder on --- //? //? Undocumented. - #ifndef __ARMEL_NOTYET__ if (temp_achieved() == 0) { enqueue(NULL); } + #ifndef __ARMEL_NOTYET__ #ifdef DC_EXTRUDER heater_set(DC_EXTRUDER, DC_EXTRUDER_PWM); #endif @@ -505,7 +501,6 @@ void process_gcode_command() { //? if ( ! next_target.seen_S) break; - #ifndef __ARMEL_NOTYET__ if ( ! next_target.seen_P) #ifdef HEATER_EXTRUDER next_target.P = HEATER_EXTRUDER; @@ -513,7 +508,6 @@ void process_gcode_command() { next_target.P = 0; #endif temp_set(next_target.P, next_target.S); - #endif /* __ARMEL_NOTYET__ */ break; case 105: @@ -533,11 +527,9 @@ void process_gcode_command() { #ifdef ENFORCE_ORDER queue_wait(); #endif - #ifndef __ARMEL_NOTYET__ if ( ! next_target.seen_P) next_target.P = TEMP_SENSOR_none; temp_print(next_target.P); - #endif /* __ARMEL_NOTYET__ */ break; case 7: @@ -820,9 +812,7 @@ void process_gcode_command() { #ifdef HEATER_BED if ( ! next_target.seen_S) break; - #ifndef __ARMEL_NOTYET__ temp_set(HEATER_BED, next_target.S); - #endif /* __ARMEL_NOTYET__ */ #endif break; diff --git a/mendel.c b/mendel.c index 60f77c0..c05eb47 100644 --- a/mendel.c +++ b/mendel.c @@ -34,8 +34,8 @@ #include "dda_queue.h" #include "gcode_parse.h" #include "timer.h" -#ifndef __ARMEL_NOTYET__ #include "temp.h" +#ifndef __ARMEL_NOTYET__ #include "watchdog.h" #include "debug.h" #include "heater.h" @@ -109,10 +109,10 @@ void init(void) { // if any of the temp sensors in your config.h use analog interface analog_init(); - #ifndef __ARMEL_NOTYET__ // set up temperature inputs temp_init(); + #ifndef __ARMEL_NOTYET__ #ifdef SD sd_init(); #endif diff --git a/temp.c b/temp.c index 7a1429e..e781897 100644 --- a/temp.c +++ b/temp.c @@ -297,7 +297,9 @@ void temp_sensor_tick() { } if (temp_sensors[i].heater < NUM_HEATERS) { + #ifndef __ARMEL_NOTYET__ heater_tick(temp_sensors[i].heater, temp_sensors[i].temp_type, temp_sensors_runtime[i].last_read_temp, temp_sensors_runtime[i].target_temp); + #endif /* __ARMEL_NOTYET__ */ } if (DEBUG_PID && (debug_flags & DEBUG_PID))