Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 12089

DIGIPOT_MOTOR_CURRENT Compiling error

$
0
0
Hi
I am trying to compile my marlin code so I can upload it to my printer and I keep getting an error.
The error I am getting is that it says that the 'DIGIPOT_MOTOR_CURRENT' was not declared in this scope.
This is in the Stepper.cpp tab of marlin
 void Stepper::digipot_init() {

    #if HAS_DIGIPOTSS

      static const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT;

      SPI.begin();
      SET_OUTPUT(DIGIPOTSS_PIN);

      for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) {
        //digitalPotWrite(digipot_ch, digipot_motor_current);
        digipot_current(i, digipot_motor_current);
      }

    #elif HAS_MOTOR_CURRENT_PWM

      #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
        SET_OUTPUT(MOTOR_CURRENT_PWM_XY_PIN);
      #endif
      #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
        SET_OUTPUT(MOTOR_CURRENT_PWM_Z_PIN);
      #endif
      #if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
        SET_OUTPUT(MOTOR_CURRENT_PWM_E_PIN);
      #endif

      refresh_motor_power();

      // Set Timer5 to 31khz so the PWM of the motor power is as constant as possible. (removes a buzzing noise)
      SET_CS5(PRESCALER_1);

    #endif
Here is the error message.
Arduino: 1.6.13 (Windows 8.1), TD: 1.33, Board: "RAMBo"

sketch\stepper.cpp: In static member function 'static void Stepper::digipot_init()':

stepper.cpp:1483: error: 'DIGIPOT_MOTOR_CURRENT' was not declared in this scope

       static const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT;

                                                      ^

exit status 1
'DIGIPOT_MOTOR_CURRENT' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I was wondering what I need to troubleshoot to get this working?
Let me know if you need more information.
Thanks
Tanner

Viewing all articles
Browse latest Browse all 12089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>