Hide tmc2130_sg_change behind DEBUG_CRASHDET_COUNTERS
tmc2130_sg_change is only used for debugging purposes. Hide definition and usage behind the required define.
This commit is contained in:
parent
6a61c26955
commit
3276320a06
1 changed files with 6 additions and 1 deletions
|
@ -68,8 +68,9 @@ uint8_t tmc2130_sg_diag_mask = 0x00;
|
|||
uint8_t tmc2130_sg_crash = 0;
|
||||
uint16_t tmc2130_sg_err[4] = {0, 0, 0, 0};
|
||||
uint16_t tmc2130_sg_cnt[4] = {0, 0, 0, 0};
|
||||
#ifdef DEBUG_CRASHDET_COUNTERS
|
||||
bool tmc2130_sg_change = false;
|
||||
|
||||
#endif
|
||||
|
||||
bool skip_debug_msg = false;
|
||||
|
||||
|
@ -255,7 +256,9 @@ void tmc2130_st_isr()
|
|||
if (tmc2130_sg_cnt[axis] < tmc2130_sg_err[axis])
|
||||
{
|
||||
tmc2130_sg_cnt[axis] = tmc2130_sg_err[axis];
|
||||
#ifdef DEBUG_CRASHDET_COUNTERS
|
||||
tmc2130_sg_change = true;
|
||||
#endif
|
||||
uint8_t sg_thr = 64;
|
||||
// if (axis == Y_AXIS) sg_thr = 64;
|
||||
if (tmc2130_sg_err[axis] >= sg_thr)
|
||||
|
@ -409,7 +412,9 @@ void tmc2130_check_overtemp()
|
|||
|
||||
}
|
||||
checktime = _millis();
|
||||
#ifdef DEBUG_CRASHDET_COUNTERS
|
||||
tmc2130_sg_change = true;
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG_CRASHDET_COUNTERS
|
||||
if (tmc2130_sg_change)
|
||||
|
|
Loading…
Reference in a new issue