소스 검색

FS: Detect runout earlier

Yuri D'Elia 5 년 전
부모
커밋
e8ce5e140e
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 5
      Firmware/fsensor.cpp

+ 2 - 5
Firmware/fsensor.cpp

@@ -19,7 +19,7 @@
 //! @name Basic parameters
 //! @{
 #define FSENSOR_CHUNK_LEN    0.64F  //!< filament sensor chunk length 0.64mm
-#define FSENSOR_ERR_MAX         17  //!< filament sensor maximum error count for runout detection
+#define FSENSOR_ERR_MAX          9  //!< filament sensor maximum error count for runout detection
 //! @}
 
 //! @name Optical quality measurement parameters
@@ -453,10 +453,7 @@ ISR(FSENSOR_INT_PIN_VECT)
 		{
 			if (pat9125_y < 0)
 			{
-				if (fsensor_err_cnt)
-					fsensor_err_cnt += 2;
-				else
-					fsensor_err_cnt++;
+                fsensor_err_cnt++;
 			}
 			else if (pat9125_y > 0)
 			{