diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp index 8a7e63e51..67cf1eb80 100644 --- a/Firmware/Dcodes.cpp +++ b/Firmware/Dcodes.cpp @@ -194,8 +194,6 @@ extern float axis_steps_per_unit[NUM_AXIS]; #endif //0 #define LOG(args...) -extern uint8_t fsensor_log; - /*! * ### D-1 - Endless Loop D-1: Endless Loop @@ -845,11 +843,13 @@ void dcode_9125() pat9125_y = (int)code_value(); LOG("pat9125_y=%d\n", pat9125_y); } +#ifdef DEBUG_FSENSOR_LOG if (code_seen('L')) { fsensor_log = (int)code_value(); LOG("fsensor_log=%d\n", fsensor_log); } +#endif //DEBUG_FSENSOR_LOG } #endif //PAT9125 diff --git a/Firmware/fsensor.cpp b/Firmware/fsensor.cpp index cfb378edf..219ab4f85 100755 --- a/Firmware/fsensor.cpp +++ b/Firmware/fsensor.cpp @@ -69,8 +69,10 @@ unsigned long fsensor_softfail_last = 0; uint8_t fsensor_softfail_ccnt = 0; #endif +#ifdef DEBUG_FSENSOR_LOG //! log flag: 0=log disabled, 1=log enabled uint8_t fsensor_log = 1; +#endif //DEBUG_FSENSOR_LOG //! @name filament autoload variables diff --git a/Firmware/fsensor.h b/Firmware/fsensor.h index 19f968128..4949381b4 100755 --- a/Firmware/fsensor.h +++ b/Firmware/fsensor.h @@ -72,6 +72,9 @@ extern bool fsensor_oq_result(void); //! @{ extern void fsensor_st_block_chunk(int cnt); +// debugging +extern uint8_t fsensor_log; + // There's really nothing to do in block_begin: the stepper ISR likely has // called us already at the end of the last block, making this integration // redundant. LA1.5 might not always do that during a coasting move, so attempt