Commit Graph

14 Commits

Author SHA1 Message Date
Alex Voinea
6ce7792045 Remove "hh" in fmt where it makes no difference 2022-02-02 20:58:21 +01:00
Yuri D'Elia
051f03119b Fix misleading indentation warnings by expanding tabs 2021-06-21 06:52:52 +02:00
Yuri D'Elia
df824414ef Fix probing in IR_SENSOR 2020-09-28 21:02:06 +02:00
Yuri D'Elia
c2e8d229a7 Be more compliant in the I2C protocol
- Enter a repeated-start for reading data
- Write in the same session
2020-09-28 20:21:07 +02:00
Yuri D'Elia
30e7b777e0 Error-out with PAT9125_SWSPI (not fully implemented)
.. and likely will never was/be.
2020-08-20 22:13:13 +02:00
Yuri D'Elia
7f425120f0 Strip down the TWI code
- Only implement a single syncronous read/write function to read a byte,
  since that's all we need currently
- Implement a compact IR_SENSOR probe for PAT9125
- Saves 242 bytes compared to PAT9125_SWI2C
2020-08-20 22:13:04 +02:00
Yuri D'Elia
240dc1132e Include initial implementation based on Arduino's twi 2020-08-20 15:34:46 +02:00
Yuri D'Elia
502bc8c72d Isolate more pat9125 code
Remove probing from Marlin_main and move it into pat9125_probe so that
it can support the various variants.
2020-08-20 15:34:46 +02:00
Yuri D'Elia
853bb79b6b Return correct status from pat9125_update_bs 2020-02-06 16:39:08 +01:00
Yuri D'Elia
3be859ece9 FS: Improve reliability on speeds with poor optical tracking
Depending on the filament surface and moving speed, the PAT9125 sensor
can stop being able to track movement.

In such cases, instead of triggering false errors and/or relying on
previous states, read and use the exposure data off the sensor and
increase error counts only for poorly exposed images instead, which
is a good indicator of a far-away (or missing!) tracking surface.
2020-02-06 15:27:22 +01:00
Yuri D'Elia
cdc17e8da1 Read all 12 bits correctly from PAT9125 DELTA_* registers
Widen ucXL/ucYL/ucXYH types to 16 bits, since the following shifts
will otherwise truncate the results.
2020-02-06 14:39:04 +01:00
Marek Bel
e77a54034c Fix compiler warning arduino-1.6.9/hardware/tools/avr/avr/include/avr/delay.h:36:2: warning: #warning "This file has been moved to <util/delay.h>." [-Wcpp] 2018-07-23 18:12:08 +02:00
Robert Pelnar
60b4db15e0 FSensor - M600 fix + cond. translation + tunning filter and params 2018-07-22 16:14:13 +02:00
Robert Pelnar
b35a212d15 PAT9125 optimalization (rewrited to C, 8bit sampling) 2018-07-12 18:11:07 +02:00