Skip to content

Commit

Permalink
Merge pull request #4739 from gudnimg/prune-disabled-code
Browse files Browse the repository at this point in the history
Remove a bit of unused code which is disabled at compile time
  • Loading branch information
gudnimg committed Aug 3, 2024
2 parents 23f92b2 + 04a7175 commit ff16bfd
Show file tree
Hide file tree
Showing 18 changed files with 6 additions and 1,215 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ set(FW_SOURCES
SdFatUtil.cpp
SdFile.cpp
SdVolume.cpp
Servo.cpp
sm4.c
sound.cpp
speed_lookuptable.cpp
Expand Down
21 changes: 0 additions & 21 deletions Firmware/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.

// #define PROBE_SERVO_DEACTIVATION_DELAY 300


//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!

Expand Down Expand Up @@ -489,20 +482,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
//define BlinkM/CyzRgb Support
//#define BLINKM

/*********************************************************************\
* R/C SERVO support
* Sponsored by TrinityLabs, Reworked by codexmas
**********************************************************************/

// Number of servos
//
// If you select a configuration below, this will receive a default value and does not need to be set manually
// set it manually if you have more servos than extruders and wish to manually control some
// leaving it undefined or defining as 0 will disable the servo subsystem
// If unsure, leave commented / disabled
//
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command

#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm). Used by the volumetric extrusion.

// Try to maintain a minimum distance from the bed even when Z is
Expand Down
7 changes: 0 additions & 7 deletions Firmware/Dcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ void dcode_3()
#include <avr/wdt.h>
#include "bootapp.h"

#if 0
extern float current_temperature_pinda;
extern float axis_steps_per_mm[NUM_AXIS];


#define LOG(args...) printf(args)
#endif //0
#define LOG(args...)

/*!
Expand Down
15 changes: 0 additions & 15 deletions Firmware/Filament_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,7 @@ bool IR_sensor_analog::checkVoltage(uint16_t raw) {
puts_P(PSTR("fsensor v0.4 in fault range 4.6-5V - unconnected"));
return false;
}
/// newer IR sensor cannot normally produce 0-0.3V, this is considered a failure
#if 0 // Disabled as it has to be decided if we gonna use this or not.
if(IRsensor_Hopen_TRESHOLD <= raw && raw <= IRsensor_VMax_TRESHOLD) {
puts_P(PSTR("fsensor v0.4 in fault range 0.0-0.3V - wrong IR sensor"));
return false;
}
#endif
}
/// If IR sensor is "uknown state" and filament is not loaded > 1.5V return false
#if 0
#error "I really think this code can't be enabled anymore because we are constantly checking this voltage."
if((sensorRevision == SensorRevision::_Undef) && (raw > IRsensor_Lmax_TRESHOLD)) {
puts_P(PSTR("Unknown IR sensor version and no filament loaded detected."));
return false;
}
#endif
// otherwise the IR fsensor is considered working correctly
return true;
}
Expand Down
3 changes: 0 additions & 3 deletions Firmware/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,6 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
void bed_check(float x_dimension, float y_dimension, int x_points_num, int y_points_num, float shift_x, float shift_y);
#endif //HEATBED_ANALYSIS
float temp_comp_interpolation(float temperature);
#if 0
void show_fw_version_warnings();
#endif
uint8_t check_printer_version();

#ifdef PINDA_THERMISTOR
Expand Down
Loading

0 comments on commit ff16bfd

Please sign in to comment.