Skip to content

Commit

Permalink
Fix for no longer being able to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
effgarces committed Nov 25, 2020
1 parent e9de4af commit 19c518c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 69 deletions.
51 changes: 0 additions & 51 deletions Marlin/src/gcode/gcode_d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@

#include "gcode.h"
#include "../module/settings.h"
<<<<<<< HEAD
#include "../libs/hex_print.h"
#include "../HAL/shared/eeprom_if.h"
=======
#include "../module/temperature.h"
#include "../libs/hex_print.h"
#include "../HAL/shared/eeprom_if.h"
#include "../HAL/shared/Delay.h"
>>>>>>> upstream/2.0.x

/**
* Dn: G-code for development and testing
Expand Down Expand Up @@ -91,42 +86,6 @@
}
} break;

<<<<<<< HEAD
case 3: { // D3 Read / Write EEPROM
uint8_t *pointer = parser.hex_adr_val('A');
uint16_t len = parser.ushortval('C', 1);
uintptr_t addr = (uintptr_t)pointer;
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
#endif
NOMORE(addr, (size_t)(MARLIN_EEPROM_SIZE - 1));
NOMORE(len, MARLIN_EEPROM_SIZE - addr);
if (parser.seenval('X')) {
uint16_t val = parser.hex_val('X');
#if ENABLED(EEPROM_SETTINGS)
persistentStore.access_start();
while(len--) {
int pos = 0;
persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val));
}
SERIAL_EOL();
persistentStore.access_finish();
#else
SERIAL_ECHOLN("NO EEPROM");
#endif
}
else {
while (len--) {
// Read bytes from EEPROM
#if ENABLED(EEPROM_SETTINGS)
persistentStore.access_start();
uint8_t val;
while(len--) {
int pos = 0;
if (!persistentStore.read_data(pos, (uint8_t *)&val, sizeof(val))) {
print_hex_byte(val);
}
=======
#if ENABLED(EEPROM_SETTINGS)
case 3: { // D3 Read / Write EEPROM
uint8_t *pointer = parser.hex_adr_val('A');
Expand All @@ -144,19 +103,13 @@
while(len--) {
int pos = 0;
persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val));
>>>>>>> upstream/2.0.x
}
SERIAL_EOL();
persistentStore.access_finish();
#else
SERIAL_ECHOLN("NO EEPROM");
#endif
}
<<<<<<< HEAD
SERIAL_EOL();
}
} break;
=======
else {
while (len--) {
// Read bytes from EEPROM
Expand All @@ -179,7 +132,6 @@
}
} break;
#endif
>>>>>>> upstream/2.0.x

case 4: { // D4 Read / Write PIN
// const uint8_t pin = parser.byteval('P');
Expand Down Expand Up @@ -219,8 +171,6 @@
SERIAL_EOL();
}
} break;
<<<<<<< HEAD
=======

case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test)
SERIAL_ECHOLN("Disabling heaters and attempting to trigger Watchdog");
Expand All @@ -235,7 +185,6 @@
ENABLE_ISRS();
SERIAL_ECHOLN("FAILURE: Watchdog did not trigger board reset.");
}
>>>>>>> upstream/2.0.x
}
}

Expand Down
15 changes: 0 additions & 15 deletions Marlin/src/lcd/menu/menu_probe_offset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,12 @@
float z_offset_backup, calculated_z_offset;

TERN_(HAS_LEVELING, bool leveling_was_active);
<<<<<<< HEAD
TERN_(HAS_SOFTWARE_ENDSTOPS, bool store_soft_endstops_enabled);
=======
>>>>>>> upstream/2.0.x

void prepare_for_calibration() {
z_offset_backup = probe.offset.z;

// Disable soft endstops for free Z movement
<<<<<<< HEAD
#if HAS_SOFTWARE_ENDSTOPS
store_soft_endstops_enabled = soft_endstops_enabled;
soft_endstops_enabled = false;
#endif
=======
SET_SOFT_ENDSTOP_LOOSE(true);
>>>>>>> upstream/2.0.x

// Disable leveling for raw planner motion
#if HAS_LEVELING
Expand All @@ -75,11 +64,7 @@ void prepare_for_calibration() {

void set_offset_and_go_back(const float &z) {
probe.offset.z = z;
<<<<<<< HEAD
TERN_(HAS_SOFTWARE_ENDSTOPS, soft_endstops_enabled = store_soft_endstops_enabled);
=======
SET_SOFT_ENDSTOP_LOOSE(false);
>>>>>>> upstream/2.0.x
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
ui.goto_previous_screen_no_defer();
}
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,6 @@ uint32_t Stepper::block_phase_isr() {
interval = LA_isr_rate;
}
else if (step_events_completed < decelerate_after && LA_current_adv_steps < LA_max_adv_steps) {
//step_events_completed <= (uint32_t)accelerate_until) {
LA_steps++;
LA_current_adv_steps++;
interval = LA_isr_rate;
Expand All @@ -2272,6 +2271,8 @@ uint32_t Stepper::block_phase_isr() {
else
interval = LA_ADV_NEVER;

if (!LA_steps) return interval; // Leave pins alone if there are no steps!

DIR_WAIT_BEFORE();

#if ENABLED(MIXING_EXTRUDER)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1668,12 +1668,12 @@ void Temperature::updateTemperaturesFromRawValues() {
#endif
#define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0)
#if EXTRUDER_AUTO_FAN_SPEED != 255
#define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0)
#define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
#else
#define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P)
#endif
#if CHAMBER_AUTO_FAN_SPEED != 255
#define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0)
#define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
#else
#define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P)
#endif
Expand Down

0 comments on commit 19c518c

Please sign in to comment.