Skip to content
Permalink
Browse files

Add motor current control with M907

  • Loading branch information...
daid committed Nov 18, 2013
1 parent c5e09ed commit 38de4aa8b88e2907444a247c0bf81d8cd12a2d41
Showing with 9 additions and 0 deletions.
  1. +9 −0 Marlin/Marlin_main.cpp
@@ -1969,6 +1969,15 @@ void process_commands()
if(code_seen('B')) digipot_current(4,code_value());
if(code_seen('S')) for(int i=0;i<=4;i++) digipot_current(i,code_value());
#endif
#if defined(MOTOR_CURRENT_PWM_XY_PIN) && MOTOR_CURRENT_PWM_XY_PIN > -1
if(code_seen('X')) digipot_current(0, code_value());
#endif
#if defined(MOTOR_CURRENT_PWM_Z_PIN) && MOTOR_CURRENT_PWM_Z_PIN > -1
if(code_seen('Z')) digipot_current(1, code_value());
#endif
#if defined(MOTOR_CURRENT_PWM_E_PIN) && MOTOR_CURRENT_PWM_E_PIN > -1
if(code_seen('E')) digipot_current(2, code_value());
#endif
}
break;
case 908: // M908 Control digital trimpot directly.

0 comments on commit 38de4aa

Please sign in to comment.
You can’t perform that action at this time.