🎨 Update MKSPWC, some other pins (#22557)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							e62486a610
						
					
				
				
					commit
					eb0d80cb19
				
			@@ -28,9 +28,9 @@
 | 
			
		||||
#define LOGO_TIME_DELAY TERN(USE_MKS_GREEN_UI, 8000, 1500)
 | 
			
		||||
 | 
			
		||||
#if ENABLED(DGUS_MKS_RUNOUT_SENSOR)
 | 
			
		||||
  #define MT_DET_1_PIN         1
 | 
			
		||||
  #define MT_DET_2_PIN         2
 | 
			
		||||
  #define MT_DET_PIN_INVERTING false
 | 
			
		||||
  #define MT_DET_1_PIN     1
 | 
			
		||||
  #define MT_DET_2_PIN     2
 | 
			
		||||
  #define MT_DET_PIN_STATE LOW
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define MKS_FINSH
 | 
			
		||||
 
 | 
			
		||||
@@ -1495,17 +1495,17 @@ void DGUSScreenHandler::DGUS_Runout_Idle(void) {
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case UNRUNOUT_STATUS:
 | 
			
		||||
        if (READ(MT_DET_1_PIN) == LOW)
 | 
			
		||||
        if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE)
 | 
			
		||||
          runout_mks.runout_status = RUNOUT_STATUS;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case RUNOUT_BEGIN_STATUS:
 | 
			
		||||
        if (READ(MT_DET_1_PIN) == HIGH)
 | 
			
		||||
        if (READ(MT_DET_1_PIN) != MT_DET_PIN_STATE)
 | 
			
		||||
          runout_mks.runout_status = RUNOUT_WAITTING_STATUS;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case RUNOUT_WAITTING_STATUS:
 | 
			
		||||
        if (READ(MT_DET_1_PIN) == LOW)
 | 
			
		||||
        if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE)
 | 
			
		||||
          runout_mks.runout_status = RUNOUT_BEGIN_STATUS;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -163,7 +163,7 @@ void filament_check() {
 | 
			
		||||
  #endif
 | 
			
		||||
  #if PIN_EXISTS(MT_DET_1)
 | 
			
		||||
    static int fil_det_count_1 = 0;
 | 
			
		||||
    if (READ(MT_DET_1_PIN) == MT_DET_PIN_INVERTING)
 | 
			
		||||
    if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE)
 | 
			
		||||
      fil_det_count_1++;
 | 
			
		||||
    else if (fil_det_count_1 > 0)
 | 
			
		||||
      fil_det_count_1--;
 | 
			
		||||
@@ -171,7 +171,7 @@ void filament_check() {
 | 
			
		||||
 | 
			
		||||
  #if PIN_EXISTS(MT_DET_2)
 | 
			
		||||
    static int fil_det_count_2 = 0;
 | 
			
		||||
    if (READ(MT_DET_2_PIN) == MT_DET_PIN_INVERTING)
 | 
			
		||||
    if (READ(MT_DET_2_PIN) == MT_DET_PIN_STATE)
 | 
			
		||||
      fil_det_count_2++;
 | 
			
		||||
    else if (fil_det_count_2 > 0)
 | 
			
		||||
      fil_det_count_2--;
 | 
			
		||||
@@ -179,7 +179,7 @@ void filament_check() {
 | 
			
		||||
 | 
			
		||||
  #if PIN_EXISTS(MT_DET_3)
 | 
			
		||||
    static int fil_det_count_3 = 0;
 | 
			
		||||
    if (READ(MT_DET_3_PIN) == MT_DET_PIN_INVERTING)
 | 
			
		||||
    if (READ(MT_DET_3_PIN) == MT_DET_PIN_STATE)
 | 
			
		||||
      fil_det_count_3++;
 | 
			
		||||
    else if (fil_det_count_3 > 0)
 | 
			
		||||
      fil_det_count_3--;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user