mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-02-08 01:01:06 -07:00
ldc1612: ignore amplitude errors during homing
Amplitude errors are useful but often too aggressive. On some sensors, it is not possible to avoid them completely. Make them non-critical for homing. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
f7ddb40037
commit
c6c7614972
1 changed files with 4 additions and 0 deletions
|
|
@ -131,8 +131,12 @@ cancel_homing(struct ldc1612 *ld, int error_code)
|
|||
trsync_do_trigger(ld->ts, ld->error_reason + error_code);
|
||||
}
|
||||
|
||||
#define DATA_ERROR_AMPLITUDE (1L << 28)
|
||||
|
||||
static int
|
||||
check_data_bits(struct ldc1612 *ld, uint32_t raw_data) {
|
||||
// Ignore amplitude errors
|
||||
raw_data &= ~DATA_ERROR_AMPLITUDE;
|
||||
if (raw_data < 0x0fffffff)
|
||||
return 0;
|
||||
cancel_homing(ld, SE_SENSOR_ERROR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue