Commit 48e3fab2 authored by MagoKimbra's avatar MagoKimbra

Fix

parent bf4cc461
......@@ -285,6 +285,7 @@
**************************** Fan configuration ***************************
**************************************************************************/
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
// Only 8 bit boards
//#define FAST_PWM_FAN
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
......
......@@ -2172,7 +2172,7 @@
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#define RADDS
......@@ -2229,16 +2229,16 @@
#define KILL_PIN -1
#define ORIG_HEATER_BED_PIN 7 // BED
#define ORIG_HEATER_BED_PIN 7 // BED
#define ORIG_HEATER_0_PIN 13
#define ORIG_HEATER_1_PIN 12
#define ORIG_HEATER_2_PIN 11
#define ORIG_TEMP_BED_PIN 4 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN -1 // 1 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // 2 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // 3 // ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 4 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 3 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 5
......@@ -2286,11 +2286,6 @@
#define BTN_EN2 52
#define BTN_ENC 48
#if UI_VOLTAGE_LEVEL != 1
#undef UI_VOLTAGE_LEVEL
#define UI_VOLTAGE_LEVEL 1
#endif
#elif ENABLED(SSD1306_OLED_I2C_CONTROLLER)
#define BTN_EN1 50
#define BTN_EN2 52
......@@ -2328,6 +2323,10 @@
#if MB(RAMPS_FD_V1) || MB(RAMPS_FD_V2)
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#if MB(RAMPS_FD_V1)
#define RAMPS_FD_V1
#define INVERTED_HEATER_PINS
......@@ -2385,27 +2384,27 @@
#define KILL_PIN -1
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_HEATER_0_PIN 9
#define ORIG_HEATER_1_PIN 10
#define ORIG_HEATER_2_PIN 11
#define ORIG_TEMP_BED_PIN 7 // ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 6 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 5 // 2 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 4 // 3 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 3 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 3 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 4 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#define SERVO0_PIN 7
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#define SERVO3_PIN 3
#endif
#endif
#endif
......@@ -2449,6 +2448,10 @@
#if MB(SMART_RAMPS)
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
......@@ -2471,9 +2474,9 @@
#define ORIG_HEATER_1_PIN 9
#define ORIG_HEATER_BED_PIN 8
#define ORIG_TEMP_0_PIN 9 // Due analog pin #
#define ORIG_TEMP_1_PIN 8 // Due analog pin #
#define ORIG_TEMP_BED_PIN 10 // Due analog pin #
#define ORIG_TEMP_0_PIN 9 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 10 // ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 11 // ANALOG NUMBERING
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
......
......@@ -177,6 +177,12 @@
::pinMode(pin,mode);
}
static inline void delayMicroseconds(unsigned int delayUs) {
::delayMicroseconds(delayUs);
}
static inline void delayMilliseconds(unsigned int delayMs) {
::delay(delayMs);
}
static inline unsigned long timeInMilliseconds() {
return millis();
}
......
......@@ -344,7 +344,7 @@ bool setTargetedExtruder(int code);
ECHO_V(n);
else
ECHO_V( (char) ('A'+n-10) );
delay(2);
HAL::delayMilliseconds(2);
}
void prt_hex_byte(unsigned int b) {
......@@ -4945,12 +4945,12 @@ inline void gcode_M92() {
for(i = 0; i < 16; i++) { // and 16 data bytes
prt_hex_byte( *(ptr+i));
ECHO_M(" ");
delay(2);
HAL::delayMilliseconds(2);
}
ECHO_M("|"); // now show where non 0xE5's are
for(i = 0; i < 16; i++) {
delay(2);
HAL::delayMilliseconds(2);
if ( *(ptr+i)==0xe5)
ECHO_M(" ");
else
......@@ -4959,7 +4959,7 @@ inline void gcode_M92() {
ECHO_M("\n");
ptr += 16;
delay(2);
HAL::delayMilliseconds(2);
}
ECHO_M("Done.\n");
return;
......@@ -5815,16 +5815,16 @@ inline void gcode_M226() {
const float PULSE_LENGTH = 0.01524;
for (int i = 0; i < NUM_PULSES; i++) {
WRITE(PHOTOGRAPH_PIN, HIGH);
_delay_ms(PULSE_LENGTH);
HAL::delayMilliseconds(PULSE_LENGTH);
WRITE(PHOTOGRAPH_PIN, LOW);
_delay_ms(PULSE_LENGTH);
HAL::delayMilliseconds(PULSE_LENGTH);
}
delay(7.33);
HAL::delayMilliseconds(7.33);
for (int i = 0; i < NUM_PULSES; i++) {
WRITE(PHOTOGRAPH_PIN, HIGH);
_delay_ms(PULSE_LENGTH);
HAL::delayMilliseconds(PULSE_LENGTH);
WRITE(PHOTOGRAPH_PIN, LOW);
_delay_ms(PULSE_LENGTH);
HAL::delayMilliseconds(PULSE_LENGTH);
}
#endif // HASNT(CHDK) && HAS(PHOTOGRAPH)
}
......@@ -8513,7 +8513,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
if (Spool_must_read[e]) {
if (RFID522.getID(e)) {
Spool_ID[e] = RFID522.RfidDataID[e].Spool_ID;
delay(200);
HAL::delayMilliseconds(200);
if (RFID522.readBlock(e)) {
Spool_must_read[e] = false;
density_multiplier[e] = RFID522.RfidData[e].data.density;
......@@ -8527,7 +8527,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
if (Spool_must_write[e]) {
if (RFID522.getID(e)) {
if (Spool_ID[e] == RFID522.RfidDataID[e].Spool_ID) {
delay(200);
HAL::delayMilliseconds(200);
if (RFID522.writeBlock(e)) {
Spool_must_write[e] = false;
ECHO_SMV(INFO, "Spool on E", e);
......@@ -8584,7 +8584,7 @@ void kill(const char* lcd_msg) {
// FMC small patch to update the LCD before ending
sei(); // enable interrupts
for (int i = 5; i--; lcd_update()) delay(200); // Wait a short time
for (int i = 5; i--; lcd_update()) HAL::delayMilliseconds(200); // Wait a short time
cli(); // disable interrupts
#if HAS(SUICIDE)
suicide();
......
......@@ -17,7 +17,7 @@
#define RESUME "//action:resume" // command for host that support action
#define DISCONNECT "//action:disconnect" // command for host that support action
#define SERIAL_INIT(baud) MKSERIAL.begin(baud), delay(1)
#define SERIAL_INIT(baud) MKSERIAL.begin(baud), HAL::delayMilliseconds(1)
#define SERIAL_WRITE(x) MKSERIAL.write(x)
#define SERIAL_PRINT(msg, args...) MKSERIAL.print(msg, ##args)
#define SERIAL_ENDL MKSERIAL.println()
......
......@@ -229,6 +229,18 @@
#include "../Pins.h"
/**
* SAM3X8E
*/
#ifdef __SAM3X8E__
#ifdef FAST_PWM_FAN
#undef FAST_PWM_FAN
#endif
#ifdef M100_FREE_MEMORY_WATCHER
#undef M100_FREE_MEMORY_WATCHER
#endif
#endif
/**
* DONDOLO
*/
......
......@@ -17,7 +17,7 @@
#define WELCOME_MSG MACHINE_NAME " ready."
#define MSG_SD "SD"
#define MSG_SD_INSERTED "\xb6\xb0\xc4\xde\x20\xbf\xb3\xc6\xad\xb3\xbb\xda\xcf\xbc\xc0" // "Card inserted"
#define MSG_SD_REMOVED "\xb6\xb0\xc4\xde\xb6xde\xb1\xd8\xcf\xbe\xdd" // "Card removed"
#define MSG_SD_REMOVED "\xb6\xb0\xc4\xde\xb6\xde\xb1\xd8\xcf\xbe\xdd" // "Card removed"
#define MSG_MAIN "\xd2\xb2\xdd" // "Main"
#define MSG_AUTOSTART "\xbc\xde\xc4\xde\xb3\xb6\xb2\xbc" // "Autostart"
#define MSG_DISABLE_STEPPERS "\xd3\xb0\xc0\xb0\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc" // "Disable steppers"
......@@ -36,23 +36,23 @@
#define MSG_ONFOR "On x:"
#define MSG_PWRCONSUMED "P.er:"
#define MSG_FILCONSUMED "F:"
#define MSG_PREHEAT "Preheat"
#define MSG_PREHEAT_PLA "PLA \xd6\xc8\xc2"
#define MSG_PREHEAT "\xd6\xc8\xc2" // "Preheat"
#define MSG_PREHEAT_PLA "PLA \xd6\xc8\xc2" // "Preheat PLA"
#define MSG_PREHEAT_PLA_ALL MSG_PREHEAT_PLA " \xbd\xcd\xde\xc3" // " All"
#define MSG_PREHEAT_PLA_BEDONLY MSG_PREHEAT_PLA " \xcd\xde\xaf\xc4\xde" // "Bed"
#define MSG_PREHEAT_PLA_SETTINGS MSG_PREHEAT_PLA " \xbe\xaf\xc3\xb2" // "conf"
#define MSG_PREHEAT_ABS "ABS \xd6\xc8\xc2"
#define MSG_PREHEAT_ABS "ABS \xd6\xc8\xc2" // "Preheat ABS"
#define MSG_PREHEAT_ABS_ALL MSG_PREHEAT_ABS " \xbd\xcd\xde\xc3" // " All"
#define MSG_PREHEAT_ABS_BEDONLY MSG_PREHEAT_ABS " \xcd\xde\xaf\xc4\xde" // "Bed"
#define MSG_PREHEAT_ABS_SETTINGS MSG_PREHEAT_ABS " \xbe\xaf\xc3\xb2" // "conf"
#define MSG_PREHEAT_GUM "Preheat GUM"
#define MSG_PREHEAT_GUM_ALL "Preheat GUM All"
#define MSG_PREHEAT_GUM_BEDONLY "Preheat GUM Bed"
#define MSG_PREHEAT_GUM_SETTINGS "Preheat GUM conf"
#define MSG_PREHEAT_GUM "GUM \xd6\xc8\xc2" // "Preheat GUM"
#define MSG_PREHEAT_GUM_ALL MSG_PREHEAT_GUM " \xbd\xcd\xde\xc3" // " All"
#define MSG_PREHEAT_GUM_BEDONLY MSG_PREHEAT_GUM " \xcd\xde\xaf\xc4\xde" // "Bed"
#define MSG_PREHEAT_GUM_SETTINGS MSG_PREHEAT_GUM " \xbe\xaf\xc3\xb2" // "conf"
#define MSG_TOO_COLD_FOR_FILAMENTCHANGE "Hotend too cold to change filament"
#define MSG_COOLDOWN "\xb6\xc8\xc2\xc3\xb2\xbc" // "Cooldown"
#define MSG_SWITCH_PS_ON "\xc3\xde\xdd\xb9\xdd\xde\x20\xb5\xdd" // "Switch power on"
#define MSG_SWITCH_PS_OFF "\xc3\xde\xdd\xb9\xdd\xde\x20\xb5\xcc" // "Switch power off"
#define MSG_SWITCH_PS_ON "\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xdd" // "Switch power on"
#define MSG_SWITCH_PS_OFF "\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc" // "Switch power off"
#define MSG_EXTRUDE "\xb5\xbc\xc0\xde\xbc" // "Extrude"
#define MSG_RETRACT "\xd8\xc4\xd7\xb8\xc4" // "Retract"
#define MSG_PURGE "Purge"
......@@ -87,7 +87,7 @@
#define MSG_Y "Y"
#define MSG_Z "Z"
#define MSG_E "E"
#define MSG_MOVE "Move"
#define MSG_MOVE "\xb2\xc4\xde\xb3" // "Move"
#define MSG_MOVE_AXIS "\xbc\xde\xb8\xb2\xc4\xde\xb3" // "Move axis"
#define MSG_MOVE_X "X\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Move X"
#define MSG_MOVE_Y "Y\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Move Y"
......@@ -115,7 +115,7 @@
#define MSG_FILAMENT_SIZE_EXTRUDER "Fil. Dia."
#define MSG_CONTRAST "LCD\xba\xdd\xc4\xd7\xbd\xc4" // "LCD contrast"
#define MSG_STORE_EPROM "\xd2\xd3\xd8\xcd\xb6\xb8\xc9\xb3" // "Store memory"
#define MSG_LOAD_EPROM "\xd2\xd3\xd8\xb6\xd7\xd6\xd0\ba\xd0" // "Load memory"
#define MSG_LOAD_EPROM "\xd2\xd3\xd8\xb6\xd7\xd6\xd0\xba\xd0" // "Load memory"
#define MSG_RESTORE_FAILSAFE "\xbe\xaf\xc3\xb2\xd8\xbe\xaf\xc4" // "Restore failsafe"
#define MSG_REFRESH "\xd8\xcc\xda\xaf\xbc\xad" // "Refresh"
#define MSG_WATCH "\xb2\xdd\xcc\xab" // "Info screen"
......@@ -147,7 +147,7 @@
#define MSG_ZPROBE_OUT "Z\xcc\xdf\xdb\xb0\xcc\xde \xcd\xde\xaf\xc4\xee\xb6\xde\xb2" // "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "\xb9\xde\xdd\xc3\xdd\xcaXY\xb2\xc4\xde\xb3\xba\xdeZ" // "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z\xb5\xcc\xbe\xaf\xc4" // "Z Offset"
#define MSG_BABYSTEP ""\xcb\xde\xc4\xde\xb3"
#define MSG_BABYSTEP "\xcb\xde\xc4\xde\xb3"
#define MSG_BABYSTEP_X MSG_BABYSTEP " " MSG_X
#define MSG_BABYSTEP_Y MSG_BABYSTEP " " MSG_Y
#define MSG_BABYSTEP_Z MSG_BABYSTEP " " MSG_Z
......
This diff is collapsed.
......@@ -230,7 +230,8 @@
#error DEPENDENCY ERROR: Missing setting THERMAL_PROTECTION_BED_HYSTERESIS
#endif
#endif
//fan
// Fan
#if DISABLED(SOFT_PWM_SCALE)
#error DEPENDENCY ERROR: Missing setting SOFT_PWM_SCALE
#endif
......@@ -259,7 +260,7 @@
#endif
#endif
//extruder
// Extruder
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
#if DISABLED(EXTRUDE_MINTEMP)
#error DEPENDENCY ERROR: Missing setting EXTRUDE_MINTEMP
......@@ -374,9 +375,6 @@
#if DISABLED(D_FILAMENT)
#error DEPENDENCY ERROR: Missing setting D_FILAMENT
#endif
#if DISABLED(STEPS_MM_E)
#error DEPENDENCY ERROR: Missing setting STEPS_MM_E
#endif
#endif
#if ENABLED(FILAMENTCHANGEENABLE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment