Browse Source

Merge branch 'Development' into delta_auto_bed_level

Conflicts:
	Marlin/Marlin_main.cpp
maverikou 9 years ago
parent
commit
8a739b6fba
100 changed files with 41548 additions and 208 deletions
  1. 2
    0
      .travis.yml
  2. 723
    0
      ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.cpp
  3. 286
    0
      ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.h
  4. 53
    0
      ArduinoAddons/Arduino_1.x.x/libraries/L6470/keywords.txt
  5. 17
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/.gitignore
  6. 1813
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/Doxyfile
  7. 10
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/LICENSE
  8. 71
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/README.rst
  9. 999
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.cpp
  10. 607
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.h
  11. 848
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp.html
  12. 1067
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp_source.html
  13. 212
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h.html
  14. 256
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h_source.html
  15. 72
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/annotated.html
  16. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/bc_s.png
  17. 117
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper-members.html
  18. 1463
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper.html
  19. 78
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/classes.html
  20. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/closed.png
  21. 949
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.css
  22. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.png
  23. 72
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/files.html
  24. 261
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions.html
  25. 261
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions_func.html
  26. 289
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals.html
  27. 289
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals_defs.html
  28. 72
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/index.html
  29. 64
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/jquery.js
  30. 68
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/mainpage_8dox.html
  31. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_f.png
  32. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_h.png
  33. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/open.png
  34. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_a.png
  35. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_b.png
  36. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_h.png
  37. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_s.png
  38. 59
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tabs.css
  39. 82
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XExample/TMC26XExample.ino
  40. 176
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Motor.ino
  41. 369
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Serial.ino
  42. 61
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/TMC26XMotorTester.ino
  43. 306
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/Arduino.pde
  44. 175
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/ChopperConfiguration.pde
  45. 327
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataRendering.pde
  46. 49
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataTable.pde
  47. 335
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/RunConfiguration.pde
  48. 156
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/TMC26XMotorTest.pde
  49. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/mc_logo.jpg
  50. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/tmc_logo.jpg
  51. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/hysteresis.png
  52. 2
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/sketch.properties
  53. 75
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/keywords.txt
  54. 30
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/mainpage.dox
  55. 9797
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.brd
  56. 11079
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.sch
  57. 1
    0
      Documentation/changelog.md
  58. 66
    57
      Marlin/Configuration.h
  59. 10
    5
      Marlin/ConfigurationStore.cpp
  60. 138
    2
      Marlin/Configuration_adv.h
  61. 27
    20
      Marlin/Marlin.h
  62. 12
    2
      Marlin/Marlin.ino
  63. 2
    2
      Marlin/Marlin.pde
  64. 1
    1
      Marlin/MarlinSerial.cpp
  65. 2
    2
      Marlin/MarlinSerial.h
  66. 158
    90
      Marlin/Marlin_main.cpp
  67. 9
    9
      Marlin/Sd2Card.cpp
  68. 4
    4
      Marlin/Sd2PinMap.h
  69. 2
    2
      Marlin/SdBaseFile.h
  70. 1
    1
      Marlin/SdVolume.cpp
  71. 1
    0
      Marlin/boards.h
  72. 903
    0
      Marlin/configurator/config/Configuration.h
  73. 584
    0
      Marlin/configurator/config/Configuration_adv.h
  74. 1
    0
      Marlin/configurator/config/_htaccess
  75. 59
    0
      Marlin/configurator/config/boards.h
  76. 228
    0
      Marlin/configurator/config/language.h
  77. 344
    0
      Marlin/configurator/css/configurator.css
  78. BIN
      Marlin/configurator/css/logo.png
  79. 117
    0
      Marlin/configurator/index.html
  80. 2
    0
      Marlin/configurator/js/FileSaver.min.js
  81. 79
    0
      Marlin/configurator/js/binaryfileuploader.js
  82. 168
    0
      Marlin/configurator/js/binarystring.js
  83. 1414
    0
      Marlin/configurator/js/configurator.js
  84. 524
    0
      Marlin/configurator/js/jcanvas.js
  85. 4
    0
      Marlin/configurator/js/jquery-2.1.3.min.js
  86. 220
    0
      Marlin/configurator/js/jstepper.js
  87. 14
    0
      Marlin/configurator/js/jszip.min.js
  88. 3
    3
      Marlin/dogm_lcd_implementation.h
  89. 852
    0
      Marlin/example_configurations/Felix/Configuration.h
  90. 852
    0
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  91. 541
    0
      Marlin/example_configurations/Felix/Configuration_adv.h
  92. 60
    0
      Marlin/example_configurations/Felix/README.md
  93. 12
    2
      Marlin/example_configurations/Hephestos/Configuration.h
  94. 1
    0
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  95. 11
    2
      Marlin/example_configurations/K8200/Configuration.h
  96. 1
    0
      Marlin/example_configurations/K8200/Configuration_adv.h
  97. 12
    2
      Marlin/example_configurations/SCARA/Configuration.h
  98. 1
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  99. 10
    2
      Marlin/example_configurations/WITBOX/Configuration.h
  100. 0
    0
      Marlin/example_configurations/WITBOX/Configuration_adv.h

+ 2
- 0
.travis.yml View File

@@ -13,6 +13,8 @@ install:
13 13
   - sudo apt-get update -q 
14 14
   - sudo apt-get install arduino
15 15
 before_script:
16
+  # copy TMC and L6470 libraries to arduino dir, as conditional includes do not work in .ino files
17
+  - sudo cp -r ArduinoAddons/Arduino_1.x.x/libraries/ /usr/share/arduino
16 18
  # add U8glib, LiquidCrystal_I2C & LiquidTWI2 libraries 
17 19
   - sudo unzip u8glib_arduino_v1.17.zip -d /usr/share/arduino/libraries/
18 20
   - cd /usr/share/arduino/libraries/

+ 723
- 0
ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.cpp View File

@@ -0,0 +1,723 @@
1
+////////////////////////////////////////////////////////////
2
+//ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
3
+//LIBRARY Created by Adam Meyer of bildr Aug 18th 2012
4
+//Released as MIT license
5
+////////////////////////////////////////////////////////////
6
+
7
+#include <Arduino.h>
8
+#include "L6470.h"
9
+#include <SPI.h>
10
+
11
+#define ENABLE_RESET_PIN	0
12
+#define K_VALUE			100
13
+
14
+L6470::L6470(int SSPin){
15
+  _SSPin = SSPin;
16
+  // Serial.begin(9600);
17
+}
18
+
19
+void L6470::init(int k_value){
20
+  // This is the generic initialization function to set up the Arduino to
21
+  // communicate with the dSPIN chip.
22
+  
23
+  // set up the input/output pins for the application.
24
+  pinMode(SLAVE_SELECT_PIN, OUTPUT); // The SPI peripheral REQUIRES the hardware SS pin-
25
+  // pin 10- to be an output. This is in here just
26
+  // in case some future user makes something other
27
+  // than pin 10 the SS pin.
28
+  
29
+  pinMode(_SSPin, OUTPUT);
30
+  digitalWrite(_SSPin, HIGH);
31
+  pinMode(MOSI, OUTPUT);
32
+  pinMode(MISO, INPUT);
33
+  pinMode(SCK, OUTPUT);
34
+  pinMode(BUSYN, INPUT);
35
+#if (ENABLE_RESET_PIN == 1)
36
+  pinMode(RESET, OUTPUT);
37
+  // reset the dSPIN chip. This could also be accomplished by
38
+  // calling the "L6470::ResetDev()" function after SPI is initialized.
39
+  digitalWrite(RESET, HIGH);
40
+  delay(10);
41
+  digitalWrite(RESET, LOW);
42
+  delay(10);
43
+  digitalWrite(RESET, HIGH);
44
+  delay(10);
45
+#endif
46
+  
47
+  
48
+  // initialize SPI for the dSPIN chip's needs:
49
+  // most significant bit first,
50
+  // SPI clock not to exceed 5MHz,
51
+  // SPI_MODE3 (clock idle high, latch data on rising edge of clock)
52
+  SPI.begin();
53
+  SPI.setBitOrder(MSBFIRST);
54
+  SPI.setClockDivider(SPI_CLOCK_DIV16); // or 2, 8, 16, 32, 64
55
+  SPI.setDataMode(SPI_MODE3);
56
+  
57
+  // First things first: let's check communications. The CONFIG register should
58
+  // power up to 0x2E88, so we can use that to check the communications.
59
+  if (GetParam(CONFIG) == 0x2E88){
60
+    //Serial.println('good to go');
61
+  }
62
+  else{
63
+    //Serial.println('Comm issue');
64
+  }
65
+
66
+#if  (ENABLE_RESET_PIN == 0) 
67
+  resetDev();
68
+#endif
69
+  // First, let's set the step mode register:
70
+  // - SYNC_EN controls whether the BUSY/SYNC pin reflects the step
71
+  // frequency or the BUSY status of the chip. We want it to be the BUSY
72
+  // status.
73
+  // - STEP_SEL_x is the microstepping rate- we'll go full step.
74
+  // - SYNC_SEL_x is the ratio of (micro)steps to toggles on the
75
+  // BUSY/SYNC pin (when that pin is used for SYNC). Make it 1:1, despite
76
+  // not using that pin.
77
+  //SetParam(STEP_MODE, !SYNC_EN | STEP_SEL_1 | SYNC_SEL_1);
78
+  
79
+  
80
+  SetParam(KVAL_RUN, k_value);
81
+  SetParam(KVAL_ACC, k_value);
82
+  SetParam(KVAL_DEC, k_value);
83
+  SetParam(KVAL_HOLD, k_value);
84
+  
85
+  // Set up the CONFIG register as follows:
86
+  // PWM frequency divisor = 1
87
+  // PWM frequency multiplier = 2 (62.5kHz PWM frequency)
88
+  // Slew rate is 290V/us
89
+  // Do NOT shut down bridges on overcurrent
90
+  // Disable motor voltage compensation
91
+  // Hard stop on switch low
92
+  // 16MHz internal oscillator, nothing on output
93
+  SetParam(CONFIG, CONFIG_PWM_DIV_1 | CONFIG_PWM_MUL_2 | CONFIG_SR_290V_us| CONFIG_OC_SD_DISABLE | CONFIG_VS_COMP_DISABLE | CONFIG_SW_HARD_STOP | CONFIG_INT_16MHZ);
94
+  // Configure the RUN KVAL. This defines the duty cycle of the PWM of the bridges
95
+  // during running. 0xFF means that they are essentially NOT PWMed during run; this
96
+  // MAY result in more power being dissipated than you actually need for the task.
97
+  // Setting this value too low may result in failure to turn.
98
+  // There are ACC, DEC, and HOLD KVAL registers as well; you may need to play with
99
+  // those values to get acceptable performance for a given application.
100
+  //SetParam(KVAL_RUN, 0xFF);
101
+  // Calling GetStatus() clears the UVLO bit in the status register, which is set by
102
+  // default on power-up. The driver may not run without that bit cleared by this
103
+  // read operation.
104
+  getStatus();
105
+  
106
+  hardStop(); //engage motors
107
+}
108
+
109
+boolean L6470::isBusy(){
110
+  int status = getStatus();
111
+  return !((status >> 1) & 0b1);
112
+}
113
+
114
+void L6470::setMicroSteps(int microSteps){
115
+  byte stepVal = 0;
116
+  
117
+  for(stepVal = 0; stepVal < 8; stepVal++){
118
+    if(microSteps == 1) break;
119
+    microSteps = microSteps >> 1;
120
+  }
121
+
122
+  SetParam(STEP_MODE, !SYNC_EN | stepVal | SYNC_SEL_1);
123
+}
124
+
125
+void L6470::setThresholdSpeed(float thresholdSpeed){
126
+  // Configure the FS_SPD register- this is the speed at which the driver ceases
127
+  // microstepping and goes to full stepping. FSCalc() converts a value in steps/s
128
+  // to a value suitable for this register; to disable full-step switching, you
129
+  // can pass 0x3FF to this register.
130
+  
131
+  if(thresholdSpeed == 0.0){
132
+    SetParam(FS_SPD, 0x3FF);
133
+  }
134
+  else{
135
+    SetParam(FS_SPD, FSCalc(thresholdSpeed));	
136
+  }
137
+}
138
+
139
+
140
+void L6470::setCurrent(int current){}
141
+
142
+
143
+
144
+void L6470::setMaxSpeed(int speed){
145
+  // Configure the MAX_SPEED register- this is the maximum number of (micro)steps per
146
+  // second allowed. You'll want to mess around with your desired application to see
147
+  // how far you can push it before the motor starts to slip. The ACTUAL parameter
148
+  // passed to this function is in steps/tick; MaxSpdCalc() will convert a number of
149
+  // steps/s into an appropriate value for this function. Note that for any move or
150
+  // goto type function where no speed is specified, this value will be used.
151
+  SetParam(MAX_SPEED, MaxSpdCalc(speed));
152
+}
153
+
154
+
155
+void L6470::setMinSpeed(int speed){
156
+  // Configure the MAX_SPEED register- this is the maximum number of (micro)steps per
157
+  // second allowed. You'll want to mess around with your desired application to see
158
+  // how far you can push it before the motor starts to slip. The ACTUAL parameter
159
+  // passed to this function is in steps/tick; MaxSpdCalc() will convert a number of
160
+  // steps/s into an appropriate value for this function. Note that for any move or
161
+  // goto type function where no speed is specified, this value will be used.
162
+  SetParam(MIN_SPEED, MinSpdCalc(speed));
163
+}
164
+
165
+
166
+
167
+
168
+void L6470::setAcc(float acceleration){
169
+  // Configure the acceleration rate, in steps/tick/tick. There is also a DEC register;
170
+  // both of them have a function (AccCalc() and DecCalc() respectively) that convert
171
+  // from steps/s/s into the appropriate value for the register. Writing ACC to 0xfff
172
+  // sets the acceleration and deceleration to 'infinite' (or as near as the driver can
173
+  // manage). If ACC is set to 0xfff, DEC is ignored. To get infinite deceleration
174
+  // without infinite acceleration, only hard stop will work.
175
+  unsigned long accelerationBYTES = AccCalc(acceleration);
176
+  SetParam(ACC, accelerationBYTES);
177
+}
178
+
179
+
180
+void L6470::setDec(float deceleration){
181
+  unsigned long decelerationBYTES = DecCalc(deceleration);
182
+  SetParam(DEC, decelerationBYTES);
183
+}
184
+
185
+
186
+long L6470::getPos(){
187
+  unsigned long position = GetParam(ABS_POS);
188
+  return convert(position);
189
+}
190
+
191
+float L6470::getSpeed(){
192
+  /*
193
+  SPEED
194
+  The SPEED register contains the current motor speed, expressed in step/tick (format unsigned fixed point 0.28).
195
+  In order to convert the SPEED value in step/s the following formula can be used:
196
+  Equation 4
197
+  where SPEED is the integer number stored into the register and tick is 250 ns.
198
+  The available range is from 0 to 15625 step/s with a resolution of 0.015 step/s.
199
+  Note: The range effectively available to the user is limited by the MAX_SPEED parameter.
200
+  */
201
+  
202
+  return (float) GetParam(SPEED);
203
+  //return (float) speed * pow(8, -22);
204
+  //return FSCalc(speed); NEEDS FIX
205
+}
206
+
207
+
208
+void L6470::setOverCurrent(unsigned int ma_current){
209
+  // Configure the overcurrent detection threshold.
210
+  byte OCValue = floor(ma_current / 375);
211
+  if(OCValue > 0x0F)OCValue = 0x0F;
212
+  SetParam(OCD_TH, OCValue);
213
+}
214
+
215
+void L6470::setStallCurrent(float ma_current){
216
+  byte STHValue = (byte)floor(ma_current / 31.25);
217
+  if(STHValue > 0x80)STHValue = 0x80;
218
+  if(STHValue < 0)STHValue = 0;
219
+  SetParam(STALL_TH, STHValue);
220
+}
221
+
222
+void L6470::SetLowSpeedOpt(boolean enable){
223
+  // Enable or disable the low-speed optimization option. If enabling,
224
+  // the other 12 bits of the register will be automatically zero.
225
+  // When disabling, the value will have to be explicitly written by
226
+  // the user with a SetParam() call. See the datasheet for further
227
+  // information about low-speed optimization.
228
+  Xfer(SET_PARAM | MIN_SPEED);
229
+  if (enable) Param(0x1000, 13);
230
+  else Param(0, 13);
231
+}
232
+
233
+
234
+void L6470::run(byte dir, float spd){
235
+  // RUN sets the motor spinning in a direction (defined by the constants
236
+  // FWD and REV). Maximum speed and minimum speed are defined
237
+  // by the MAX_SPEED and MIN_SPEED registers; exceeding the FS_SPD value
238
+  // will switch the device into full-step mode.
239
+  // The SpdCalc() function is provided to convert steps/s values into
240
+  // appropriate integer values for this function.
241
+  unsigned long speedVal = SpdCalc(spd);
242
+  
243
+  Xfer(RUN | dir);
244
+  if (speedVal > 0xFFFFF) speedVal = 0xFFFFF;
245
+  Xfer((byte)(speedVal >> 16));
246
+  Xfer((byte)(speedVal >> 8));
247
+  Xfer((byte)(speedVal));
248
+}
249
+
250
+
251
+void L6470::Step_Clock(byte dir){
252
+  // STEP_CLOCK puts the device in external step clocking mode. When active,
253
+  // pin 25, STCK, becomes the step clock for the device, and steps it in
254
+  // the direction (set by the FWD and REV constants) imposed by the call
255
+  // of this function. Motion commands (RUN, MOVE, etc) will cause the device
256
+  // to exit step clocking mode.
257
+  Xfer(STEP_CLOCK | dir);
258
+}
259
+
260
+void L6470::move(long n_step){
261
+  // MOVE will send the motor n_step steps (size based on step mode) in the
262
+  // direction imposed by dir (FWD or REV constants may be used). The motor
263
+  // will accelerate according the acceleration and deceleration curves, and
264
+  // will run at MAX_SPEED. Stepping mode will adhere to FS_SPD value, as well.
265
+  
266
+  byte dir;
267
+  
268
+  if(n_step >= 0){
269
+    dir = FWD;
270
+  }
271
+  else{
272
+    dir = REV;
273
+  }
274
+
275
+  long n_stepABS = abs(n_step);
276
+  
277
+  Xfer(MOVE | dir); //set direction
278
+  if (n_stepABS > 0x3FFFFF) n_step = 0x3FFFFF;
279
+  Xfer((byte)(n_stepABS >> 16));
280
+  Xfer((byte)(n_stepABS >> 8));
281
+  Xfer((byte)(n_stepABS));
282
+}
283
+
284
+void L6470::goTo(long pos){
285
+  // GOTO operates much like MOVE, except it produces absolute motion instead
286
+  // of relative motion. The motor will be moved to the indicated position
287
+  // in the shortest possible fashion.
288
+  
289
+  Xfer(GOTO);
290
+  if (pos > 0x3FFFFF) pos = 0x3FFFFF;
291
+  Xfer((byte)(pos >> 16));
292
+  Xfer((byte)(pos >> 8));
293
+  Xfer((byte)(pos));
294
+}
295
+
296
+
297
+void L6470::goTo_DIR(byte dir, long pos){
298
+  // Same as GOTO, but with user constrained rotational direction.
299
+  
300
+  Xfer(GOTO_DIR);
301
+  if (pos > 0x3FFFFF) pos = 0x3FFFFF;
302
+  Xfer((byte)(pos >> 16));
303
+  Xfer((byte)(pos >> 8));
304
+  Xfer((byte)(pos));
305
+}
306
+
307
+void L6470::goUntil(byte act, byte dir, unsigned long spd){
308
+  // GoUntil will set the motor running with direction dir (REV or
309
+  // FWD) until a falling edge is detected on the SW pin. Depending
310
+  // on bit SW_MODE in CONFIG, either a hard stop or a soft stop is
311
+  // performed at the falling edge, and depending on the value of
312
+  // act (either RESET or COPY) the value in the ABS_POS register is
313
+  // either RESET to 0 or COPY-ed into the MARK register.
314
+  Xfer(GO_UNTIL | act | dir);
315
+  if (spd > 0x3FFFFF) spd = 0x3FFFFF;
316
+  Xfer((byte)(spd >> 16));
317
+  Xfer((byte)(spd >> 8));
318
+  Xfer((byte)(spd));
319
+}
320
+
321
+void L6470::releaseSW(byte act, byte dir){
322
+  // Similar in nature to GoUntil, ReleaseSW produces motion at the
323
+  // higher of two speeds: the value in MIN_SPEED or 5 steps/s.
324
+  // The motor continues to run at this speed until a rising edge
325
+  // is detected on the switch input, then a hard stop is performed
326
+  // and the ABS_POS register is either COPY-ed into MARK or RESET to
327
+  // 0, depending on whether RESET or COPY was passed to the function
328
+  // for act.
329
+  Xfer(RELEASE_SW | act | dir);
330
+}
331
+
332
+void L6470::goHome(){
333
+  // GoHome is equivalent to GoTo(0), but requires less time to send.
334
+  // Note that no direction is provided; motion occurs through shortest
335
+  // path. If a direction is required, use GoTo_DIR().
336
+  Xfer(GO_HOME);
337
+}
338
+
339
+void L6470::goMark(){
340
+  // GoMark is equivalent to GoTo(MARK), but requires less time to send.
341
+  // Note that no direction is provided; motion occurs through shortest
342
+  // path. If a direction is required, use GoTo_DIR().
343
+  Xfer(GO_MARK);
344
+}
345
+
346
+
347
+void L6470::setMark(long value){
348
+
349
+  Xfer(MARK);
350
+  if (value > 0x3FFFFF) value = 0x3FFFFF;
351
+  if (value < -0x3FFFFF) value = -0x3FFFFF;
352
+  
353
+  
354
+  Xfer((byte)(value >> 16));
355
+  Xfer((byte)(value >> 8));
356
+  Xfer((byte)(value));
357
+}
358
+
359
+
360
+void L6470::setMark(){
361
+  long value = getPos();
362
+  
363
+  Xfer(MARK);
364
+  if (value > 0x3FFFFF) value = 0x3FFFFF;
365
+  if (value < -0x3FFFFF) value = -0x3FFFFF;
366
+  
367
+  
368
+  Xfer((byte)(value >> 16));
369
+  Xfer((byte)(value >> 8));
370
+  Xfer((byte)(value));
371
+}
372
+
373
+void L6470::setAsHome(){
374
+  // Sets the ABS_POS register to 0, effectively declaring the current
375
+  // position to be "HOME".
376
+  Xfer(RESET_POS);
377
+}
378
+
379
+void L6470::resetDev(){
380
+  // Reset device to power up conditions. Equivalent to toggling the STBY
381
+  // pin or cycling power.
382
+  Xfer(RESET_DEVICE);
383
+}
384
+
385
+void L6470::softStop(){
386
+  // Bring the motor to a halt using the deceleration curve.
387
+  Xfer(SOFT_STOP);
388
+}
389
+
390
+void L6470::hardStop(){
391
+  // Stop the motor right away. No deceleration.
392
+  Xfer(HARD_STOP);
393
+}
394
+
395
+void L6470::softFree(){
396
+  // Decelerate the motor and disengage
397
+  Xfer(SOFT_HIZ);
398
+}
399
+
400
+void L6470::free(){
401
+  // disengage the motor immediately with no deceleration.
402
+  Xfer(HARD_HIZ);
403
+}
404
+
405
+int L6470::getStatus(){
406
+  // Fetch and return the 16-bit value in the STATUS register. Resets
407
+  // any warning flags and exits any error states. Using GetParam()
408
+  // to read STATUS does not clear these values.
409
+  int temp = 0;
410
+  Xfer(GET_STATUS);
411
+  temp = Xfer(0)<<8;
412
+  temp |= Xfer(0);
413
+  return temp;
414
+}
415
+
416
+unsigned long L6470::AccCalc(float stepsPerSecPerSec){
417
+  // The value in the ACC register is [(steps/s/s)*(tick^2)]/(2^-40) where tick is
418
+  // 250ns (datasheet value)- 0x08A on boot.
419
+  // Multiply desired steps/s/s by .137438 to get an appropriate value for this register.
420
+  // This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
421
+  float temp = stepsPerSecPerSec * 0.137438;
422
+  if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
423
+  else return (unsigned long) long(temp);
424
+}
425
+
426
+
427
+unsigned long L6470::DecCalc(float stepsPerSecPerSec){
428
+  // The calculation for DEC is the same as for ACC. Value is 0x08A on boot.
429
+  // This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
430
+  float temp = stepsPerSecPerSec * 0.137438;
431
+  if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
432
+  else return (unsigned long) long(temp);
433
+}
434
+
435
+unsigned long L6470::MaxSpdCalc(float stepsPerSec){
436
+  // The value in the MAX_SPD register is [(steps/s)*(tick)]/(2^-18) where tick is
437
+  // 250ns (datasheet value)- 0x041 on boot.
438
+  // Multiply desired steps/s by .065536 to get an appropriate value for this register
439
+  // This is a 10-bit value, so we need to make sure it remains at or below 0x3FF
440
+  float temp = stepsPerSec * .065536;
441
+  if( (unsigned long) long(temp) > 0x000003FF) return 0x000003FF;
442
+  else return (unsigned long) long(temp);
443
+}
444
+
445
+unsigned long L6470::MinSpdCalc(float stepsPerSec){
446
+  // The value in the MIN_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
447
+  // 250ns (datasheet value)- 0x000 on boot.
448
+  // Multiply desired steps/s by 4.1943 to get an appropriate value for this register
449
+  // This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
450
+  float temp = stepsPerSec * 4.1943;
451
+  if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
452
+  else return (unsigned long) long(temp);
453
+}
454
+
455
+unsigned long L6470::FSCalc(float stepsPerSec){
456
+  // The value in the FS_SPD register is ([(steps/s)*(tick)]/(2^-18))-0.5 where tick is
457
+  // 250ns (datasheet value)- 0x027 on boot.
458
+  // Multiply desired steps/s by .065536 and subtract .5 to get an appropriate value for this register
459
+  // This is a 10-bit value, so we need to make sure the value is at or below 0x3FF.
460
+  float temp = (stepsPerSec * .065536)-.5;
461
+  if( (unsigned long) long(temp) > 0x000003FF) return 0x000003FF;
462
+  else return (unsigned long) long(temp);
463
+}
464
+
465
+unsigned long L6470::IntSpdCalc(float stepsPerSec){
466
+  // The value in the INT_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
467
+  // 250ns (datasheet value)- 0x408 on boot.
468
+  // Multiply desired steps/s by 4.1943 to get an appropriate value for this register
469
+  // This is a 14-bit value, so we need to make sure the value is at or below 0x3FFF.
470
+  float temp = stepsPerSec * 4.1943;
471
+  if( (unsigned long) long(temp) > 0x00003FFF) return 0x00003FFF;
472
+  else return (unsigned long) long(temp);
473
+}
474
+
475
+unsigned long L6470::SpdCalc(float stepsPerSec){
476
+  // When issuing RUN command, the 20-bit speed is [(steps/s)*(tick)]/(2^-28) where tick is
477
+  // 250ns (datasheet value).
478
+  // Multiply desired steps/s by 67.106 to get an appropriate value for this register
479
+  // This is a 20-bit value, so we need to make sure the value is at or below 0xFFFFF.
480
+  
481
+  float temp = stepsPerSec * 67.106;
482
+  if( (unsigned long) long(temp) > 0x000FFFFF) return 0x000FFFFF;
483
+  else return (unsigned long)temp;
484
+}
485
+
486
+unsigned long L6470::Param(unsigned long value, byte bit_len){
487
+  // Generalization of the subsections of the register read/write functionality.
488
+  // We want the end user to just write the value without worrying about length,
489
+  // so we pass a bit length parameter from the calling function.
490
+  unsigned long ret_val=0; // We'll return this to generalize this function
491
+  // for both read and write of registers.
492
+  byte byte_len = bit_len/8; // How many BYTES do we have?
493
+  if (bit_len%8 > 0) byte_len++; // Make sure not to lose any partial byte values.
494
+  // Let's make sure our value has no spurious bits set, and if the value was too
495
+  // high, max it out.
496
+  unsigned long mask = 0xffffffff >> (32-bit_len);
497
+  if (value > mask) value = mask;
498
+  // The following three if statements handle the various possible byte length
499
+  // transfers- it'll be no less than 1 but no more than 3 bytes of data.
500
+  // L6470::Xfer() sends a byte out through SPI and returns a byte received
501
+  // over SPI- when calling it, we typecast a shifted version of the masked
502
+  // value, then we shift the received value back by the same amount and
503
+  // store it until return time.
504
+  if (byte_len == 3) {
505
+    ret_val |= long(Xfer((byte)(value>>16))) << 16;
506
+    //Serial.println(ret_val, HEX);
507
+  }
508
+  if (byte_len >= 2) {
509
+    ret_val |= long(Xfer((byte)(value>>8))) << 8;
510
+    //Serial.println(ret_val, HEX);
511
+  }
512
+  if (byte_len >= 1) {
513
+    ret_val |= Xfer((byte)value);
514
+    //Serial.println(ret_val, HEX);
515
+  }
516
+  // Return the received values. Mask off any unnecessary bits, just for
517
+  // the sake of thoroughness- we don't EXPECT to see anything outside
518
+  // the bit length range but better to be safe than sorry.
519
+  return (ret_val & mask);
520
+}
521
+
522
+byte L6470::Xfer(byte data){
523
+  // This simple function shifts a byte out over SPI and receives a byte over
524
+  // SPI. Unusually for SPI devices, the dSPIN requires a toggling of the
525
+  // CS (slaveSelect) pin after each byte sent. That makes this function
526
+  // a bit more reasonable, because we can include more functionality in it.
527
+  byte data_out;
528
+  digitalWrite(_SSPin,LOW);
529
+  // SPI.transfer() both shifts a byte out on the MOSI pin AND receives a
530
+  // byte in on the MISO pin.
531
+  data_out = SPI.transfer(data);
532
+  digitalWrite(_SSPin,HIGH);
533
+  return data_out;
534
+}
535
+
536
+
537
+
538
+void L6470::SetParam(byte param, unsigned long value){
539
+  Xfer(SET_PARAM | param);
540
+  ParamHandler(param, value);
541
+}
542
+
543
+unsigned long L6470::GetParam(byte param){
544
+  // Realize the "get parameter" function, to read from the various registers in
545
+  // the dSPIN chip.
546
+  Xfer(GET_PARAM | param);
547
+  return ParamHandler(param, 0);
548
+}
549
+
550
+long L6470::convert(unsigned long val){
551
+  //convert 22bit 2s comp to signed long
552
+  int MSB = val >> 21;
553
+  
554
+  val = val << 11;
555
+  val = val >> 11;
556
+  
557
+  if(MSB == 1) val = val | 0b11111111111000000000000000000000;
558
+  return val;
559
+}
560
+
561
+unsigned long L6470::ParamHandler(byte param, unsigned long value){
562
+  // Much of the functionality between "get parameter" and "set parameter" is
563
+  // very similar, so we deal with that by putting all of it in one function
564
+  // here to save memory space and simplify the program.
565
+  unsigned long ret_val = 0; // This is a temp for the value to return.
566
+  // This switch structure handles the appropriate action for each register.
567
+  // This is necessary since not all registers are of the same length, either
568
+  // bit-wise or byte-wise, so we want to make sure we mask out any spurious
569
+  // bits and do the right number of transfers. That is handled by the dSPIN_Param()
570
+  // function, in most cases, but for 1-byte or smaller transfers, we call
571
+  // Xfer() directly.
572
+  switch (param)
573
+  {
574
+    // ABS_POS is the current absolute offset from home. It is a 22 bit number expressed
575
+    // in two's complement. At power up, this value is 0. It cannot be written when
576
+    // the motor is running, but at any other time, it can be updated to change the
577
+    // interpreted position of the motor.
578
+    case ABS_POS:
579
+      ret_val = Param(value, 22);
580
+      break;
581
+    // EL_POS is the current electrical position in the step generation cycle. It can
582
+    // be set when the motor is not in motion. Value is 0 on power up.
583
+    case EL_POS:
584
+      ret_val = Param(value, 9);
585
+      break;
586
+    // MARK is a second position other than 0 that the motor can be told to go to. As
587
+    // with ABS_POS, it is 22-bit two's complement. Value is 0 on power up.
588
+    case MARK:
589
+      ret_val = Param(value, 22);
590
+      break;
591
+    // SPEED contains information about the current speed. It is read-only. It does
592
+    // NOT provide direction information.
593
+    case SPEED:
594
+      ret_val = Param(0, 20);
595
+      break;
596
+    // ACC and DEC set the acceleration and deceleration rates. Set ACC to 0xFFF
597
+    // to get infinite acceleration/decelaeration- there is no way to get infinite
598
+    // deceleration w/o infinite acceleration (except the HARD STOP command).
599
+    // Cannot be written while motor is running. Both default to 0x08A on power up.
600
+    // AccCalc() and DecCalc() functions exist to convert steps/s/s values into
601
+    // 12-bit values for these two registers.
602
+    case ACC:
603
+      ret_val = Param(value, 12);
604
+      break;
605
+    case DEC:
606
+      ret_val = Param(value, 12);
607
+      break;
608
+    // MAX_SPEED is just what it says- any command which attempts to set the speed
609
+    // of the motor above this value will simply cause the motor to turn at this
610
+    // speed. Value is 0x041 on power up.
611
+    // MaxSpdCalc() function exists to convert steps/s value into a 10-bit value
612
+    // for this register.
613
+    case MAX_SPEED:
614
+      ret_val = Param(value, 10);
615
+      break;
616
+    // MIN_SPEED controls two things- the activation of the low-speed optimization
617
+    // feature and the lowest speed the motor will be allowed to operate at. LSPD_OPT
618
+    // is the 13th bit, and when it is set, the minimum allowed speed is automatically
619
+    // set to zero. This value is 0 on startup.
620
+    // MinSpdCalc() function exists to convert steps/s value into a 12-bit value for this
621
+    // register. SetLowSpeedOpt() function exists to enable/disable the optimization feature.
622
+    case MIN_SPEED:
623
+      ret_val = Param(value, 12);
624
+      break;
625
+    // FS_SPD register contains a threshold value above which microstepping is disabled
626
+    // and the dSPIN operates in full-step mode. Defaults to 0x027 on power up.
627
+    // FSCalc() function exists to convert steps/s value into 10-bit integer for this
628
+    // register.
629
+    case FS_SPD:
630
+      ret_val = Param(value, 10);
631
+      break;
632
+    // KVAL is the maximum voltage of the PWM outputs. These 8-bit values are ratiometric
633
+    // representations: 255 for full output voltage, 128 for half, etc. Default is 0x29.
634
+    // The implications of different KVAL settings is too complex to dig into here, but
635
+    // it will usually work to max the value for RUN, ACC, and DEC. Maxing the value for
636
+    // HOLD may result in excessive power dissipation when the motor is not running.
637
+    case KVAL_HOLD:
638
+      ret_val = Xfer((byte)value);
639
+      break;
640
+    case KVAL_RUN:
641
+      ret_val = Xfer((byte)value);
642
+      break;
643
+    case KVAL_ACC:
644
+      ret_val = Xfer((byte)value);
645
+      break;
646
+    case KVAL_DEC:
647
+      ret_val = Xfer((byte)value);
648
+      break;
649
+    // INT_SPD, ST_SLP, FN_SLP_ACC and FN_SLP_DEC are all related to the back EMF
650
+    // compensation functionality. Please see the datasheet for details of this
651
+    // function- it is too complex to discuss here. Default values seem to work
652
+    // well enough.
653
+    case INT_SPD:
654
+      ret_val = Param(value, 14);
655
+      break;
656
+    case ST_SLP:
657
+      ret_val = Xfer((byte)value);
658
+      break;
659
+    case FN_SLP_ACC:
660
+      ret_val = Xfer((byte)value);
661
+      break;
662
+    case FN_SLP_DEC:
663
+      ret_val = Xfer((byte)value);
664
+      break;
665
+    // K_THERM is motor winding thermal drift compensation. Please see the datasheet
666
+    // for full details on operation- the default value should be okay for most users.
667
+    case K_THERM:
668
+      ret_val = Xfer((byte)value & 0x0F);
669
+      break;
670
+    // ADC_OUT is a read-only register containing the result of the ADC measurements.
671
+    // This is less useful than it sounds; see the datasheet for more information.
672
+    case ADC_OUT:
673
+      ret_val = Xfer(0);
674
+      break;
675
+    // Set the overcurrent threshold. Ranges from 375mA to 6A in steps of 375mA.
676
+    // A set of defined constants is provided for the user's convenience. Default
677
+    // value is 3.375A- 0x08. This is a 4-bit value.
678
+    case OCD_TH:
679
+      ret_val = Xfer((byte)value & 0x0F);
680
+      break;
681
+    // Stall current threshold. Defaults to 0x40, or 2.03A. Value is from 31.25mA to
682
+    // 4A in 31.25mA steps. This is a 7-bit value.
683
+    case STALL_TH:
684
+      ret_val = Xfer((byte)value & 0x7F);
685
+      break;
686
+    // STEP_MODE controls the microstepping settings, as well as the generation of an
687
+    // output signal from the dSPIN. Bits 2:0 control the number of microsteps per
688
+    // step the part will generate. Bit 7 controls whether the BUSY/SYNC pin outputs
689
+    // a BUSY signal or a step synchronization signal. Bits 6:4 control the frequency
690
+    // of the output signal relative to the full-step frequency; see datasheet for
691
+    // that relationship as it is too complex to reproduce here.
692
+    // Most likely, only the microsteps per step value will be needed; there is a set
693
+    // of constants provided for ease of use of these values.
694
+    case STEP_MODE:
695
+      ret_val = Xfer((byte)value);
696
+      break;
697
+    // ALARM_EN controls which alarms will cause the FLAG pin to fall. A set of constants
698
+    // is provided to make this easy to interpret. By default, ALL alarms will trigger the
699
+    // FLAG pin.
700
+    case ALARM_EN:
701
+      ret_val = Xfer((byte)value);
702
+      break;
703
+    // CONFIG contains some assorted configuration bits and fields. A fairly comprehensive
704
+    // set of reasonably self-explanatory constants is provided, but users should refer
705
+    // to the datasheet before modifying the contents of this register to be certain they
706
+    // understand the implications of their modifications. Value on boot is 0x2E88; this
707
+    // can be a useful way to verify proper start up and operation of the dSPIN chip.
708
+    case CONFIG:
709
+      ret_val = Param(value, 16);
710
+      break;
711
+      // STATUS contains read-only information about the current condition of the chip. A
712
+      // comprehensive set of constants for masking and testing this register is provided, but
713
+      // users should refer to the datasheet to ensure that they fully understand each one of
714
+      // the bits in the register.
715
+    case STATUS: // STATUS is a read-only register
716
+      ret_val = Param(0, 16);
717
+      break;
718
+    default:
719
+      ret_val = Xfer((byte)(value));
720
+    break;
721
+  }
722
+  return ret_val;
723
+}

+ 286
- 0
ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.h View File

@@ -0,0 +1,286 @@
1
+////////////////////////////////////////////////////////////
2
+//ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
3
+//LIBRARY Created by Adam Meyer of bildr Aug 18th 2012
4
+//Released as MIT license
5
+////////////////////////////////////////////////////////////
6
+#ifndef L6470_h
7
+#define L6470_h
8
+
9
+#include <Arduino.h>
10
+#include <SPI.h>
11
+
12
+#define SLAVE_SELECT_PIN 38 // Wire this to the CSN pin
13
+// #define RESET 6 // Wire this to the STBY line
14
+#define BUSYN 7 // Wire this to the BSYN line
15
+
16
+// constant definitions for overcurrent thresholds. Write these values to
17
+// register dSPIN_OCD_TH to set the level at which an overcurrent even occurs.
18
+#define OCD_TH_375mA 0x00
19
+#define OCD_TH_750mA 0x01
20
+#define OCD_TH_1125mA 0x02
21
+#define OCD_TH_1500mA 0x03
22
+#define OCD_TH_1875mA 0x04
23
+#define OCD_TH_2250mA 0x05
24
+#define OCD_TH_2625mA 0x06
25
+#define OCD_TH_3000mA 0x07
26
+#define OCD_TH_3375mA 0x08
27
+#define OCD_TH_3750mA 0x09
28
+#define OCD_TH_4125mA 0x0A
29
+#define OCD_TH_4500mA 0x0B
30
+#define OCD_TH_4875mA 0x0C
31
+#define OCD_TH_5250mA 0x0D
32
+#define OCD_TH_5625mA 0x0E
33
+#define OCD_TH_6000mA 0x0F
34
+
35
+// STEP_MODE option values.
36
+// First comes the "microsteps per step" options...
37
+#define STEP_MODE_STEP_SEL 0x07 // Mask for these bits only.
38
+#define STEP_SEL_1 0x00
39
+#define STEP_SEL_1_2 0x01
40
+#define STEP_SEL_1_4 0x02
41
+#define STEP_SEL_1_8 0x03
42
+#define STEP_SEL_1_16 0x04
43
+#define STEP_SEL_1_32 0x05
44
+#define STEP_SEL_1_64 0x06
45
+#define STEP_SEL_1_128 0x07
46
+
47
+// ...next, define the SYNC_EN bit. When set, the BUSYN pin will instead
48
+// output a clock related to the full-step frequency as defined by the
49
+// SYNC_SEL bits below.
50
+#define STEP_MODE_SYNC_EN 0x80 // Mask for this bit
51
+#define SYNC_EN 0x80
52
+
53
+// ...last, define the SYNC_SEL modes. The clock output is defined by
54
+// the full-step frequency and the value in these bits- see the datasheet
55
+// for a matrix describing that relationship (page 46).
56
+#define STEP_MODE_SYNC_SEL 0x70
57
+#define SYNC_SEL_1_2 0x00
58
+#define SYNC_SEL_1 0x10
59
+#define SYNC_SEL_2 0x20
60
+#define SYNC_SEL_4 0x30
61
+#define SYNC_SEL_8 0x40
62
+#define SYNC_SEL_16 0x50
63
+#define SYNC_SEL_32 0x60
64
+#define SYNC_SEL_64 0x70
65
+
66
+// Bit names for the ALARM_EN register.
67
+// Each of these bits defines one potential alarm condition.
68
+// When one of these conditions occurs and the respective bit in ALARM_EN is set,
69
+// the FLAG pin will go low. The register must be queried to determine which event
70
+// caused the alarm.
71
+#define ALARM_EN_OVERCURRENT 0x01
72
+#define ALARM_EN_THERMAL_SHUTDOWN 0x02
73
+#define ALARM_EN_THERMAL_WARNING 0x04
74
+#define ALARM_EN_UNDER_VOLTAGE 0x08
75
+#define ALARM_EN_STALL_DET_A 0x10
76
+#define ALARM_EN_STALL_DET_B 0x20
77
+#define ALARM_EN_SW_TURN_ON 0x40
78
+#define ALARM_EN_WRONG_NPERF_CMD 0x80
79
+
80
+// CONFIG register renames.
81
+
82
+// Oscillator options.
83
+// The dSPIN needs to know what the clock frequency is because it uses that for some
84
+// calculations during operation.
85
+#define CONFIG_OSC_SEL 0x000F // Mask for this bit field.
86
+#define CONFIG_INT_16MHZ 0x0000 // Internal 16MHz, no output
87
+#define CONFIG_INT_16MHZ_OSCOUT_2MHZ 0x0008 // Default; internal 16MHz, 2MHz output
88
+#define CONFIG_INT_16MHZ_OSCOUT_4MHZ 0x0009 // Internal 16MHz, 4MHz output
89
+#define CONFIG_INT_16MHZ_OSCOUT_8MHZ 0x000A // Internal 16MHz, 8MHz output
90
+#define CONFIG_INT_16MHZ_OSCOUT_16MHZ 0x000B // Internal 16MHz, 16MHz output
91
+#define CONFIG_EXT_8MHZ_XTAL_DRIVE 0x0004 // External 8MHz crystal
92
+#define CONFIG_EXT_16MHZ_XTAL_DRIVE 0x0005 // External 16MHz crystal
93
+#define CONFIG_EXT_24MHZ_XTAL_DRIVE 0x0006 // External 24MHz crystal
94
+#define CONFIG_EXT_32MHZ_XTAL_DRIVE 0x0007 // External 32MHz crystal
95
+#define CONFIG_EXT_8MHZ_OSCOUT_INVERT 0x000C // External 8MHz crystal, output inverted
96
+#define CONFIG_EXT_16MHZ_OSCOUT_INVERT 0x000D // External 16MHz crystal, output inverted
97
+#define CONFIG_EXT_24MHZ_OSCOUT_INVERT 0x000E // External 24MHz crystal, output inverted
98
+#define CONFIG_EXT_32MHZ_OSCOUT_INVERT 0x000F // External 32MHz crystal, output inverted
99
+
100
+// Configure the functionality of the external switch input
101
+#define CONFIG_SW_MODE 0x0010 // Mask for this bit.
102
+#define CONFIG_SW_HARD_STOP 0x0000 // Default; hard stop motor on switch.
103
+#define CONFIG_SW_USER 0x0010 // Tie to the GoUntil and ReleaseSW
104
+                                                    // commands to provide jog function.
105
+                                                    // See page 25 of datasheet.
106
+
107
+// Configure the motor voltage compensation mode (see page 34 of datasheet)
108
+#define CONFIG_EN_VSCOMP 0x0020 // Mask for this bit.
109
+#define CONFIG_VS_COMP_DISABLE 0x0000 // Disable motor voltage compensation.
110
+#define CONFIG_VS_COMP_ENABLE 0x0020 // Enable motor voltage compensation.
111
+
112
+// Configure overcurrent detection event handling
113
+#define CONFIG_OC_SD 0x0080 // Mask for this bit.
114
+#define CONFIG_OC_SD_DISABLE 0x0000 // Bridges do NOT shutdown on OC detect
115
+#define CONFIG_OC_SD_ENABLE 0x0080 // Bridges shutdown on OC detect
116
+
117
+// Configure the slew rate of the power bridge output
118
+#define CONFIG_POW_SR 0x0300 // Mask for this bit field.
119
+#define CONFIG_SR_180V_us 0x0000 // 180V/us
120
+#define CONFIG_SR_290V_us 0x0200 // 290V/us
121
+#define CONFIG_SR_530V_us 0x0300 // 530V/us
122
+
123
+// Integer divisors for PWM sinewave generation
124
+// See page 32 of the datasheet for more information on this.
125
+#define CONFIG_F_PWM_DEC 0x1C00 // mask for this bit field
126
+#define CONFIG_PWM_MUL_0_625 (0x00)<<10
127
+#define CONFIG_PWM_MUL_0_75 (0x01)<<10
128
+#define CONFIG_PWM_MUL_0_875 (0x02)<<10
129
+#define CONFIG_PWM_MUL_1 (0x03)<<10
130
+#define CONFIG_PWM_MUL_1_25 (0x04)<<10
131
+#define CONFIG_PWM_MUL_1_5 (0x05)<<10
132
+#define CONFIG_PWM_MUL_1_75 (0x06)<<10
133
+#define CONFIG_PWM_MUL_2 (0x07)<<10
134
+
135
+// Multiplier for the PWM sinewave frequency
136
+#define CONFIG_F_PWM_INT 0xE000 // mask for this bit field.
137
+#define CONFIG_PWM_DIV_1 (0x00)<<13
138
+#define CONFIG_PWM_DIV_2 (0x01)<<13
139
+#define CONFIG_PWM_DIV_3 (0x02)<<13
140
+#define CONFIG_PWM_DIV_4 (0x03)<<13
141
+#define CONFIG_PWM_DIV_5 (0x04)<<13
142
+#define CONFIG_PWM_DIV_6 (0x05)<<13
143
+#define CONFIG_PWM_DIV_7 (0x06)<<13
144
+
145
+// Status register bit renames- read-only bits conferring information about the
146
+// device to the user.
147
+#define STATUS_HIZ 0x0001 // high when bridges are in HiZ mode
148
+#define STATUS_BUSY 0x0002 // mirrors BUSY pin
149
+#define STATUS_SW_F 0x0004 // low when switch open, high when closed
150
+#define STATUS_SW_EVN 0x0008 // active high, set on switch falling edge,
151
+                                                    // cleared by reading STATUS
152
+#define STATUS_DIR 0x0010 // Indicates current motor direction.
153
+                                                    // High is FWD, Low is REV.
154
+#define STATUS_NOTPERF_CMD 0x0080 // Last command not performed.
155
+#define STATUS_WRONG_CMD 0x0100 // Last command not valid.
156
+#define STATUS_UVLO 0x0200 // Undervoltage lockout is active
157
+#define STATUS_TH_WRN 0x0400 // Thermal warning
158
+#define STATUS_TH_SD 0x0800 // Thermal shutdown
159
+#define STATUS_OCD 0x1000 // Overcurrent detected
160
+#define STATUS_STEP_LOSS_A 0x2000 // Stall detected on A bridge
161
+#define STATUS_STEP_LOSS_B 0x4000 // Stall detected on B bridge
162
+#define STATUS_SCK_MOD 0x8000 // Step clock mode is active
163
+
164
+// Status register motor status field
165
+#define STATUS_MOT_STATUS 0x0060 // field mask
166
+#define STATUS_MOT_STATUS_STOPPED (0x0000)<<13 // Motor stopped
167
+#define STATUS_MOT_STATUS_ACCELERATION (0x0001)<<13 // Motor accelerating
168
+#define STATUS_MOT_STATUS_DECELERATION (0x0002)<<13 // Motor decelerating
169
+#define STATUS_MOT_STATUS_CONST_SPD (0x0003)<<13 // Motor at constant speed
170
+
171
+// Register address redefines.
172
+// See the Param_Handler() function for more info about these.
173
+#define ABS_POS 0x01
174
+#define EL_POS 0x02
175
+#define MARK 0x03
176
+#define SPEED 0x04
177
+#define ACC 0x05
178
+#define DEC 0x06
179
+#define MAX_SPEED 0x07
180
+#define MIN_SPEED 0x08
181
+#define FS_SPD 0x15
182
+#define KVAL_HOLD 0x09
183
+#define KVAL_RUN 0x0A
184
+#define KVAL_ACC 0x0B
185
+#define KVAL_DEC 0x0C
186
+#define INT_SPD 0x0D
187
+#define ST_SLP 0x0E
188
+#define FN_SLP_ACC 0x0F
189
+#define FN_SLP_DEC 0x10
190
+#define K_THERM 0x11
191
+#define ADC_OUT 0x12
192
+#define OCD_TH 0x13
193
+#define STALL_TH 0x14
194
+#define STEP_MODE 0x16
195
+#define ALARM_EN 0x17
196
+#define CONFIG 0x18
197
+#define STATUS 0x19
198
+
199
+//dSPIN commands
200
+#define NOP 0x00
201
+#define SET_PARAM 0x00
202
+#define GET_PARAM 0x20
203
+#define RUN 0x50
204
+#define STEP_CLOCK 0x58
205
+#define MOVE 0x40
206
+#define GOTO 0x60
207
+#define GOTO_DIR 0x68
208
+#define GO_UNTIL 0x82
209
+#define RELEASE_SW 0x92
210
+#define GO_HOME 0x70
211
+#define GO_MARK 0x78
212
+#define RESET_POS 0xD8
213
+#define RESET_DEVICE 0xC0
214
+#define SOFT_STOP 0xB0
215
+#define HARD_STOP 0xB8
216
+#define SOFT_HIZ 0xA0
217
+#define HARD_HIZ 0xA8
218
+#define GET_STATUS 0xD0
219
+
220
+/* dSPIN direction options */
221
+#define FWD 0x01
222
+#define REV 0x00
223
+
224
+/* dSPIN action options */
225
+#define ACTION_RESET 0x00
226
+#define ACTION_COPY 0x01
227
+
228
+
229
+class L6470{
230
+
231
+  public:
232
+
233
+    L6470(int SSPin);
234
+    void init(int k_value);
235
+    void setMicroSteps(int microSteps);
236
+    void setCurrent(int current);
237
+    void setMaxSpeed(int speed);
238
+    void setMinSpeed(int speed);
239
+    void setAcc(float acceleration);
240
+    void setDec(float deceleration);
241
+    void setOverCurrent(unsigned int ma_current);
242
+    void setThresholdSpeed(float threshold);
243
+    void setStallCurrent(float ma_current);
244
+    
245
+    unsigned long ParamHandler(byte param, unsigned long value);
246
+    void SetLowSpeedOpt(boolean enable);
247
+    void run(byte dir, float spd);
248
+    void Step_Clock(byte dir);
249
+    void goHome();
250
+    void setAsHome();
251
+    void goMark();
252
+    void move(long n_step);
253
+    void goTo(long pos);
254
+    void goTo_DIR(byte dir, long pos);
255
+    void goUntil(byte act, byte dir, unsigned long spd);
256
+    boolean isBusy();
257
+    void releaseSW(byte act, byte dir);
258
+    float getSpeed();
259
+    long getPos();
260
+    void setMark();
261
+    void setMark(long value);
262
+    void resetPos();
263
+    void resetDev();
264
+    void softStop();
265
+    void hardStop();
266
+    void softFree();
267
+    void free();
268
+    int getStatus();
269
+	void SetParam(byte param, unsigned long value);
270
+
271
+  private:
272
+    long convert(unsigned long val);
273
+    unsigned long GetParam(byte param);
274
+    unsigned long AccCalc(float stepsPerSecPerSec);
275
+    unsigned long DecCalc(float stepsPerSecPerSec);
276
+    unsigned long MaxSpdCalc(float stepsPerSec);
277
+    unsigned long MinSpdCalc(float stepsPerSec);
278
+    unsigned long FSCalc(float stepsPerSec);
279
+    unsigned long IntSpdCalc(float stepsPerSec);
280
+    unsigned long SpdCalc(float stepsPerSec);
281
+    unsigned long Param(unsigned long value, byte bit_len);
282
+    byte Xfer(byte data);
283
+    int _SSPin;
284
+};
285
+
286
+#endif

+ 53
- 0
ArduinoAddons/Arduino_1.x.x/libraries/L6470/keywords.txt View File

@@ -0,0 +1,53 @@
1
+#######################################################
2
+# keywords.txt - keywords file for the L6470 library
3
+#
4
+# ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
5
+# Library by Adam Meyer of bildr Aug 18th 2012
6
+#
7
+# Released as MIT license
8
+#######################################################
9
+
10
+#######################################
11
+# Datatypes (KEYWORD1)
12
+#######################################
13
+
14
+L6470 KEYWORD1
15
+
16
+#######################################
17
+# Methods and Functions (KEYWORD2)
18
+#######################################
19
+
20
+L6470 				KEYWORD2
21
+init 				KEYWORD2
22
+setMicroSteps 		KEYWORD2
23
+setCurrent 			KEYWORD2
24
+setMaxSpeed 		KEYWORD2
25
+setMinSpeed 		KEYWORD2
26
+setAcc 				KEYWORD2
27
+setDec 				KEYWORD2
28
+setOverCurrent 		KEYWORD2
29
+setThresholdSpeed 	KEYWORD2
30
+setStallCurrent 	KEYWORD2
31
+ParamHandler 		KEYWORD2
32
+SetLowSpeedOpt 		KEYWORD2
33
+run 				KEYWORD2
34
+Step_Clock 			KEYWORD2
35
+goHome 				KEYWORD2
36
+goMark 				KEYWORD2
37
+move 				KEYWORD2
38
+goTo 				KEYWORD2
39
+goTo_DIR 			KEYWORD2
40
+goUntil 			KEYWORD2
41
+isBusy 				KEYWORD2
42
+releaseSW 			KEYWORD2
43
+resetPos			KEYWORD2
44
+resetDev 			KEYWORD2
45
+softStop			KEYWORD2
46
+hardStop 			KEYWORD2
47
+softHiZ 			KEYWORD2
48
+hardHiZ 			KEYWORD2
49
+getStatus 			KEYWORD2
50
+
51
+#######################################
52
+# Constants (LITERAL1)
53
+#######################################

+ 17
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/.gitignore View File

@@ -0,0 +1,17 @@
1
+#mac stuff
2
+.DS_Store
3
+
4
+#eclipse stuff
5
+.classpath
6
+.project
7
+
8
+#processing stuff 
9
+generated/
10
+examples/TMC26XMotorTester/processing/TMC26XMotorTest/application.*/
11
+examples/TMC26XMotorTester/processing/TMC26XMotorTest/application.*
12
+
13
+#eagle stuff
14
+schematics/*.b#?
15
+schematics/*.s#?
16
+
17
+*.zip

+ 1813
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/Doxyfile
File diff suppressed because it is too large
View File


+ 10
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/LICENSE View File

@@ -0,0 +1,10 @@
1
+
2
+Copyright (c) 2012 Interactive Matter
3
+
4
+based on the stepper library by Tom Igoe, et. al.
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
+
8
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
+
10
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 71
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/README.rst View File

@@ -0,0 +1,71 @@
1
+Arduino TMC26X Stepper Motor Controller Library
2
+===============================================
3
+
4
+License
5
+-------
6
+
7
+TMC26XStepper.cpp - - TMC 260/261/262 Stepper library for Wiring/Arduino
8
+ 
9
+based on the stepper library by Tom Igoe, et. al.
10
+ 
11
+Copyright (c) 2011, Interactive Matter, Marcus Nowotny
12
+ 
13
+Permission is hereby granted, free of charge, to any person obtaining a copy
14
+of this software and associated documentation files (the "Software"), to deal
15
+in the Software without restriction, including without limitation the rights
16
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+copies of the Software, and to permit persons to whom the Software is
18
+furnished to do so, subject to the following conditions:
19
+ 
20
+The above copyright notice and this permission notice shall be included in
21
+all copies or substantial portions of the Software.
22
+ 
23
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+THE SOFTWARE.
30
+
31
+About
32
+-----
33
+
34
+The TMC26X is a stepper motor controller for bipolar stepper motors. From the trinamic web site:
35
+
36
+ The TMC262 is the first energy efficient high current high precision microstepping driver 
37
+ IC for bipolar stepper motors. The unique high resolution sensorless load detection stallGuard2™ 
38
+ is used to for the world’s first integrated load dependent current control feature called coolStep™.
39
+ The ability to read out the load and detect an overload makes the TMC262 an optimum choice for 
40
+ drives where a high reliability is desired at a low cost. The new patented spreadCycle PWM mixed 
41
+ decay chopper scheme ensures best zero crossing performance as well as high speed operation. 
42
+ The TMC262 can be driven with Step & Direction signals as well as by serial SPI™ interface. 
43
+ Using the microPlyer allows to operate the motor with highest 256 μStep smoothness reducing the 
44
+ input frequency to 16 μSteps. A full set of protection and diagnostic features makes this device 
45
+ very rugged. It directly drives external MOSFETs for currents of up to 6A. This way it reaches 
46
+ highest energy efficiency and allows driving of a high motor current without cooling measures 
47
+ even at high environment temperatures.
48
+
49
+
50
+The unique features of the TMC26X are that everything can (and must) be controlled in software:
51
+
52
+* the motor current
53
+* microstepping
54
+* stall protection
55
+* current reduction according to load
56
+* stallGuard2™ sensorless load detection
57
+* coolStep™ load dependent current control
58
+* spreadCycle hysteresis PWM chopper 
59
+* microPlyer 16-to-256 μStep multiplier
60
+* full protection and diagnostics
61
+
62
+This makes the TMC26X a bit harder to use than other stepper motors but much more versatile.
63
+This library resolves all the complicated stuff so that you can use TMC26X straight away.
64
+Furthermore, all the settings are implemented in high level interfaces so that configuring your
65
+motor is a breeze.
66
+
67
+How to use
68
+----------
69
+
70
+Check out the Setup Guide here: 
71
+And the How To here:

+ 999
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.cpp
File diff suppressed because it is too large
View File


+ 607
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.h View File

@@ -0,0 +1,607 @@
1
+/*
2
+ TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino
3
+ 
4
+ based on the stepper library by Tom Igoe, et. al.
5
+
6
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
7
+ 
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+ 
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+ 
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+ */
27
+
28
+
29
+// ensure this library description is only included once
30
+#ifndef TMC26XStepper_h
31
+#define TMC26XStepper_h
32
+
33
+//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature situation in the TMC chip
34
+/*!
35
+ * This warning indicates that the TCM chip is too warm. 
36
+ * It is still working but some parameters may be inferior. 
37
+ * You should do something against it.
38
+ */
39
+#define TMC26X_OVERTEMPERATURE_PREWARING 1
40
+//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature shutdown in the TMC chip
41
+/*!
42
+ * This warning indicates that the TCM chip is too warm to operate and has shut down to prevent damage. 
43
+ * It will stop working until it cools down again.
44
+ * If you encouter this situation you must do something against it. Like reducing the current or improving the PCB layout 
45
+ * and/or heat management.
46
+ */
47
+#define TMC26X_OVERTEMPERATURE_SHUTDOWN 2
48
+
49
+//which values can be read out
50
+/*!
51
+ * Selects to readout the microstep position from the motor.
52
+ *\sa readStatus()
53
+ */
54
+#define TMC26X_READOUT_POSITION 0
55
+/*!
56
+ * Selects to read out the StallGuard value of the motor.
57
+ *\sa readStatus()
58
+ */
59
+#define TMC26X_READOUT_STALLGUARD 1
60
+/*!
61
+ * Selects to read out the current current setting (acc. to CoolStep) and the upper bits of the StallGuard value from the motor.
62
+ *\sa readStatus(), setCurrent()
63
+ */
64
+#define TMC26X_READOUT_CURRENT 3
65
+
66
+/*!
67
+ * Define to set the minimum current for CoolStep operation to 1/2 of the selected CS minium.
68
+ *\sa setCoolStepConfiguration()
69
+ */
70
+#define COOL_STEP_HALF_CS_LIMIT 0
71
+/*!
72
+ * Define to set the minimum current for CoolStep operation to 1/4 of the selected CS minium.
73
+ *\sa setCoolStepConfiguration()
74
+ */
75
+#define COOL_STEP_QUARTDER_CS_LIMIT 1
76
+
77
+/*!
78
+ * \class TMC26XStepper
79
+ * \brief Class representing a TMC26X stepper driver
80
+ * 
81
+ * In order to use one fo those drivers in your Arduino code you have to create an object of that class:
82
+ * \code
83
+ * TMC26XStepper stepper = TMC26XStepper(200,1,2,3,500);
84
+ * \endcode
85
+ * see TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int rms_current)
86
+ *
87
+ * Keep in mind that you need to start the driver with start() in order to get the TMC26X configured.
88
+ * 
89
+ * The most important function is the move(). It checks if the motor has to do a step or not.
90
+ * It is important that you call move() as often as possible in your Arduino loop() routine. I suggest
91
+ * to use a very fast loop routine and always call it at the beginning or the end.
92
+ *
93
+ * In order to move you have to provide a movement speed with setSpeed(). The speed is a positive value setting
94
+ * the rotations per minute.
95
+ *
96
+ * To really move the motor you have to call step() to tell the driver to move the motor the given number 
97
+ * of steps in the given direction. Positive values move the motor in one direction, negative values in the other direction.
98
+ *
99
+ * You can check with isMoving() if the mototr is still moving or stop it  apruptely with stop().
100
+ */
101
+class TMC26XStepper {
102
+  public:
103
+    /*!
104
+     * \brief creates a new represenatation of a stepper motor connected to a TMC26X stepper driver
105
+     *
106
+     * This is the main constructor. If in doubt use this. You must provide all parameters as described below.
107
+     *
108
+     * \param number_of_steps the number of steps the motor has per rotation.
109
+     * \param cs_pin The Arduino pin you have connected the Cient Select Pin (!CS) of the TMC26X for SPI
110
+     * \param dir_pin the number of the Arduino pin the Direction input of the TMC26X is connected
111
+     * \param step_pin the number of the Arduino pin the step pin of the TMC26X driver is connected.
112
+     * \param rms_current the maximum current to privide to the motor in mA (!). A value of 200 would send up to 200mA to the motor
113
+     * \param resistor the current sense resistor in milli Ohm, defaults to ,15 Ohm ( or 150 milli Ohm) as in the TMC260 Arduino Shield
114
+     *
115
+     * Keep in mind that you must also call TMC26XStepper.start() in order to configure the stepper driver for use.
116
+     *
117
+     * By default the Constant Off Time chopper is used, see TCM262Stepper.setConstantOffTimeChopper() for details. 
118
+     * This should work on most motors (YMMV). You may want to configure and use the Spread Cycle Chopper, see  setSpreadCycleChopper().
119
+     *
120
+     * By default a microstepping of 1/32th is used to provide a smooth motor run, while still giving a good progression per step.
121
+     * You can select a different stepping with setMicrosteps() to aa different value.
122
+     * \sa start(), setMicrosteps()
123
+     */
124
+	TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor=150);
125
+	
126
+    /*!
127
+     * \brief configures and starts the TMC26X stepper driver. Before you called this function the stepper driver is in nonfunctional mode.
128
+     *
129
+     * This routine configures the TMC26X stepper driver for the given values via SPI. 
130
+     * Most member functions are non functional if the driver has not been started.
131
+     * Therefore it is best to call this in your Arduino setup() function.
132
+     */
133
+	void start();
134
+    
135
+    /*!
136
+     * \brief resets the stepper in unconfigured mode.
137
+     *
138
+     * This routine enables you to call start again. It does not change anything 
139
+     * in the internal stepper configuration or the desired configuration.
140
+     * It just marks the stepper as not yet startet. You do not have to reconfigure
141
+     * the stepper to start it again, but it is not reset to any factory settings
142
+     * this has to be configured back by yourself.
143
+     * (Hint: Normally you do not need this function)
144
+     */
145
+	void un_start();
146
+
147
+
148
+    /*!
149
+     * \brief Sets the rotation speed in revolutions per minute.
150
+     * \param whatSpeed the desired speed in rotations per minute.
151
+     */
152
+    void setSpeed(unsigned int whatSpeed);
153
+    
154
+    /*!
155
+     * \brief reads out the currently selected speed in revolutions per minute.
156
+     * \sa setSpeed()
157
+     */
158
+    unsigned int getSpeed(void);
159
+
160
+    /*!
161
+     * \brief Set the number of microsteps in 2^i values (rounded) up to 256
162
+     *
163
+     * This method set's the number of microsteps per step in 2^i interval.
164
+     * This means you can select 1, 2, 4, 16, 32, 64, 128 or 256 as valid microsteps.
165
+     * If you give any other value it will be rounded to the next smaller number (3 would give a microstepping of 2).
166
+     * You can always check the current microstepping with getMicrosteps(). 
167
+     */ 
168
+	void setMicrosteps(int number_of_steps);
169
+    
170
+	/*!
171
+     * \brief returns the effective current number of microsteps selected.
172
+     *
173
+     * This function always returns the effective number of microsteps. 
174
+     * This can be a bit different than the micro steps set in setMicrosteps() since it is rounded to 2^i.
175
+     *
176
+     * \sa setMicrosteps()
177
+     */
178
+	int getMicrosteps(void);
179
+
180
+    /*!
181
+     * \brief Initiate a movement for the given number of steps. Positive numbers move in one, negative numbers in the other direction.
182
+     *
183
+     * \param number_of_steps The number of steps to move the motor.
184
+     * \return 0 if the motor was not moving and moves now. -1 if the motor is moving and the new steps could not be set.
185
+     *
186
+     * If the previous movement is not finished yet the function will return -1 and not change the steps to move the motor.
187
+	 * If the motor does not move it return 0
188
+     *
189
+     * The direction of the movement is indicated by the sign of the steps parameter. It is not determinable if positive values are right 
190
+     * or left This depends on the internal construction of the motor and how you connected it to the stepper driver.
191
+     *
192
+     * You can always verify with isMoving() or even use stop() to stop the motor before giving it new step directions.
193
+     * \sa isMoving(), getStepsLeft(), stop()
194
+     */
195
+    char step(int number_of_steps);
196
+    
197
+    /*!
198
+     * \brief Central movement method, must be called as often as possible in the lopp function and is very fast.
199
+     *
200
+     * This routine checks if the motor still has to move, if the waiting delay has passed to send a new step command to the motor 
201
+     * and manages the number of steps yet to move to fulfill the current move command.
202
+     *
203
+     * This function is implemented to be as fast as possible to call it as often as possible in your loop routine.
204
+     * The more regurlarly you call this function the better. In both senses of 'regularly': Calling it as often as
205
+     * possible is not a bad idea and if you even manage that the intervals you call this function are not too irregular helps too.
206
+     *
207
+     * You can call this routine even if you know that the motor is not miving. It introduces just a very small penalty in your code.
208
+     * You must not call isMoving() to determine if you need to call this function, since taht is done internally already and only 
209
+     * slows down you code.
210
+     * 
211
+     * How often you call this function directly influences your top miving speed for the motor. It may be a good idea to call this
212
+     * from an timer overflow interrupt to ensure proper calling.
213
+     * \sa step()
214
+     */
215
+    char move(void);
216
+
217
+    /*!
218
+     * \brief checks if the motor still has to move to fulfill the last movement command.
219
+     * \return 0 if the motor stops, -1 if the motor is moving.
220
+     *
221
+     * This method can be used to determine if the motor is ready for new movements.
222
+     *\sa step(), move()
223
+     */
224
+    char isMoving(void);
225
+    
226
+    /*!
227
+     * \brief Get the number of steps left in the current movement.
228
+     * \return The number of steps left in the movement. This number is always positive.
229
+     */
230
+    unsigned int getStepsLeft(void);
231
+    
232
+    /*!
233
+     * \brief Stops the motor regardless if it moves or not.
234
+     * \return -1 if the motor was moving and is really stoped or 0 if it was not moving at all.
235
+     *
236
+     * This method directly and apruptely stops the motor and may be used as an emergency stop.
237
+     */
238
+    char stop(void);
239
+    
240
+    /*!
241
+     * \brief Sets and configure the classical Constant Off Timer Chopper
242
+     * \param constant_off_time The off time setting controls the minimum chopper frequency. For most applications an off time within the range of 5μs to 20μs will fit. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. 0: chopper off, 1:15: off time setting (1 will work with minimum blank time of 24 clocks)
243
+     * \param blank_time Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most low current drivers, a setting of 1 or 2 is good. For high current applications with large MOSFETs, a setting of 2 or 3 will be required. 0 (min setting) … (3) amx setting
244
+     * \param fast_decay_time_setting Fast decay time setting. Controls the portion of fast decay for each chopper cycle. 0: slow decay only, 1…15: duration of fast decay phase
245
+     * \param sine_wave_offset Sine wave offset. Controls the sine wave offset. A positive offset corrects for zero crossing error. -3…-1: negative offset, 0: no offset,1…12: positive offset
246
+     * \param use_curreent_comparator Selects usage of the current comparator for termination of the fast decay cycle. If current comparator is enabled, it terminates the fast decay cycle in case the current reaches a higher negative value than the actual positive value. (0 disable, -1 enable).
247
+     *
248
+     * The classic constant off time chopper uses a fixed portion of fast decay following each on phase. 
249
+     * While the duration of the on time is determined by the chopper comparator, the fast decay time needs 
250
+     * to be set by the user in a way, that the current decay is enough for the driver to be able to follow 
251
+     * the falling slope of the sine wave, and on the other hand it should not be too long, in order to minimize 
252
+     * motor current ripple and power dissipation. This best can be tuned using an oscilloscope or 
253
+     * trying out motor smoothness at different velocities. A good starting value is a fast decay time setting 
254
+     * similar to the slow decay time setting.
255
+     * After tuning of the fast decay time, the offset should be determined, in order to have a smooth zero transition. 
256
+     * This is necessary, because the fast decay phase leads to the absolute value of the motor current being lower 
257
+     * than the target current (see figure 17). If the zero offset is too low, the motor stands still for a short 
258
+     * moment during current zero crossing, if it is set too high, it makes a larger microstep.
259
+     * Typically, a positive offset setting is required for optimum operation.
260
+     *
261
+     * \sa setSpreadCycleChoper() for other alternatives.
262
+     * \sa setRandomOffTime() for spreading the noise over a wider spectrum
263
+     */
264
+	void setConstantOffTimeChopper(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator);
265
+    
266
+    /*!
267
+     * \brief Sets and configures with spread cycle chopper.
268
+     * \param constant_off_time The off time setting controls the minimum chopper frequency. For most applications an off time within the range of 5μs to 20μs will fit. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. 0: chopper off, 1:15: off time setting (1 will work with minimum blank time of 24 clocks)
269
+     * \param blank_time Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most low current drivers, a setting of 1 or 2 is good. For high current applications with large MOSFETs, a setting of 2 or 3 will be required. 0 (min setting) … (3) amx setting
270
+     * \param hysteresis_start Hysteresis start setting. Please remark, that this value is an offset to the hysteresis end value. 1 … 8
271
+     * \param hysteresis_end Hysteresis end setting. Sets the hysteresis end value after a number of decrements. Decrement interval time is controlled by hysteresis_decrement. The sum hysteresis_start + hysteresis_end must be <16. At a current setting CS of max. 30 (amplitude reduced to 240), the sum is not limited.
272
+     * \param hysteresis_decrement Hysteresis decrement setting. This setting determines the slope of the hysteresis during on time and during fast decay time. 0 (fast decrement) … 3 (slow decrement).
273
+     *
274
+     * The spreadCycle chopper scheme (pat.fil.) is a precise and simple to use chopper principle, which automatically determines 
275
+     * the optimum fast decay portion for the motor. Anyhow, a number of settings can be made in order to optimally fit the driver 
276
+     * to the motor.
277
+     * Each chopper cycle is comprised of an on-phase, a slow decay phase, a fast decay phase and a second slow decay phase.
278
+     * The slow decay phases limit the maximum chopper frequency and are important for low motor and driver power dissipation. 
279
+     * The hysteresis start setting limits the chopper frequency by forcing the driver to introduce a minimum amount of 
280
+     * current ripple into the motor coils. The motor inductivity determines the ability to follow a changing motor current. 
281
+     * The duration of the on- and fast decay phase needs to cover at least the blank time, because the current comparator is 
282
+     * disabled during this time.
283
+     * 
284
+     * \sa setRandomOffTime() for spreading the noise over a wider spectrum
285
+     */
286
+	void setSpreadCycleChopper(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement);
287
+
288
+	/*!
289
+     * \brief Use random off time for noise reduction (0 for off, -1 for on).
290
+     * \param value 0 for off, -1 for on
291
+     *
292
+     * In a constant off time chopper scheme both coil choppers run freely, i.e. are not synchronized. 
293
+     * The frequency of each chopper mainly depends on the coil current and the position dependant motor coil inductivity, 
294
+     * thus it depends on the microstep position. With some motors a slightly audible beat can occur between the chopper 
295
+     * frequencies, especially when they are near to each other. This typically occurs at a few microstep positions within 
296
+     * each quarter wave. 
297
+     * This effect normally is not audible when compared to mechanical noise generated by ball bearings, 
298
+     * etc. Further factors which can cause a similar effect are a poor layout of sense resistor GND connection.
299
+     * In order to minimize the effect of a beat between both chopper frequencies, an internal random generator is provided. 
300
+     * It modulates the slow decay time setting when switched on. The random off time feature further spreads the chopper spectrum,
301
+     * reducing electromagnetic emission on single frequencies.
302
+     */
303
+	void setRandomOffTime(char value);
304
+    
305
+	/*!
306
+     * \brief set the maximum motor current in mA (1000 is 1 Amp)
307
+     * Keep in mind this is the maximum peak Current. The RMS current will be 1/sqrt(2) smaller. The actual current can also be smaller
308
+     * by employing CoolStep.
309
+     * \param current the maximum motor current in mA
310
+     * \sa getCurrent(), getCurrentCurrent()
311
+     */
312
+	void setCurrent(unsigned int current);
313
+    
314
+    /*!
315
+     * \brief readout the motor maximum current in mA (1000 is an Amp)
316
+     * This is the maximum current. to get the current current - which may be affected by CoolStep us getCurrentCurrent()
317
+     *\return the maximum motor current in milli amps
318
+     * \sa getCurrentCurrent()
319
+     */
320
+    unsigned int getCurrent(void);
321
+    
322
+	/*!
323
+     * \brief set the StallGuard threshold in order to get sensible StallGuard readings.
324
+     * \param stall_guard_threshold -64 … 63 the StallGuard threshold
325
+     * \param stall_guard_filter_enabled 0 if the filter is disabled, -1 if it is enabled
326
+     *
327
+     * The StallGuard threshold is used to optimize the StallGuard reading to sensible values. It should be at 0 at
328
+     * the maximum allowable load on the otor (but not before). = is a good starting point (and the default)
329
+     * If you get Stall Gaurd readings of 0 without any load or with too little laod increase the value.
330
+     * If you get readings of 1023 even with load decrease the setting.
331
+     *
332
+     * If you switch on the filter the StallGuard reading is only updated each 4th full step to reduce the noise in the
333
+     * reading.
334
+     * 
335
+     * \sa getCurrentStallGuardReading() to read out the current value.
336
+     */ 
337
+	void setStallGuardThreshold(char stall_guard_threshold, char stall_guard_filter_enabled);
338
+    
339
+    /*!
340
+     * \brief reads out the StallGuard threshold
341
+     * \return a number between -64 and 63.
342
+     */
343
+    char getStallGuardThreshold(void);
344
+    
345
+    /*!
346
+     * \brief returns the current setting of the StallGuard filter
347
+     * \return 0 if not set, -1 if set
348
+     */
349
+    char getStallGuardFilter(void);
350
+    
351
+    /*!
352
+     * \brief This method configures the CoolStep smart energy operation. You must have a proper StallGuard configuration for the motor situation (current, voltage, speed) in rder to use this feature.
353
+     * \param lower_SG_threshold Sets the lower threshold for stallGuard2TM reading. Below this value, the motor current becomes increased. Allowed values are 0...480
354
+     * \param SG_hysteresis Sets the distance between the lower and the upper threshold for stallGuard2TM reading. Above the upper threshold (which is lower_SG_threshold+SG_hysteresis+1) the motor current becomes decreased. Allowed values are 0...480
355
+     * \param current_decrement_step_size Sets the current decrement steps. If the StallGuard value is above the threshold the current gets decremented by this step size. 0...32
356
+     * \param current_increment_step_size Sets the current increment step. The current becomes incremented for each measured stallGuard2TM value below the lower threshold. 0...8
357
+     * \param lower_current_limit Sets the lower motor current limit for coolStepTM operation by scaling the CS value. Values can be COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
358
+     * The CoolStep smart energy operation automatically adjust the current sent into the motor according to the current load,
359
+     * read out by the StallGuard in order to provide the optimum torque with the minimal current consumption.
360
+     * You configure the CoolStep current regulator by defining upper and lower bounds of StallGuard readouts. If the readout is above the 
361
+     * limit the current gets increased, below the limit the current gets decreased.
362
+     * You can specify the upper an lower threshold of the StallGuard readout in order to adjust the current. You can also set the number of
363
+     * StallGuard readings neccessary above or below the limit to get a more stable current adjustement.
364
+     * The current adjustement itself is configured by the number of steps the current gests in- or decreased and the absolut minimum current
365
+     * (1/2 or 1/4th otf the configured current).
366
+     * \sa COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
367
+     */
368
+    void setCoolStepConfiguration(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size,
369
+                                  unsigned char current_increment_step_size, unsigned char lower_current_limit);
370
+    
371
+    /*!
372
+     * \brief enables or disables the CoolStep smart energy operation feature. It must be configured before enabling it.
373
+     * \param enabled true if CoolStep should be enabled, false if not.
374
+     * \sa setCoolStepConfiguration()
375
+     */
376
+    void setCoolStepEnabled(boolean enabled);
377
+    
378
+    
379
+    /*!
380
+     * \brief check if the CoolStep feature is enabled
381
+     * \sa setCoolStepEnabled()
382
+     */
383
+    boolean isCoolStepEnabled();
384
+
385
+    /*!
386
+     * \brief returns the lower StallGuard threshold for the CoolStep operation
387
+     * \sa setCoolStepConfiguration()
388
+     */
389
+    unsigned int getCoolStepLowerSgThreshold();
390
+    
391
+    /*!
392
+     * \brief returns the upper StallGuard threshold for the CoolStep operation
393
+     * \sa setCoolStepConfiguration()
394
+     */
395
+    unsigned int getCoolStepUpperSgThreshold();
396
+    
397
+    /*!
398
+     * \brief returns the number of StallGuard readings befor CoolStep adjusts the motor current.
399
+     * \sa setCoolStepConfiguration()
400
+     */
401
+    unsigned char getCoolStepNumberOfSGReadings();
402
+    
403
+    /*!
404
+     * \brief returns the increment steps for the current for the CoolStep operation
405
+     * \sa setCoolStepConfiguration()
406
+     */
407
+    unsigned char getCoolStepCurrentIncrementSize();
408
+    
409
+    /*!
410
+     * \brief returns the absolut minium current for the CoolStep operation
411
+     * \sa setCoolStepConfiguration()
412
+     * \sa COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
413
+     */
414
+    unsigned char getCoolStepLowerCurrentLimit();
415
+    
416
+	/*!
417
+     * \brief Get the current microstep position for phase A
418
+     * \return The current microstep position for phase A 0…255
419
+     * 
420
+     * Keep in mind that this routine reads and writes a value via SPI - so this may take a bit time.
421
+     */
422
+	int getMotorPosition(void);
423
+    
424
+    /*!
425
+     * \brief Reads the current StallGuard value.
426
+     * \return The current StallGuard value, lesser values indicate higher load, 0 means stall detected.
427
+     * Keep in mind that this routine reads and writes a value via SPI - so this may take a bit time.
428
+     * \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
429
+     */
430
+	int getCurrentStallGuardReading(void);
431
+    
432
+    /*!
433
+     * \brief Reads the current current setting value as fraction of the maximum current
434
+     * Returns values between 0 and 31, representing 1/32 to 32/32 (=1)
435
+     * \sa setCoolStepConfiguration()
436
+     */
437
+    unsigned char getCurrentCSReading(void);
438
+    
439
+    
440
+    /*!
441
+     *\brief a convenience method to determine if the current scaling uses 0.31V or 0.165V as reference.
442
+     *\return false if 0.13V is the reference voltage, true if 0.165V is used.
443
+     */
444
+    boolean isCurrentScalingHalfed();
445
+
446
+    /*!
447
+     * \brief Reads the current current setting value and recalculates the absolute current in mA (1A would be 1000).
448
+     * This method calculates the currently used current setting (either by setting or by CoolStep) and reconstructs
449
+     * the current in mA by usinge the VSENSE and resistor value. This method uses floating point math - so it 
450
+     * may not be the fastest.
451
+     * \sa getCurrentCSReading(), getResistor(), isCurrentScalingHalfed(), getCurrent()
452
+     */
453
+    unsigned int getCurrentCurrent(void);
454
+    
455
+    /*!
456
+     * \brief checks if there is a StallGuard warning in the last status
457
+     * \return 0 if there was no warning, -1 if there was some warning.
458
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
459
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
460
+     *
461
+     * \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
462
+     */
463
+	boolean isStallGuardOverThreshold(void);
464
+    
465
+    /*!
466
+     * \brief Return over temperature status of the last status readout
467
+     * return 0 is everything is OK, TMC26X_OVERTEMPERATURE_PREWARING if status is reached, TMC26X_OVERTEMPERATURE_SHUTDOWN is the chip is shutdown, -1 if the status is unknown.
468
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
469
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
470
+     */
471
+	char getOverTemperature(void);
472
+    
473
+    /*!
474
+     * \brief Is motor channel A shorted to ground detected in the last status readout.
475
+     * \return true is yes, false if not.
476
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
477
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
478
+     */
479
+     
480
+	boolean isShortToGroundA(void);
481
+
482
+    /*!
483
+     * \brief Is motor channel B shorted to ground detected in the last status readout.
484
+     * \return true is yes, false if not.
485
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
486
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
487
+     */
488
+	boolean isShortToGroundB(void);
489
+	/*!
490
+     * \brief iIs motor channel A connected according to the last statu readout.
491
+     * \return true is yes, false if not.
492
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
493
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
494
+     */
495
+	boolean isOpenLoadA(void);
496
+
497
+	/*!
498
+     * \brief iIs motor channel A connected according to the last statu readout.
499
+     * \return true is yes, false if not.
500
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
501
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
502
+     */
503
+	boolean isOpenLoadB(void);
504
+    
505
+    /*!
506
+     * \brief Is chopper inactive since 2^20 clock cycles - defaults to ~0,08s
507
+     * \return true is yes, false if not.
508
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
509
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
510
+     */
511
+	boolean isStandStill(void);
512
+
513
+    /*!
514
+     * \brief checks if there is a StallGuard warning in the last status
515
+     * \return 0 if there was no warning, -1 if there was some warning.
516
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
517
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
518
+     *
519
+     * \sa isStallGuardOverThreshold()
520
+     * TODO why?
521
+     *
522
+     * \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
523
+     */
524
+	boolean isStallGuardReached(void);
525
+    
526
+    /*!
527
+     *\brief enables or disables the motor driver bridges. If disabled the motor can run freely. If enabled not.
528
+     *\param enabled a boolean value true if the motor should be enabled, false otherwise.
529
+     */
530
+    void setEnabled(boolean enabled);
531
+    
532
+    /*!
533
+     *\brief checks if the output bridges are enabled. If the bridges are not enabled the motor can run freely
534
+     *\return true if the bridges and by that the motor driver are enabled, false if not.
535
+     *\sa setEnabled()
536
+     */
537
+    boolean isEnabled();
538
+
539
+	/*!
540
+     * \brief Manually read out the status register
541
+     * This function sends a byte to the motor driver in order to get the current readout. The parameter read_value
542
+     * seletcs which value will get returned. If the read_vlaue changes in respect to the previous readout this method
543
+     * automatically send two bytes to the motor: one to set the redout and one to get the actual readout. So this method 
544
+     * may take time to send and read one or two bits - depending on the previous readout.
545
+     * \param read_value selects which value to read out (0..3). You can use the defines TMC26X_READOUT_POSITION, TMC_262_READOUT_STALLGUARD, or TMC_262_READOUT_CURRENT
546
+     * \sa TMC26X_READOUT_POSITION, TMC_262_READOUT_STALLGUARD, TMC_262_READOUT_CURRENT
547
+     */
548
+	void readStatus(char read_value);
549
+    
550
+    /*!
551
+     * \brief Returns the current sense resistor value in milliohm.
552
+     * The default value of ,15 Ohm will return 150.
553
+     */
554
+    int getResistor();
555
+
556
+    /*!
557
+     * \brief Prints out all the information that can be found in the last status read out - it does not force a status readout. 
558
+     * The result is printed via Serial
559
+     */
560
+	void debugLastStatus(void);
561
+	/*!
562
+     * \brief library version
563
+     * \return the version number as int.
564
+     */
565
+    int version(void);
566
+
567
+  private:    
568
+  	unsigned int steps_left;		//the steps the motor has to do to complete the movement
569
+    int direction;        // Direction of rotation
570
+    unsigned long step_delay;    // delay between steps, in ms, based on speed
571
+    int number_of_steps;      // total number of steps this motor can take
572
+    unsigned int speed; // we need to store the current speed in order to change the speed after changing microstepping
573
+    unsigned int resistor; //current sense resitor value in milliohm
574
+        
575
+    unsigned long last_step_time;      // time stamp in ms of when the last step was taken
576
+    unsigned long next_step_time;      // time stamp in ms of when the last step was taken
577
+	
578
+	//driver control register copies to easily set & modify the registers
579
+	unsigned long driver_control_register_value;
580
+	unsigned long chopper_config_register;
581
+	unsigned long cool_step_register_value;
582
+	unsigned long stall_guard2_current_register_value;
583
+	unsigned long driver_configuration_register_value;
584
+	//the driver status result
585
+	unsigned long driver_status_result;
586
+	
587
+	//helper routione to get the top 10 bit of the readout
588
+	inline int getReadoutValue();
589
+	
590
+	//the pins for the stepper driver
591
+	unsigned char cs_pin;
592
+	unsigned char step_pin;
593
+	unsigned char dir_pin;
594
+	
595
+	//status values 
596
+	boolean started; //if the stepper has been started yet
597
+	int microsteps; //the current number of micro steps
598
+    char constant_off_time; //we need to remember this value in order to enable and disable the motor
599
+    unsigned char cool_step_lower_threshold; // we need to remember the threshold to enable and disable the CoolStep feature
600
+    boolean cool_step_enabled; //we need to remember this to configure the coolstep if it si enabled
601
+	
602
+	//SPI sender
603
+	inline void send262(unsigned long datagram);
604
+};
605
+
606
+#endif
607
+

+ 848
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp.html View File

@@ -0,0 +1,848 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.cpp File Reference</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="summary">
55
+<a href="#define-members">Defines</a>  </div>
56
+  <div class="headertitle">
57
+<div class="title">TMC26XStepper.cpp File Reference</div>  </div>
58
+</div><!--header-->
59
+<div class="contents">
60
+<div class="textblock"><code>#include &lt;WProgram.h&gt;</code><br/>
61
+<code>#include &lt;SPI.h&gt;</code><br/>
62
+<code>#include &quot;<a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>&quot;</code><br/>
63
+</div>
64
+<p><a href="_t_m_c26_x_stepper_8cpp_source.html">Go to the source code of this file.</a></p>
65
+<table class="memberdecls">
66
+<tr><td colspan="2"><h2><a name="define-members"></a>
67
+Defines</h2></td></tr>
68
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">DEFAULT_MICROSTEPPING_VALUE</a>&#160;&#160;&#160;32</td></tr>
69
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">DRIVER_CONTROL_REGISTER</a>&#160;&#160;&#160;0x0ul</td></tr>
70
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">CHOPPER_CONFIG_REGISTER</a>&#160;&#160;&#160;0x80000ul</td></tr>
71
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">COOL_STEP_REGISTER</a>&#160;&#160;&#160;0xA0000ul</td></tr>
72
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">STALL_GUARD2_LOAD_MEASURE_REGISTER</a>&#160;&#160;&#160;0xC0000ul</td></tr>
73
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">DRIVER_CONFIG_REGISTER</a>&#160;&#160;&#160;0xE0000ul</td></tr>
74
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">REGISTER_BIT_PATTERN</a>&#160;&#160;&#160;0xFFFFFul</td></tr>
75
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">MICROSTEPPING_PATTERN</a>&#160;&#160;&#160;0xFul</td></tr>
76
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">STEP_INTERPOLATION</a>&#160;&#160;&#160;0x200ul</td></tr>
77
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">DOUBLE_EDGE_STEP</a>&#160;&#160;&#160;0x100ul</td></tr>
78
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">VSENSE</a>&#160;&#160;&#160;0x40ul</td></tr>
79
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">READ_MICROSTEP_POSTION</a>&#160;&#160;&#160;0x0ul</td></tr>
80
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">READ_STALL_GUARD_READING</a>&#160;&#160;&#160;0x10ul</td></tr>
81
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">READ_STALL_GUARD_AND_COOL_STEP</a>&#160;&#160;&#160;0x20ul</td></tr>
82
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">READ_SELECTION_PATTERN</a>&#160;&#160;&#160;0x30ul</td></tr>
83
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">CHOPPER_MODE_STANDARD</a>&#160;&#160;&#160;0x0ul</td></tr>
84
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">CHOPPER_MODE_T_OFF_FAST_DECAY</a>&#160;&#160;&#160;0x4000ul</td></tr>
85
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">T_OFF_PATTERN</a>&#160;&#160;&#160;0xful</td></tr>
86
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">RANDOM_TOFF_TIME</a>&#160;&#160;&#160;0x2000ul</td></tr>
87
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">BLANK_TIMING_PATTERN</a>&#160;&#160;&#160;0x18000ul</td></tr>
88
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">BLANK_TIMING_SHIFT</a>&#160;&#160;&#160;15</td></tr>
89
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">HYSTERESIS_DECREMENT_PATTERN</a>&#160;&#160;&#160;0x1800ul</td></tr>
90
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">HYSTERESIS_DECREMENT_SHIFT</a>&#160;&#160;&#160;11</td></tr>
91
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">HYSTERESIS_LOW_VALUE_PATTERN</a>&#160;&#160;&#160;0x780ul</td></tr>
92
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">HYSTERESIS_LOW_SHIFT</a>&#160;&#160;&#160;7</td></tr>
93
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">HYSTERESIS_START_VALUE_PATTERN</a>&#160;&#160;&#160;0x78ul</td></tr>
94
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">HYSTERESIS_START_VALUE_SHIFT</a>&#160;&#160;&#160;4</td></tr>
95
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">T_OFF_TIMING_PATERN</a>&#160;&#160;&#160;0xFul</td></tr>
96
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">MINIMUM_CURRENT_FOURTH</a>&#160;&#160;&#160;0x8000ul</td></tr>
97
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">CURRENT_DOWN_STEP_SPEED_PATTERN</a>&#160;&#160;&#160;0x6000ul</td></tr>
98
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">SE_MAX_PATTERN</a>&#160;&#160;&#160;0xF00ul</td></tr>
99
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">SE_CURRENT_STEP_WIDTH_PATTERN</a>&#160;&#160;&#160;0x60ul</td></tr>
100
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">SE_MIN_PATTERN</a>&#160;&#160;&#160;0xful</td></tr>
101
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">STALL_GUARD_FILTER_ENABLED</a>&#160;&#160;&#160;0x10000ul</td></tr>
102
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">STALL_GUARD_TRESHHOLD_VALUE_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td></tr>
103
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">CURRENT_SCALING_PATTERN</a>&#160;&#160;&#160;0x1Ful</td></tr>
104
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">STALL_GUARD_CONFIG_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td></tr>
105
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">STALL_GUARD_VALUE_PATTERN</a>&#160;&#160;&#160;0x7F00ul</td></tr>
106
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">STATUS_STALL_GUARD_STATUS</a>&#160;&#160;&#160;0x1ul</td></tr>
107
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">STATUS_OVER_TEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;0x2ul</td></tr>
108
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">STATUS_OVER_TEMPERATURE_WARNING</a>&#160;&#160;&#160;0x4ul</td></tr>
109
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">STATUS_SHORT_TO_GROUND_A</a>&#160;&#160;&#160;0x8ul</td></tr>
110
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">STATUS_SHORT_TO_GROUND_B</a>&#160;&#160;&#160;0x10ul</td></tr>
111
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">STATUS_OPEN_LOAD_A</a>&#160;&#160;&#160;0x20ul</td></tr>
112
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">STATUS_OPEN_LOAD_B</a>&#160;&#160;&#160;0x40ul</td></tr>
113
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">STATUS_STAND_STILL</a>&#160;&#160;&#160;0x80ul</td></tr>
114
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">READOUT_VALUE_PATTERN</a>&#160;&#160;&#160;0xFFC00ul</td></tr>
115
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">INITIAL_MICROSTEPPING</a>&#160;&#160;&#160;0x3ul</td></tr>
116
+</table>
117
+<hr/><h2>Define Documentation</h2>
118
+<a class="anchor" id="a42cb2ce84258587d514ec3268548ba89"></a><!-- doxytag: member="TMC26XStepper.cpp::BLANK_TIMING_PATTERN" ref="a42cb2ce84258587d514ec3268548ba89" args="" -->
119
+<div class="memitem">
120
+<div class="memproto">
121
+      <table class="memname">
122
+        <tr>
123
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">BLANK_TIMING_PATTERN</a>&#160;&#160;&#160;0x18000ul</td>
124
+        </tr>
125
+      </table>
126
+</div>
127
+<div class="memdoc">
128
+
129
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00063">63</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
130
+
131
+</div>
132
+</div>
133
+<a class="anchor" id="abdac78f7f2c506972265a8e5883e1eae"></a><!-- doxytag: member="TMC26XStepper.cpp::BLANK_TIMING_SHIFT" ref="abdac78f7f2c506972265a8e5883e1eae" args="" -->
134
+<div class="memitem">
135
+<div class="memproto">
136
+      <table class="memname">
137
+        <tr>
138
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">BLANK_TIMING_SHIFT</a>&#160;&#160;&#160;15</td>
139
+        </tr>
140
+      </table>
141
+</div>
142
+<div class="memdoc">
143
+
144
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00064">64</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
145
+
146
+</div>
147
+</div>
148
+<a class="anchor" id="a70a540d1090b989b8600b5e4776659fe"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_CONFIG_REGISTER" ref="a70a540d1090b989b8600b5e4776659fe" args="" -->
149
+<div class="memitem">
150
+<div class="memproto">
151
+      <table class="memname">
152
+        <tr>
153
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">CHOPPER_CONFIG_REGISTER</a>&#160;&#160;&#160;0x80000ul</td>
154
+        </tr>
155
+      </table>
156
+</div>
157
+<div class="memdoc">
158
+
159
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00041">41</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
160
+
161
+</div>
162
+</div>
163
+<a class="anchor" id="a57418a67ff726d540b813230bca1d536"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_MODE_STANDARD" ref="a57418a67ff726d540b813230bca1d536" args="" -->
164
+<div class="memitem">
165
+<div class="memproto">
166
+      <table class="memname">
167
+        <tr>
168
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">CHOPPER_MODE_STANDARD</a>&#160;&#160;&#160;0x0ul</td>
169
+        </tr>
170
+      </table>
171
+</div>
172
+<div class="memdoc">
173
+
174
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00059">59</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
175
+
176
+</div>
177
+</div>
178
+<a class="anchor" id="aaf1b564ced7de8ff3245c964e3775826"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_MODE_T_OFF_FAST_DECAY" ref="aaf1b564ced7de8ff3245c964e3775826" args="" -->
179
+<div class="memitem">
180
+<div class="memproto">
181
+      <table class="memname">
182
+        <tr>
183
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">CHOPPER_MODE_T_OFF_FAST_DECAY</a>&#160;&#160;&#160;0x4000ul</td>
184
+        </tr>
185
+      </table>
186
+</div>
187
+<div class="memdoc">
188
+
189
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00060">60</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
190
+
191
+</div>
192
+</div>
193
+<a class="anchor" id="ab9828bfaa075a0a8647c709136016317"></a><!-- doxytag: member="TMC26XStepper.cpp::COOL_STEP_REGISTER" ref="ab9828bfaa075a0a8647c709136016317" args="" -->
194
+<div class="memitem">
195
+<div class="memproto">
196
+      <table class="memname">
197
+        <tr>
198
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">COOL_STEP_REGISTER</a>&#160;&#160;&#160;0xA0000ul</td>
199
+        </tr>
200
+      </table>
201
+</div>
202
+<div class="memdoc">
203
+
204
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00042">42</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
205
+
206
+</div>
207
+</div>
208
+<a class="anchor" id="adbe13a0464355e42fbe786ca5f58ed8d"></a><!-- doxytag: member="TMC26XStepper.cpp::CURRENT_DOWN_STEP_SPEED_PATTERN" ref="adbe13a0464355e42fbe786ca5f58ed8d" args="" -->
209
+<div class="memitem">
210
+<div class="memproto">
211
+      <table class="memname">
212
+        <tr>
213
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">CURRENT_DOWN_STEP_SPEED_PATTERN</a>&#160;&#160;&#160;0x6000ul</td>
214
+        </tr>
215
+      </table>
216
+</div>
217
+<div class="memdoc">
218
+
219
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00075">75</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
220
+
221
+</div>
222
+</div>
223
+<a class="anchor" id="a99dcb8c6d98b0b54c23699a3f90450e4"></a><!-- doxytag: member="TMC26XStepper.cpp::CURRENT_SCALING_PATTERN" ref="a99dcb8c6d98b0b54c23699a3f90450e4" args="" -->
224
+<div class="memitem">
225
+<div class="memproto">
226
+      <table class="memname">
227
+        <tr>
228
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">CURRENT_SCALING_PATTERN</a>&#160;&#160;&#160;0x1Ful</td>
229
+        </tr>
230
+      </table>
231
+</div>
232
+<div class="memdoc">
233
+
234
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00083">83</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
235
+
236
+</div>
237
+</div>
238
+<a class="anchor" id="a6560b3471273e99e280ba795e3469ede"></a><!-- doxytag: member="TMC26XStepper.cpp::DEFAULT_MICROSTEPPING_VALUE" ref="a6560b3471273e99e280ba795e3469ede" args="" -->
239
+<div class="memitem">
240
+<div class="memproto">
241
+      <table class="memname">
242
+        <tr>
243
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">DEFAULT_MICROSTEPPING_VALUE</a>&#160;&#160;&#160;32</td>
244
+        </tr>
245
+      </table>
246
+</div>
247
+<div class="memdoc">
248
+
249
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00037">37</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
250
+
251
+</div>
252
+</div>
253
+<a class="anchor" id="a770601bf0153e4bc639b9c3005b15af7"></a><!-- doxytag: member="TMC26XStepper.cpp::DOUBLE_EDGE_STEP" ref="a770601bf0153e4bc639b9c3005b15af7" args="" -->
254
+<div class="memitem">
255
+<div class="memproto">
256
+      <table class="memname">
257
+        <tr>
258
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">DOUBLE_EDGE_STEP</a>&#160;&#160;&#160;0x100ul</td>
259
+        </tr>
260
+      </table>
261
+</div>
262
+<div class="memdoc">
263
+
264
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00051">51</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
265
+
266
+</div>
267
+</div>
268
+<a class="anchor" id="af35f569d42ea3b1d634901a3b6a908ee"></a><!-- doxytag: member="TMC26XStepper.cpp::DRIVER_CONFIG_REGISTER" ref="af35f569d42ea3b1d634901a3b6a908ee" args="" -->
269
+<div class="memitem">
270
+<div class="memproto">
271
+      <table class="memname">
272
+        <tr>
273
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">DRIVER_CONFIG_REGISTER</a>&#160;&#160;&#160;0xE0000ul</td>
274
+        </tr>
275
+      </table>
276
+</div>
277
+<div class="memdoc">
278
+
279
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00044">44</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
280
+
281
+</div>
282
+</div>
283
+<a class="anchor" id="a108f18bf4a30a0e0f0991ac0e4ce0579"></a><!-- doxytag: member="TMC26XStepper.cpp::DRIVER_CONTROL_REGISTER" ref="a108f18bf4a30a0e0f0991ac0e4ce0579" args="" -->
284
+<div class="memitem">
285
+<div class="memproto">
286
+      <table class="memname">
287
+        <tr>
288
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">DRIVER_CONTROL_REGISTER</a>&#160;&#160;&#160;0x0ul</td>
289
+        </tr>
290
+      </table>
291
+</div>
292
+<div class="memdoc">
293
+
294
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00040">40</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
295
+
296
+</div>
297
+</div>
298
+<a class="anchor" id="a424c248097b38c1e29e6a58ad48e6bd9"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_DECREMENT_PATTERN" ref="a424c248097b38c1e29e6a58ad48e6bd9" args="" -->
299
+<div class="memitem">
300
+<div class="memproto">
301
+      <table class="memname">
302
+        <tr>
303
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">HYSTERESIS_DECREMENT_PATTERN</a>&#160;&#160;&#160;0x1800ul</td>
304
+        </tr>
305
+      </table>
306
+</div>
307
+<div class="memdoc">
308
+
309
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00065">65</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
310
+
311
+</div>
312
+</div>
313
+<a class="anchor" id="a36e554a87785ce6ba998b79aae9e74e0"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_DECREMENT_SHIFT" ref="a36e554a87785ce6ba998b79aae9e74e0" args="" -->
314
+<div class="memitem">
315
+<div class="memproto">
316
+      <table class="memname">
317
+        <tr>
318
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">HYSTERESIS_DECREMENT_SHIFT</a>&#160;&#160;&#160;11</td>
319
+        </tr>
320
+      </table>
321
+</div>
322
+<div class="memdoc">
323
+
324
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00066">66</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
325
+
326
+</div>
327
+</div>
328
+<a class="anchor" id="a38ce0bb0fa20db28351ac9167f28db98"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_LOW_SHIFT" ref="a38ce0bb0fa20db28351ac9167f28db98" args="" -->
329
+<div class="memitem">
330
+<div class="memproto">
331
+      <table class="memname">
332
+        <tr>
333
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">HYSTERESIS_LOW_SHIFT</a>&#160;&#160;&#160;7</td>
334
+        </tr>
335
+      </table>
336
+</div>
337
+<div class="memdoc">
338
+
339
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00068">68</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
340
+
341
+</div>
342
+</div>
343
+<a class="anchor" id="ad9d2302f6d61cd84a612a2e2bcdeb56e"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_LOW_VALUE_PATTERN" ref="ad9d2302f6d61cd84a612a2e2bcdeb56e" args="" -->
344
+<div class="memitem">
345
+<div class="memproto">
346
+      <table class="memname">
347
+        <tr>
348
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">HYSTERESIS_LOW_VALUE_PATTERN</a>&#160;&#160;&#160;0x780ul</td>
349
+        </tr>
350
+      </table>
351
+</div>
352
+<div class="memdoc">
353
+
354
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00067">67</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
355
+
356
+</div>
357
+</div>
358
+<a class="anchor" id="a0de4e98b412dced62c3a4452b7483af3"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_START_VALUE_PATTERN" ref="a0de4e98b412dced62c3a4452b7483af3" args="" -->
359
+<div class="memitem">
360
+<div class="memproto">
361
+      <table class="memname">
362
+        <tr>
363
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">HYSTERESIS_START_VALUE_PATTERN</a>&#160;&#160;&#160;0x78ul</td>
364
+        </tr>
365
+      </table>
366
+</div>
367
+<div class="memdoc">
368
+
369
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00069">69</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
370
+
371
+</div>
372
+</div>
373
+<a class="anchor" id="ac2c1c939256126e605396c4aaee3c804"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_START_VALUE_SHIFT" ref="ac2c1c939256126e605396c4aaee3c804" args="" -->
374
+<div class="memitem">
375
+<div class="memproto">
376
+      <table class="memname">
377
+        <tr>
378
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">HYSTERESIS_START_VALUE_SHIFT</a>&#160;&#160;&#160;4</td>
379
+        </tr>
380
+      </table>
381
+</div>
382
+<div class="memdoc">
383
+
384
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00070">70</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
385
+
386
+</div>
387
+</div>
388
+<a class="anchor" id="a54a6d12e96d851361974b10614a00e45"></a><!-- doxytag: member="TMC26XStepper.cpp::INITIAL_MICROSTEPPING" ref="a54a6d12e96d851361974b10614a00e45" args="" -->
389
+<div class="memitem">
390
+<div class="memproto">
391
+      <table class="memname">
392
+        <tr>
393
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">INITIAL_MICROSTEPPING</a>&#160;&#160;&#160;0x3ul</td>
394
+        </tr>
395
+      </table>
396
+</div>
397
+<div class="memdoc">
398
+
399
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00099">99</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
400
+
401
+</div>
402
+</div>
403
+<a class="anchor" id="a8f5cb0c066109ffb18cefc0e85ee1d1b"></a><!-- doxytag: member="TMC26XStepper.cpp::MICROSTEPPING_PATTERN" ref="a8f5cb0c066109ffb18cefc0e85ee1d1b" args="" -->
404
+<div class="memitem">
405
+<div class="memproto">
406
+      <table class="memname">
407
+        <tr>
408
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">MICROSTEPPING_PATTERN</a>&#160;&#160;&#160;0xFul</td>
409
+        </tr>
410
+      </table>
411
+</div>
412
+<div class="memdoc">
413
+
414
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00049">49</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
415
+
416
+</div>
417
+</div>
418
+<a class="anchor" id="a8a261a77d198b85f6dd8416387b354b3"></a><!-- doxytag: member="TMC26XStepper.cpp::MINIMUM_CURRENT_FOURTH" ref="a8a261a77d198b85f6dd8416387b354b3" args="" -->
419
+<div class="memitem">
420
+<div class="memproto">
421
+      <table class="memname">
422
+        <tr>
423
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">MINIMUM_CURRENT_FOURTH</a>&#160;&#160;&#160;0x8000ul</td>
424
+        </tr>
425
+      </table>
426
+</div>
427
+<div class="memdoc">
428
+
429
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00074">74</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
430
+
431
+</div>
432
+</div>
433
+<a class="anchor" id="a64520580cffd416668f3b91bd60f84e1"></a><!-- doxytag: member="TMC26XStepper.cpp::RANDOM_TOFF_TIME" ref="a64520580cffd416668f3b91bd60f84e1" args="" -->
434
+<div class="memitem">
435
+<div class="memproto">
436
+      <table class="memname">
437
+        <tr>
438
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">RANDOM_TOFF_TIME</a>&#160;&#160;&#160;0x2000ul</td>
439
+        </tr>
440
+      </table>
441
+</div>
442
+<div class="memdoc">
443
+
444
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00062">62</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
445
+
446
+</div>
447
+</div>
448
+<a class="anchor" id="a143b7757272f07866d9655bde8303d9a"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_MICROSTEP_POSTION" ref="a143b7757272f07866d9655bde8303d9a" args="" -->
449
+<div class="memitem">
450
+<div class="memproto">
451
+      <table class="memname">
452
+        <tr>
453
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">READ_MICROSTEP_POSTION</a>&#160;&#160;&#160;0x0ul</td>
454
+        </tr>
455
+      </table>
456
+</div>
457
+<div class="memdoc">
458
+
459
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00053">53</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
460
+
461
+</div>
462
+</div>
463
+<a class="anchor" id="a88a4b45fa6385eba8aa4f0342334b832"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_SELECTION_PATTERN" ref="a88a4b45fa6385eba8aa4f0342334b832" args="" -->
464
+<div class="memitem">
465
+<div class="memproto">
466
+      <table class="memname">
467
+        <tr>
468
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">READ_SELECTION_PATTERN</a>&#160;&#160;&#160;0x30ul</td>
469
+        </tr>
470
+      </table>
471
+</div>
472
+<div class="memdoc">
473
+
474
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00056">56</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
475
+
476
+</div>
477
+</div>
478
+<a class="anchor" id="aef62b7fdcbac0b33b2d6e9cea4b5f9b2"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_STALL_GUARD_AND_COOL_STEP" ref="aef62b7fdcbac0b33b2d6e9cea4b5f9b2" args="" -->
479
+<div class="memitem">
480
+<div class="memproto">
481
+      <table class="memname">
482
+        <tr>
483
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">READ_STALL_GUARD_AND_COOL_STEP</a>&#160;&#160;&#160;0x20ul</td>
484
+        </tr>
485
+      </table>
486
+</div>
487
+<div class="memdoc">
488
+
489
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00055">55</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
490
+
491
+</div>
492
+</div>
493
+<a class="anchor" id="ac1bd4da94fab7ce1049be2f866211819"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_STALL_GUARD_READING" ref="ac1bd4da94fab7ce1049be2f866211819" args="" -->
494
+<div class="memitem">
495
+<div class="memproto">
496
+      <table class="memname">
497
+        <tr>
498
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">READ_STALL_GUARD_READING</a>&#160;&#160;&#160;0x10ul</td>
499
+        </tr>
500
+      </table>
501
+</div>
502
+<div class="memdoc">
503
+
504
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00054">54</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
505
+
506
+</div>
507
+</div>
508
+<a class="anchor" id="a5c3d76da63f585e37813c32be2e11ab7"></a><!-- doxytag: member="TMC26XStepper.cpp::READOUT_VALUE_PATTERN" ref="a5c3d76da63f585e37813c32be2e11ab7" args="" -->
509
+<div class="memitem">
510
+<div class="memproto">
511
+      <table class="memname">
512
+        <tr>
513
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">READOUT_VALUE_PATTERN</a>&#160;&#160;&#160;0xFFC00ul</td>
514
+        </tr>
515
+      </table>
516
+</div>
517
+<div class="memdoc">
518
+
519
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00096">96</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
520
+
521
+</div>
522
+</div>
523
+<a class="anchor" id="a3b02ee1f518b0c90c16488f937abd443"></a><!-- doxytag: member="TMC26XStepper.cpp::REGISTER_BIT_PATTERN" ref="a3b02ee1f518b0c90c16488f937abd443" args="" -->
524
+<div class="memitem">
525
+<div class="memproto">
526
+      <table class="memname">
527
+        <tr>
528
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">REGISTER_BIT_PATTERN</a>&#160;&#160;&#160;0xFFFFFul</td>
529
+        </tr>
530
+      </table>
531
+</div>
532
+<div class="memdoc">
533
+
534
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00046">46</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
535
+
536
+</div>
537
+</div>
538
+<a class="anchor" id="aba6c07e5672e34e618bb3a550ab0d2bc"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_CURRENT_STEP_WIDTH_PATTERN" ref="aba6c07e5672e34e618bb3a550ab0d2bc" args="" -->
539
+<div class="memitem">
540
+<div class="memproto">
541
+      <table class="memname">
542
+        <tr>
543
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">SE_CURRENT_STEP_WIDTH_PATTERN</a>&#160;&#160;&#160;0x60ul</td>
544
+        </tr>
545
+      </table>
546
+</div>
547
+<div class="memdoc">
548
+
549
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00077">77</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
550
+
551
+</div>
552
+</div>
553
+<a class="anchor" id="ac8f748bf735c447dbed7dd4c7b631a87"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_MAX_PATTERN" ref="ac8f748bf735c447dbed7dd4c7b631a87" args="" -->
554
+<div class="memitem">
555
+<div class="memproto">
556
+      <table class="memname">
557
+        <tr>
558
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">SE_MAX_PATTERN</a>&#160;&#160;&#160;0xF00ul</td>
559
+        </tr>
560
+      </table>
561
+</div>
562
+<div class="memdoc">
563
+
564
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00076">76</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
565
+
566
+</div>
567
+</div>
568
+<a class="anchor" id="ae1862dfb958c03698b0abd95fda033ea"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_MIN_PATTERN" ref="ae1862dfb958c03698b0abd95fda033ea" args="" -->
569
+<div class="memitem">
570
+<div class="memproto">
571
+      <table class="memname">
572
+        <tr>
573
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">SE_MIN_PATTERN</a>&#160;&#160;&#160;0xful</td>
574
+        </tr>
575
+      </table>
576
+</div>
577
+<div class="memdoc">
578
+
579
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00078">78</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
580
+
581
+</div>
582
+</div>
583
+<a class="anchor" id="a478d9bde09a6528eef6af6ffeeb6caba"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD2_LOAD_MEASURE_REGISTER" ref="a478d9bde09a6528eef6af6ffeeb6caba" args="" -->
584
+<div class="memitem">
585
+<div class="memproto">
586
+      <table class="memname">
587
+        <tr>
588
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">STALL_GUARD2_LOAD_MEASURE_REGISTER</a>&#160;&#160;&#160;0xC0000ul</td>
589
+        </tr>
590
+      </table>
591
+</div>
592
+<div class="memdoc">
593
+
594
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00043">43</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
595
+
596
+</div>
597
+</div>
598
+<a class="anchor" id="a99ac04f0615556fc13c0c9f3e1c1b49d"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_CONFIG_PATTERN" ref="a99ac04f0615556fc13c0c9f3e1c1b49d" args="" -->
599
+<div class="memitem">
600
+<div class="memproto">
601
+      <table class="memname">
602
+        <tr>
603
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">STALL_GUARD_CONFIG_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td>
604
+        </tr>
605
+      </table>
606
+</div>
607
+<div class="memdoc">
608
+
609
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00084">84</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
610
+
611
+</div>
612
+</div>
613
+<a class="anchor" id="afdbbefabd0c29c4b6e403c4663d0f0be"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_FILTER_ENABLED" ref="afdbbefabd0c29c4b6e403c4663d0f0be" args="" -->
614
+<div class="memitem">
615
+<div class="memproto">
616
+      <table class="memname">
617
+        <tr>
618
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">STALL_GUARD_FILTER_ENABLED</a>&#160;&#160;&#160;0x10000ul</td>
619
+        </tr>
620
+      </table>
621
+</div>
622
+<div class="memdoc">
623
+
624
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00081">81</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
625
+
626
+</div>
627
+</div>
628
+<a class="anchor" id="ae631457932894a974334892704550ecc"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_TRESHHOLD_VALUE_PATTERN" ref="ae631457932894a974334892704550ecc" args="" -->
629
+<div class="memitem">
630
+<div class="memproto">
631
+      <table class="memname">
632
+        <tr>
633
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">STALL_GUARD_TRESHHOLD_VALUE_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td>
634
+        </tr>
635
+      </table>
636
+</div>
637
+<div class="memdoc">
638
+
639
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00082">82</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
640
+
641
+</div>
642
+</div>
643
+<a class="anchor" id="a6a1cb1fd61cf7c570f94376fa11fe55b"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_VALUE_PATTERN" ref="a6a1cb1fd61cf7c570f94376fa11fe55b" args="" -->
644
+<div class="memitem">
645
+<div class="memproto">
646
+      <table class="memname">
647
+        <tr>
648
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">STALL_GUARD_VALUE_PATTERN</a>&#160;&#160;&#160;0x7F00ul</td>
649
+        </tr>
650
+      </table>
651
+</div>
652
+<div class="memdoc">
653
+
654
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00085">85</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
655
+
656
+</div>
657
+</div>
658
+<a class="anchor" id="ae9cbbe5af7188e6bff8fe412f8e42f59"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OPEN_LOAD_A" ref="ae9cbbe5af7188e6bff8fe412f8e42f59" args="" -->
659
+<div class="memitem">
660
+<div class="memproto">
661
+      <table class="memname">
662
+        <tr>
663
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">STATUS_OPEN_LOAD_A</a>&#160;&#160;&#160;0x20ul</td>
664
+        </tr>
665
+      </table>
666
+</div>
667
+<div class="memdoc">
668
+
669
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00093">93</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
670
+
671
+</div>
672
+</div>
673
+<a class="anchor" id="ab29dc5cd6c6c4e5bf99e71bd563e1be1"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OPEN_LOAD_B" ref="ab29dc5cd6c6c4e5bf99e71bd563e1be1" args="" -->
674
+<div class="memitem">
675
+<div class="memproto">
676
+      <table class="memname">
677
+        <tr>
678
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">STATUS_OPEN_LOAD_B</a>&#160;&#160;&#160;0x40ul</td>
679
+        </tr>
680
+      </table>
681
+</div>
682
+<div class="memdoc">
683
+
684
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00094">94</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
685
+
686
+</div>
687
+</div>
688
+<a class="anchor" id="adbb23d2f055c9eab55eac29d1a75deb4"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OVER_TEMPERATURE_SHUTDOWN" ref="adbb23d2f055c9eab55eac29d1a75deb4" args="" -->
689
+<div class="memitem">
690
+<div class="memproto">
691
+      <table class="memname">
692
+        <tr>
693
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">STATUS_OVER_TEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;0x2ul</td>
694
+        </tr>
695
+      </table>
696
+</div>
697
+<div class="memdoc">
698
+
699
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00089">89</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
700
+
701
+</div>
702
+</div>
703
+<a class="anchor" id="aa317fd77f2f26fdfbfd331e21d9069e8"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OVER_TEMPERATURE_WARNING" ref="aa317fd77f2f26fdfbfd331e21d9069e8" args="" -->
704
+<div class="memitem">
705
+<div class="memproto">
706
+      <table class="memname">
707
+        <tr>
708
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">STATUS_OVER_TEMPERATURE_WARNING</a>&#160;&#160;&#160;0x4ul</td>
709
+        </tr>
710
+      </table>
711
+</div>
712
+<div class="memdoc">
713
+
714
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00090">90</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
715
+
716
+</div>
717
+</div>
718
+<a class="anchor" id="a8e03041302a092174fa33b3cf837dca2"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_SHORT_TO_GROUND_A" ref="a8e03041302a092174fa33b3cf837dca2" args="" -->
719
+<div class="memitem">
720
+<div class="memproto">
721
+      <table class="memname">
722
+        <tr>
723
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">STATUS_SHORT_TO_GROUND_A</a>&#160;&#160;&#160;0x8ul</td>
724
+        </tr>
725
+      </table>
726
+</div>
727
+<div class="memdoc">
728
+
729
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00091">91</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
730
+
731
+</div>
732
+</div>
733
+<a class="anchor" id="a903c3eba99695a32c6736463dcfd93ae"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_SHORT_TO_GROUND_B" ref="a903c3eba99695a32c6736463dcfd93ae" args="" -->
734
+<div class="memitem">
735
+<div class="memproto">
736
+      <table class="memname">
737
+        <tr>
738
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">STATUS_SHORT_TO_GROUND_B</a>&#160;&#160;&#160;0x10ul</td>
739
+        </tr>
740
+      </table>
741
+</div>
742
+<div class="memdoc">
743
+
744
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00092">92</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
745
+
746
+</div>
747
+</div>
748
+<a class="anchor" id="aa09ef662fd19bf2d063d6bd0f48eca14"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_STALL_GUARD_STATUS" ref="aa09ef662fd19bf2d063d6bd0f48eca14" args="" -->
749
+<div class="memitem">
750
+<div class="memproto">
751
+      <table class="memname">
752
+        <tr>
753
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">STATUS_STALL_GUARD_STATUS</a>&#160;&#160;&#160;0x1ul</td>
754
+        </tr>
755
+      </table>
756
+</div>
757
+<div class="memdoc">
758
+
759
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00088">88</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
760
+
761
+</div>
762
+</div>
763
+<a class="anchor" id="ab96ed1635faee6650e9cce73598a2773"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_STAND_STILL" ref="ab96ed1635faee6650e9cce73598a2773" args="" -->
764
+<div class="memitem">
765
+<div class="memproto">
766
+      <table class="memname">
767
+        <tr>
768
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">STATUS_STAND_STILL</a>&#160;&#160;&#160;0x80ul</td>
769
+        </tr>
770
+      </table>
771
+</div>
772
+<div class="memdoc">
773
+
774
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00095">95</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
775
+
776
+</div>
777
+</div>
778
+<a class="anchor" id="aa64245f223209654c60588e4558e0bab"></a><!-- doxytag: member="TMC26XStepper.cpp::STEP_INTERPOLATION" ref="aa64245f223209654c60588e4558e0bab" args="" -->
779
+<div class="memitem">
780
+<div class="memproto">
781
+      <table class="memname">
782
+        <tr>
783
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">STEP_INTERPOLATION</a>&#160;&#160;&#160;0x200ul</td>
784
+        </tr>
785
+      </table>
786
+</div>
787
+<div class="memdoc">
788
+
789
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00050">50</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
790
+
791
+</div>
792
+</div>
793
+<a class="anchor" id="aa4e49237f2671e7f28aa34ae0e89da8d"></a><!-- doxytag: member="TMC26XStepper.cpp::T_OFF_PATTERN" ref="aa4e49237f2671e7f28aa34ae0e89da8d" args="" -->
794
+<div class="memitem">
795
+<div class="memproto">
796
+      <table class="memname">
797
+        <tr>
798
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">T_OFF_PATTERN</a>&#160;&#160;&#160;0xful</td>
799
+        </tr>
800
+      </table>
801
+</div>
802
+<div class="memdoc">
803
+
804
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00061">61</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
805
+
806
+</div>
807
+</div>
808
+<a class="anchor" id="a7659d842c803e47ba911a2a6e26327f3"></a><!-- doxytag: member="TMC26XStepper.cpp::T_OFF_TIMING_PATERN" ref="a7659d842c803e47ba911a2a6e26327f3" args="" -->
809
+<div class="memitem">
810
+<div class="memproto">
811
+      <table class="memname">
812
+        <tr>
813
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">T_OFF_TIMING_PATERN</a>&#160;&#160;&#160;0xFul</td>
814
+        </tr>
815
+      </table>
816
+</div>
817
+<div class="memdoc">
818
+
819
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00071">71</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
820
+
821
+</div>
822
+</div>
823
+<a class="anchor" id="a4fb1c008e2ff76eee9362600eed112e1"></a><!-- doxytag: member="TMC26XStepper.cpp::VSENSE" ref="a4fb1c008e2ff76eee9362600eed112e1" args="" -->
824
+<div class="memitem">
825
+<div class="memproto">
826
+      <table class="memname">
827
+        <tr>
828
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">VSENSE</a>&#160;&#160;&#160;0x40ul</td>
829
+        </tr>
830
+      </table>
831
+</div>
832
+<div class="memdoc">
833
+
834
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00052">52</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
835
+
836
+</div>
837
+</div>
838
+</div><!-- contents -->
839
+
840
+
841
+<hr class="footer"/><address class="footer"><small>
842
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
843
+<img class="footer" src="doxygen.png" alt="doxygen"/>
844
+</a> 1.7.6.1
845
+</small></address>
846
+
847
+</body>
848
+</html>

+ 1067
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp_source.html
File diff suppressed because it is too large
View File


+ 212
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h.html View File

@@ -0,0 +1,212 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.h File Reference</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="summary">
55
+<a href="#nested-classes">Classes</a> &#124;
56
+<a href="#define-members">Defines</a>  </div>
57
+  <div class="headertitle">
58
+<div class="title">TMC26XStepper.h File Reference</div>  </div>
59
+</div><!--header-->
60
+<div class="contents">
61
+
62
+<p><a href="_t_m_c26_x_stepper_8h_source.html">Go to the source code of this file.</a></p>
63
+<table class="memberdecls">
64
+<tr><td colspan="2"><h2><a name="nested-classes"></a>
65
+Classes</h2></td></tr>
66
+<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td></tr>
67
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Class representing a TMC26X stepper driver.  <a href="class_t_m_c26_x_stepper.html#details">More...</a><br/></td></tr>
68
+<tr><td colspan="2"><h2><a name="define-members"></a>
69
+Defines</h2></td></tr>
70
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26X_OVERTEMPERATURE_PREWARING</a>&#160;&#160;&#160;1</td></tr>
71
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature situation in the TMC chip  <a href="#add42eee34f674f92c19bcd5266d2445f"></a><br/></td></tr>
72
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26X_OVERTEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;2</td></tr>
73
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature shutdown in the TMC chip  <a href="#adae814ce848677abd87758c7ac79a436"></a><br/></td></tr>
74
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26X_READOUT_POSITION</a>&#160;&#160;&#160;0</td></tr>
75
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26X_READOUT_STALLGUARD</a>&#160;&#160;&#160;1</td></tr>
76
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26X_READOUT_CURRENT</a>&#160;&#160;&#160;3</td></tr>
77
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">COOL_STEP_HALF_CS_LIMIT</a>&#160;&#160;&#160;0</td></tr>
78
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">COOL_STEP_QUARTDER_CS_LIMIT</a>&#160;&#160;&#160;1</td></tr>
79
+</table>
80
+<hr/><h2>Define Documentation</h2>
81
+<a class="anchor" id="a28b1774bd4aa854fb5e4b6dc7db96ecb"></a><!-- doxytag: member="TMC26XStepper.h::COOL_STEP_HALF_CS_LIMIT" ref="a28b1774bd4aa854fb5e4b6dc7db96ecb" args="" -->
82
+<div class="memitem">
83
+<div class="memproto">
84
+      <table class="memname">
85
+        <tr>
86
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">COOL_STEP_HALF_CS_LIMIT</a>&#160;&#160;&#160;0</td>
87
+        </tr>
88
+      </table>
89
+</div>
90
+<div class="memdoc">
91
+<p>Define to set the minimum current for CoolStep operation to 1/2 of the selected CS minium. </p>
92
+<dl class="see"><dt><b>See also:</b></dt><dd>setCoolStepConfiguration() </dd></dl>
93
+
94
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00070">70</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
95
+
96
+</div>
97
+</div>
98
+<a class="anchor" id="a1a4db5eafd0a9247677153cb4c8b7d54"></a><!-- doxytag: member="TMC26XStepper.h::COOL_STEP_QUARTDER_CS_LIMIT" ref="a1a4db5eafd0a9247677153cb4c8b7d54" args="" -->
99
+<div class="memitem">
100
+<div class="memproto">
101
+      <table class="memname">
102
+        <tr>
103
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">COOL_STEP_QUARTDER_CS_LIMIT</a>&#160;&#160;&#160;1</td>
104
+        </tr>
105
+      </table>
106
+</div>
107
+<div class="memdoc">
108
+<p>Define to set the minimum current for CoolStep operation to 1/4 of the selected CS minium. </p>
109
+<dl class="see"><dt><b>See also:</b></dt><dd>setCoolStepConfiguration() </dd></dl>
110
+
111
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00075">75</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
112
+
113
+</div>
114
+</div>
115
+<a class="anchor" id="add42eee34f674f92c19bcd5266d2445f"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_OVERTEMPERATURE_PREWARING" ref="add42eee34f674f92c19bcd5266d2445f" args="" -->
116
+<div class="memitem">
117
+<div class="memproto">
118
+      <table class="memname">
119
+        <tr>
120
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26X_OVERTEMPERATURE_PREWARING</a>&#160;&#160;&#160;1</td>
121
+        </tr>
122
+      </table>
123
+</div>
124
+<div class="memdoc">
125
+
126
+<p>return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature situation in the TMC chip </p>
127
+<p>This warning indicates that the TCM chip is too warm. It is still working but some parameters may be inferior. You should do something against it. </p>
128
+
129
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00039">39</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
130
+
131
+</div>
132
+</div>
133
+<a class="anchor" id="adae814ce848677abd87758c7ac79a436"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_OVERTEMPERATURE_SHUTDOWN" ref="adae814ce848677abd87758c7ac79a436" args="" -->
134
+<div class="memitem">
135
+<div class="memproto">
136
+      <table class="memname">
137
+        <tr>
138
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26X_OVERTEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;2</td>
139
+        </tr>
140
+      </table>
141
+</div>
142
+<div class="memdoc">
143
+
144
+<p>return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature shutdown in the TMC chip </p>
145
+<p>This warning indicates that the TCM chip is too warm to operate and has shut down to prevent damage. It will stop working until it cools down again. If you encouter this situation you must do something against it. Like reducing the current or improving the PCB layout and/or heat management. </p>
146
+
147
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00047">47</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
148
+
149
+</div>
150
+</div>
151
+<a class="anchor" id="a01760ad15e3846536526a990efe47094"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_CURRENT" ref="a01760ad15e3846536526a990efe47094" args="" -->
152
+<div class="memitem">
153
+<div class="memproto">
154
+      <table class="memname">
155
+        <tr>
156
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26X_READOUT_CURRENT</a>&#160;&#160;&#160;3</td>
157
+        </tr>
158
+      </table>
159
+</div>
160
+<div class="memdoc">
161
+<p>Selects to read out the current current setting (acc. to CoolStep) and the upper bits of the StallGuard value from the motor. </p>
162
+<dl class="see"><dt><b>See also:</b></dt><dd>readStatus(), setCurrent() </dd></dl>
163
+
164
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00064">64</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
165
+
166
+</div>
167
+</div>
168
+<a class="anchor" id="aff05d4a47ef8821322ccc2a20785fbee"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_POSITION" ref="aff05d4a47ef8821322ccc2a20785fbee" args="" -->
169
+<div class="memitem">
170
+<div class="memproto">
171
+      <table class="memname">
172
+        <tr>
173
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26X_READOUT_POSITION</a>&#160;&#160;&#160;0</td>
174
+        </tr>
175
+      </table>
176
+</div>
177
+<div class="memdoc">
178
+<p>Selects to readout the microstep position from the motor. </p>
179
+<dl class="see"><dt><b>See also:</b></dt><dd>readStatus() </dd></dl>
180
+
181
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00054">54</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
182
+
183
+</div>
184
+</div>
185
+<a class="anchor" id="ac864ff8886123039c7d2d3c617f7ef87"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_STALLGUARD" ref="ac864ff8886123039c7d2d3c617f7ef87" args="" -->
186
+<div class="memitem">
187
+<div class="memproto">
188
+      <table class="memname">
189
+        <tr>
190
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26X_READOUT_STALLGUARD</a>&#160;&#160;&#160;1</td>
191
+        </tr>
192
+      </table>
193
+</div>
194
+<div class="memdoc">
195
+<p>Selects to read out the StallGuard value of the motor. </p>
196
+<dl class="see"><dt><b>See also:</b></dt><dd>readStatus() </dd></dl>
197
+
198
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00059">59</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
199
+
200
+</div>
201
+</div>
202
+</div><!-- contents -->
203
+
204
+
205
+<hr class="footer"/><address class="footer"><small>
206
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
207
+<img class="footer" src="doxygen.png" alt="doxygen"/>
208
+</a> 1.7.6.1
209
+</small></address>
210
+
211
+</body>
212
+</html>

+ 256
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h_source.html View File

@@ -0,0 +1,256 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.h Source File</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="headertitle">
55
+<div class="title">TMC26XStepper.h</div>  </div>
56
+</div><!--header-->
57
+<div class="contents">
58
+<a href="_t_m_c26_x_stepper_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
59
+<a name="l00002"></a>00002 <span class="comment"> TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino - Version 0.1</span>
60
+<a name="l00003"></a>00003 <span class="comment"> </span>
61
+<a name="l00004"></a>00004 <span class="comment"> based on the stepper library by Tom Igoe, et. al.</span>
62
+<a name="l00005"></a>00005 <span class="comment"></span>
63
+<a name="l00006"></a>00006 <span class="comment"> Copyright (c) 2011, Interactive Matter, Marcus Nowotny</span>
64
+<a name="l00007"></a>00007 <span class="comment"> </span>
65
+<a name="l00008"></a>00008 <span class="comment"> Permission is hereby granted, free of charge, to any person obtaining a copy</span>
66
+<a name="l00009"></a>00009 <span class="comment"> of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
67
+<a name="l00010"></a>00010 <span class="comment"> in the Software without restriction, including without limitation the rights</span>
68
+<a name="l00011"></a>00011 <span class="comment"> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
69
+<a name="l00012"></a>00012 <span class="comment"> copies of the Software, and to permit persons to whom the Software is</span>
70
+<a name="l00013"></a>00013 <span class="comment"> furnished to do so, subject to the following conditions:</span>
71
+<a name="l00014"></a>00014 <span class="comment"> </span>
72
+<a name="l00015"></a>00015 <span class="comment"> The above copyright notice and this permission notice shall be included in</span>
73
+<a name="l00016"></a>00016 <span class="comment"> all copies or substantial portions of the Software.</span>
74
+<a name="l00017"></a>00017 <span class="comment"> </span>
75
+<a name="l00018"></a>00018 <span class="comment"> THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
76
+<a name="l00019"></a>00019 <span class="comment"> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
77
+<a name="l00020"></a>00020 <span class="comment"> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
78
+<a name="l00021"></a>00021 <span class="comment"> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
79
+<a name="l00022"></a>00022 <span class="comment"> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
80
+<a name="l00023"></a>00023 <span class="comment"> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
81
+<a name="l00024"></a>00024 <span class="comment"> THE SOFTWARE.</span>
82
+<a name="l00025"></a>00025 <span class="comment"></span>
83
+<a name="l00026"></a>00026 <span class="comment"> */</span>
84
+<a name="l00027"></a>00027 
85
+<a name="l00028"></a>00028 
86
+<a name="l00029"></a>00029 <span class="comment">// ensure this library description is only included once</span>
87
+<a name="l00030"></a>00030 <span class="preprocessor">#ifndef TMC26XStepper_h</span>
88
+<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define TMC26XStepper_h</span>
89
+<a name="l00032"></a>00032 <span class="preprocessor"></span>
90
+<a name="l00034"></a>00034 
91
+<a name="l00039"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">00039</a> <span class="preprocessor">#define TMC26X_OVERTEMPERATURE_PREWARING 1</span>
92
+<a name="l00040"></a>00040 <span class="preprocessor"></span>
93
+<a name="l00041"></a>00041 
94
+<a name="l00047"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">00047</a> <span class="preprocessor">#define TMC26X_OVERTEMPERATURE_SHUTDOWN 2</span>
95
+<a name="l00048"></a>00048 <span class="preprocessor"></span>
96
+<a name="l00049"></a>00049 <span class="comment">//which values can be read out</span>
97
+<a name="l00054"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">00054</a> <span class="comment"></span><span class="preprocessor">#define TMC26X_READOUT_POSITION 0</span>
98
+<a name="l00055"></a>00055 <span class="preprocessor"></span>
99
+<a name="l00059"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">00059</a> <span class="preprocessor">#define TMC26X_READOUT_STALLGUARD 1</span>
100
+<a name="l00060"></a>00060 <span class="preprocessor"></span>
101
+<a name="l00064"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">00064</a> <span class="preprocessor">#define TMC26X_READOUT_CURRENT 3</span>
102
+<a name="l00065"></a>00065 <span class="preprocessor"></span>
103
+<a name="l00070"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">00070</a> <span class="preprocessor">#define COOL_STEP_HALF_CS_LIMIT 0</span>
104
+<a name="l00071"></a>00071 <span class="preprocessor"></span>
105
+<a name="l00075"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">00075</a> <span class="preprocessor">#define COOL_STEP_QUARTDER_CS_LIMIT 1</span>
106
+<a name="l00076"></a>00076 <span class="preprocessor"></span>
107
+<a name="l00101"></a><a class="code" href="class_t_m_c26_x_stepper.html">00101</a> <span class="keyword">class </span><a class="code" href="class_t_m_c26_x_stepper.html" title="Class representing a TMC26X stepper driver.">TMC26XStepper</a> {
108
+<a name="l00102"></a>00102   <span class="keyword">public</span>:
109
+<a name="l00124"></a>00124         <a class="code" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c" title="creates a new represenatation of a stepper motor connected to a TMC26X stepper driver">TMC26XStepper</a>(<span class="keywordtype">int</span> number_of_steps, <span class="keywordtype">int</span> cs_pin, <span class="keywordtype">int</span> dir_pin, <span class="keywordtype">int</span> step_pin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> resistor=150);
110
+<a name="l00125"></a>00125         
111
+<a name="l00133"></a>00133         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7" title="configures and starts the TMC26X stepper driver. Before you called this function the stepper driver i...">start</a>();
112
+<a name="l00134"></a>00134     
113
+<a name="l00145"></a>00145         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5" title="resets the stepper in unconfigured mode.">un_start</a>();
114
+<a name="l00146"></a>00146 
115
+<a name="l00147"></a>00147 
116
+<a name="l00152"></a>00152     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd" title="Sets the rotation speed in revolutions per minute.">setSpeed</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> whatSpeed);
117
+<a name="l00153"></a>00153     
118
+<a name="l00158"></a>00158     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29" title="reads out the currently selected speed in revolutions per minute.">getSpeed</a>(<span class="keywordtype">void</span>);
119
+<a name="l00159"></a>00159 
120
+<a name="l00168"></a>00168         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0" title="Set the number of microsteps in 2^i values (rounded) up to 256.">setMicrosteps</a>(<span class="keywordtype">int</span> number_of_steps);
121
+<a name="l00169"></a>00169     
122
+<a name="l00178"></a>00178         <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3" title="returns the effective current number of microsteps selected.">getMicrosteps</a>(<span class="keywordtype">void</span>);
123
+<a name="l00179"></a>00179 
124
+<a name="l00195"></a>00195     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d" title="Initiate a movement for the given number of steps. Positive numbers move in one, negative numbers in ...">step</a>(<span class="keywordtype">int</span> number_of_steps);
125
+<a name="l00196"></a>00196     
126
+<a name="l00215"></a>00215     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415" title="Central movement method, must be called as often as possible in the lopp function and is very fast...">move</a>(<span class="keywordtype">void</span>);
127
+<a name="l00216"></a>00216 
128
+<a name="l00224"></a>00224     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e" title="checks if the motor still has to move to fulfill the last movement command.">isMoving</a>(<span class="keywordtype">void</span>);
129
+<a name="l00225"></a>00225     
130
+<a name="l00230"></a>00230     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7" title="Get the number of steps left in the current movement.">getStepsLeft</a>(<span class="keywordtype">void</span>);
131
+<a name="l00231"></a>00231     
132
+<a name="l00238"></a>00238     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123" title="Stops the motor regardless if it moves or not.">stop</a>(<span class="keywordtype">void</span>);
133
+<a name="l00239"></a>00239     
134
+<a name="l00264"></a>00264         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649" title="Sets and configure the classical Constant Off Timer Chopper.">setConstantOffTimeChopper</a>(<span class="keywordtype">char</span> constant_off_time, <span class="keywordtype">char</span> blank_time, <span class="keywordtype">char</span> fast_decay_time_setting, <span class="keywordtype">char</span> sine_wave_offset, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> use_current_comparator);
135
+<a name="l00265"></a>00265     
136
+<a name="l00286"></a>00286         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2" title="Sets and configures with spread cycle chopper.">setSpreadCycleChopper</a>(<span class="keywordtype">char</span> constant_off_time, <span class="keywordtype">char</span> blank_time, <span class="keywordtype">char</span> hysteresis_start, <span class="keywordtype">char</span> hysteresis_end, <span class="keywordtype">char</span> hysteresis_decrement);
137
+<a name="l00287"></a>00287 
138
+<a name="l00303"></a>00303         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a" title="Use random off time for noise reduction (0 for off, -1 for on).">setRandomOffTime</a>(<span class="keywordtype">char</span> value);
139
+<a name="l00304"></a>00304     
140
+<a name="l00312"></a>00312         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2" title="set the maximum motor current in mA (1000 is 1 Amp) Keep in mind this is the maximum peak Current...">setCurrent</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current);
141
+<a name="l00313"></a>00313     
142
+<a name="l00320"></a>00320     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f" title="readout the motor maximum current in mA (1000 is an Amp) This is the maximum current. to get the current current - which may be affected by CoolStep us getCurrentCurrent()">getCurrent</a>(<span class="keywordtype">void</span>);
143
+<a name="l00321"></a>00321     
144
+<a name="l00337"></a>00337         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a" title="set the StallGuard threshold in order to get sensible StallGuard readings.">setStallGuardThreshold</a>(<span class="keywordtype">char</span> stall_guard_threshold, <span class="keywordtype">char</span> stall_guard_filter_enabled);
145
+<a name="l00338"></a>00338     
146
+<a name="l00343"></a>00343     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def" title="reads out the StallGuard threshold">getStallGuardThreshold</a>(<span class="keywordtype">void</span>);
147
+<a name="l00344"></a>00344     
148
+<a name="l00349"></a>00349     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a" title="returns the current setting of the StallGuard filter">getStallGuardFilter</a>(<span class="keywordtype">void</span>);
149
+<a name="l00350"></a>00350     
150
+<a name="l00368"></a>00368     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e" title="This method configures the CoolStep smart energy operation. You must have a proper StallGuard configu...">setCoolStepConfiguration</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> lower_SG_threshold, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SG_hysteresis, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_decrement_step_size,
151
+<a name="l00369"></a>00369                                   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_increment_step_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> lower_current_limit);
152
+<a name="l00370"></a>00370     
153
+<a name="l00376"></a>00376     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157" title="enables or disables the CoolStep smart energy operation feature. It must be configured before enablin...">setCoolStepEnabled</a>(<span class="keywordtype">boolean</span> enabled);
154
+<a name="l00377"></a>00377     
155
+<a name="l00378"></a>00378     
156
+<a name="l00383"></a>00383     <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d" title="check if the CoolStep feature is enabled">isCoolStepEnabled</a>();
157
+<a name="l00384"></a>00384 
158
+<a name="l00389"></a>00389     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8" title="returns the lower StallGuard threshold for the CoolStep operation">getCoolStepLowerSgThreshold</a>();
159
+<a name="l00390"></a>00390     
160
+<a name="l00395"></a>00395     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f" title="returns the upper StallGuard threshold for the CoolStep operation">getCoolStepUpperSgThreshold</a>();
161
+<a name="l00396"></a>00396     
162
+<a name="l00401"></a>00401     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46" title="returns the number of StallGuard readings befor CoolStep adjusts the motor current.">getCoolStepNumberOfSGReadings</a>();
163
+<a name="l00402"></a>00402     
164
+<a name="l00407"></a>00407     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883" title="returns the increment steps for the current for the CoolStep operation">getCoolStepCurrentIncrementSize</a>();
165
+<a name="l00408"></a>00408     
166
+<a name="l00414"></a>00414     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c" title="returns the absolut minium current for the CoolStep operation">getCoolStepLowerCurrentLimit</a>();
167
+<a name="l00415"></a>00415     
168
+<a name="l00422"></a>00422         <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125" title="Get the current microstep position for phase A.">getMotorPosition</a>(<span class="keywordtype">void</span>);
169
+<a name="l00423"></a>00423     
170
+<a name="l00430"></a>00430         <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e" title="Reads the current StallGuard value.">getCurrentStallGuardReading</a>(<span class="keywordtype">void</span>);
171
+<a name="l00431"></a>00431     
172
+<a name="l00437"></a>00437     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1" title="Reads the current current setting value as fraction of the maximum current Returns values between 0 a...">getCurrentCSReading</a>(<span class="keywordtype">void</span>);
173
+<a name="l00438"></a>00438     
174
+<a name="l00439"></a>00439     
175
+<a name="l00444"></a>00444     <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905" title="a convenience method to determine if the current scaling uses 0.31V or 0.165V as reference.">isCurrentScalingHalfed</a>();
176
+<a name="l00445"></a>00445 
177
+<a name="l00453"></a>00453     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7" title="Reads the current current setting value and recalculates the absolute current in mA (1A would be 1000...">getCurrentCurrent</a>(<span class="keywordtype">void</span>);
178
+<a name="l00454"></a>00454     
179
+<a name="l00463"></a>00463         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41" title="checks if there is a StallGuard warning in the last status">isStallGuardOverThreshold</a>(<span class="keywordtype">void</span>);
180
+<a name="l00464"></a>00464     
181
+<a name="l00471"></a>00471         <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">getOverTemperature</a>(<span class="keywordtype">void</span>);
182
+<a name="l00472"></a>00472     
183
+<a name="l00480"></a>00480         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf" title="Is motor channel A shorted to ground detected in the last status readout.">isShortToGroundA</a>(<span class="keywordtype">void</span>);
184
+<a name="l00481"></a>00481 
185
+<a name="l00488"></a>00488         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b" title="Is motor channel B shorted to ground detected in the last status readout.">isShortToGroundB</a>(<span class="keywordtype">void</span>);
186
+<a name="l00495"></a>00495         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c" title="iIs motor channel A connected according to the last statu readout.">isOpenLoadA</a>(<span class="keywordtype">void</span>);
187
+<a name="l00496"></a>00496 
188
+<a name="l00503"></a>00503         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303" title="iIs motor channel A connected according to the last statu readout.">isOpenLoadB</a>(<span class="keywordtype">void</span>);
189
+<a name="l00504"></a>00504     
190
+<a name="l00511"></a>00511         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0" title="Is chopper inactive since 2^20 clock cycles - defaults to ~0,08s.">isStandStill</a>(<span class="keywordtype">void</span>);
191
+<a name="l00512"></a>00512 
192
+<a name="l00524"></a>00524         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7" title="checks if there is a StallGuard warning in the last status">isStallGuardReached</a>(<span class="keywordtype">void</span>);
193
+<a name="l00525"></a>00525     
194
+<a name="l00530"></a>00530     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305" title="enables or disables the motor driver bridges. If disabled the motor can run freely. If enabled not.">setEnabled</a>(<span class="keywordtype">boolean</span> enabled);
195
+<a name="l00531"></a>00531     
196
+<a name="l00537"></a>00537     <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6" title="checks if the output bridges are enabled. If the bridges are not enabled the motor can run freely...">isEnabled</a>();
197
+<a name="l00538"></a>00538 
198
+<a name="l00548"></a>00548         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967" title="Manually read out the status register This function sends a byte to the motor driver in order to get ...">readStatus</a>(<span class="keywordtype">char</span> read_value);
199
+<a name="l00549"></a>00549     
200
+<a name="l00554"></a>00554     <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e" title="Returns the current sense resistor value in milliohm. The default value of ,15 Ohm will return 150...">getResistor</a>();
201
+<a name="l00555"></a>00555 
202
+<a name="l00560"></a>00560         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3" title="Prints out all the information that can be found in the last status read out - it does not force a st...">debugLastStatus</a>(<span class="keywordtype">void</span>);
203
+<a name="l00565"></a>00565     <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215" title="library version">version</a>(<span class="keywordtype">void</span>);
204
+<a name="l00566"></a>00566 
205
+<a name="l00567"></a>00567   <span class="keyword">private</span>:    
206
+<a name="l00568"></a>00568         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps_left;                <span class="comment">//the steps the motor has to do to complete the movement</span>
207
+<a name="l00569"></a>00569     <span class="keywordtype">int</span> direction;        <span class="comment">// Direction of rotation</span>
208
+<a name="l00570"></a>00570     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> step_delay;    <span class="comment">// delay between steps, in ms, based on speed</span>
209
+<a name="l00571"></a>00571     <span class="keywordtype">int</span> number_of_steps;      <span class="comment">// total number of steps this motor can take</span>
210
+<a name="l00572"></a>00572     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> speed; <span class="comment">// we need to store the current speed in order to change the speed after changing microstepping</span>
211
+<a name="l00573"></a>00573     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> resistor; <span class="comment">//current sense resitor value in milliohm</span>
212
+<a name="l00574"></a>00574         
213
+<a name="l00575"></a>00575     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> last_step_time;      <span class="comment">// time stamp in ms of when the last step was taken</span>
214
+<a name="l00576"></a>00576     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> next_step_time;      <span class="comment">// time stamp in ms of when the last step was taken</span>
215
+<a name="l00577"></a>00577         
216
+<a name="l00578"></a>00578         <span class="comment">//driver control register copies to easily set &amp; modify the registers</span>
217
+<a name="l00579"></a>00579         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_control_register_value;
218
+<a name="l00580"></a>00580         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> chopper_config_register;
219
+<a name="l00581"></a>00581         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> cool_step_register_value;
220
+<a name="l00582"></a>00582         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> stall_guard2_current_register_value;
221
+<a name="l00583"></a>00583         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_configuration_register_value;
222
+<a name="l00584"></a>00584         <span class="comment">//the driver status result</span>
223
+<a name="l00585"></a>00585         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_status_result;
224
+<a name="l00586"></a>00586         
225
+<a name="l00587"></a>00587         <span class="comment">//helper routione to get the top 10 bit of the readout</span>
226
+<a name="l00588"></a>00588         <span class="keyword">inline</span> <span class="keywordtype">int</span> getReadoutValue();
227
+<a name="l00589"></a>00589         
228
+<a name="l00590"></a>00590         <span class="comment">//the pins for the stepper driver</span>
229
+<a name="l00591"></a>00591         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cs_pin;
230
+<a name="l00592"></a>00592         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> step_pin;
231
+<a name="l00593"></a>00593         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> dir_pin;
232
+<a name="l00594"></a>00594         
233
+<a name="l00595"></a>00595         <span class="comment">//status values </span>
234
+<a name="l00596"></a>00596         <span class="keywordtype">boolean</span> started; <span class="comment">//if the stepper has been started yet</span>
235
+<a name="l00597"></a>00597         <span class="keywordtype">int</span> microsteps; <span class="comment">//the current number of micro steps</span>
236
+<a name="l00598"></a>00598     <span class="keywordtype">char</span> constant_off_time; <span class="comment">//we need to remember this value in order to enable and disable the motor</span>
237
+<a name="l00599"></a>00599     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cool_step_lower_threshold; <span class="comment">// we need to remember the threshold to enable and disable the CoolStep feature</span>
238
+<a name="l00600"></a>00600     <span class="keywordtype">boolean</span> cool_step_enabled; <span class="comment">//we need to remember this to configure the coolstep if it si enabled</span>
239
+<a name="l00601"></a>00601         
240
+<a name="l00602"></a>00602         <span class="comment">//SPI sender</span>
241
+<a name="l00603"></a>00603         <span class="keyword">inline</span> <span class="keywordtype">void</span> send262(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> datagram);
242
+<a name="l00604"></a>00604 };
243
+<a name="l00605"></a>00605 
244
+<a name="l00606"></a>00606 <span class="preprocessor">#endif</span>
245
+<a name="l00607"></a>00607 <span class="preprocessor"></span>
246
+</pre></div></div><!-- contents -->
247
+
248
+
249
+<hr class="footer"/><address class="footer"><small>
250
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
251
+<img class="footer" src="doxygen.png" alt="doxygen"/>
252
+</a> 1.7.6.1
253
+</small></address>
254
+
255
+</body>
256
+</html>

+ 72
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/annotated.html View File

@@ -0,0 +1,72 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class List</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li class="current"><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+</div>
54
+<div class="header">
55
+  <div class="headertitle">
56
+<div class="title">Class List</div>  </div>
57
+</div><!--header-->
58
+<div class="contents">
59
+<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><table>
60
+  <tr><td class="indexkey"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td class="indexvalue">Class representing a TMC26X stepper driver </td></tr>
61
+</table>
62
+</div><!-- contents -->
63
+
64
+
65
+<hr class="footer"/><address class="footer"><small>
66
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
67
+<img class="footer" src="doxygen.png" alt="doxygen"/>
68
+</a> 1.7.6.1
69
+</small></address>
70
+
71
+</body>
72
+</html>

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/bc_s.png View File


+ 117
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper-members.html View File

@@ -0,0 +1,117 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Member List</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+</div>
54
+<div class="header">
55
+  <div class="headertitle">
56
+<div class="title">TMC26XStepper Member List</div>  </div>
57
+</div><!--header-->
58
+<div class="contents">
59
+This is the complete list of members for <a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a>, including all inherited members.<table>
60
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">debugLastStatus</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
61
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">getCoolStepCurrentIncrementSize</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
62
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">getCoolStepLowerCurrentLimit</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
63
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">getCoolStepLowerSgThreshold</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
64
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">getCoolStepNumberOfSGReadings</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
65
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">getCoolStepUpperSgThreshold</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
66
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">getCurrent</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
67
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">getCurrentCSReading</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
68
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">getCurrentCurrent</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
69
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">getCurrentStallGuardReading</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
70
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">getMicrosteps</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
71
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">getMotorPosition</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
72
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">getOverTemperature</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
73
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">getResistor</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
74
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">getSpeed</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
75
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">getStallGuardFilter</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
76
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">getStallGuardThreshold</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
77
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">getStepsLeft</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
78
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">isCoolStepEnabled</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
79
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">isCurrentScalingHalfed</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
80
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">isEnabled</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
81
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">isMoving</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
82
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">isOpenLoadA</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
83
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">isOpenLoadB</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
84
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">isShortToGroundA</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
85
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">isShortToGroundB</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
86
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">isStallGuardOverThreshold</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
87
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">isStallGuardReached</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
88
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">isStandStill</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
89
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">move</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
90
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">readStatus</a>(char read_value)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
91
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">setConstantOffTimeChopper</a>(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
92
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">setCoolStepConfiguration</a>(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size, unsigned char current_increment_step_size, unsigned char lower_current_limit)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
93
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">setCoolStepEnabled</a>(boolean enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
94
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">setCurrent</a>(unsigned int current)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
95
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">setEnabled</a>(boolean enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
96
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">setMicrosteps</a>(int number_of_steps)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
97
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">setRandomOffTime</a>(char value)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
98
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">setSpeed</a>(unsigned int whatSpeed)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
99
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">setSpreadCycleChopper</a>(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
100
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">setStallGuardThreshold</a>(char stall_guard_threshold, char stall_guard_filter_enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
101
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">start</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
102
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">step</a>(int number_of_steps)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
103
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">stop</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
104
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor=150)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
105
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">un_start</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
106
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">version</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
107
+</table></div><!-- contents -->
108
+
109
+
110
+<hr class="footer"/><address class="footer"><small>
111
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
112
+<img class="footer" src="doxygen.png" alt="doxygen"/>
113
+</a> 1.7.6.1
114
+</small></address>
115
+
116
+</body>
117
+</html>

+ 1463
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper.html
File diff suppressed because it is too large
View File


+ 78
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/classes.html View File

@@ -0,0 +1,78 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class Index</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li class="current"><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+</div>
54
+<div class="header">
55
+  <div class="headertitle">
56
+<div class="title">Class Index</div>  </div>
57
+</div><!--header-->
58
+<div class="contents">
59
+<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
60
+<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
61
+<tr><td rowspan="2" valign="bottom"><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;T&#160;&#160;</div></td></tr></table>
62
+</td><td></td></tr>
63
+<tr><td></td></tr>
64
+<tr><td valign="top"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a>&#160;&#160;&#160;</td><td></td></tr>
65
+<tr><td></td><td></td></tr>
66
+</table>
67
+<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
68
+</div><!-- contents -->
69
+
70
+
71
+<hr class="footer"/><address class="footer"><small>
72
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
73
+<img class="footer" src="doxygen.png" alt="doxygen"/>
74
+</a> 1.7.6.1
75
+</small></address>
76
+
77
+</body>
78
+</html>

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/closed.png View File


+ 949
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.css View File

@@ -0,0 +1,949 @@
1
+/* The standard CSS for doxygen */
2
+
3
+body, table, div, p, dl {
4
+	font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
5
+	font-size: 13px;
6
+	line-height: 1.3;
7
+}
8
+
9
+/* @group Heading Levels */
10
+
11
+h1 {
12
+	font-size: 150%;
13
+}
14
+
15
+.title {
16
+	font-size: 150%;
17
+	font-weight: bold;
18
+	margin: 10px 2px;
19
+}
20
+
21
+h2 {
22
+	font-size: 120%;
23
+}
24
+
25
+h3 {
26
+	font-size: 100%;
27
+}
28
+
29
+dt {
30
+	font-weight: bold;
31
+}
32
+
33
+div.multicol {
34
+	-moz-column-gap: 1em;
35
+	-webkit-column-gap: 1em;
36
+	-moz-column-count: 3;
37
+	-webkit-column-count: 3;
38
+}
39
+
40
+p.startli, p.startdd, p.starttd {
41
+	margin-top: 2px;
42
+}
43
+
44
+p.endli {
45
+	margin-bottom: 0px;
46
+}
47
+
48
+p.enddd {
49
+	margin-bottom: 4px;
50
+}
51
+
52
+p.endtd {
53
+	margin-bottom: 2px;
54
+}
55
+
56
+/* @end */
57
+
58
+caption {
59
+	font-weight: bold;
60
+}
61
+
62
+span.legend {
63
+        font-size: 70%;
64
+        text-align: center;
65
+}
66
+
67
+h3.version {
68
+        font-size: 90%;
69
+        text-align: center;
70
+}
71
+
72
+div.qindex, div.navtab{
73
+	background-color: #EBEFF6;
74
+	border: 1px solid #A3B4D7;
75
+	text-align: center;
76
+}
77
+
78
+div.qindex, div.navpath {
79
+	width: 100%;
80
+	line-height: 140%;
81
+}
82
+
83
+div.navtab {
84
+	margin-right: 15px;
85
+}
86
+
87
+/* @group Link Styling */
88
+
89
+a {
90
+	color: #3D578C;
91
+	font-weight: normal;
92
+	text-decoration: none;
93
+}
94
+
95
+.contents a:visited {
96
+	color: #4665A2;
97
+}
98
+
99
+a:hover {
100
+	text-decoration: underline;
101
+}
102
+
103
+a.qindex {
104
+	font-weight: bold;
105
+}
106
+
107
+a.qindexHL {
108
+	font-weight: bold;
109
+	background-color: #9CAFD4;
110
+	color: #ffffff;
111
+	border: 1px double #869DCA;
112
+}
113
+
114
+.contents a.qindexHL:visited {
115
+        color: #ffffff;
116
+}
117
+
118
+a.el {
119
+	font-weight: bold;
120
+}
121
+
122
+a.elRef {
123
+}
124
+
125
+a.code, a.code:visited {
126
+	color: #4665A2; 
127
+}
128
+
129
+a.codeRef, a.codeRef:visited {
130
+	color: #4665A2; 
131
+}
132
+
133
+/* @end */
134
+
135
+dl.el {
136
+	margin-left: -1cm;
137
+}
138
+
139
+.fragment {
140
+	font-family: monospace, fixed;
141
+	font-size: 105%;
142
+}
143
+
144
+pre.fragment {
145
+	border: 1px solid #C4CFE5;
146
+	background-color: #FBFCFD;
147
+	padding: 4px 6px;
148
+	margin: 4px 8px 4px 2px;
149
+	overflow: auto;
150
+	word-wrap: break-word;
151
+	font-size:  9pt;
152
+	line-height: 125%;
153
+}
154
+
155
+div.ah {
156
+	background-color: black;
157
+	font-weight: bold;
158
+	color: #ffffff;
159
+	margin-bottom: 3px;
160
+	margin-top: 3px;
161
+	padding: 0.2em;
162
+	border: solid thin #333;
163
+	border-radius: 0.5em;
164
+	-webkit-border-radius: .5em;
165
+	-moz-border-radius: .5em;
166
+	box-shadow: 2px 2px 3px #999;
167
+	-webkit-box-shadow: 2px 2px 3px #999;
168
+	-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
169
+	background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
170
+	background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
171
+}
172
+
173
+div.groupHeader {
174
+	margin-left: 16px;
175
+	margin-top: 12px;
176
+	font-weight: bold;
177
+}
178
+
179
+div.groupText {
180
+	margin-left: 16px;
181
+	font-style: italic;
182
+}
183
+
184
+body {
185
+	background-color: white;
186
+	color: black;
187
+        margin: 0;
188
+}
189
+
190
+div.contents {
191
+	margin-top: 10px;
192
+	margin-left: 8px;
193
+	margin-right: 8px;
194
+}
195
+
196
+td.indexkey {
197
+	background-color: #EBEFF6;
198
+	font-weight: bold;
199
+	border: 1px solid #C4CFE5;
200
+	margin: 2px 0px 2px 0;
201
+	padding: 2px 10px;
202
+        white-space: nowrap;
203
+        vertical-align: top;
204
+}
205
+
206
+td.indexvalue {
207
+	background-color: #EBEFF6;
208
+	border: 1px solid #C4CFE5;
209
+	padding: 2px 10px;
210
+	margin: 2px 0px;
211
+}
212
+
213
+tr.memlist {
214
+	background-color: #EEF1F7;
215
+}
216
+
217
+p.formulaDsp {
218
+	text-align: center;
219
+}
220
+
221
+img.formulaDsp {
222
+	
223
+}
224
+
225
+img.formulaInl {
226
+	vertical-align: middle;
227
+}
228
+
229
+div.center {
230
+	text-align: center;
231
+        margin-top: 0px;
232
+        margin-bottom: 0px;
233
+        padding: 0px;
234
+}
235
+
236
+div.center img {
237
+	border: 0px;
238
+}
239
+
240
+address.footer {
241
+	text-align: right;
242
+	padding-right: 12px;
243
+}
244
+
245
+img.footer {
246
+	border: 0px;
247
+	vertical-align: middle;
248
+}
249
+
250
+/* @group Code Colorization */
251
+
252
+span.keyword {
253
+	color: #008000
254
+}
255
+
256
+span.keywordtype {
257
+	color: #604020
258
+}
259
+
260
+span.keywordflow {
261
+	color: #e08000
262
+}
263
+
264
+span.comment {
265
+	color: #800000
266
+}
267
+
268
+span.preprocessor {
269
+	color: #806020
270
+}
271
+
272
+span.stringliteral {
273
+	color: #002080
274
+}
275
+
276
+span.charliteral {
277
+	color: #008080
278
+}
279
+
280
+span.vhdldigit { 
281
+	color: #ff00ff 
282
+}
283
+
284
+span.vhdlchar { 
285
+	color: #000000 
286
+}
287
+
288
+span.vhdlkeyword { 
289
+	color: #700070 
290
+}
291
+
292
+span.vhdllogic { 
293
+	color: #ff0000 
294
+}
295
+
296
+/* @end */
297
+
298
+/*
299
+.search {
300
+	color: #003399;
301
+	font-weight: bold;
302
+}
303
+
304
+form.search {
305
+	margin-bottom: 0px;
306
+	margin-top: 0px;
307
+}
308
+
309
+input.search {
310
+	font-size: 75%;
311
+	color: #000080;
312
+	font-weight: normal;
313
+	background-color: #e8eef2;
314
+}
315
+*/
316
+
317
+td.tiny {
318
+	font-size: 75%;
319
+}
320
+
321
+.dirtab {
322
+	padding: 4px;
323
+	border-collapse: collapse;
324
+	border: 1px solid #A3B4D7;
325
+}
326
+
327
+th.dirtab {
328
+	background: #EBEFF6;
329
+	font-weight: bold;
330
+}
331
+
332
+hr {
333
+	height: 0px;
334
+	border: none;
335
+	border-top: 1px solid #4A6AAA;
336
+}
337
+
338
+hr.footer {
339
+	height: 1px;
340
+}
341
+
342
+/* @group Member Descriptions */
343
+
344
+table.memberdecls {
345
+	border-spacing: 0px;
346
+	padding: 0px;
347
+}
348
+
349
+.mdescLeft, .mdescRight,
350
+.memItemLeft, .memItemRight,
351
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
352
+	background-color: #F9FAFC;
353
+	border: none;
354
+	margin: 4px;
355
+	padding: 1px 0 0 8px;
356
+}
357
+
358
+.mdescLeft, .mdescRight {
359
+	padding: 0px 8px 4px 8px;
360
+	color: #555;
361
+}
362
+
363
+.memItemLeft, .memItemRight, .memTemplParams {
364
+	border-top: 1px solid #C4CFE5;
365
+}
366
+
367
+.memItemLeft, .memTemplItemLeft {
368
+        white-space: nowrap;
369
+}
370
+
371
+.memItemRight {
372
+	width: 100%;
373
+}
374
+
375
+.memTemplParams {
376
+	color: #4665A2;
377
+        white-space: nowrap;
378
+}
379
+
380
+/* @end */
381
+
382
+/* @group Member Details */
383
+
384
+/* Styles for detailed member documentation */
385
+
386
+.memtemplate {
387
+	font-size: 80%;
388
+	color: #4665A2;
389
+	font-weight: normal;
390
+	margin-left: 9px;
391
+}
392
+
393
+.memnav {
394
+	background-color: #EBEFF6;
395
+	border: 1px solid #A3B4D7;
396
+	text-align: center;
397
+	margin: 2px;
398
+	margin-right: 15px;
399
+	padding: 2px;
400
+}
401
+
402
+.mempage {
403
+	width: 100%;
404
+}
405
+
406
+.memitem {
407
+	padding: 0;
408
+	margin-bottom: 10px;
409
+	margin-right: 5px;
410
+}
411
+
412
+.memname {
413
+        white-space: nowrap;
414
+        font-weight: bold;
415
+        margin-left: 6px;
416
+}
417
+
418
+.memproto, dl.reflist dt {
419
+        border-top: 1px solid #A8B8D9;
420
+        border-left: 1px solid #A8B8D9;
421
+        border-right: 1px solid #A8B8D9;
422
+        padding: 6px 0px 6px 0px;
423
+        color: #253555;
424
+        font-weight: bold;
425
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
426
+        /* opera specific markup */
427
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
428
+        border-top-right-radius: 8px;
429
+        border-top-left-radius: 8px;
430
+        /* firefox specific markup */
431
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
432
+        -moz-border-radius-topright: 8px;
433
+        -moz-border-radius-topleft: 8px;
434
+        /* webkit specific markup */
435
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
436
+        -webkit-border-top-right-radius: 8px;
437
+        -webkit-border-top-left-radius: 8px;
438
+        background-image:url('nav_f.png');
439
+        background-repeat:repeat-x;
440
+        background-color: #E2E8F2;
441
+
442
+}
443
+
444
+.memdoc, dl.reflist dd {
445
+        border-bottom: 1px solid #A8B8D9;      
446
+        border-left: 1px solid #A8B8D9;      
447
+        border-right: 1px solid #A8B8D9; 
448
+        padding: 2px 5px;
449
+        background-color: #FBFCFD;
450
+        border-top-width: 0;
451
+        /* opera specific markup */
452
+        border-bottom-left-radius: 8px;
453
+        border-bottom-right-radius: 8px;
454
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
455
+        /* firefox specific markup */
456
+        -moz-border-radius-bottomleft: 8px;
457
+        -moz-border-radius-bottomright: 8px;
458
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
459
+        background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
460
+        /* webkit specific markup */
461
+        -webkit-border-bottom-left-radius: 8px;
462
+        -webkit-border-bottom-right-radius: 8px;
463
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
464
+        background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
465
+}
466
+
467
+dl.reflist dt {
468
+        padding: 5px;
469
+}
470
+
471
+dl.reflist dd {
472
+        margin: 0px 0px 10px 0px;
473
+        padding: 5px;
474
+}
475
+
476
+.paramkey {
477
+	text-align: right;
478
+}
479
+
480
+.paramtype {
481
+	white-space: nowrap;
482
+}
483
+
484
+.paramname {
485
+	color: #602020;
486
+	white-space: nowrap;
487
+}
488
+.paramname em {
489
+	font-style: normal;
490
+}
491
+
492
+.params, .retval, .exception, .tparams {
493
+        border-spacing: 6px 2px;
494
+}       
495
+
496
+.params .paramname, .retval .paramname {
497
+        font-weight: bold;
498
+        vertical-align: top;
499
+}
500
+        
501
+.params .paramtype {
502
+        font-style: italic;
503
+        vertical-align: top;
504
+}       
505
+        
506
+.params .paramdir {
507
+        font-family: "courier new",courier,monospace;
508
+        vertical-align: top;
509
+}
510
+
511
+
512
+
513
+
514
+/* @end */
515
+
516
+/* @group Directory (tree) */
517
+
518
+/* for the tree view */
519
+
520
+.ftvtree {
521
+	font-family: sans-serif;
522
+	margin: 0px;
523
+}
524
+
525
+/* these are for tree view when used as main index */
526
+
527
+.directory {
528
+	font-size: 9pt;
529
+	font-weight: bold;
530
+	margin: 5px;
531
+}
532
+
533
+.directory h3 {
534
+	margin: 0px;
535
+	margin-top: 1em;
536
+	font-size: 11pt;
537
+}
538
+
539
+/*
540
+The following two styles can be used to replace the root node title
541
+with an image of your choice.  Simply uncomment the next two styles,
542
+specify the name of your image and be sure to set 'height' to the
543
+proper pixel height of your image.
544
+*/
545
+
546
+/*
547
+.directory h3.swap {
548
+	height: 61px;
549
+	background-repeat: no-repeat;
550
+	background-image: url("yourimage.gif");
551
+}
552
+.directory h3.swap span {
553
+	display: none;
554
+}
555
+*/
556
+
557
+.directory > h3 {
558
+	margin-top: 0;
559
+}
560
+
561
+.directory p {
562
+	margin: 0px;
563
+	white-space: nowrap;
564
+}
565
+
566
+.directory div {
567
+	display: none;
568
+	margin: 0px;
569
+}
570
+
571
+.directory img {
572
+	vertical-align: -30%;
573
+}
574
+
575
+/* these are for tree view when not used as main index */
576
+
577
+.directory-alt {
578
+	font-size: 100%;
579
+	font-weight: bold;
580
+}
581
+
582
+.directory-alt h3 {
583
+	margin: 0px;
584
+	margin-top: 1em;
585
+	font-size: 11pt;
586
+}
587
+
588
+.directory-alt > h3 {
589
+	margin-top: 0;
590
+}
591
+
592
+.directory-alt p {
593
+	margin: 0px;
594
+	white-space: nowrap;
595
+}
596
+
597
+.directory-alt div {
598
+	display: none;
599
+	margin: 0px;
600
+}
601
+
602
+.directory-alt img {
603
+	vertical-align: -30%;
604
+}
605
+
606
+/* @end */
607
+
608
+div.dynheader {
609
+        margin-top: 8px;
610
+}
611
+
612
+address {
613
+	font-style: normal;
614
+	color: #2A3D61;
615
+}
616
+
617
+table.doxtable {
618
+	border-collapse:collapse;
619
+}
620
+
621
+table.doxtable td, table.doxtable th {
622
+	border: 1px solid #2D4068;
623
+	padding: 3px 7px 2px;
624
+}
625
+
626
+table.doxtable th {
627
+	background-color: #374F7F;
628
+	color: #FFFFFF;
629
+	font-size: 110%;
630
+	padding-bottom: 4px;
631
+	padding-top: 5px;
632
+	text-align:left;
633
+}
634
+
635
+table.fieldtable {
636
+        width: 100%;
637
+        margin-bottom: 10px;
638
+        border: 1px solid #A8B8D9;
639
+        border-spacing: 0px;
640
+        -moz-border-radius: 4px;
641
+        -webkit-border-radius: 4px;
642
+        border-radius: 4px;
643
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
644
+        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
645
+        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
646
+}
647
+
648
+.fieldtable td, .fieldtable th {
649
+        padding: 3px 7px 2px;
650
+}
651
+
652
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
653
+        white-space: nowrap;
654
+        border-right: 1px solid #A8B8D9;
655
+        border-bottom: 1px solid #A8B8D9;
656
+        vertical-align: top;
657
+}
658
+
659
+.fieldtable td.fielddoc {
660
+        border-bottom: 1px solid #A8B8D9;
661
+        width: 100%;
662
+}
663
+
664
+.fieldtable tr:last-child td {
665
+        border-bottom: none;
666
+}
667
+
668
+.fieldtable th {
669
+        background-image:url('nav_f.png');
670
+        background-repeat:repeat-x;
671
+        background-color: #E2E8F2;
672
+        font-size: 90%;
673
+        color: #253555;
674
+        padding-bottom: 4px;
675
+        padding-top: 5px;
676
+        text-align:left;
677
+        -moz-border-radius-topleft: 4px;
678
+        -moz-border-radius-topright: 4px;
679
+        -webkit-border-top-left-radius: 4px;
680
+        -webkit-border-top-right-radius: 4px;
681
+        border-top-left-radius: 4px;
682
+        border-top-right-radius: 4px;
683
+        border-bottom: 1px solid #A8B8D9;
684
+}
685
+
686
+
687
+.tabsearch {
688
+	top: 0px;
689
+	left: 10px;
690
+	height: 36px;
691
+	background-image: url('tab_b.png');
692
+	z-index: 101;
693
+	overflow: hidden;
694
+	font-size: 13px;
695
+}
696
+
697
+.navpath ul
698
+{
699
+	font-size: 11px;
700
+	background-image:url('tab_b.png');
701
+	background-repeat:repeat-x;
702
+	height:30px;
703
+	line-height:30px;
704
+	color:#8AA0CC;
705
+	border:solid 1px #C2CDE4;
706
+	overflow:hidden;
707
+	margin:0px;
708
+	padding:0px;
709
+}
710
+
711
+.navpath li
712
+{
713
+	list-style-type:none;
714
+	float:left;
715
+	padding-left:10px;
716
+	padding-right:15px;
717
+	background-image:url('bc_s.png');
718
+	background-repeat:no-repeat;
719
+	background-position:right;
720
+	color:#364D7C;
721
+}
722
+
723
+.navpath li.navelem a
724
+{
725
+	height:32px;
726
+	display:block;
727
+	text-decoration: none;
728
+	outline: none;
729
+}
730
+
731
+.navpath li.navelem a:hover
732
+{
733
+	color:#6884BD;
734
+}
735
+
736
+.navpath li.footer
737
+{
738
+        list-style-type:none;
739
+        float:right;
740
+        padding-left:10px;
741
+        padding-right:15px;
742
+        background-image:none;
743
+        background-repeat:no-repeat;
744
+        background-position:right;
745
+        color:#364D7C;
746
+        font-size: 8pt;
747
+}
748
+
749
+
750
+div.summary
751
+{
752
+	float: right;
753
+	font-size: 8pt;
754
+	padding-right: 5px;
755
+	width: 50%;
756
+	text-align: right;
757
+}       
758
+
759
+div.summary a
760
+{
761
+	white-space: nowrap;
762
+}
763
+
764
+div.ingroups
765
+{
766
+	margin-left: 5px;
767
+	font-size: 8pt;
768
+	padding-left: 5px;
769
+	width: 50%;
770
+	text-align: left;
771
+}
772
+
773
+div.ingroups a
774
+{
775
+	white-space: nowrap;
776
+}
777
+
778
+div.header
779
+{
780
+        background-image:url('nav_h.png');
781
+        background-repeat:repeat-x;
782
+	background-color: #F9FAFC;
783
+	margin:  0px;
784
+	border-bottom: 1px solid #C4CFE5;
785
+}
786
+
787
+div.headertitle
788
+{
789
+	padding: 5px 5px 5px 7px;
790
+}
791
+
792
+dl
793
+{
794
+        padding: 0 0 0 10px;
795
+}
796
+
797
+dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
798
+{
799
+        border-left:4px solid;
800
+        padding: 0 0 0 6px;
801
+}
802
+
803
+dl.note
804
+{
805
+        border-color: #D0C000;
806
+}
807
+
808
+dl.warning, dl.attention
809
+{
810
+        border-color: #FF0000;
811
+}
812
+
813
+dl.pre, dl.post, dl.invariant
814
+{
815
+        border-color: #00D000;
816
+}
817
+
818
+dl.deprecated
819
+{
820
+        border-color: #505050;
821
+}
822
+
823
+dl.todo
824
+{
825
+        border-color: #00C0E0;
826
+}
827
+
828
+dl.test
829
+{
830
+        border-color: #3030E0;
831
+}
832
+
833
+dl.bug
834
+{
835
+        border-color: #C08050;
836
+}
837
+
838
+#projectlogo
839
+{
840
+	text-align: center;
841
+	vertical-align: bottom;
842
+	border-collapse: separate;
843
+}
844
+ 
845
+#projectlogo img
846
+{ 
847
+	border: 0px none;
848
+}
849
+ 
850
+#projectname
851
+{
852
+	font: 300% Tahoma, Arial,sans-serif;
853
+	margin: 0px;
854
+	padding: 2px 0px;
855
+}
856
+    
857
+#projectbrief
858
+{
859
+	font: 120% Tahoma, Arial,sans-serif;
860
+	margin: 0px;
861
+	padding: 0px;
862
+}
863
+
864
+#projectnumber
865
+{
866
+	font: 50% Tahoma, Arial,sans-serif;
867
+	margin: 0px;
868
+	padding: 0px;
869
+}
870
+
871
+#titlearea
872
+{
873
+	padding: 0px;
874
+	margin: 0px;
875
+	width: 100%;
876
+	border-bottom: 1px solid #5373B4;
877
+}
878
+
879
+.image
880
+{
881
+        text-align: center;
882
+}
883
+
884
+.dotgraph
885
+{
886
+        text-align: center;
887
+}
888
+
889
+.mscgraph
890
+{
891
+        text-align: center;
892
+}
893
+
894
+.caption
895
+{
896
+	font-weight: bold;
897
+}
898
+
899
+div.zoom
900
+{
901
+	border: 1px solid #90A5CE;
902
+}
903
+
904
+dl.citelist {
905
+        margin-bottom:50px;
906
+}
907
+
908
+dl.citelist dt {
909
+        color:#334975;
910
+        float:left;
911
+        font-weight:bold;
912
+        margin-right:10px;
913
+        padding:5px;
914
+}
915
+
916
+dl.citelist dd {
917
+        margin:2px 0;
918
+        padding:5px 0;
919
+}
920
+
921
+@media print
922
+{
923
+  #top { display: none; }
924
+  #side-nav { display: none; }
925
+  #nav-path { display: none; }
926
+  body { overflow:visible; }
927
+  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
928
+  .summary { display: none; }
929
+  .memitem { page-break-inside: avoid; }
930
+  #doc-content
931
+  {
932
+    margin-left:0 !important;
933
+    height:auto !important;
934
+    width:auto !important;
935
+    overflow:inherit;
936
+    display:inline;
937
+  }
938
+  pre.fragment
939
+  {
940
+    overflow: visible;
941
+    text-wrap: unrestricted;
942
+    white-space: -moz-pre-wrap; /* Moz */
943
+    white-space: -pre-wrap; /* Opera 4-6 */
944
+    white-space: -o-pre-wrap; /* Opera 7 */
945
+    white-space: pre-wrap; /* CSS3  */
946
+    word-wrap: break-word; /* IE 5.5+ */
947
+  }
948
+}
949
+

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.png View File


+ 72
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/files.html View File

@@ -0,0 +1,72 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: File List</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="headertitle">
55
+<div class="title">File List</div>  </div>
56
+</div><!--header-->
57
+<div class="contents">
58
+<div class="textblock">Here is a list of all files with brief descriptions:</div><table>
59
+  <tr><td class="indexkey"><a class="el" href="_t_m_c26_x_stepper_8cpp.html">TMC26XStepper.cpp</a> <a href="_t_m_c26_x_stepper_8cpp_source.html">[code]</a></td><td class="indexvalue"></td></tr>
60
+  <tr><td class="indexkey"><a class="el" href="_t_m_c26_x_stepper_8h.html">TMC26XStepper.h</a> <a href="_t_m_c26_x_stepper_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
61
+</table>
62
+</div><!-- contents -->
63
+
64
+
65
+<hr class="footer"/><address class="footer"><small>
66
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
67
+<img class="footer" src="doxygen.png" alt="doxygen"/>
68
+</a> 1.7.6.1
69
+</small></address>
70
+
71
+</body>
72
+</html>

+ 261
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions.html View File

@@ -0,0 +1,261 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class Members</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+  <div id="navrow3" class="tabs2">
54
+    <ul class="tablist">
55
+      <li class="current"><a href="functions.html"><span>All</span></a></li>
56
+      <li><a href="functions_func.html"><span>Functions</span></a></li>
57
+    </ul>
58
+  </div>
59
+  <div id="navrow4" class="tabs3">
60
+    <ul class="tablist">
61
+      <li><a href="#index_d"><span>d</span></a></li>
62
+      <li><a href="#index_g"><span>g</span></a></li>
63
+      <li><a href="#index_i"><span>i</span></a></li>
64
+      <li><a href="#index_m"><span>m</span></a></li>
65
+      <li><a href="#index_r"><span>r</span></a></li>
66
+      <li><a href="#index_s"><span>s</span></a></li>
67
+      <li><a href="#index_t"><span>t</span></a></li>
68
+      <li><a href="#index_u"><span>u</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
75
+
76
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
77
+<li>debugLastStatus()
78
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">TMC26XStepper</a>
79
+</li>
80
+</ul>
81
+
82
+
83
+<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
84
+<li>getCoolStepCurrentIncrementSize()
85
+: <a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">TMC26XStepper</a>
86
+</li>
87
+<li>getCoolStepLowerCurrentLimit()
88
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">TMC26XStepper</a>
89
+</li>
90
+<li>getCoolStepLowerSgThreshold()
91
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">TMC26XStepper</a>
92
+</li>
93
+<li>getCoolStepNumberOfSGReadings()
94
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">TMC26XStepper</a>
95
+</li>
96
+<li>getCoolStepUpperSgThreshold()
97
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">TMC26XStepper</a>
98
+</li>
99
+<li>getCurrent()
100
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">TMC26XStepper</a>
101
+</li>
102
+<li>getCurrentCSReading()
103
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">TMC26XStepper</a>
104
+</li>
105
+<li>getCurrentCurrent()
106
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">TMC26XStepper</a>
107
+</li>
108
+<li>getCurrentStallGuardReading()
109
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">TMC26XStepper</a>
110
+</li>
111
+<li>getMicrosteps()
112
+: <a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">TMC26XStepper</a>
113
+</li>
114
+<li>getMotorPosition()
115
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">TMC26XStepper</a>
116
+</li>
117
+<li>getOverTemperature()
118
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">TMC26XStepper</a>
119
+</li>
120
+<li>getResistor()
121
+: <a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">TMC26XStepper</a>
122
+</li>
123
+<li>getSpeed()
124
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">TMC26XStepper</a>
125
+</li>
126
+<li>getStallGuardFilter()
127
+: <a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">TMC26XStepper</a>
128
+</li>
129
+<li>getStallGuardThreshold()
130
+: <a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">TMC26XStepper</a>
131
+</li>
132
+<li>getStepsLeft()
133
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">TMC26XStepper</a>
134
+</li>
135
+</ul>
136
+
137
+
138
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
139
+<li>isCoolStepEnabled()
140
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">TMC26XStepper</a>
141
+</li>
142
+<li>isCurrentScalingHalfed()
143
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">TMC26XStepper</a>
144
+</li>
145
+<li>isEnabled()
146
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">TMC26XStepper</a>
147
+</li>
148
+<li>isMoving()
149
+: <a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">TMC26XStepper</a>
150
+</li>
151
+<li>isOpenLoadA()
152
+: <a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">TMC26XStepper</a>
153
+</li>
154
+<li>isOpenLoadB()
155
+: <a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">TMC26XStepper</a>
156
+</li>
157
+<li>isShortToGroundA()
158
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">TMC26XStepper</a>
159
+</li>
160
+<li>isShortToGroundB()
161
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">TMC26XStepper</a>
162
+</li>
163
+<li>isStallGuardOverThreshold()
164
+: <a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">TMC26XStepper</a>
165
+</li>
166
+<li>isStallGuardReached()
167
+: <a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">TMC26XStepper</a>
168
+</li>
169
+<li>isStandStill()
170
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">TMC26XStepper</a>
171
+</li>
172
+</ul>
173
+
174
+
175
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
176
+<li>move()
177
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">TMC26XStepper</a>
178
+</li>
179
+</ul>
180
+
181
+
182
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
183
+<li>readStatus()
184
+: <a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">TMC26XStepper</a>
185
+</li>
186
+</ul>
187
+
188
+
189
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
190
+<li>setConstantOffTimeChopper()
191
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">TMC26XStepper</a>
192
+</li>
193
+<li>setCoolStepConfiguration()
194
+: <a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">TMC26XStepper</a>
195
+</li>
196
+<li>setCoolStepEnabled()
197
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">TMC26XStepper</a>
198
+</li>
199
+<li>setCurrent()
200
+: <a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">TMC26XStepper</a>
201
+</li>
202
+<li>setEnabled()
203
+: <a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">TMC26XStepper</a>
204
+</li>
205
+<li>setMicrosteps()
206
+: <a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">TMC26XStepper</a>
207
+</li>
208
+<li>setRandomOffTime()
209
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">TMC26XStepper</a>
210
+</li>
211
+<li>setSpeed()
212
+: <a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">TMC26XStepper</a>
213
+</li>
214
+<li>setSpreadCycleChopper()
215
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">TMC26XStepper</a>
216
+</li>
217
+<li>setStallGuardThreshold()
218
+: <a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">TMC26XStepper</a>
219
+</li>
220
+<li>start()
221
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">TMC26XStepper</a>
222
+</li>
223
+<li>step()
224
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">TMC26XStepper</a>
225
+</li>
226
+<li>stop()
227
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">TMC26XStepper</a>
228
+</li>
229
+</ul>
230
+
231
+
232
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
233
+<li>TMC26XStepper()
234
+: <a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>
235
+</li>
236
+</ul>
237
+
238
+
239
+<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
240
+<li>un_start()
241
+: <a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">TMC26XStepper</a>
242
+</li>
243
+</ul>
244
+
245
+
246
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
247
+<li>version()
248
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">TMC26XStepper</a>
249
+</li>
250
+</ul>
251
+</div><!-- contents -->
252
+
253
+
254
+<hr class="footer"/><address class="footer"><small>
255
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
256
+<img class="footer" src="doxygen.png" alt="doxygen"/>
257
+</a> 1.7.6.1
258
+</small></address>
259
+
260
+</body>
261
+</html>

+ 261
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions_func.html View File

@@ -0,0 +1,261 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class Members - Functions</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+  <div id="navrow3" class="tabs2">
54
+    <ul class="tablist">
55
+      <li><a href="functions.html"><span>All</span></a></li>
56
+      <li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
57
+    </ul>
58
+  </div>
59
+  <div id="navrow4" class="tabs3">
60
+    <ul class="tablist">
61
+      <li><a href="#index_d"><span>d</span></a></li>
62
+      <li><a href="#index_g"><span>g</span></a></li>
63
+      <li><a href="#index_i"><span>i</span></a></li>
64
+      <li><a href="#index_m"><span>m</span></a></li>
65
+      <li><a href="#index_r"><span>r</span></a></li>
66
+      <li><a href="#index_s"><span>s</span></a></li>
67
+      <li><a href="#index_t"><span>t</span></a></li>
68
+      <li><a href="#index_u"><span>u</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+&#160;
75
+
76
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
77
+<li>debugLastStatus()
78
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">TMC26XStepper</a>
79
+</li>
80
+</ul>
81
+
82
+
83
+<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
84
+<li>getCoolStepCurrentIncrementSize()
85
+: <a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">TMC26XStepper</a>
86
+</li>
87
+<li>getCoolStepLowerCurrentLimit()
88
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">TMC26XStepper</a>
89
+</li>
90
+<li>getCoolStepLowerSgThreshold()
91
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">TMC26XStepper</a>
92
+</li>
93
+<li>getCoolStepNumberOfSGReadings()
94
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">TMC26XStepper</a>
95
+</li>
96
+<li>getCoolStepUpperSgThreshold()
97
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">TMC26XStepper</a>
98
+</li>
99
+<li>getCurrent()
100
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">TMC26XStepper</a>
101
+</li>
102
+<li>getCurrentCSReading()
103
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">TMC26XStepper</a>
104
+</li>
105
+<li>getCurrentCurrent()
106
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">TMC26XStepper</a>
107
+</li>
108
+<li>getCurrentStallGuardReading()
109
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">TMC26XStepper</a>
110
+</li>
111
+<li>getMicrosteps()
112
+: <a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">TMC26XStepper</a>
113
+</li>
114
+<li>getMotorPosition()
115
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">TMC26XStepper</a>
116
+</li>
117
+<li>getOverTemperature()
118
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">TMC26XStepper</a>
119
+</li>
120
+<li>getResistor()
121
+: <a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">TMC26XStepper</a>
122
+</li>
123
+<li>getSpeed()
124
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">TMC26XStepper</a>
125
+</li>
126
+<li>getStallGuardFilter()
127
+: <a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">TMC26XStepper</a>
128
+</li>
129
+<li>getStallGuardThreshold()
130
+: <a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">TMC26XStepper</a>
131
+</li>
132
+<li>getStepsLeft()
133
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">TMC26XStepper</a>
134
+</li>
135
+</ul>
136
+
137
+
138
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
139
+<li>isCoolStepEnabled()
140
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">TMC26XStepper</a>
141
+</li>
142
+<li>isCurrentScalingHalfed()
143
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">TMC26XStepper</a>
144
+</li>
145
+<li>isEnabled()
146
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">TMC26XStepper</a>
147
+</li>
148
+<li>isMoving()
149
+: <a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">TMC26XStepper</a>
150
+</li>
151
+<li>isOpenLoadA()
152
+: <a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">TMC26XStepper</a>
153
+</li>
154
+<li>isOpenLoadB()
155
+: <a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">TMC26XStepper</a>
156
+</li>
157
+<li>isShortToGroundA()
158
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">TMC26XStepper</a>
159
+</li>
160
+<li>isShortToGroundB()
161
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">TMC26XStepper</a>
162
+</li>
163
+<li>isStallGuardOverThreshold()
164
+: <a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">TMC26XStepper</a>
165
+</li>
166
+<li>isStallGuardReached()
167
+: <a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">TMC26XStepper</a>
168
+</li>
169
+<li>isStandStill()
170
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">TMC26XStepper</a>
171
+</li>
172
+</ul>
173
+
174
+
175
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
176
+<li>move()
177
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">TMC26XStepper</a>
178
+</li>
179
+</ul>
180
+
181
+
182
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
183
+<li>readStatus()
184
+: <a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">TMC26XStepper</a>
185
+</li>
186
+</ul>
187
+
188
+
189
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
190
+<li>setConstantOffTimeChopper()
191
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">TMC26XStepper</a>
192
+</li>
193
+<li>setCoolStepConfiguration()
194
+: <a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">TMC26XStepper</a>
195
+</li>
196
+<li>setCoolStepEnabled()
197
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">TMC26XStepper</a>
198
+</li>
199
+<li>setCurrent()
200
+: <a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">TMC26XStepper</a>
201
+</li>
202
+<li>setEnabled()
203
+: <a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">TMC26XStepper</a>
204
+</li>
205
+<li>setMicrosteps()
206
+: <a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">TMC26XStepper</a>
207
+</li>
208
+<li>setRandomOffTime()
209
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">TMC26XStepper</a>
210
+</li>
211
+<li>setSpeed()
212
+: <a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">TMC26XStepper</a>
213
+</li>
214
+<li>setSpreadCycleChopper()
215
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">TMC26XStepper</a>
216
+</li>
217
+<li>setStallGuardThreshold()
218
+: <a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">TMC26XStepper</a>
219
+</li>
220
+<li>start()
221
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">TMC26XStepper</a>
222
+</li>
223
+<li>step()
224
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">TMC26XStepper</a>
225
+</li>
226
+<li>stop()
227
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">TMC26XStepper</a>
228
+</li>
229
+</ul>
230
+
231
+
232
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
233
+<li>TMC26XStepper()
234
+: <a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>
235
+</li>
236
+</ul>
237
+
238
+
239
+<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
240
+<li>un_start()
241
+: <a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">TMC26XStepper</a>
242
+</li>
243
+</ul>
244
+
245
+
246
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
247
+<li>version()
248
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">TMC26XStepper</a>
249
+</li>
250
+</ul>
251
+</div><!-- contents -->
252
+
253
+
254
+<hr class="footer"/><address class="footer"><small>
255
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
256
+<img class="footer" src="doxygen.png" alt="doxygen"/>
257
+</a> 1.7.6.1
258
+</small></address>
259
+
260
+</body>
261
+</html>

+ 289
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals.html View File

@@ -0,0 +1,289 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: File Members</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+  <div id="navrow3" class="tabs2">
53
+    <ul class="tablist">
54
+      <li class="current"><a href="globals.html"><span>All</span></a></li>
55
+      <li><a href="globals_defs.html"><span>Defines</span></a></li>
56
+    </ul>
57
+  </div>
58
+  <div id="navrow4" class="tabs3">
59
+    <ul class="tablist">
60
+      <li><a href="#index_b"><span>b</span></a></li>
61
+      <li><a href="#index_c"><span>c</span></a></li>
62
+      <li><a href="#index_d"><span>d</span></a></li>
63
+      <li><a href="#index_h"><span>h</span></a></li>
64
+      <li><a href="#index_i"><span>i</span></a></li>
65
+      <li><a href="#index_m"><span>m</span></a></li>
66
+      <li><a href="#index_r"><span>r</span></a></li>
67
+      <li><a href="#index_s"><span>s</span></a></li>
68
+      <li><a href="#index_t"><span>t</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
75
+
76
+<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
77
+<li>BLANK_TIMING_PATTERN
78
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">TMC26XStepper.cpp</a>
79
+</li>
80
+<li>BLANK_TIMING_SHIFT
81
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">TMC26XStepper.cpp</a>
82
+</li>
83
+</ul>
84
+
85
+
86
+<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
87
+<li>CHOPPER_CONFIG_REGISTER
88
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">TMC26XStepper.cpp</a>
89
+</li>
90
+<li>CHOPPER_MODE_STANDARD
91
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">TMC26XStepper.cpp</a>
92
+</li>
93
+<li>CHOPPER_MODE_T_OFF_FAST_DECAY
94
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">TMC26XStepper.cpp</a>
95
+</li>
96
+<li>COOL_STEP_HALF_CS_LIMIT
97
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">TMC26XStepper.h</a>
98
+</li>
99
+<li>COOL_STEP_QUARTDER_CS_LIMIT
100
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">TMC26XStepper.h</a>
101
+</li>
102
+<li>COOL_STEP_REGISTER
103
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">TMC26XStepper.cpp</a>
104
+</li>
105
+<li>CURRENT_DOWN_STEP_SPEED_PATTERN
106
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">TMC26XStepper.cpp</a>
107
+</li>
108
+<li>CURRENT_SCALING_PATTERN
109
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">TMC26XStepper.cpp</a>
110
+</li>
111
+</ul>
112
+
113
+
114
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
115
+<li>DEFAULT_MICROSTEPPING_VALUE
116
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">TMC26XStepper.cpp</a>
117
+</li>
118
+<li>DOUBLE_EDGE_STEP
119
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">TMC26XStepper.cpp</a>
120
+</li>
121
+<li>DRIVER_CONFIG_REGISTER
122
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">TMC26XStepper.cpp</a>
123
+</li>
124
+<li>DRIVER_CONTROL_REGISTER
125
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">TMC26XStepper.cpp</a>
126
+</li>
127
+</ul>
128
+
129
+
130
+<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
131
+<li>HYSTERESIS_DECREMENT_PATTERN
132
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">TMC26XStepper.cpp</a>
133
+</li>
134
+<li>HYSTERESIS_DECREMENT_SHIFT
135
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">TMC26XStepper.cpp</a>
136
+</li>
137
+<li>HYSTERESIS_LOW_SHIFT
138
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">TMC26XStepper.cpp</a>
139
+</li>
140
+<li>HYSTERESIS_LOW_VALUE_PATTERN
141
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">TMC26XStepper.cpp</a>
142
+</li>
143
+<li>HYSTERESIS_START_VALUE_PATTERN
144
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">TMC26XStepper.cpp</a>
145
+</li>
146
+<li>HYSTERESIS_START_VALUE_SHIFT
147
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">TMC26XStepper.cpp</a>
148
+</li>
149
+</ul>
150
+
151
+
152
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
153
+<li>INITIAL_MICROSTEPPING
154
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">TMC26XStepper.cpp</a>
155
+</li>
156
+</ul>
157
+
158
+
159
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
160
+<li>MICROSTEPPING_PATTERN
161
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">TMC26XStepper.cpp</a>
162
+</li>
163
+<li>MINIMUM_CURRENT_FOURTH
164
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">TMC26XStepper.cpp</a>
165
+</li>
166
+</ul>
167
+
168
+
169
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
170
+<li>RANDOM_TOFF_TIME
171
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">TMC26XStepper.cpp</a>
172
+</li>
173
+<li>READ_MICROSTEP_POSTION
174
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">TMC26XStepper.cpp</a>
175
+</li>
176
+<li>READ_SELECTION_PATTERN
177
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">TMC26XStepper.cpp</a>
178
+</li>
179
+<li>READ_STALL_GUARD_AND_COOL_STEP
180
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">TMC26XStepper.cpp</a>
181
+</li>
182
+<li>READ_STALL_GUARD_READING
183
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">TMC26XStepper.cpp</a>
184
+</li>
185
+<li>READOUT_VALUE_PATTERN
186
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">TMC26XStepper.cpp</a>
187
+</li>
188
+<li>REGISTER_BIT_PATTERN
189
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">TMC26XStepper.cpp</a>
190
+</li>
191
+</ul>
192
+
193
+
194
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
195
+<li>SE_CURRENT_STEP_WIDTH_PATTERN
196
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">TMC26XStepper.cpp</a>
197
+</li>
198
+<li>SE_MAX_PATTERN
199
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">TMC26XStepper.cpp</a>
200
+</li>
201
+<li>SE_MIN_PATTERN
202
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">TMC26XStepper.cpp</a>
203
+</li>
204
+<li>STALL_GUARD2_LOAD_MEASURE_REGISTER
205
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">TMC26XStepper.cpp</a>
206
+</li>
207
+<li>STALL_GUARD_CONFIG_PATTERN
208
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">TMC26XStepper.cpp</a>
209
+</li>
210
+<li>STALL_GUARD_FILTER_ENABLED
211
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">TMC26XStepper.cpp</a>
212
+</li>
213
+<li>STALL_GUARD_TRESHHOLD_VALUE_PATTERN
214
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">TMC26XStepper.cpp</a>
215
+</li>
216
+<li>STALL_GUARD_VALUE_PATTERN
217
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">TMC26XStepper.cpp</a>
218
+</li>
219
+<li>STATUS_OPEN_LOAD_A
220
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">TMC26XStepper.cpp</a>
221
+</li>
222
+<li>STATUS_OPEN_LOAD_B
223
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">TMC26XStepper.cpp</a>
224
+</li>
225
+<li>STATUS_OVER_TEMPERATURE_SHUTDOWN
226
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">TMC26XStepper.cpp</a>
227
+</li>
228
+<li>STATUS_OVER_TEMPERATURE_WARNING
229
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">TMC26XStepper.cpp</a>
230
+</li>
231
+<li>STATUS_SHORT_TO_GROUND_A
232
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">TMC26XStepper.cpp</a>
233
+</li>
234
+<li>STATUS_SHORT_TO_GROUND_B
235
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">TMC26XStepper.cpp</a>
236
+</li>
237
+<li>STATUS_STALL_GUARD_STATUS
238
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">TMC26XStepper.cpp</a>
239
+</li>
240
+<li>STATUS_STAND_STILL
241
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">TMC26XStepper.cpp</a>
242
+</li>
243
+<li>STEP_INTERPOLATION
244
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">TMC26XStepper.cpp</a>
245
+</li>
246
+</ul>
247
+
248
+
249
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
250
+<li>T_OFF_PATTERN
251
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">TMC26XStepper.cpp</a>
252
+</li>
253
+<li>T_OFF_TIMING_PATERN
254
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">TMC26XStepper.cpp</a>
255
+</li>
256
+<li>TMC26X_OVERTEMPERATURE_PREWARING
257
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26XStepper.h</a>
258
+</li>
259
+<li>TMC26X_OVERTEMPERATURE_SHUTDOWN
260
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26XStepper.h</a>
261
+</li>
262
+<li>TMC26X_READOUT_CURRENT
263
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26XStepper.h</a>
264
+</li>
265
+<li>TMC26X_READOUT_POSITION
266
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26XStepper.h</a>
267
+</li>
268
+<li>TMC26X_READOUT_STALLGUARD
269
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26XStepper.h</a>
270
+</li>
271
+</ul>
272
+
273
+
274
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
275
+<li>VSENSE
276
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">TMC26XStepper.cpp</a>
277
+</li>
278
+</ul>
279
+</div><!-- contents -->
280
+
281
+
282
+<hr class="footer"/><address class="footer"><small>
283
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
284
+<img class="footer" src="doxygen.png" alt="doxygen"/>
285
+</a> 1.7.6.1
286
+</small></address>
287
+
288
+</body>
289
+</html>

+ 289
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals_defs.html View File

@@ -0,0 +1,289 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: File Members</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+  <div id="navrow3" class="tabs2">
53
+    <ul class="tablist">
54
+      <li><a href="globals.html"><span>All</span></a></li>
55
+      <li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
56
+    </ul>
57
+  </div>
58
+  <div id="navrow4" class="tabs3">
59
+    <ul class="tablist">
60
+      <li><a href="#index_b"><span>b</span></a></li>
61
+      <li><a href="#index_c"><span>c</span></a></li>
62
+      <li><a href="#index_d"><span>d</span></a></li>
63
+      <li><a href="#index_h"><span>h</span></a></li>
64
+      <li><a href="#index_i"><span>i</span></a></li>
65
+      <li><a href="#index_m"><span>m</span></a></li>
66
+      <li><a href="#index_r"><span>r</span></a></li>
67
+      <li><a href="#index_s"><span>s</span></a></li>
68
+      <li><a href="#index_t"><span>t</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+&#160;
75
+
76
+<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
77
+<li>BLANK_TIMING_PATTERN
78
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">TMC26XStepper.cpp</a>
79
+</li>
80
+<li>BLANK_TIMING_SHIFT
81
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">TMC26XStepper.cpp</a>
82
+</li>
83
+</ul>
84
+
85
+
86
+<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
87
+<li>CHOPPER_CONFIG_REGISTER
88
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">TMC26XStepper.cpp</a>
89
+</li>
90
+<li>CHOPPER_MODE_STANDARD
91
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">TMC26XStepper.cpp</a>
92
+</li>
93
+<li>CHOPPER_MODE_T_OFF_FAST_DECAY
94
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">TMC26XStepper.cpp</a>
95
+</li>
96
+<li>COOL_STEP_HALF_CS_LIMIT
97
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">TMC26XStepper.h</a>
98
+</li>
99
+<li>COOL_STEP_QUARTDER_CS_LIMIT
100
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">TMC26XStepper.h</a>
101
+</li>
102
+<li>COOL_STEP_REGISTER
103
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">TMC26XStepper.cpp</a>
104
+</li>
105
+<li>CURRENT_DOWN_STEP_SPEED_PATTERN
106
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">TMC26XStepper.cpp</a>
107
+</li>
108
+<li>CURRENT_SCALING_PATTERN
109
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">TMC26XStepper.cpp</a>
110
+</li>
111
+</ul>
112
+
113
+
114
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
115
+<li>DEFAULT_MICROSTEPPING_VALUE
116
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">TMC26XStepper.cpp</a>
117
+</li>
118
+<li>DOUBLE_EDGE_STEP
119
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">TMC26XStepper.cpp</a>
120
+</li>
121
+<li>DRIVER_CONFIG_REGISTER
122
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">TMC26XStepper.cpp</a>
123
+</li>
124
+<li>DRIVER_CONTROL_REGISTER
125
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">TMC26XStepper.cpp</a>
126
+</li>
127
+</ul>
128
+
129
+
130
+<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
131
+<li>HYSTERESIS_DECREMENT_PATTERN
132
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">TMC26XStepper.cpp</a>
133
+</li>
134
+<li>HYSTERESIS_DECREMENT_SHIFT
135
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">TMC26XStepper.cpp</a>
136
+</li>
137
+<li>HYSTERESIS_LOW_SHIFT
138
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">TMC26XStepper.cpp</a>
139
+</li>
140
+<li>HYSTERESIS_LOW_VALUE_PATTERN
141
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">TMC26XStepper.cpp</a>
142
+</li>
143
+<li>HYSTERESIS_START_VALUE_PATTERN
144
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">TMC26XStepper.cpp</a>
145
+</li>
146
+<li>HYSTERESIS_START_VALUE_SHIFT
147
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">TMC26XStepper.cpp</a>
148
+</li>
149
+</ul>
150
+
151
+
152
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
153
+<li>INITIAL_MICROSTEPPING
154
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">TMC26XStepper.cpp</a>
155
+</li>
156
+</ul>
157
+
158
+
159
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
160
+<li>MICROSTEPPING_PATTERN
161
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">TMC26XStepper.cpp</a>
162
+</li>
163
+<li>MINIMUM_CURRENT_FOURTH
164
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">TMC26XStepper.cpp</a>
165
+</li>
166
+</ul>
167
+
168
+
169
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
170
+<li>RANDOM_TOFF_TIME
171
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">TMC26XStepper.cpp</a>
172
+</li>
173
+<li>READ_MICROSTEP_POSTION
174
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">TMC26XStepper.cpp</a>
175
+</li>
176
+<li>READ_SELECTION_PATTERN
177
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">TMC26XStepper.cpp</a>
178
+</li>
179
+<li>READ_STALL_GUARD_AND_COOL_STEP
180
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">TMC26XStepper.cpp</a>
181
+</li>
182
+<li>READ_STALL_GUARD_READING
183
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">TMC26XStepper.cpp</a>
184
+</li>
185
+<li>READOUT_VALUE_PATTERN
186
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">TMC26XStepper.cpp</a>
187
+</li>
188
+<li>REGISTER_BIT_PATTERN
189
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">TMC26XStepper.cpp</a>
190
+</li>
191
+</ul>
192
+
193
+
194
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
195
+<li>SE_CURRENT_STEP_WIDTH_PATTERN
196
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">TMC26XStepper.cpp</a>
197
+</li>
198
+<li>SE_MAX_PATTERN
199
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">TMC26XStepper.cpp</a>
200
+</li>
201
+<li>SE_MIN_PATTERN
202
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">TMC26XStepper.cpp</a>
203
+</li>
204
+<li>STALL_GUARD2_LOAD_MEASURE_REGISTER
205
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">TMC26XStepper.cpp</a>
206
+</li>
207
+<li>STALL_GUARD_CONFIG_PATTERN
208
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">TMC26XStepper.cpp</a>
209
+</li>
210
+<li>STALL_GUARD_FILTER_ENABLED
211
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">TMC26XStepper.cpp</a>
212
+</li>
213
+<li>STALL_GUARD_TRESHHOLD_VALUE_PATTERN
214
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">TMC26XStepper.cpp</a>
215
+</li>
216
+<li>STALL_GUARD_VALUE_PATTERN
217
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">TMC26XStepper.cpp</a>
218
+</li>
219
+<li>STATUS_OPEN_LOAD_A
220
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">TMC26XStepper.cpp</a>
221
+</li>
222
+<li>STATUS_OPEN_LOAD_B
223
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">TMC26XStepper.cpp</a>
224
+</li>
225
+<li>STATUS_OVER_TEMPERATURE_SHUTDOWN
226
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">TMC26XStepper.cpp</a>
227
+</li>
228
+<li>STATUS_OVER_TEMPERATURE_WARNING
229
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">TMC26XStepper.cpp</a>
230
+</li>
231
+<li>STATUS_SHORT_TO_GROUND_A
232
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">TMC26XStepper.cpp</a>
233
+</li>
234
+<li>STATUS_SHORT_TO_GROUND_B
235
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">TMC26XStepper.cpp</a>
236
+</li>
237
+<li>STATUS_STALL_GUARD_STATUS
238
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">TMC26XStepper.cpp</a>
239
+</li>
240
+<li>STATUS_STAND_STILL
241
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">TMC26XStepper.cpp</a>
242
+</li>
243
+<li>STEP_INTERPOLATION
244
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">TMC26XStepper.cpp</a>
245
+</li>
246
+</ul>
247
+
248
+
249
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
250
+<li>T_OFF_PATTERN
251
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">TMC26XStepper.cpp</a>
252
+</li>
253
+<li>T_OFF_TIMING_PATERN
254
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">TMC26XStepper.cpp</a>
255
+</li>
256
+<li>TMC26X_OVERTEMPERATURE_PREWARING
257
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26XStepper.h</a>
258
+</li>
259
+<li>TMC26X_OVERTEMPERATURE_SHUTDOWN
260
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26XStepper.h</a>
261
+</li>
262
+<li>TMC26X_READOUT_CURRENT
263
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26XStepper.h</a>
264
+</li>
265
+<li>TMC26X_READOUT_POSITION
266
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26XStepper.h</a>
267
+</li>
268
+<li>TMC26X_READOUT_STALLGUARD
269
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26XStepper.h</a>
270
+</li>
271
+</ul>
272
+
273
+
274
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
275
+<li>VSENSE
276
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">TMC26XStepper.cpp</a>
277
+</li>
278
+</ul>
279
+</div><!-- contents -->
280
+
281
+
282
+<hr class="footer"/><address class="footer"><small>
283
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
284
+<img class="footer" src="doxygen.png" alt="doxygen"/>
285
+</a> 1.7.6.1
286
+</small></address>
287
+
288
+</body>
289
+</html>

+ 72
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/index.html View File

@@ -0,0 +1,72 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC 260, 261, 262 Stepper Driver for Arduino</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+</div>
47
+<div class="header">
48
+  <div class="headertitle">
49
+<div class="title">TMC 260, 261, 262 Stepper Driver for Arduino </div>  </div>
50
+</div><!--header-->
51
+<div class="contents">
52
+<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Interactive MAtter, MArcus Nowotny, <a href="mailto:marcus@interactive-matter.eu">marcus@interactive-matter.eu</a> </dd></dl>
53
+<h2><a class="anchor" id="HOWTO"></a>
54
+How to use the driver</h2>
55
+<p>Here we go with aminial how to description</p>
56
+<h2><a class="anchor" id="COPYRIGHT_NOTIFICATION"></a>
57
+COPYRIGHT NOTIFICATION</h2>
58
+<dl class="user"><dt><b>(c) 2011 Interactive MAtter, Marcus Nowotny </b></dt><dd></dd></dl>
59
+<dl class="user"><dt><b></b></dt><dd>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</dd></dl>
60
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
61
+<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
62
+</div></div><!-- contents -->
63
+
64
+
65
+<hr class="footer"/><address class="footer"><small>
66
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
67
+<img class="footer" src="doxygen.png" alt="doxygen"/>
68
+</a> 1.7.6.1
69
+</small></address>
70
+
71
+</body>
72
+</html>

+ 64
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/jquery.js
File diff suppressed because it is too large
View File


+ 68
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/mainpage_8dox.html View File

@@ -0,0 +1,68 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: mainpage.dox File Reference</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="headertitle">
55
+<div class="title">mainpage.dox File Reference</div>  </div>
56
+</div><!--header-->
57
+<div class="contents">
58
+</div><!-- contents -->
59
+
60
+
61
+<hr class="footer"/><address class="footer"><small>
62
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
63
+<img class="footer" src="doxygen.png" alt="doxygen"/>
64
+</a> 1.7.6.1
65
+</small></address>
66
+
67
+</body>
68
+</html>

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_f.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_h.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/open.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_a.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_b.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_h.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_s.png View File


+ 59
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tabs.css View File

@@ -0,0 +1,59 @@
1
+.tabs, .tabs2, .tabs3 {
2
+    background-image: url('tab_b.png');
3
+    width: 100%;
4
+    z-index: 101;
5
+    font-size: 13px;
6
+}
7
+
8
+.tabs2 {
9
+    font-size: 10px;
10
+}
11
+.tabs3 {
12
+    font-size: 9px;
13
+}
14
+
15
+.tablist {
16
+    margin: 0;
17
+    padding: 0;
18
+    display: table;
19
+}
20
+
21
+.tablist li {
22
+    float: left;
23
+    display: table-cell;
24
+    background-image: url('tab_b.png');
25
+    line-height: 36px;
26
+    list-style: none;
27
+}
28
+
29
+.tablist a {
30
+    display: block;
31
+    padding: 0 20px;
32
+    font-weight: bold;
33
+    background-image:url('tab_s.png');
34
+    background-repeat:no-repeat;
35
+    background-position:right;
36
+    color: #283A5D;
37
+    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
38
+    text-decoration: none;
39
+    outline: none;
40
+}
41
+
42
+.tabs3 .tablist a {
43
+    padding: 0 10px;
44
+}
45
+
46
+.tablist a:hover {
47
+    background-image: url('tab_h.png');
48
+    background-repeat:repeat-x;
49
+    color: #fff;
50
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
51
+    text-decoration: none;
52
+}
53
+
54
+.tablist li.current a {
55
+    background-image: url('tab_a.png');
56
+    background-repeat:repeat-x;
57
+    color: #fff;
58
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
59
+}

+ 82
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XExample/TMC26XExample.ino View File

@@ -0,0 +1,82 @@
1
+/*
2
+ TMC26XExample.ino - - TMC26X Stepper library Example for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+#include <SPI.h>
26
+#include <TMC26XStepper.h>
27
+
28
+//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 6, step pin 7 and a current of 300mA
29
+TMC26XStepper tmc26XStepper = TMC26XStepper(200,2,6,7,700);
30
+int curr_step;
31
+int speed =  0;
32
+int speedDirection = 100;
33
+int maxSpeed = 1000;
34
+
35
+void setup() {
36
+  Serial.begin(9600);
37
+  Serial.println("==============================");
38
+  Serial.println("TMC26X Stepper Driver Demo App");
39
+  Serial.println("==============================");
40
+  //set this according to you stepper
41
+  Serial.println("Configuring stepper driver");
42
+  //char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement
43
+  tmc26XStepper.setSpreadCycleChopper(2,24,8,6,0);
44
+  tmc26XStepper.setRandomOffTime(0);
45
+  
46
+  tmc26XStepper.setMicrosteps(32);
47
+  tmc26XStepper.setStallGuardThreshold(4,0);
48
+  Serial.println("config finished, starting");
49
+  tmc26XStepper.start();
50
+  Serial.println("started");
51
+}
52
+
53
+void loop() {
54
+  if (!tmc26XStepper.isMoving()) {
55
+    speed+=speedDirection;
56
+    if (speed>maxSpeed) {
57
+      speed = maxSpeed;
58
+      speedDirection = -speedDirection;
59
+    } else if (speed<0) {
60
+      speedDirection = -speedDirection;
61
+      speed=speedDirection;
62
+    }
63
+    //setting the speed
64
+    Serial.print("setting speed to ");
65
+    Serial.println(speed);
66
+    tmc26XStepper.setSpeed(speed);
67
+    //we want some kind of constant running time - so the length is just a product of speed
68
+    Serial.print("Going ");
69
+    Serial.print(10*speed);
70
+    Serial.println(" steps");
71
+    tmc26XStepper.step(10*speed);
72
+  } else {
73
+    //we put out the status every 100 steps
74
+    if (tmc26XStepper.getStepsLeft()%100==0) {
75
+      Serial.print("Stall Guard: ");
76
+      Serial.println(tmc26XStepper.getCurrentStallGuardReading());
77
+    }    
78
+  }  
79
+  tmc26XStepper.move();
80
+}
81
+
82
+

+ 176
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Motor.ino View File

@@ -0,0 +1,176 @@
1
+/*
2
+ TMC26XMotorTest.ino - - TMC26X Stepper library tester for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+ unsigned int motor_counter = 0;
26
+unsigned char motor_moved = 0;
27
+int sgThreshold = 4;
28
+int sgFilter = 0;
29
+int direction = 1;
30
+
31
+unsigned int lower_SG_threshold = 0;
32
+unsigned int upper_SG_threshold = 0;
33
+unsigned char number_of_SG_readings=0;
34
+unsigned char current_increment_step_size=0;
35
+unsigned char lower_current_limit=0;
36
+
37
+
38
+char chopperMode = 0; //0 for spread, 1 for constant off
39
+char t_off = 2;
40
+char t_blank = 24;
41
+char h_start = 8;
42
+char h_end = 6;
43
+char h_decrement = 0;
44
+
45
+
46
+void startMotor() {
47
+  Serial.println(F("Configuring stepper driver"));
48
+  //char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement
49
+  tmc26XStepper.setSpreadCycleChopper(t_off,t_blank,h_start,h_end,h_decrement);
50
+  tmc26XStepper.setRandomOffTime(0);
51
+
52
+  tmc26XStepper.setMicrosteps(32);
53
+  tmc26XStepper.setStallGuardThreshold(sgThreshold,sgFilter);
54
+  //  Serial.println("config finished, starting");
55
+  digitalWrite(ENABLE_PIN,LOW);
56
+  tmc26XStepper.start();
57
+  tmc26XStepper.setSpeed(10);
58
+  TCNT2=setupTimer2(10000);
59
+  sei();
60
+}
61
+
62
+void runMotor() {
63
+  if (running && !tmc26XStepper.isMoving()) {
64
+    tmc26XStepper.step(direction*10000);
65
+    Serial.println("run");
66
+  }
67
+  if (!running & tmc26XStepper.isMoving()) {
68
+    tmc26XStepper.stop();
69
+    Serial.println("stop");
70
+  }
71
+}
72
+
73
+void setSpeed(unsigned int targetSpeed) {
74
+  if (targetSpeed>0 && targetSpeed<MAX_SPEED) {
75
+    Serial.print(F("Setting speed: ")); 
76
+    Serial.println(targetSpeed);
77
+    tmc26XStepper.setSpeed(targetSpeed);
78
+  } 
79
+  else {
80
+    Serial.print(F("improper speed "));
81
+    Serial.println(targetSpeed);
82
+  }
83
+}
84
+
85
+void setMicrostepping(int microstepping) {
86
+  if (microstepping<1 || microstepping>256) {
87
+    Serial.print(F("Improperd microstepping setting [1...256]: "));
88
+    Serial.print(microstepping);
89
+  } 
90
+  else {
91
+    tmc26XStepper.setMicrosteps(microstepping);
92
+  }
93
+}
94
+
95
+void setStallGuardThreshold(int threshold) {
96
+  if (threshold<-64 || threshold > 63) {
97
+    Serial.print(F("Improper Stall Guard Threshold [-64...63]: "));
98
+    Serial.println(threshold);
99
+  } 
100
+  else {
101
+    sgThreshold = threshold;
102
+    tmc26XStepper.setStallGuardThreshold(threshold,sgFilter);
103
+  }
104
+}
105
+
106
+void setStallGuardFilter(int filter) {
107
+  if (filter) {
108
+    sgFilter=1;
109
+  } 
110
+  else {
111
+    sgFilter=0;
112
+  }
113
+  tmc26XStepper.setStallGuardThreshold(sgThreshold,sgFilter);
114
+}
115
+
116
+void setCurrent(int current) {
117
+  if (current>0 && current <1700) {
118
+    tmc26XStepper.setCurrent(current);
119
+  } 
120
+  else {
121
+    Serial.print(F("Improper current {0 ... 1200}: "));
122
+    Serial.print(current);
123
+  }
124
+}
125
+
126
+void updateChopper() {
127
+  //we can do only spread now
128
+  if (chopperMode==0) {
129
+    tmc26XStepper.setSpreadCycleChopper(t_off,t_blank,h_start,h_end,h_decrement);
130
+  }    
131
+}
132
+
133
+void updateCoolStep() {
134
+  tmc26XStepper.setCoolStepConfiguration(
135
+    lower_SG_threshold, upper_SG_threshold, number_of_SG_readings,
136
+    current_increment_step_size, lower_current_limit);
137
+}
138
+
139
+//from http://www.uchobby.com/index.php/2007/11/24/arduino-interrupts/
140
+//Setup Timer2.s
141
+//Configures the ATMega168 8-Bit Timer2 to generate an interrupt
142
+//at the specified frequency.
143
+//Returns the timer load value which must be loaded into TCNT2
144
+//inside your ISR routine.
145
+//See the example usage below.
146
+unsigned char setupTimer2(float timeoutFrequency){
147
+  unsigned char result; //The timer load value.
148
+
149
+  //Calculate the timer load value
150
+  result=(int)((257.0-(TIMER_CLOCK_FREQ/timeoutFrequency))+0.5);
151
+  //The 257 really should be 256 but I get better results with 257.
152
+
153
+  //Timer2 Settings: Timer Prescaler /8, mode 0
154
+  //Timer clock = 16MHz/8 = 2Mhz or 0.5us
155
+  //The /8 prescale gives us a good range to work with
156
+  //so we just hard code this for now.
157
+  TCCR2A = 0;
158
+  TCCR2B = 0<<CS22 | 1<<CS21 | 0<<CS20;
159
+
160
+  //Timer2 Overflow Interrupt Enable
161
+  TIMSK2 = 1<<TOIE2;
162
+
163
+  //load the timer for its first cycle
164
+  TCNT2=result;
165
+
166
+  return(result);
167
+}
168
+
169
+ISR(TIMER2_OVF_vect) {
170
+  motor_moved = tmc26XStepper.move();
171
+  motor_counter++;
172
+}
173
+
174
+
175
+
176
+

+ 369
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Serial.ino View File

@@ -0,0 +1,369 @@
1
+/*
2
+ TMC26XMotorTest.ino - - TMC26X Stepper library tester for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+ #define INPUT_BUFFER_LENGTH 32
26
+
27
+#define SERIAL_SPEED 115200
28
+#define STATUS_COUNTER 100
29
+
30
+char inputBuffer[INPUT_BUFFER_LENGTH+1]; //ad on character to keep the trainling 0
31
+unsigned char inputBufferPosition;
32
+
33
+void startSerial() {
34
+  Serial.begin(SERIAL_SPEED);
35
+  Serial.println(F("================================="));
36
+  Serial.println(F("TMC26X Stepper Driver Motor Tester"));
37
+  Serial.println(F("================================="));
38
+  //empty the input buffer
39
+  for (unsigned char i=0; i< INPUT_BUFFER_LENGTH+1; i++) {
40
+    inputBuffer[i]=0;
41
+  }
42
+  inputBufferPosition=0;
43
+}
44
+
45
+void loopSerial() {
46
+  if (Serial.available()>0 && inputBufferPosition<INPUT_BUFFER_LENGTH) {
47
+    char c = Serial.read();
48
+    //Read the char
49
+    inputBuffer[inputBufferPosition]=c;
50
+    inputBufferPosition++;
51
+    //always terminate the string
52
+    inputBuffer[inputBufferPosition]=0;
53
+    //and if the line ended we execute the command
54
+    if (c=='\n') {
55
+      executeSerialCommand();   
56
+    }
57
+  }
58
+  if (motor_moved) {
59
+    Serial.print("#sg");
60
+    Serial.print(tmc26XStepper.getCurrentStallGuardReading(),DEC);
61
+    Serial.print(",p");
62
+    Serial.print(tmc26XStepper.getMotorPosition(),DEC);
63
+    Serial.print(",k");
64
+    Serial.print(tmc26XStepper.getCurrentCurrent(),DEC);
65
+    Serial.println(',');
66
+    motor_moved=0;
67
+  }
68
+  if (motor_counter>STATUS_COUNTER) {
69
+    motor_counter=0;
70
+    char moving = tmc26XStepper.isMoving();
71
+    Serial.print('#');
72
+    if (moving) {
73
+      Serial.print('r');
74
+    } 
75
+    else {
76
+      Serial.print('s');
77
+    }
78
+    Serial.print(',');
79
+    Serial.print('d');
80
+    Serial.print(direction);
81
+    Serial.print(',');
82
+    Serial.print("c");
83
+    Serial.print(tmc26XStepper.getCurrent(),DEC);
84
+    Serial.print(',');
85
+    Serial.print('S');
86
+    Serial.print(tmc26XStepper.getSpeed(),DEC);
87
+    Serial.print(',');
88
+    Serial.print('m');
89
+    Serial.print(tmc26XStepper.getMicrosteps(),DEC);
90
+    Serial.print(',');
91
+    Serial.print("t");
92
+    Serial.print(tmc26XStepper.getStallGuardThreshold(),DEC);
93
+    Serial.print(',');
94
+    Serial.print('f');
95
+    Serial.print(tmc26XStepper.getStallGuardFilter(),DEC);
96
+    Serial.print(',');
97
+    //print out the general cool step config
98
+    if (tmc26XStepper.isCoolStepEnabled()) {
99
+      Serial.print("Ke+,");
100
+    } 
101
+    else {
102
+      Serial.print("Ke-,");
103
+    }
104
+    Serial.print("Kl");
105
+    Serial.print(tmc26XStepper.getCoolStepLowerSgThreshold(),DEC);
106
+    Serial.print(",Ku");
107
+    Serial.print(tmc26XStepper.getCoolStepUpperSgThreshold(),DEC);
108
+    Serial.print(",Kn");
109
+    Serial.print(tmc26XStepper.getCoolStepNumberOfSGReadings(),DEC);
110
+    Serial.print(",Ki");
111
+    Serial.print(tmc26XStepper.getCoolStepCurrentIncrementSize(),DEC);
112
+    Serial.print(",Km");
113
+    Serial.print(tmc26XStepper.getCoolStepLowerCurrentLimit(),DEC);
114
+    Serial.print(',');
115
+    //detect the winding status
116
+    if (tmc26XStepper.isOpenLoadA()) {
117
+      Serial.print("ao,");
118
+    } 
119
+    else if(tmc26XStepper.isShortToGroundA()) {
120
+      Serial.print("ag,");
121
+    } 
122
+    else {
123
+      Serial.print("a-,");
124
+    }
125
+    //detect the winding status
126
+    if (tmc26XStepper.isOpenLoadB()) {
127
+      Serial.print("bo,");
128
+    } 
129
+    else if(tmc26XStepper.isShortToGroundB()) {
130
+      Serial.print("bg,");
131
+    } 
132
+    else {
133
+      Serial.print("b-,");
134
+    }
135
+    char temperature = tmc26XStepper.getOverTemperature();
136
+    if (temperature==0) {
137
+      Serial.print("x-,");
138
+    } 
139
+    else if (temperature==TMC26X_OVERTEMPERATURE_PREWARING) {
140
+      Serial.print("xw,");
141
+    } 
142
+    else {
143
+      Serial.print("xe,");
144
+    }
145
+    if (tmc26XStepper.isEnabled()) {
146
+      Serial.print("e1,");
147
+    } 
148
+    else {
149
+      Serial.print("e0,");
150
+    }
151
+    //write out the current chopper config
152
+    Serial.print("Cm");
153
+    Serial.print(chopperMode,DEC);
154
+    Serial.print(",Co");
155
+    Serial.print(t_off,DEC);
156
+    Serial.print(",Cb");
157
+    Serial.print(t_blank,DEC);
158
+    if (chopperMode==0) {
159
+      Serial.print(",Cs");
160
+      Serial.print(h_start,DEC);
161
+      Serial.print(",Ce");
162
+      Serial.print(h_end,DEC);
163
+      Serial.print(",Cd");
164
+      Serial.print(h_decrement,DEC);
165
+    }
166
+    Serial.print(',');
167
+    Serial.println();
168
+  }
169
+}
170
+
171
+void executeSerialCommand() {
172
+  Serial.print("Executing ");
173
+  Serial.println(inputBuffer);
174
+  //stimple runn & stop commands
175
+  switch(inputBuffer[0]) {
176
+  case 's':
177
+    running = 0;
178
+    break;
179
+  case 'r':
180
+    running = -1;
181
+    break;
182
+  case 'S':
183
+    {
184
+      int targetSpeed = decode(1);
185
+      setSpeed(targetSpeed);
186
+    }
187
+    break;
188
+  case 'm':
189
+    {
190
+      int microstepping = decode(1);
191
+      setMicrostepping(microstepping);
192
+    }
193
+    break;
194
+  case 't':
195
+    {
196
+      int threshold = decode(1);
197
+      setStallGuardThreshold(threshold);
198
+    }
199
+    break;
200
+  case 'f':
201
+    {
202
+      int filter = decode(1);
203
+      setStallGuardFilter(filter);
204
+    }
205
+    break;
206
+  case 'd':
207
+    {
208
+      int value = decode(1);
209
+      tmc26XStepper.stop();
210
+      if (value<0) {
211
+        direction=-1;
212
+      } 
213
+      else {
214
+        direction=1;
215
+      }
216
+    }
217
+    break;
218
+  case 'c':
219
+    {
220
+      int current = decode(1);
221
+      setCurrent(current);
222
+    }
223
+    break;
224
+  case 'e':
225
+    {
226
+      int enabled = decode(1);
227
+      if (enabled) {
228
+        tmc26XStepper.setEnabled(true);
229
+      } 
230
+      else {
231
+        tmc26XStepper.setEnabled(false);
232
+      }
233
+    }
234
+    break;
235
+  case 'C':
236
+    switch(inputBuffer[1]) {
237
+    case 'o':
238
+      {
239
+        int value = decode(2);
240
+        if (value>0 && value<16) {
241
+          t_off=value;
242
+          updateChopper();
243
+        }
244
+      }
245
+      break;
246
+    case 'b':
247
+      {
248
+        int value = decode(2);
249
+        if (value>=0 && value<=3) {
250
+          t_blank=value;
251
+          updateChopper();
252
+        }
253
+      }
254
+      break;
255
+    case 's':
256
+      {
257
+        int value = decode(2);
258
+        if (value>=0 && value<=8) {
259
+          h_start=value;
260
+          updateChopper();
261
+        }
262
+      }
263
+      break;
264
+    case 'e':
265
+      {
266
+        int value = decode(2);
267
+        if (value>=-3 && value<=12) {
268
+          h_end=value;
269
+          updateChopper();
270
+        }
271
+      }
272
+      break;
273
+    case 'd':
274
+      {
275
+        int value = decode(2);
276
+        if (value>=0 && value<=3) {
277
+          h_decrement=value;
278
+          updateChopper();
279
+        }
280
+      }
281
+      break;
282
+    }
283
+    break;
284
+  case 'K':
285
+    switch(inputBuffer[1]) {
286
+    case '+':
287
+      tmc26XStepper.setCoolStepEnabled(true);
288
+      break;
289
+    case '-':
290
+      tmc26XStepper.setCoolStepEnabled(false);
291
+      break;
292
+    case 'l':
293
+      {
294
+        int value = decode(2);
295
+        if (value>=0 && value<480) {
296
+          lower_SG_threshold=value;
297
+          updateCoolStep();
298
+        }
299
+      }
300
+      break;
301
+    case 'u':
302
+      {
303
+        int value = decode(2);
304
+        if (value>=0 && value<480) {
305
+          upper_SG_threshold=value;
306
+          updateCoolStep();
307
+        }
308
+      }
309
+      break;
310
+    case 'n':
311
+      {
312
+        int value = decode(2);
313
+        if (value>=0 && value<4) {
314
+          number_of_SG_readings=value;
315
+          updateCoolStep();
316
+        }
317
+      }
318
+      break;
319
+    case 'i':
320
+      {
321
+        int value = decode(2);
322
+        if (value>=0 && value<4) {
323
+          current_increment_step_size=value;
324
+          updateCoolStep();
325
+        }
326
+      }
327
+      break;
328
+    case 'm':
329
+      {
330
+        int value = decode(2);
331
+        if (value>=0 && value<2) {
332
+          lower_current_limit=value;
333
+          updateCoolStep();
334
+        }
335
+      }
336
+      break;
337
+    }
338
+    break;
339
+  }
340
+  //at the end delete buffer
341
+  inputBufferPosition=0;
342
+  inputBuffer[0]=0;
343
+}
344
+
345
+int decode(unsigned char startPosition) {
346
+  int result=0;
347
+  boolean negative = false;
348
+  if (inputBuffer[startPosition]=='-') {
349
+    negative=true;
350
+    startPosition++;
351
+  }
352
+  for (unsigned char i=startPosition; i< (INPUT_BUFFER_LENGTH+1) && inputBuffer[i]!=0; i++) {
353
+    char number = inputBuffer[i];
354
+    //this very dumb approac can lead to errors, but we expect only numbers after the command anyway
355
+    if (number <= '9' && number >='0') {
356
+      result *= 10;
357
+      result += number - '0';
358
+    } 
359
+  }
360
+  if (negative) {
361
+    return -result;
362
+  } 
363
+  else {
364
+    return result;
365
+  }
366
+}
367
+
368
+
369
+

+ 61
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/TMC26XMotorTester.ino View File

@@ -0,0 +1,61 @@
1
+/*
2
+ TMC26XMotorTest.ino - - TMC26X Stepper library Example for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+#include <SPI.h>
26
+#include <TMC26XStepper.h>
27
+
28
+//you may adapt this to your shield or breakout board connection
29
+#define CS_PIN 2
30
+#define DIR_PIN 6
31
+#define STEP_PIN 7
32
+#define ENABLE_PIN 8 //if it is not connected it won't be a problem
33
+
34
+
35
+#define TIMER_CLOCK_FREQ 2000000.0 //2MHz for /8 prescale from 16MHz
36
+#define INITIAL_CURRENT 500 //in mA
37
+#define MAX_SPEED 1000
38
+
39
+
40
+//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 3, step pin 4 and a current of 300mA
41
+TMC26XStepper tmc26XStepper = TMC26XStepper(200,CS_PIN,DIR_PIN,STEP_PIN,INITIAL_CURRENT);
42
+char running;
43
+
44
+void setup() {
45
+  //configure the enable pin
46
+  pinMode(ENABLE_PIN, OUTPUT);
47
+  digitalWrite(ENABLE_PIN,HIGH);
48
+
49
+  startSerial();
50
+  startMotor();
51
+  //set this according to you stepper
52
+  Serial.println(F("started"));
53
+}
54
+
55
+void loop() {
56
+  loopSerial();
57
+  runMotor();
58
+}
59
+
60
+
61
+

+ 306
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/Arduino.pde View File

@@ -0,0 +1,306 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+String channelAStatus=null;
27
+String channelBStatus=null;
28
+String temperatureStatus=null;
29
+boolean motor_connected = false;
30
+
31
+RadioButton serialButtons;
32
+Button serialOkButton;
33
+Button helpButton;
34
+Textarea statusArea;
35
+String[] ports;
36
+int activePortIndex = -1;
37
+
38
+String identString="TMC26X Stepper Driver Motor Tester";
39
+int connectTimeout=10*1000; //how long do we wait until the Arduino is connected
40
+
41
+StringBuilder serialStringBuilder = new StringBuilder();
42
+
43
+void setupSerialConfig() {
44
+  Tab defaultTab = controlP5.getTab("default");
45
+  //add the list of serial interfaces - it get's populated later
46
+  serialButtons = controlP5.addRadioButton("serialport", 200, 100+TMCLogo.height*2+50);
47
+  serialConfigElements.add(serialButtons);
48
+  serialButtons.captionLabel().set("Select Serial Port");
49
+  serialButtons.showBar();
50
+  serialButtons.moveTo(defaultTab);
51
+  //ad the ok button
52
+  serialOkButton = controlP5.addButton("serialOk", 1, 200, height-300, 30, 30);
53
+  serialConfigElements.add(serialOkButton);
54
+  serialOkButton.setCaptionLabel("OK");
55
+  runToggle.moveTo(defaultTab);
56
+  //add the status area
57
+  statusArea = controlP5.addTextarea("statusArea","",200,height-250,300,50);
58
+  serialConfigElements.add(statusArea);
59
+  statusArea.moveTo(defaultTab);
60
+  
61
+  helpButton =  controlP5.addButton("help", 1, 200, height-250, 80, 30);
62
+  serialConfigElements.add(helpButton);
63
+  helpButton.moveTo(defaultTab);
64
+  
65
+
66
+  //finally update the list of serial ports
67
+  updateSerialPortList();
68
+}
69
+
70
+void updateSerialPortList() {
71
+  //first remove all present serial ports
72
+  List items = serialButtons.getItems();
73
+  for (Object i:items) {
74
+    Toggle item = (Toggle) i;
75
+    serialButtons.removeItem(item.getName());
76
+  }
77
+  //add the serial ports
78
+  ports = Serial.list();
79
+  for (int i=0; i< ports.length; i++) {
80
+    serialButtons.addItem(ports[i],i);
81
+  }
82
+  serialButtons.setValue(-1);
83
+  serialOkButton.setVisible(false);
84
+}
85
+
86
+void serialport(int value) {
87
+  //ok button is only active if a serial port is selected
88
+  serialOkButton.setVisible(value>-1);
89
+  if (value>-1) {
90
+    statusArea.setText("");
91
+  }
92
+  activePortIndex = value;
93
+}
94
+
95
+void serialOk(int value) {
96
+  String error = null;
97
+  if (value!=0 && activePortIndex>-1) {
98
+    try {
99
+      arduinoPort = new Serial(this, ports[activePortIndex], 115200);
100
+      int timeStarted = millis();
101
+      StringBuilder identBuffer = new StringBuilder();
102
+      while (!motor_connected && (millis()-timeStarted)<connectTimeout) {
103
+        if (arduinoPort.available ()>0) {
104
+          char c = arduinoPort.readChar();
105
+          identBuffer.append(c);
106
+          if (c=='\n') {
107
+            if (identString.contains(identString)) {
108
+              motor_connected = true;
109
+              toggleUi(true);
110
+              return;
111
+            }
112
+            identBuffer = new StringBuilder();
113
+          }
114
+        } 
115
+      }
116
+    } catch (RuntimeException e) {
117
+      //we simply do nothing
118
+      //TODO set status label
119
+      error = "There was a problem with serial port "+ports[activePortIndex]+": "+e.getMessage();
120
+    }
121
+    //ok appearantly we did not find an motor tester - so lets deselect that port
122
+    if (error == null) {
123
+      error = "Could not find TMC26XMotorTester on serial port "+ports[activePortIndex];
124
+    }
125
+    statusArea.setText(error);
126
+    Toggle selected = serialButtons.getItem(activePortIndex);
127
+    selected.setState(false);
128
+    serialOkButton.setVisible(false);
129
+  }
130
+}
131
+
132
+
133
+void decodeSerial() {
134
+  if (motor_connected) {
135
+    while (arduinoPort.available ()>0) {
136
+      char c = arduinoPort.readChar();
137
+      serialStringBuilder.append(c);
138
+      if (c=='\n') {
139
+        decodeSerial(serialStringBuilder.toString());
140
+        serialStringBuilder = new StringBuilder();
141
+      }
142
+    }
143
+  }
144
+}
145
+
146
+void sendCommand(String command) {
147
+  if (motor_connected) {
148
+    arduinoPort.write(command+"\n");
149
+  }
150
+}
151
+
152
+void decodeSerial(String line) {
153
+  settingStatus=true;
154
+  if (line.startsWith("#")) {
155
+    String status = line.substring(1);
156
+    StringTokenizer statusTokenizer = new StringTokenizer(status, ",");
157
+    while (statusTokenizer.hasMoreTokens ()) {
158
+      String statusToken = statusTokenizer.nextToken();
159
+      if ("s".equals(statusToken)) {
160
+        runToggle.setValue(0);
161
+      } 
162
+      else if ("r".equals(statusToken)) {
163
+        runToggle.setValue(1);
164
+      } 
165
+      else if (statusToken.startsWith("e")) {
166
+        int enabled = getValueOfToken(statusToken, 1);
167
+        if (enabled!=0) {
168
+          enabledToggle.setValue(1);
169
+        } 
170
+        else {
171
+          enabledToggle.setValue(0);
172
+        }
173
+      }
174
+      else if (statusToken.startsWith("S")) {
175
+        speedSlider.setValue(getValueOfToken(statusToken, 1));
176
+      } 
177
+      else if (statusToken.startsWith("m")) {
178
+        microsteppingButtons.activate("m_1/"+String.valueOf(getValueOfToken(statusToken, 1)));
179
+      } 
180
+      else if (statusToken.startsWith("sg")) {
181
+        addStallGuardReading(getValueOfToken(statusToken, 2));
182
+      } 
183
+      else if (statusToken.startsWith("p")) {
184
+        addPositionReading(getValueOfToken(statusToken, 1));
185
+      } 
186
+      else if (statusToken.startsWith("k")) {
187
+        addCurrentReading(getValueOfToken(statusToken, 1));
188
+      } 
189
+      else if (statusToken.startsWith("t")) {
190
+        sgtSlider.setValue(getValueOfToken(statusToken, 1));
191
+      } 
192
+      else if (statusToken.startsWith("f")) {
193
+        sgFilterToggle.setValue(getValueOfToken(statusToken, 1));
194
+      } 
195
+      else if (statusToken.startsWith("d")) {
196
+        setDirection(getValueOfToken(statusToken, 1));
197
+      }
198
+      else if (statusToken.startsWith("c")) {
199
+        setCurrent(getValueOfToken(statusToken, 1));
200
+      } 
201
+      else if (statusToken.startsWith("a")) {
202
+        if (statusToken.charAt(1)=='o') {
203
+          channelAStatus="Open Load";
204
+        } 
205
+        else if (statusToken.charAt(1)=='g') {
206
+          channelAStatus="Short to Ground!";
207
+        } 
208
+        else {
209
+          channelAStatus=null;
210
+        }
211
+      } 
212
+      else if (statusToken.startsWith("b")) {
213
+        if (statusToken.charAt(1)=='o') {
214
+          channelBStatus="Open Load";
215
+        } 
216
+        else if (statusToken.charAt(1)=='g') {
217
+          channelBStatus="Short to Ground!";
218
+        } 
219
+        else {
220
+          channelBStatus=null;
221
+        }
222
+      } 
223
+      else if (statusToken.startsWith("x")) {
224
+        if (statusToken.charAt(1)=='w') {
225
+          temperatureStatus="Prewarning!";
226
+        } 
227
+        else if (statusToken.charAt(1)=='e') {
228
+          temperatureStatus="Error";
229
+        } 
230
+        else {
231
+          temperatureStatus=null;
232
+        }
233
+      }
234
+      else if (statusToken.startsWith("Cm")) {
235
+        //chopper mode is currently ignored
236
+      } 
237
+      else if (statusToken.startsWith("Co")) {
238
+        constantOffSlider.setValue(getValueOfToken(statusToken, 2));
239
+      }  
240
+      else if (statusToken.startsWith("Cb")) {
241
+        blankTimeSlider.setValue(getValueOfToken(statusToken, 2));
242
+      } 
243
+      else if (statusToken.startsWith("Cs")) {
244
+        hysteresisStartSlider.setValue(getValueOfToken(statusToken, 2));
245
+      } 
246
+      else if (statusToken.startsWith("Ce")) {
247
+        hysteresisEndSlider.setValue(getValueOfToken(statusToken, 2));
248
+      } 
249
+      else if (statusToken.startsWith("Cd")) {
250
+        setHystDecrement(getValueOfToken(statusToken, 2));
251
+      } 
252
+      else if ("Ke+".equals(statusToken)) {
253
+        coolStepActiveToggle.setValue(1);
254
+      } 
255
+      else if ("Ke-".equals(statusToken)) {
256
+        coolStepActiveToggle.setValue(0);
257
+      } 
258
+      else if (statusToken.startsWith("Kl")) {
259
+        coolStepMinSlider.setValue(getValueOfToken(statusToken, 2));
260
+      } 
261
+      else if (statusToken.startsWith("Ku")) {
262
+        coolStepMaxSlider.setValue(getValueOfToken(statusToken, 2));
263
+      }
264
+      else if (statusToken.startsWith("Kn")) {
265
+        coolStepDecrementButtons.activate(getValueOfToken(statusToken, 2));
266
+      } 
267
+      else if (statusToken.startsWith("Ki")) {
268
+        coolStepIncrementButtons.activate(getValueOfToken(statusToken, 2));
269
+      }
270
+      else if (statusToken.startsWith("Km")) {
271
+        coolStepMinButtons.activate(getValueOfToken(statusToken, 2));
272
+      }
273
+    }
274
+  }
275
+  else {
276
+    println(line);
277
+  }
278
+  settingStatus=false;
279
+}
280
+
281
+int getValueOfToken(String token, int position) {
282
+  String value = token.substring(position);
283
+  try {
284
+    return Integer.valueOf(value);
285
+  } 
286
+  catch (NumberFormatException e) {
287
+    println("Unable to decode '"+value+"'of '"+token+"' !");
288
+    return 0;
289
+  }
290
+}
291
+
292
+void drawSerial() {
293
+  //draw the logo and some epxlaining text while setting up the serial port
294
+  if (!motor_connected) {
295
+    image(TMCLogo,200, 100);
296
+    fill(uiTextColor);
297
+    text("Select the serial port where your Arduino is connected\nIf in doubt check it in the Arduino IDE.\nThe Motor Tester will automatically verify if it can find an Motor tester ath the port.",200,100+TMCLogo.height+50);
298
+  }
299
+}
300
+
301
+void help(float value) {
302
+  if (value!=0) {
303
+    link(helpUrl);
304
+  }
305
+}
306
+

+ 175
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/ChopperConfiguration.pde View File

@@ -0,0 +1,175 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+Slider constantOffSlider;
27
+Slider blankTimeSlider;
28
+Toggle randomOffTimeToggle;
29
+RadioButton ChopperModeButtons;
30
+//for constant off time chopeer
31
+Slider fastDecaySlider;
32
+Slider sineWaveOffsetSlider;
33
+Toggle currentComparatorToggle;
34
+//for spread chopper
35
+Slider hysteresisStartSlider;
36
+Slider hysteresisEndSlider;
37
+Numberbox motorVoltageBox;
38
+Numberbox motorCurrentBox;
39
+Numberbox motorResistanceBox;
40
+Numberbox motorInductanceBox;
41
+
42
+RadioButton hysteresisDecrementButtons;
43
+
44
+PImage spreadChopperImage;
45
+
46
+void setupChooperConfig() {
47
+  //add input fields for the various motor parameters
48
+  motorVoltageBox = controlP5.addNumberbox("motorvoltage",12.0,20,40,100,20);
49
+  motorVoltageBox.setCaptionLabel("Motor Voltage (V)");
50
+  motorVoltageBox.setMultiplier(0.025);
51
+  motorVoltageBox.setMin(0);
52
+  motorVoltageBox.setMax(40.0);
53
+  motorVoltageBox.moveTo(configureTab);
54
+  
55
+  motorCurrentBox = controlP5.addNumberbox("motorcurrent",0.5,140,40,100,20);
56
+  motorCurrentBox.setCaptionLabel("Motor Current (A)");
57
+  motorCurrentBox.setMultiplier(0.025);
58
+  motorCurrentBox.setMin(0.46);
59
+  motorCurrentBox.setMax(1.7);
60
+  motorCurrentBox.moveTo(configureTab);
61
+  
62
+  motorResistanceBox = controlP5.addNumberbox("motorresistance",2,260,40,100,20);
63
+  motorResistanceBox.setCaptionLabel("Motor Resistance (Ohm)");
64
+  motorResistanceBox.setMultiplier(0.1);
65
+  motorResistanceBox.setMin(0);
66
+  motorResistanceBox.setMax(250);
67
+  motorResistanceBox.moveTo(configureTab);
68
+  
69
+  motorInductanceBox = controlP5.addNumberbox("motorinductance",2,380,40,100,20);
70
+  motorInductanceBox.setMultiplier(0.1);
71
+  motorInductanceBox.setMin(0);
72
+  motorInductanceBox.setMax(250);
73
+  motorInductanceBox.setCaptionLabel("Motor Inductance (mH)");
74
+  motorInductanceBox.moveTo(configureTab);
75
+  // add a vertical slider for speed  
76
+  constantOffSlider = controlP5.addSlider("constantoff", 1, 15, 1, 20, 80, 400, 20);
77
+  constantOffSlider.setCaptionLabel("Constant Off Time");
78
+  constantOffSlider.setSliderMode(Slider.FIX);
79
+  constantOffSlider.moveTo(configureTab);
80
+
81
+  blankTimeSlider =  controlP5.addSlider("blanktime", 0, 3, 2, 20, 120, 400, 20);
82
+  blankTimeSlider.setCaptionLabel("Blank Time");
83
+  blankTimeSlider.moveTo(configureTab);
84
+
85
+  hysteresisStartSlider =  controlP5.addSlider("hysteresisstart", 0, 8, 2, 20, 160, 400, 20);
86
+  hysteresisStartSlider.setCaptionLabel("Hysteresis Start");
87
+  hysteresisStartSlider.moveTo(configureTab);
88
+
89
+  hysteresisEndSlider =  controlP5.addSlider("hysteresisend", -3, 12, 2, 20, 200, 400, 20);
90
+  hysteresisEndSlider.setCaptionLabel("Hysteresis End");
91
+  hysteresisEndSlider.moveTo(configureTab);
92
+
93
+  hysteresisDecrementButtons =controlP5.addRadioButton("decrement", 20, 240);
94
+  hysteresisDecrementButtons.addItem("fastest", 0);
95
+  hysteresisDecrementButtons.addItem("fast", 1);
96
+  hysteresisDecrementButtons.addItem("medium", 2);
97
+  hysteresisDecrementButtons.addItem("slow", 3);
98
+  hysteresisDecrementButtons.showBar();
99
+  hysteresisDecrementButtons.moveTo(configureTab);
100
+
101
+  spreadChopperImage = loadImage("hysteresis.png");
102
+}
103
+
104
+void drawChopper() {
105
+  if (activeTab!=null && configureTab.equals(activeTab)) {
106
+    image(spreadChopperImage, 200, 400);
107
+  }
108
+}
109
+
110
+void constantoff(int theValue) {
111
+  if (!settingStatus) {
112
+    if (theValue>0 && theValue<16) {
113
+      println("Constant off "+theValue);
114
+      sendCommand("cO"+theValue);
115
+    } 
116
+    else {
117
+      println("invalid blank time of "+theValue);
118
+    }
119
+  }
120
+}
121
+
122
+void blanktime(int theValue) {
123
+  if (!settingStatus) {
124
+    if (theValue>=0 && theValue<=3) {
125
+      println("blank time "+theValue);
126
+      sendCommand("Cb"+theValue);
127
+    }
128
+  }
129
+}
130
+
131
+void hysteresisstart(int start) {
132
+  if (!settingStatus) {
133
+    if (start>=1 && start<=8) {
134
+      println("hystereis start "+start);
135
+      sendCommand("Cs"+start);
136
+    }
137
+  }
138
+}
139
+
140
+void hysteresisend(int end) {
141
+  if (!settingStatus) {
142
+    if (end>=-3 && end<=12) {
143
+      println("hystereis end "+end);
144
+      sendCommand("Ce"+end);
145
+    }
146
+  }
147
+}
148
+
149
+void setHysteresisDecrement(int theValue) {
150
+  if (!settingStatus) {
151
+    if (theValue>=0 && theValue<=3) {
152
+      println("Hysteresis decrement "+theValue);
153
+      sendCommand("Cd"+theValue);
154
+    } 
155
+    else {
156
+      println("cannot set decrement to "+theValue);
157
+    }
158
+  }
159
+}
160
+
161
+void setHystDecrement(int value) {
162
+  if (value>=0 && value<=3) {
163
+    hysteresisDecrementButtons.activate(value);
164
+  } 
165
+  else {
166
+    println("this is no proper hysteresis decerement value: "+value);
167
+  }
168
+}
169
+
170
+void motorcurrent(float value) {
171
+  if (activeTab!=null && "default".equals(activeTab.name())) {
172
+    currentSlider.setValue(value);
173
+  }
174
+}
175
+

+ 327
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataRendering.pde View File

@@ -0,0 +1,327 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+//our graph dimensions
27
+int plotBottom, plotTop;
28
+int plotLeft, plotRight;
29
+
30
+
31
+//we already know the minima and maxima of certain dates
32
+int stallGuardMin =  0;
33
+int stallGuardMax =1024;
34
+
35
+int positionMin = 0;
36
+int positionMax = 1024;
37
+
38
+int dataPointsWidth = 3;
39
+int dataLineWidth = 2;
40
+int highLightWidth = 7;
41
+
42
+int numberOfDataPoints=1000;
43
+
44
+int legendTitleSize = 10;
45
+int legendTextSize = 10;
46
+int currentLabelInterval = 500;
47
+int currentMinorTickInterval = 25;
48
+DecimalFormat currentLabelFormat = new DecimalFormat("#0.0A");
49
+
50
+int stallGuardLabelInterval = 100;
51
+int stallGuardMinorTickInterval = 10;
52
+int positionLabelInterval = 64;
53
+int positionMinorTickInterval = 8;
54
+
55
+int coolStepActiveStroke = 2;
56
+int coolStepInactiveStroke = 1;
57
+int stallGuardHighLightDistance = 1;
58
+int positionHighLightDistance = 3;
59
+int currentHighLightDistance = 3;
60
+
61
+DataTable stallGuardTable = new DataTable(numberOfDataPoints);
62
+DataTable positionTable = new DataTable(numberOfDataPoints);
63
+DataTable currentTable =  new DataTable(numberOfDataPoints);
64
+
65
+int logoLeft = 10;
66
+int logoTop = 50;
67
+int logoWidth = 75;
68
+int logoHeight = 75;
69
+
70
+void setupData() {
71
+  plotBottom = height-50;
72
+  plotTop = 300;
73
+
74
+  plotLeft = 150;
75
+  plotRight= width-50;
76
+  //recalculate the image dimension for the Logo
77
+  logoHeight = (int)((float)logoWidth/(float)TMCLogo.width*(float)TMCLogo.height);
78
+  logoTop = height - 10 - logoHeight;
79
+}
80
+
81
+void drawData() {
82
+
83
+  if (motor_connected && activeTab!=null && runTab.equals(activeTab)) {
84
+    fill(diagramBackgroundColor);
85
+    noStroke();
86
+    rect(plotLeft, plotTop, plotRight, plotBottom);
87
+    noFill();
88
+    rectMode(CORNERS);
89
+    noStroke();
90
+    //rect(plotLeft, plotBottom, plotRight, plotTop);
91
+
92
+    strokeWeight(dataLineWidth);
93
+    stroke(positionColor);
94
+    drawDataLine(positionTable, positionMin, positionMax);
95
+    drawDataHighLight(positionTable, positionMin, positionMax, positionHighLightDistance, labelColor, "Microstep Position", false);
96
+
97
+    strokeWeight(dataLineWidth);
98
+    stroke(coolStepColor);
99
+    drawCurrentLine(currentTable);
100
+    drawCurrentHighLight(positionTable, currentHighLightDistance, labelColor, "Current Ratio", false);
101
+
102
+    strokeWeight(dataPointsWidth);
103
+    stroke(stallGuardColor);
104
+    drawDataPoints(stallGuardTable, stallGuardMin, stallGuardMax);
105
+    drawDataHighLight(stallGuardTable, stallGuardMin, stallGuardMax, stallGuardHighLightDistance, labelColor, "Stall Guard", true);
106
+    
107
+    if (coolStepActive) {
108
+      strokeWeight(coolStepActiveStroke); 
109
+    } else {
110
+      strokeWeight(coolStepInactiveStroke);
111
+    }
112
+    stroke(coolStepColor);
113
+    float coolStepMinHeight = map(coolStepMin, 0, stallGuardMax, plotBottom, plotTop);
114
+    line(plotLeft,coolStepMinHeight, plotRight, coolStepMinHeight);
115
+    float coolStepMaxHeight = map(coolStepMin+coolStepMax+1, 0, stallGuardMax, plotBottom, plotTop);
116
+    line(plotLeft,coolStepMaxHeight, plotRight, coolStepMaxHeight);
117
+
118
+    textSize(legendTitleSize);
119
+    textAlign(RIGHT);
120
+    fill(coolStepColor);
121
+    text("Motor Current", plotLeft - 50, plotTop - 10);
122
+    textSize(legendTextSize);
123
+    textAlign(RIGHT);
124
+    strokeWeight(1);
125
+    stroke(coolStepColor);
126
+    int currentScaleMax = (int)(maxCurrent*1000.0);
127
+    for (int i=0; i<=currentScaleMax; i++) {
128
+      float y = map(i, 0, currentScaleMax, plotBottom, plotTop);
129
+      if (i % currentLabelInterval == 0) {
130
+        if (i==0) {
131
+          textAlign(RIGHT, BOTTOM);
132
+        } 
133
+        else if (i==currentScaleMax) {
134
+          textAlign(RIGHT, TOP);
135
+        } 
136
+        else {
137
+          textAlign(RIGHT, CENTER);
138
+        }        
139
+        text(currentLabelFormat.format((float)i/1000.0), plotLeft-58, y);
140
+        line (plotLeft-55, y, plotLeft-50, y);
141
+      } 
142
+      else if (i % currentMinorTickInterval == 0) {
143
+        line (plotLeft-53, y, plotLeft-50, y);
144
+      }
145
+      
146
+    }
147
+
148
+    textSize(legendTitleSize);
149
+    textAlign(LEFT);
150
+    fill(stallGuardColor);
151
+    text("Stall Guard Reading", plotLeft - 30, plotTop - 10);
152
+    textSize(legendTextSize);
153
+    textAlign(RIGHT);
154
+    strokeWeight(1);
155
+    stroke(stallGuardColor);
156
+    for (int i=stallGuardMin; i<=stallGuardMax; i++) {
157
+      float y = map(i, stallGuardMin, stallGuardMax, plotBottom, plotTop);
158
+      if (i % stallGuardLabelInterval == 0) {
159
+        if (i==stallGuardMin) {
160
+          textAlign(RIGHT, BOTTOM);
161
+        } 
162
+        else if (i==stallGuardMax) {
163
+          textAlign(RIGHT, TOP);
164
+        } 
165
+        else {
166
+          textAlign(RIGHT, CENTER);
167
+        }        
168
+        text(i, plotLeft-8, y);
169
+        line (plotLeft-5, y, plotLeft, y);
170
+      } 
171
+      else if (i % stallGuardMinorTickInterval == 0) {
172
+        line (plotLeft-3, y, plotLeft, y);
173
+      }
174
+    }
175
+
176
+    textSize(legendTitleSize);
177
+    fill(positionColor);
178
+    textAlign(RIGHT);
179
+    text("Position", plotRight + 30, plotTop - 10);
180
+    textSize(legendTextSize);
181
+    textAlign(LEFT);
182
+    strokeWeight(1);
183
+    stroke(positionColor);
184
+    for (int i=positionMin; i<=positionMax; i++) {
185
+      float y = map(i, positionMin, positionMax, plotBottom, plotTop);
186
+      if (i % positionLabelInterval == 0) {
187
+        if (i==positionMin) {
188
+          textAlign(LEFT, BOTTOM);
189
+        } 
190
+        else if (i==stallGuardMax) {
191
+          textAlign(LEFT, TOP);
192
+        } 
193
+        else {
194
+          textAlign(LEFT, CENTER);
195
+        }        
196
+        text(i, plotRight+8, y);
197
+        line (plotRight, y, plotRight+5, y);
198
+      } 
199
+      else if (i % positionMinorTickInterval == 0) {
200
+        line (plotRight, y, plotRight+3, y);
201
+      }
202
+    }
203
+    //draw the channel status
204
+    textSize(legendTextSize);
205
+    textAlign(CENTER);
206
+    strokeWeight(1);
207
+    int statusY = height - 20;
208
+    int channelAX = width/4;
209
+    int temperatureX = width/2;
210
+    int channelBX = width/4*3;
211
+    if (channelAStatus==null) {
212
+      fill(goodStatusColor);
213
+      text("Channel A: OK", channelAX, statusY);
214
+    } 
215
+    else {
216
+      fill(badStatusColor);
217
+      text("Channel A: "+channelAStatus, channelAX, statusY);
218
+    }    
219
+    if (channelBStatus==null) {
220
+      fill(goodStatusColor);
221
+      text("Channel B: OK", channelBX, statusY);
222
+    } 
223
+    else {
224
+      fill(badStatusColor);
225
+      text("Channel B: "+channelBStatus, channelBX, statusY);
226
+    }    
227
+    if (temperatureStatus==null) {
228
+      fill(goodStatusColor);
229
+      text("Temperature: OK", temperatureX, statusY);
230
+    } 
231
+    else {
232
+      fill(badStatusColor);
233
+      text("Temperature: "+temperatureStatus, temperatureX, statusY);
234
+    }
235
+  }
236
+}
237
+void drawDataPoints(DataTable table, int minValue, int maxValue) {
238
+  int dataCount = table.getSize();
239
+  for (int i=0; i<dataCount; i++) {
240
+    int value = table.getEntry(i);
241
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
242
+    float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
243
+    point(x, y);
244
+  }
245
+}
246
+
247
+void drawDataLine(DataTable table, int minValue, int maxValue) {
248
+  beginShape();
249
+  int dataCount = table.getSize();
250
+  for (int i=0; i<dataCount; i++) {
251
+    int value = table.getEntry(i);
252
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
253
+    float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
254
+    vertex(x, y);
255
+  }
256
+  endShape();
257
+}
258
+
259
+void drawDataHighLight(DataTable table, int minValue, int maxValue, int distance, color textColor, String name, boolean top) {
260
+  int dataCount = table.getSize();
261
+  for (int i=0; i<dataCount; i++) {
262
+    int value = table.getEntry(i);
263
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
264
+    float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
265
+    if (dist(mouseX, mouseY, x, y) < distance) {
266
+      strokeWeight(highLightWidth);
267
+      point(x, y);
268
+      fill(textColor);
269
+      textSize(10);
270
+      textAlign(CENTER);
271
+      if (top) {
272
+        text(name+": "+value, x, y-8);
273
+      } 
274
+      else {
275
+        text(name+": "+value, x, y+8);
276
+      }
277
+    }
278
+  }
279
+}
280
+
281
+void drawCurrentLine(DataTable table) {
282
+  noFill();
283
+  beginShape();
284
+  int dataCount = table.getSize();
285
+  for (int i=0; i<dataCount; i++) {
286
+    float value = (table.getEntry(i)+1)/1000.0;
287
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
288
+    float y = map(value, 0.0, maxCurrent, (float)plotBottom-dataPointsWidth, (float)plotTop+dataPointsWidth);
289
+    vertex(x, y);
290
+  }
291
+  endShape();
292
+}
293
+
294
+void drawCurrentHighLight(DataTable table, int distance, color textColor, String name, boolean top) {
295
+  int dataCount = table.getSize();
296
+  for (int i=0; i<dataCount; i++) {
297
+    float value = (table.getEntry(i)+1)/1000.0;
298
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
299
+    float y = map(value, 0.0, maxCurrent, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
300
+    if (dist(mouseX, mouseY, x, y) < distance) {
301
+      strokeWeight(highLightWidth);
302
+      point(x, y);
303
+      fill(textColor);
304
+      textSize(10);
305
+      textAlign(CENTER);
306
+      if (top) {
307
+        text(name+": "+value, x, y-8);
308
+      } 
309
+      else {
310
+        text(name+": "+value, x, y+8);
311
+      }
312
+    }
313
+  }
314
+}
315
+
316
+void addStallGuardReading(int value) {
317
+  stallGuardTable.addData(value);
318
+}
319
+
320
+void addPositionReading(int value) {
321
+  positionTable.addData(value);
322
+}
323
+
324
+void addCurrentReading(int value) {
325
+  currentTable.addData(value);
326
+}
327
+

+ 49
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataTable.pde View File

@@ -0,0 +1,49 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+class DataTable {
27
+  
28
+  LinkedList<Integer> dataList = new LinkedList<Integer>();
29
+  int maxEntries;
30
+  
31
+  DataTable(int maxEntries) {
32
+    this.maxEntries = maxEntries;
33
+  }
34
+  
35
+  void addData(int value) {
36
+    dataList.add(value);
37
+    if (dataList.size()>maxEntries) {
38
+      dataList.remove();
39
+    }
40
+  }
41
+  
42
+  int getSize() {
43
+    return dataList.size();
44
+  }
45
+  
46
+  int getEntry(int position) {
47
+    return dataList.get(position);
48
+  }
49
+}

+ 335
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/RunConfiguration.pde View File

@@ -0,0 +1,335 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+Slider speedSlider;
27
+Toggle runToggle;
28
+RadioButton directionButtons;
29
+Toggle enabledToggle;
30
+RadioButton microsteppingButtons;
31
+Slider sgtSlider;
32
+Button sgtPlus;
33
+Button sgtMinus;
34
+Toggle sgFilterToggle;
35
+Slider currentSlider;
36
+Slider coolStepMinSlider;
37
+Slider coolStepMaxSlider;
38
+Toggle coolStepActiveToggle;
39
+RadioButton coolStepIncrementButtons;
40
+RadioButton coolStepDecrementButtons;
41
+RadioButton coolStepMinButtons;
42
+List runControls = new LinkedList();
43
+
44
+Button trinamicButton;
45
+Button motionControlButton;
46
+
47
+void setupRunConfig() {
48
+  //the run configuration
49
+  //controlP5.getControlFont().setSize(10); - the font is too small, try to increase it!
50
+  //add a button te let the motor run
51
+  runToggle = controlP5.addToggle("run", false, 20, 40, 30, 30);
52
+  controlElements.add(runToggle);
53
+  runToggle.moveTo(runTab);
54
+  //add some directions buttons
55
+  directionButtons = controlP5.addRadioButton("direction", 20, 90);
56
+  controlElements.add(directionButtons);
57
+  directionButtons.addItem("forward", 1);
58
+  directionButtons.addItem("backward", -1);
59
+  directionButtons.activate(0);
60
+  directionButtons.moveTo(runTab);
61
+  enabledToggle = controlP5.addToggle("enabled", false, 20, 220, 30, 30);
62
+  controlElements.add(enabledToggle);
63
+  enabledToggle.moveTo(runTab);
64
+
65
+  // add a vertical slider for speed  
66
+  speedSlider = controlP5.addSlider("speed", 1, 100, 10, 85, 40, 20, 210);
67
+  controlElements.add(speedSlider);
68
+  speedSlider.moveTo(runTab);
69
+
70
+  //ad a multilist for the microstepping setting
71
+  microsteppingButtons = controlP5.addRadioButton("microstepping", 150, 40);
72
+  controlElements.add(microsteppingButtons);
73
+  microsteppingButtons.addItem("m_1/1", 1);
74
+  microsteppingButtons.addItem("m_1/2", 2);
75
+  microsteppingButtons.addItem("m_1/4", 4);
76
+  microsteppingButtons.addItem("m_1/8", 8);
77
+  microsteppingButtons.addItem("m_1/16", 16);
78
+  microsteppingButtons.addItem("m_1/32", 32);
79
+  microsteppingButtons.addItem("m_1/64", 64);
80
+  microsteppingButtons.addItem("m_1/128", 128);
81
+  microsteppingButtons.addItem("m_1/256", 256);
82
+  for (Object o:microsteppingButtons.getItems()) {
83
+    Toggle t = (Toggle) o;
84
+    t.setCaptionLabel(t.getName().substring(2));
85
+  }
86
+  microsteppingButtons.showBar();
87
+  microsteppingButtons.moveTo(runTab);
88
+
89
+
90
+
91
+  currentSlider = controlP5.addSlider("current", 0.46, maxCurrent, 0.4, 250, 40, 20, 210);
92
+  controlElements.add(currentSlider);
93
+  currentSlider.moveTo(runTab);
94
+
95
+  // add a vertical slider for stallGuard threshold  
96
+  sgtPlus = controlP5.addButton("sgtplus", 0, 400, 40, 20, 20);
97
+  controlElements.add(sgtPlus);
98
+  sgtPlus.setCaptionLabel("+");
99
+  sgtPlus.moveTo(runTab);
100
+  sgtMinus = controlP5.addButton("sgtminus", 1, 400, 70, 20, 20);
101
+  controlElements.add(sgtMinus);
102
+  sgtMinus.setCaptionLabel("-");
103
+  sgtMinus.moveTo(runTab);
104
+  sgtSlider = controlP5.addSlider("stallguardthreshold", -64, 63, 0, 350, 40, 20, 150);
105
+  controlElements.add(sgtSlider);
106
+  sgtSlider.setSliderMode(Slider.FIX);
107
+  sgtSlider.setCaptionLabel("Stall Guard Threshold");
108
+  sgtSlider.moveTo(runTab);
109
+  //ading some buttons to have finer sg control
110
+  //adding a button for the filter
111
+  sgFilterToggle = controlP5.addToggle("sgfilter", false, 350, 220, 30, 30);
112
+  controlElements.add(sgFilterToggle);
113
+  sgFilterToggle.setCaptionLabel("Stall GuardFilter");
114
+  sgFilterToggle.moveTo(runTab);
115
+  
116
+  //add the coolstep sliders
117
+  coolStepMaxSlider = controlP5.addSlider("coolStepUpper", 0, 480, 0, 500, 40, 20, 90);
118
+  controlElements.add(coolStepMaxSlider);
119
+  coolStepMaxSlider.setCaptionLabel("Cool Step Hysteresis");
120
+  coolStepMaxSlider.moveTo(runTab);
121
+
122
+  coolStepMinSlider = controlP5.addSlider("coolStepLower", 0, 480, 0, 500, 160, 20, 90);
123
+  controlElements.add(coolStepMinSlider);
124
+  coolStepMinSlider.setCaptionLabel("Cool Step Minimum");
125
+  coolStepMinSlider.moveTo(runTab);
126
+  
127
+  coolStepActiveToggle = controlP5.addToggle("coolStepActive", false, 600, 220, 30, 30);  
128
+  controlElements.add(coolStepActiveToggle);
129
+  coolStepActiveToggle.setCaptionLabel("Enable CoolStep");
130
+  coolStepActiveToggle.moveTo(runTab);
131
+
132
+  coolStepIncrementButtons = controlP5.addRadioButton("coolStepIncrement", 600, 40);
133
+  controlElements.add(coolStepIncrementButtons);
134
+  coolStepIncrementButtons.captionLabel().set("Cool Step  Increment");
135
+  coolStepIncrementButtons.addItem("i_1", 0);
136
+  coolStepIncrementButtons.addItem("i_2", 1);
137
+  coolStepIncrementButtons.addItem("i_4", 2);
138
+  coolStepIncrementButtons.addItem("i_8", 3);
139
+  for (Object o:coolStepIncrementButtons.getItems()) {
140
+    Toggle t = (Toggle) o;
141
+    t.setCaptionLabel(t.getName().substring(2));
142
+  }
143
+  coolStepIncrementButtons.showBar();
144
+  coolStepIncrementButtons.moveTo(runTab);
145
+
146
+  coolStepDecrementButtons = controlP5.addRadioButton("coolStepDecrement", 600, 110);
147
+  controlElements.add(coolStepDecrementButtons);
148
+  coolStepDecrementButtons.captionLabel().set("Cool Step Decrement");
149
+  coolStepDecrementButtons.addItem("d_32", 0);
150
+  coolStepDecrementButtons.addItem("d_8", 1);
151
+  coolStepDecrementButtons.addItem("d_2", 2);
152
+  coolStepDecrementButtons.addItem("d_1", 3);
153
+  for (Object o:coolStepDecrementButtons.getItems()) {
154
+    Toggle t = (Toggle) o;
155
+    t.setCaptionLabel(t.getName().substring(2));
156
+  }
157
+  coolStepDecrementButtons.showBar();
158
+  coolStepDecrementButtons.moveTo(runTab);
159
+
160
+  coolStepMinButtons = controlP5.addRadioButton("coolStepMin", 600, 180);
161
+  controlElements.add(coolStepMinButtons);
162
+  coolStepMinButtons.addItem("s_1/2", 0);
163
+  coolStepMinButtons.addItem("s_1/4", 1);
164
+  for (Object o:coolStepMinButtons.getItems()) {
165
+    Toggle t = (Toggle) o;
166
+    t.setCaptionLabel(t.getName().substring(2));
167
+  }
168
+  coolStepMinButtons.showBar();
169
+  coolStepMinButtons.moveTo(runTab);
170
+  
171
+  trinamicButton = controlP5.addButton("trinamicLogo", 1.0, 750, 40, 200, 100);
172
+  trinamicButton.setImage(TMCLogo);
173
+  trinamicButton.moveTo(runTab);
174
+  controlElements.add(trinamicButton);
175
+  
176
+  motionControlButton = controlP5.addButton("mcLogo", 1.0, 750, 150, 200, 100);
177
+  motionControlButton.setImage(MCLogo);
178
+  motionControlButton.moveTo(runTab);
179
+  controlElements.add(motionControlButton);
180
+}
181
+
182
+void speed(int theSpeed) {
183
+  if (!settingStatus) {
184
+    int speed = (int) theSpeed;
185
+    println("setting speed to "+speed);
186
+    sendCommand("S"+speed);
187
+  }
188
+}
189
+
190
+void run(int value) {
191
+  if (!settingStatus) {
192
+    println("button pressed");
193
+    if (running) {
194
+      println("stopping motor");
195
+      sendCommand("s");
196
+      running = false;
197
+    } 
198
+    else {
199
+      println("starting motor");
200
+      sendCommand("r");
201
+      running = true;
202
+    }
203
+  }
204
+}
205
+
206
+void enabled(int value) {
207
+  if (!settingStatus) {
208
+    println("enabled: "+value);
209
+    sendCommand("e"+value);
210
+  }
211
+}
212
+
213
+void microstepping(int value) {
214
+  if (!settingStatus) {
215
+    println("microstepping: "+value);
216
+    sendCommand("m"+value);
217
+  }
218
+}
219
+
220
+void stallguardthreshold(int value) {
221
+  if (!settingStatus) {
222
+    println("stall guard threshold: "+value);
223
+    sendCommand("t"+value);
224
+  }
225
+  if (value==sgtSlider.max()) {
226
+    sgtPlus.lock();
227
+  } 
228
+  else {
229
+    sgtPlus.unlock();
230
+  }
231
+  if (value==sgtSlider.min()) {
232
+    sgtMinus.lock();
233
+  } 
234
+  else {
235
+    sgtMinus.unlock();
236
+  }
237
+}
238
+
239
+void sgtplus(int value) {
240
+  sgtSlider.setValue(sgtSlider.value()+1);
241
+}
242
+
243
+void sgtminus(int value) {
244
+  sgtSlider.setValue(sgtSlider.value()-1);
245
+}
246
+
247
+void sgfilter(int value) {
248
+  if (!settingStatus) {
249
+    println("filter: "+value);
250
+    sendCommand("f"+value);
251
+  }
252
+}  
253
+
254
+void current(float value) {
255
+  if (!settingStatus) {
256
+    int realValue=(int)(value*1000.0);
257
+    println("current: "+((float)realValue/1000.0)+" = "+realValue);
258
+    sendCommand("c"+realValue);
259
+    if (activeTab!=null && "run".equals(activeTab.name())) {
260
+      motorCurrentBox.setValue(value);
261
+    }
262
+  }
263
+}
264
+
265
+void coolStepUpper(int value) {
266
+  coolStepMax=value;
267
+  if (!settingStatus) {
268
+    sendCommand("Ku"+value);
269
+  }
270
+}
271
+
272
+void coolStepLower(int value) {
273
+  coolStepMin = value;
274
+  if (!settingStatus) {
275
+    sendCommand("Kl"+value);
276
+  }
277
+}
278
+
279
+
280
+void setCoolStepIncrement(int value) {
281
+  if (!settingStatus) {
282
+    println("cool step increment :"+value);
283
+    sendCommand("Ki"+value);
284
+  }
285
+}
286
+
287
+void setCoolStepDecrement(int value) {
288
+  if (!settingStatus) {
289
+    println("cool step decrement :"+value);
290
+    sendCommand("Kn"+value);
291
+  }
292
+}
293
+
294
+void setCoolStepMin(int value) {
295
+  if (!settingStatus) {
296
+    println("cool step minimum :"+value);
297
+    sendCommand("Km"+value);
298
+  }
299
+}
300
+
301
+void coolStepActive(int value) {
302
+  if (!settingStatus) {
303
+    coolStepActive = (value!=0);
304
+    sendCommand(coolStepActive? "K+":"K-");
305
+  }
306
+}
307
+
308
+void setCurrent(int current) {
309
+  currentSlider.setValue((float)current/1000.0);
310
+}
311
+
312
+void setDirection(int direction) {
313
+  if (!settingStatus) {
314
+    if (direction<0) {
315
+      println("back");
316
+      sendCommand("d-1");
317
+    } 
318
+    else {
319
+      sendCommand("d1");
320
+    }
321
+  }
322
+}
323
+
324
+void trinamicLogo(float value){
325
+  if (value!=0) {
326
+    link(trinamicUrl);
327
+  }
328
+}
329
+
330
+void mcLogo(float value) {
331
+  if (value!=0) {
332
+    link(mcUrl);
333
+  }
334
+}
335
+

+ 156
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/TMC26XMotorTest.pde View File

@@ -0,0 +1,156 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+import controlP5.*;
26
+import processing.serial.*;
27
+import java.util.*;
28
+import java.text.*;
29
+
30
+ControlP5 controlP5;
31
+
32
+Serial arduinoPort;
33
+
34
+String helpUrl = "http://www.motioncontrol-community.org/";
35
+String trinamicUrl = "http://trinamic.com";
36
+String mcUrl = "http://www.motioncontrol-community.org/";
37
+
38
+//TODO comde up with a nice color scheme
39
+color activeColor = #01ADF1;
40
+color foreGroundColor = #01ADF1; 
41
+color uiTextColor = #4D4D4F;
42
+color uiElementColor = #ffffff;
43
+color labelColor = #f0f0f0;
44
+color valueColor = #f0f0f0;
45
+color backgroundColor = #EDEEEF;
46
+color stallGuardColor = #969696;
47
+color positionColor = #01ADF1;
48
+color goodStatusColor = labelColor;
49
+color badStatusColor = stallGuardColor;
50
+color coolStepColor = #4D4D4F;
51
+color diagramBackgroundColor = #ffffff;
52
+
53
+CColor uiColor = new CColor( foreGroundColor, uiElementColor, activeColor, uiTextColor, uiTextColor);
54
+
55
+Tab configureTab;
56
+Tab runTab;
57
+Tab activeTab;
58
+
59
+boolean settingStatus=false;
60
+
61
+boolean running = false;
62
+int coolStepMin = 0;
63
+int coolStepMax = 0;
64
+boolean coolStepActive = false;
65
+
66
+float maxCurrent = 1.7;
67
+
68
+List controlElements = new LinkedList();
69
+List serialConfigElements = new LinkedList();
70
+
71
+PImage TMCLogo;
72
+PImage MCLogo;
73
+
74
+void setup() {
75
+  size(1000, 800);
76
+  //load the logos
77
+  TMCLogo=loadImage("tmc_logo.jpg");
78
+  MCLogo=loadImage("mc_logo.jpg");
79
+  
80
+  //create the UI
81
+  controlP5 = new ControlP5(this);
82
+  controlP5.setColor(uiColor);
83
+  runTab = controlP5.getTab("default");
84
+  configureTab =controlP5.addTab("configure"); 
85
+  //customize the tabs a bit
86
+  configureTab.setLabel("configure");
87
+  controlElements.add(configureTab);
88
+  activeTab =  controlP5.getTab("default");
89
+  controlP5.setTabEventsActive(true);
90
+  configureTab.activateEvent(true);
91
+  runTab.activateEvent(true);
92
+
93
+  //configuring the general UI l&f
94
+  //the configuration UI
95
+
96
+  setupRunConfig();
97
+  setupChooperConfig();
98
+  setupSerialConfig();
99
+  //directly hide the controls again since we are not connected to the Arduino yet
100
+  toggleUi(motor_connected);
101
+
102
+  smooth();
103
+  setupData();
104
+}
105
+
106
+
107
+void toggleUi(boolean show_controls) {
108
+  for (Object c:controlElements) {
109
+    ControllerInterface controller = (ControllerInterface) c;
110
+    if (show_controls) {
111
+      controller.show();
112
+    } else {
113
+      controller.hide();
114
+    }
115
+  }
116
+  for (Object c:serialConfigElements) {
117
+    ControllerInterface controller = (ControllerInterface) c;
118
+    if (show_controls) {
119
+      controller.hide();
120
+    } else {
121
+      controller.show();
122
+    }
123
+  }    
124
+}
125
+
126
+void draw() {
127
+  background(backgroundColor);
128
+  drawSerial();
129
+  drawChopper();
130
+  drawData();
131
+  decodeSerial();
132
+}
133
+
134
+
135
+void controlEvent(ControlEvent theEvent) {
136
+  if (theEvent.isGroup() && !settingStatus) {
137
+    if ("microstepping".equals(theEvent.group().name())) { 
138
+      microstepping((int)theEvent.group().value());
139
+    } else 
140
+    if ("direction".equals(theEvent.group().name())) {
141
+      setDirection((int)theEvent.group().value());
142
+    } else if ("decrement".equals(theEvent.group().name())) {
143
+      setHysteresisDecrement((int)theEvent.group().value());
144
+    } else if ("coolStepIncrement".equals(theEvent.group().name())) {
145
+      setCoolStepIncrement((int)theEvent.group().value());
146
+    } else if ("coolStepDecrement".equals(theEvent.group().name())) {
147
+      setCoolStepDecrement((int)theEvent.group().value());
148
+    } else if ("coolStepMin".equals(theEvent.group().name())) {
149
+      setCoolStepMin((int)theEvent.group().value());
150
+    }
151
+  } 
152
+  else if (theEvent.isTab()) {
153
+    activeTab = theEvent.tab();
154
+    println("Tab: "+activeTab.name());
155
+  } 
156
+}

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/mc_logo.jpg View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/tmc_logo.jpg View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/hysteresis.png View File


+ 2
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/sketch.properties View File

@@ -0,0 +1,2 @@
1
+mode.id=processing.mode.java.JavaMode
2
+mode=Java

+ 75
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/keywords.txt View File

@@ -0,0 +1,75 @@
1
+#######################################
2
+# Syntax Coloring Map For Test
3
+#######################################
4
+
5
+#######################################
6
+# Datatypes (KEYWORD1)
7
+#######################################
8
+
9
+Stepper	TMC26XStepper
10
+
11
+#######################################
12
+# Methods and Functions (KEYWORD2)
13
+#######################################
14
+
15
+start				KEYWORD2
16
+step				KEYWORD2
17
+setSpeed			KEYWORD2
18
+getSpeed			KEYWORD2
19
+setMicrosteps			KEYWORD2
20
+getMicrosteps			KEYWORD2
21
+move				KEYWORD2
22
+isMoving			KEYWORD2
23
+getStepsLeft			KEYWORD2
24
+stop				KEYWORD2
25
+setConstantOffTimeChopper	KEYWORD2
26
+setSpreadCycleChopper		KEYWORD2
27
+setRandomOffTime		KEYWORD2
28
+setCurrent			KEYWORD2
29
+getCurrent			KEYWORD2
30
+setStallGuardThreshold		KEYWORD2
31
+getStallGuardThreshold		KEYWORD2
32
+getStallGuardFilter		KEYWORD2
33
+setCoolStepConfiguration	KEYWORD2
34
+setCoolStepEnabled		KEYWORD2
35
+isCoolStepEnabled		KEYWORD2
36
+getCoolStepLowerSgThreshold	KEYWORD2
37
+getCoolStepUpperSgThreshold	KEYWORD2
38
+getCoolStepNumberOfSGReadings	KEYWORD2
39
+getCoolStepCurrentIncrementSize	KEYWORD2
40
+getCoolStepLowerCurrentLimit	KEYWORD2
41
+getMotorPosition		KEYWORD2
42
+getCurrentStallGuardReading	KEYWORD2
43
+getCurrentCSReading		KEYWORD2
44
+isCurrentScalingHalfed		KEYWORD2
45
+getCurrentCurrent		KEYWORD2
46
+isStallGuardOverThreshold	KEYWORD2
47
+getOverTemperature		KEYWORD2
48
+isShortToGroundA		KEYWORD2
49
+isShortToGroundB		KEYWORD2
50
+isOpenLoadA			KEYWORD2
51
+isOpenLoadB			KEYWORD2
52
+isStandStill			KEYWORD2
53
+isStallGuardReached		KEYWORD2
54
+setEnabled			KEYWORD2
55
+isEnabled			KEYWORD2
56
+readStatus			KEYWORD2
57
+getResistor			KEYWORD2
58
+debugLastStatus			KEYWORD2
59
+version				KEYWORD2
60
+
61
+######################################
62
+# Instances (KEYWORD2)
63
+#######################################
64
+
65
+#######################################
66
+# Constants (LITERAL1)
67
+#######################################
68
+
69
+TMC262_OVERTEMPERATURE_PREWARING	LITERAL1
70
+TMC262_OVERTEMPERATURE_SHUTDOWN 	LITERAL1
71
+TMC262_READOUT_POSITION 		LITERAL1
72
+TMC262_READOUT_STALLGUARD 		LITERAL1
73
+TMC262_READOUT_CURRENT 		LITERAL1
74
+COOL_STEP_HALF_CS_LIMIT		LITERAL1
75
+COOL_STEP_QUARTDER_CS_LIMIT		LITERAL1

+ 30
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/mainpage.dox View File

@@ -0,0 +1,30 @@
1
+/*!
2
+ * \mainpage TMC 260, 261, 262 Stepper Driver for Arduino
3
+ * \author Interactive MAtter, MArcus Nowotny, marcus@interactive-matter.eu
4
+ * \section HOWTO How to use the driver
5
+ * Here we go with aminial how to description
6
+ *
7
+ *
8
+ * \section  COPYRIGHT_NOTIFICATION COPYRIGHT NOTIFICATION
9
+ * \par (c) 2011 Interactive MAtter, Marcus Nowotny 
10
+ *
11
+ * \par
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ *  in the Software without restriction, including without limitation the rights
15
+ *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ *  copies of the Software, and to permit persons to whom the Software is
17
+ *  furnished to do so, subject to the following conditions:
18
+ *  
19
+ *  The above copyright notice and this permission notice shall be included in
20
+ *  all copies or substantial portions of the Software.
21
+ 
22
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ *  THE SOFTWARE.
29
+ *
30
+ */

+ 9797
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.brd
File diff suppressed because it is too large
View File


+ 11079
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.sch
File diff suppressed because it is too large
View File


+ 1
- 0
Documentation/changelog.md View File

@@ -0,0 +1 @@
1
+

+ 66
- 57
Marlin/Configuration.h View File

@@ -59,7 +59,7 @@ Here are some standard links for getting your machine calibrated:
59 59
 // The following define selects which electronics board you have.
60 60
 // Please choose the name from boards.h that matches your setup
61 61
 #ifndef MOTHERBOARD
62
-  #define MOTHERBOARD BOARD_ULTIMAKER
62
+  #define MOTHERBOARD BOARD_RAMPS_13_EFB
63 63
 #endif
64 64
 
65 65
 // Define this to set a custom name for your generic Mendel,
@@ -123,8 +123,8 @@ Here are some standard links for getting your machine calibrated:
123 123
 //     #define DUMMY_THERMISTOR_998_VALUE 25
124 124
 //     #define DUMMY_THERMISTOR_999_VALUE 100
125 125
 
126
-#define TEMP_SENSOR_0 -1
127
-#define TEMP_SENSOR_1 -1
126
+#define TEMP_SENSOR_0 1
127
+#define TEMP_SENSOR_1 0
128 128
 #define TEMP_SENSOR_2 0
129 129
 #define TEMP_SENSOR_3 0
130 130
 #define TEMP_SENSOR_BED 0
@@ -301,35 +301,21 @@ your extruder heater takes 2 minutes to hit the target on heating.
301 301
 // Enable this option for Toshiba steppers
302 302
 // #define CONFIG_STEPPERS_TOSHIBA
303 303
 
304
-// coarse Endstop Settings
305
-#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
306
-
307
-#ifndef ENDSTOPPULLUPS
308
-  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
309
-  // #define ENDSTOPPULLUP_XMAX
310
-  // #define ENDSTOPPULLUP_YMAX
311
-  // #define ENDSTOPPULLUP_ZMAX
312
-  // #define ENDSTOPPULLUP_XMIN
313
-  // #define ENDSTOPPULLUP_YMIN
314
-  // #define ENDSTOPPULLUP_ZMIN
315
-#endif
316
-
317
-#ifdef ENDSTOPPULLUPS
318
-  #define ENDSTOPPULLUP_XMAX
319
-  #define ENDSTOPPULLUP_YMAX
320
-  #define ENDSTOPPULLUP_ZMAX
321
-  #define ENDSTOPPULLUP_XMIN
322
-  #define ENDSTOPPULLUP_YMIN
323
-  #define ENDSTOPPULLUP_ZMIN
324
-#endif
325
-
326
-// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
327
-const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
328
-const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
329
-const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
330
-const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
331
-const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
332
-const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
304
+// The pullups are needed if you directly connect a mechanical endstop between the signal and ground pins.
305
+#define ENDSTOPPULLUP_XMAX
306
+#define ENDSTOPPULLUP_YMAX
307
+#define ENDSTOPPULLUP_ZMAX
308
+#define ENDSTOPPULLUP_XMIN
309
+#define ENDSTOPPULLUP_YMIN
310
+#define ENDSTOPPULLUP_ZMIN
311
+
312
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
313
+const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
314
+const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
315
+const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
316
+const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
317
+const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
318
+const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
333 319
 //#define DISABLE_MAX_ENDSTOPS
334 320
 //#define DISABLE_MIN_ENDSTOPS
335 321
 
@@ -346,13 +332,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
346 332
 #define DISABLE_E false // For all extruders
347 333
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
348 334
 
349
-#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
350
-#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
351
-#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
352
-#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
353
-#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
354
-#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
355
-#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
335
+// If you motor turns to wrong direction, you can invert it here:
336
+#define INVERT_X_DIR false
337
+#define INVERT_Y_DIR false
338
+#define INVERT_Z_DIR false
339
+#define INVERT_E0_DIR false
340
+#define INVERT_E1_DIR false
341
+#define INVERT_E2_DIR false
342
+#define INVERT_E3_DIR false
356 343
 
357 344
 // ENDSTOP SETTINGS:
358 345
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -364,17 +351,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
364 351
 #define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
365 352
 
366 353
 // Travel limits after homing (units are in mm)
367
-#define X_MAX_POS 205
368 354
 #define X_MIN_POS 0
369
-#define Y_MAX_POS 205
370 355
 #define Y_MIN_POS 0
371
-#define Z_MAX_POS 200
372 356
 #define Z_MIN_POS 0
357
+#define X_MAX_POS 200
358
+#define Y_MAX_POS 200
359
+#define Z_MAX_POS 200
373 360
 
374 361
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
375 362
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
376 363
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
377 364
 
365
+//===========================================================================
366
+//============================= Filament Runout Sensor ======================
367
+//===========================================================================
368
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
369
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
370
+                                 // It is assumed that when logic high = filament available
371
+                                 //                    when logic  low = filament ran out
372
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
373
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
378 374
 
379 375
 //===========================================================================
380 376
 //============================= Bed Auto Leveling ===========================
@@ -402,11 +398,18 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
402 398
 
403 399
   #ifdef AUTO_BED_LEVELING_GRID
404 400
 
401
+    // Use one of these defines to specify the origin
402
+    // for a topographical map to be printed for your bed.
403
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
404
+    #define TOPO_ORIGIN OriginFrontLeft
405
+
405 406
     // The edges of the rectangle in which to probe
406 407
     #define LEFT_PROBE_BED_POSITION 15
407 408
     #define RIGHT_PROBE_BED_POSITION 170
408 409
     #define FRONT_PROBE_BED_POSITION 20
409 410
     #define BACK_PROBE_BED_POSITION 170
411
+    
412
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
410 413
 
411 414
     // Set the number of grid points per dimension
412 415
     // You probably don't need more than 3 (squared=9)
@@ -429,8 +432,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
429 432
 
430 433
   // Offsets to the probe relative to the extruder tip (Hotend - Probe)
431 434
   // X and Y offsets must be integers
432
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
433
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
435
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // Probe on: -left  +right
436
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // Probe on: -front +behind
434 437
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
435 438
 
436 439
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
@@ -442,6 +445,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
442 445
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
443 446
   #define Z_RAISE_AFTER_PROBING 15    //How much the extruder will be raised after the last probing point.
444 447
 
448
+//   #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
449
+                                                                            //Useful to retract a deployable probe.
450
+                                                                           
445 451
   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
446 452
   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
447 453
 
@@ -476,12 +482,14 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
476 482
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
477 483
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
478 484
 
479
-//Manual homing switch locations:
485
+// Manual homing switch locations:
480 486
 // For deltabots this means top and center of the Cartesian print volume.
481
-#define MANUAL_X_HOME_POS 0
482
-#define MANUAL_Y_HOME_POS 0
483
-#define MANUAL_Z_HOME_POS 0
484
-//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
487
+#ifdef MANUAL_HOME_POSITIONS
488
+  #define MANUAL_X_HOME_POS 0
489
+  #define MANUAL_Y_HOME_POS 0
490
+  #define MANUAL_Z_HOME_POS 0
491
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
492
+#endif
485 493
 
486 494
 //// MOVEMENT SETTINGS
487 495
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
@@ -489,12 +497,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
489 497
 
490 498
 // default settings
491 499
 
492
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
493
-#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
494
-#define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
500
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,4000,500}  // default steps per unit for Ultimaker
501
+#define DEFAULT_MAX_FEEDRATE          {300, 300, 5, 25}    // (mm/sec)
502
+#define DEFAULT_MAX_ACCELERATION      {3000,3000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
495 503
 
496
-#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
497
-#define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
504
+#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
505
+#define DEFAULT_RETRACT_ACCELERATION  3000   // E acceleration in mm/s^2 for retracts
506
+#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
498 507
 
499 508
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
500 509
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
@@ -535,11 +544,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
535 544
 // Preheat Constants
536 545
 #define PLA_PREHEAT_HOTEND_TEMP 180
537 546
 #define PLA_PREHEAT_HPB_TEMP 70
538
-#define PLA_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
547
+#define PLA_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
539 548
 
540 549
 #define ABS_PREHEAT_HOTEND_TEMP 240
541
-#define ABS_PREHEAT_HPB_TEMP 100
542
-#define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
550
+#define ABS_PREHEAT_HPB_TEMP 110
551
+#define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
543 552
 
544 553
 //==============================LCD and SD support=============================
545 554
 

+ 10
- 5
Marlin/ConfigurationStore.cpp View File

@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Configuration and EEPROM storage
5 5
  *
6
- * V15 EEPROM Layout:
6
+ * V16 EEPROM Layout:
7 7
  *
8 8
  *  ver
9 9
  *  axis_steps_per_unit (x4)
@@ -11,6 +11,7 @@
11 11
  *  max_acceleration_units_per_sq_second (x4)
12 12
  *  acceleration
13 13
  *  retract_acceleration
14
+ *  travel_aceeleration
14 15
  *  minimumfeedrate
15 16
  *  mintravelfeedrate
16 17
  *  minsegmenttime
@@ -104,7 +105,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
104 105
 // wrong data being written to the variables.
105 106
 // ALSO:  always make sure the variables in the Store and retrieve sections are in the same order.
106 107
 
107
-#define EEPROM_VERSION "V15"
108
+#define EEPROM_VERSION "V16"
108 109
 
109 110
 #ifdef EEPROM_SETTINGS
110 111
 
@@ -118,6 +119,7 @@ void Config_StoreSettings()  {
118 119
   EEPROM_WRITE_VAR(i, max_acceleration_units_per_sq_second);
119 120
   EEPROM_WRITE_VAR(i, acceleration);
120 121
   EEPROM_WRITE_VAR(i, retract_acceleration);
122
+  EEPROM_WRITE_VAR(i, travel_acceleration);
121 123
   EEPROM_WRITE_VAR(i, minimumfeedrate);
122 124
   EEPROM_WRITE_VAR(i, mintravelfeedrate);
123 125
   EEPROM_WRITE_VAR(i, minsegmenttime);
@@ -253,6 +255,7 @@ void Config_RetrieveSettings() {
253 255
 
254 256
     EEPROM_READ_VAR(i, acceleration);
255 257
     EEPROM_READ_VAR(i, retract_acceleration);
258
+    EEPROM_READ_VAR(i, travel_acceleration);
256 259
     EEPROM_READ_VAR(i, minimumfeedrate);
257 260
     EEPROM_READ_VAR(i, mintravelfeedrate);
258 261
     EEPROM_READ_VAR(i, minsegmenttime);
@@ -380,6 +383,7 @@ void Config_ResetDefault() {
380 383
 
381 384
   acceleration = DEFAULT_ACCELERATION;
382 385
   retract_acceleration = DEFAULT_RETRACT_ACCELERATION;
386
+  travel_acceleration = DEFAULT_TRAVEL_ACCELERATION;
383 387
   minimumfeedrate = DEFAULT_MINIMUMFEEDRATE;
384 388
   minsegmenttime = DEFAULT_MINSEGMENTTIME;
385 389
   mintravelfeedrate = DEFAULT_MINTRAVELFEEDRATE;
@@ -516,11 +520,12 @@ void Config_PrintSettings(bool forReplay) {
516 520
   SERIAL_EOL;
517 521
   SERIAL_ECHO_START;
518 522
   if (!forReplay) {
519
-    SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration");
523
+    SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
520 524
     SERIAL_ECHO_START;
521 525
   }
522
-  SERIAL_ECHOPAIR("  M204 S", acceleration );
523
-  SERIAL_ECHOPAIR(" T", retract_acceleration);
526
+  SERIAL_ECHOPAIR("  M204 P", acceleration );
527
+  SERIAL_ECHOPAIR(" R", retract_acceleration);
528
+  SERIAL_ECHOPAIR(" T", travel_acceleration);
524 529
   SERIAL_EOL;
525 530
 
526 531
   SERIAL_ECHO_START;

+ 138
- 2
Marlin/Configuration_adv.h View File

@@ -214,6 +214,7 @@
214 214
 #define X_HOME_RETRACT_MM 5
215 215
 #define Y_HOME_RETRACT_MM 5
216 216
 #define Z_HOME_RETRACT_MM 2
217
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
217 218
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
218 219
 
219 220
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -285,8 +286,8 @@
285 286
 //===========================================================================
286 287
 
287 288
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
289
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
290
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
290 291
 //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291 292
 
292 293
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
@@ -461,6 +462,141 @@ const unsigned int dropsegments=5; //everything with less than this number of st
461 462
   #endif
462 463
 #endif
463 464
 
465
+
466
+/******************************************************************************\
467
+ * enable this section if you have TMC26X motor drivers. 
468
+ * you need to import the TMC26XStepper library into the arduino IDE for this
469
+ ******************************************************************************/
470
+
471
+//#define HAVE_TMCDRIVER
472
+#ifdef HAVE_TMCDRIVER
473
+
474
+//	#define X_IS_TMC
475
+	#define X_MAX_CURRENT 1000  //in mA
476
+	#define X_SENSE_RESISTOR 91 //in mOhms
477
+	#define X_MICROSTEPS 16     //number of microsteps
478
+	
479
+//	#define X2_IS_TMC
480
+	#define X2_MAX_CURRENT 1000  //in mA
481
+	#define X2_SENSE_RESISTOR 91 //in mOhms
482
+	#define X2_MICROSTEPS 16     //number of microsteps
483
+	
484
+//	#define Y_IS_TMC
485
+	#define Y_MAX_CURRENT 1000  //in mA
486
+	#define Y_SENSE_RESISTOR 91 //in mOhms
487
+	#define Y_MICROSTEPS 16     //number of microsteps
488
+	
489
+//	#define Y2_IS_TMC
490
+	#define Y2_MAX_CURRENT 1000  //in mA
491
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
492
+	#define Y2_MICROSTEPS 16     //number of microsteps	
493
+	
494
+//	#define Z_IS_TMC
495
+	#define Z_MAX_CURRENT 1000  //in mA
496
+	#define Z_SENSE_RESISTOR 91 //in mOhms
497
+	#define Z_MICROSTEPS 16     //number of microsteps
498
+	
499
+//	#define Z2_IS_TMC
500
+	#define Z2_MAX_CURRENT 1000  //in mA
501
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
502
+	#define Z2_MICROSTEPS 16     //number of microsteps
503
+	
504
+//	#define E0_IS_TMC
505
+	#define E0_MAX_CURRENT 1000  //in mA
506
+	#define E0_SENSE_RESISTOR 91 //in mOhms
507
+	#define E0_MICROSTEPS 16     //number of microsteps
508
+	
509
+//	#define E1_IS_TMC
510
+	#define E1_MAX_CURRENT 1000  //in mA
511
+	#define E1_SENSE_RESISTOR 91 //in mOhms
512
+	#define E1_MICROSTEPS 16     //number of microsteps	
513
+	
514
+//	#define E2_IS_TMC
515
+	#define E2_MAX_CURRENT 1000  //in mA
516
+	#define E2_SENSE_RESISTOR 91 //in mOhms
517
+	#define E2_MICROSTEPS 16     //number of microsteps	
518
+	
519
+//	#define E3_IS_TMC
520
+	#define E3_MAX_CURRENT 1000  //in mA
521
+	#define E3_SENSE_RESISTOR 91 //in mOhms
522
+	#define E3_MICROSTEPS 16     //number of microsteps		
523
+
524
+#endif
525
+
526
+/******************************************************************************\
527
+ * enable this section if you have L6470  motor drivers. 
528
+ * you need to import the L6470 library into the arduino IDE for this
529
+ ******************************************************************************/
530
+
531
+//#define HAVE_L6470DRIVER
532
+#ifdef HAVE_L6470DRIVER
533
+
534
+//	#define X_IS_L6470
535
+	#define X_MICROSTEPS 16     //number of microsteps
536
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
537
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
538
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
539
+	
540
+//	#define X2_IS_L6470
541
+	#define X2_MICROSTEPS 16     //number of microsteps
542
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
543
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545
+	
546
+//	#define Y_IS_L6470
547
+	#define Y_MICROSTEPS 16     //number of microsteps
548
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
549
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551
+	
552
+//	#define Y2_IS_L6470
553
+	#define Y2_MICROSTEPS 16     //number of microsteps	
554
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
555
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
557
+	
558
+//	#define Z_IS_L6470
559
+	#define Z_MICROSTEPS 16     //number of microsteps
560
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
561
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563
+	
564
+//	#define Z2_IS_L6470
565
+	#define Z2_MICROSTEPS 16     //number of microsteps
566
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
567
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569
+	
570
+//	#define E0_IS_L6470
571
+	#define E0_MICROSTEPS 16     //number of microsteps
572
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
573
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575
+	
576
+//	#define E1_IS_L6470
577
+	#define E1_MICROSTEPS 16     //number of microsteps	
578
+	#define E1_MICROSTEPS 16     //number of microsteps
579
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
580
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
581
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
582
+	
583
+//	#define E2_IS_L6470
584
+	#define E2_MICROSTEPS 16     //number of microsteps	
585
+	#define E2_MICROSTEPS 16     //number of microsteps
586
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
587
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
588
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
589
+	
590
+//	#define E3_IS_L6470
591
+	#define E3_MICROSTEPS 16     //number of microsteps		
592
+	#define E3_MICROSTEPS 16     //number of microsteps
593
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
594
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
595
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
596
+	
597
+#endif
598
+
599
+
464 600
 //===========================================================================
465 601
 //=============================  Define Defines  ============================
466 602
 //===========================================================================

+ 27
- 20
Marlin/Marlin.h View File

@@ -32,6 +32,9 @@
32 32
   #include "WProgram.h"
33 33
 #endif
34 34
 
35
+#define BIT(b) (1<<(b))
36
+#define TEST(n,b) (((n)&BIT(b))!=0)
37
+
35 38
 // Arduino < 1.0.0 does not define this, so we need to do it ourselves
36 39
 #ifndef analogInputToDigitalPin
37 40
   #define analogInputToDigitalPin(p) ((p) + 0xA0)
@@ -112,11 +115,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
112 115
 
113 116
 #if defined(DUAL_X_CARRIAGE) && defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 \
114 117
     && defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
115
-  #define  enable_x() do { WRITE(X_ENABLE_PIN, X_ENABLE_ON); WRITE(X2_ENABLE_PIN, X_ENABLE_ON); } while (0)
116
-  #define disable_x() do { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); WRITE(X2_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
118
+  #define  enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
119
+  #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
117 120
 #elif defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1
118
-  #define  enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
119
-  #define disable_x() { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
121
+  #define  enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
122
+  #define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
120 123
 #else
121 124
   #define enable_x() ;
122 125
   #define disable_x() ;
@@ -124,11 +127,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
124 127
 
125 128
 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
126 129
   #ifdef Y_DUAL_STEPPER_DRIVERS
127
-    #define  enable_y() { WRITE(Y_ENABLE_PIN, Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN,  Y_ENABLE_ON); }
128
-    #define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, !Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
130
+    #define  enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
131
+    #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
129 132
   #else
130
-    #define  enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
131
-    #define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
133
+    #define  enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON)
134
+    #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
132 135
   #endif
133 136
 #else
134 137
   #define enable_y() ;
@@ -137,11 +140,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
137 140
 
138 141
 #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
139 142
   #ifdef Z_DUAL_STEPPER_DRIVERS
140
-    #define  enable_z() { WRITE(Z_ENABLE_PIN, Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN, Z_ENABLE_ON); }
141
-    #define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
143
+    #define  enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
144
+    #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
142 145
   #else
143
-    #define  enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
144
-    #define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
146
+    #define  enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON)
147
+    #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
145 148
   #endif
146 149
 #else
147 150
   #define enable_z() ;
@@ -149,32 +152,32 @@ void manage_inactivity(bool ignore_stepper_queue=false);
149 152
 #endif
150 153
 
151 154
 #if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1)
152
-  #define enable_e0() WRITE(E0_ENABLE_PIN, E_ENABLE_ON)
153
-  #define disable_e0() WRITE(E0_ENABLE_PIN,!E_ENABLE_ON)
155
+  #define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON)
156
+  #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
154 157
 #else
155 158
   #define enable_e0()  /* nothing */
156 159
   #define disable_e0() /* nothing */
157 160
 #endif
158 161
 
159 162
 #if (EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
160
-  #define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
161
-  #define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON)
163
+  #define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON)
164
+  #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
162 165
 #else
163 166
   #define enable_e1()  /* nothing */
164 167
   #define disable_e1() /* nothing */
165 168
 #endif
166 169
 
167 170
 #if (EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
168
-  #define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
169
-  #define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON)
171
+  #define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON)
172
+  #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
170 173
 #else
171 174
   #define enable_e2()  /* nothing */
172 175
   #define disable_e2() /* nothing */
173 176
 #endif
174 177
 
175 178
 #if (EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
176
-  #define enable_e3() WRITE(E3_ENABLE_PIN, E_ENABLE_ON)
177
-  #define disable_e3() WRITE(E3_ENABLE_PIN,!E_ENABLE_ON)
179
+  #define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON)
180
+  #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
178 181
 #else
179 182
   #define enable_e3()  /* nothing */
180 183
   #define disable_e3() /* nothing */
@@ -205,6 +208,10 @@ void prepare_move();
205 208
 void kill();
206 209
 void Stop();
207 210
 
211
+#ifdef FILAMENT_RUNOUT_SENSOR
212
+void filrunout();
213
+#endif
214
+
208 215
 bool IsStopped();
209 216
 
210 217
 bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full

+ 12
- 2
Marlin/Marlin.ino View File

@@ -47,10 +47,20 @@
47 47
   #endif
48 48
 #endif
49 49
 
50
-#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
51
-#include <SPI.h>
50
+#if HAS_DIGIPOTSS
51
+  #include <SPI.h>
52 52
 #endif
53 53
 
54 54
 #if defined(DIGIPOT_I2C)
55 55
   #include <Wire.h>
56 56
 #endif
57
+
58
+#ifdef HAVE_TMCDRIVER
59
+  #include <SPI.h>
60
+  #include <TMC26XStepper.h>
61
+#endif
62
+
63
+#ifdef HAVE_L6470DRIVER
64
+  #include <SPI.h>
65
+  #include <L6470.h>
66
+#endif

+ 2
- 2
Marlin/Marlin.pde View File

@@ -47,8 +47,8 @@
47 47
   #endif
48 48
 #endif
49 49
 
50
-#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
51
-#include <SPI.h>
50
+#if HAS_DIGIPOTSS
51
+  #include <SPI.h>
52 52
 #endif
53 53
 
54 54
 #if defined(DIGIPOT_I2C)

+ 1
- 1
Marlin/MarlinSerial.cpp View File

@@ -76,7 +76,7 @@ void MarlinSerial::begin(long baud) {
76 76
   #endif
77 77
   
78 78
   if (useU2X) {
79
-    M_UCSRxA = 1 << M_U2Xx;
79
+    M_UCSRxA = BIT(M_U2Xx);
80 80
     baud_setting = (F_CPU / 4 / baud - 1) / 2;
81 81
   } else {
82 82
     M_UCSRxA = 0;

+ 2
- 2
Marlin/MarlinSerial.h View File

@@ -97,14 +97,14 @@ class MarlinSerial { //: public Stream
97 97
     }
98 98
 
99 99
     FORCE_INLINE void write(uint8_t c) {
100
-      while (!((M_UCSRxA) & (1 << M_UDREx)))
100
+      while (!TEST(M_UCSRxA, M_UDREx))
101 101
         ;
102 102
 
103 103
       M_UDRx = c;
104 104
     }
105 105
 
106 106
     FORCE_INLINE void checkRx(void) {
107
-      if ((M_UCSRxA & (1<<M_RXCx)) != 0) {
107
+      if (TEST(M_UCSRxA, M_RXCx)) {
108 108
         unsigned char c  =  M_UDRx;
109 109
         int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
110 110
 

+ 158
- 90
Marlin/Marlin_main.cpp View File

@@ -62,7 +62,7 @@
62 62
   #include "Servo.h"
63 63
 #endif
64 64
 
65
-#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
65
+#if HAS_DIGIPOTSS
66 66
   #include <SPI.h>
67 67
 #endif
68 68
 
@@ -201,6 +201,10 @@
201 201
 #endif
202 202
 
203 203
 float homing_feedrate[] = HOMING_FEEDRATE;
204
+#ifdef ENABLE_AUTO_BED_LEVELING
205
+int xy_travel_speed = XY_TRAVEL_SPEED;
206
+#endif
207
+int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
204 208
 bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
205 209
 int feedmultiply = 100; //100->1 200->2
206 210
 int saved_feedmultiply;
@@ -369,6 +373,10 @@ bool cancel_heatup = false;
369 373
   int meas_delay_cm = MEASUREMENT_DELAY_CM;  //distance delay setting
370 374
 #endif
371 375
 
376
+#ifdef FILAMENT_RUNOUT_SENSOR
377
+   static bool filrunoutEnqued = false;
378
+#endif
379
+
372 380
 const char errormagic[] PROGMEM = "Error:";
373 381
 const char echomagic[] PROGMEM = "echo:";
374 382
 
@@ -528,6 +536,16 @@ void setup_killpin()
528 536
   #endif
529 537
 }
530 538
 
539
+void setup_filrunoutpin()
540
+{
541
+#if defined(FILRUNOUT_PIN) && FILRUNOUT_PIN > -1
542
+   pinMode(FILRUNOUT_PIN,INPUT);
543
+   #if defined(ENDSTOPPULLUP_FIL_RUNOUT)
544
+      WRITE(FILLRUNOUT_PIN,HIGH);
545
+   #endif
546
+#endif
547
+}
548
+
531 549
 // Set home pin
532 550
 void setup_homepin(void)
533 551
 {
@@ -604,6 +622,7 @@ void servo_init()
604 622
 void setup()
605 623
 {
606 624
   setup_killpin();
625
+  setup_filrunoutpin();
607 626
   setup_powerhold();
608 627
   MYSERIAL.begin(BAUDRATE);
609 628
   SERIAL_PROTOCOLLNPGM("start");
@@ -768,7 +787,7 @@ void get_command()
768 787
           while(cmdbuffer[bufindw][count] != '*') checksum = checksum^cmdbuffer[bufindw][count++];
769 788
           strchr_pointer = strchr(cmdbuffer[bufindw], '*');
770 789
 
771
-          if( (int)(strtod(strchr_pointer + 1, NULL)) != checksum) {
790
+          if(strtol(strchr_pointer + 1, NULL, 10) != checksum) {
772 791
             SERIAL_ERROR_START;
773 792
             SERIAL_ERRORPGM(MSG_ERR_CHECKSUM_MISMATCH);
774 793
             SERIAL_ERRORLN(gcode_LastN);
@@ -804,7 +823,7 @@ void get_command()
804 823
       }
805 824
       if((strchr(cmdbuffer[bufindw], 'G') != NULL)){
806 825
         strchr_pointer = strchr(cmdbuffer[bufindw], 'G');
807
-        switch((int)((strtod(strchr_pointer + 1, NULL)))){
826
+        switch(strtol(strchr_pointer + 1, NULL, 10)){
808 827
         case 0:
809 828
         case 1:
810 829
         case 2:
@@ -1158,7 +1177,18 @@ static void run_z_probe() {
1158 1177
     st_synchronize();
1159 1178
 
1160 1179
     // move back down slowly to find bed
1161
-    feedrate = homing_feedrate[Z_AXIS]/4;
1180
+    
1181
+    if (homing_bump_divisor[Z_AXIS] >= 1)
1182
+    {
1183
+        feedrate = homing_feedrate[Z_AXIS]/homing_bump_divisor[Z_AXIS];
1184
+    } 
1185
+    else
1186
+    {
1187
+        feedrate = homing_feedrate[Z_AXIS]/10;
1188
+        SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1");
1189
+    }
1190
+
1191
+    
1162 1192
     zPosition -= home_retract_mm(Z_AXIS) * 2;
1163 1193
     plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
1164 1194
     st_synchronize();
@@ -1191,7 +1221,7 @@ static void do_blocking_move_to(float x, float y, float z) {
1191 1221
     plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder);
1192 1222
     st_synchronize();
1193 1223
 
1194
-    feedrate = XY_TRAVEL_SPEED;
1224
+    feedrate = xy_travel_speed;
1195 1225
 
1196 1226
     current_position[X_AXIS] = x;
1197 1227
     current_position[Y_AXIS] = y;
@@ -1467,11 +1497,17 @@ static void homeaxis(int axis) {
1467 1497
     st_synchronize();
1468 1498
 
1469 1499
     destination[axis] = 2*home_retract_mm(axis) * axis_home_dir;
1470
-#ifdef DELTA
1471
-    feedrate = homing_feedrate[axis]/10;
1472
-#else
1473
-    feedrate = homing_feedrate[axis]/2 ;
1474
-#endif
1500
+
1501
+    if (homing_bump_divisor[axis] >= 1)
1502
+    {
1503
+        feedrate = homing_feedrate[axis]/homing_bump_divisor[axis];
1504
+    } 
1505
+    else
1506
+    {
1507
+        feedrate = homing_feedrate[axis]/10;
1508
+        SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1");
1509
+    }
1510
+
1475 1511
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
1476 1512
     st_synchronize();
1477 1513
 #ifdef DELTA
@@ -1934,41 +1970,32 @@ inline void gcode_G28() {
1934 1970
 
1935 1971
   #ifdef AUTO_BED_LEVELING_GRID
1936 1972
 
1937
-    #define MIN_PROBE_EDGE 20 // The probe square sides can be no smaller than this
1938
-
1939 1973
     // Make sure probing points are reachable
1940 1974
 
1941 1975
     #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
1942
-      #error The given LEFT_PROBE_BED_POSITION can't be reached by the probe.
1976
+      #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
1943 1977
     #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
1944
-      #error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe.
1978
+      #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
1945 1979
     #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
1946
-      #error The given FRONT_PROBE_BED_POSITION can't be reached by the probe.
1980
+      #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
1947 1981
     #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
1948
-      #error The given BACK_PROBE_BED_POSITION can't be reached by the probe.
1949
-
1950
-    // Check if Probe_Offset * Grid Points is greater than Probing Range
1951
-
1952
-    #elif abs(X_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION
1953
-      #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
1954
-    #elif abs(Y_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION
1955
-      #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
1982
+      #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
1956 1983
     #endif
1957 1984
 
1958 1985
   #else // !AUTO_BED_LEVELING_GRID
1959 1986
 
1960 1987
     #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
1961
-      #error The given ABL_PROBE_PT_1_X can't be reached by the probe.
1988
+      #error "The given ABL_PROBE_PT_1_X can't be reached by the probe."
1962 1989
     #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
1963
-      #error The given ABL_PROBE_PT_2_X can't be reached by the probe.
1990
+      #error "The given ABL_PROBE_PT_2_X can't be reached by the probe."
1964 1991
     #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
1965
-      #error The given ABL_PROBE_PT_3_X can't be reached by the probe.
1992
+      #error "The given ABL_PROBE_PT_3_X can't be reached by the probe."
1966 1993
     #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
1967
-      #error The given ABL_PROBE_PT_1_Y can't be reached by the probe.
1994
+      #error "The given ABL_PROBE_PT_1_Y can't be reached by the probe."
1968 1995
     #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
1969
-      #error The given ABL_PROBE_PT_2_Y can't be reached by the probe.
1996
+      #error "The given ABL_PROBE_PT_2_Y can't be reached by the probe."
1970 1997
     #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
1971
-      #error The given ABL_PROBE_PT_3_Y can't be reached by the probe.
1998
+      #error "The given ABL_PROBE_PT_3_Y can't be reached by the probe."
1972 1999
     #endif
1973 2000
 
1974 2001
   #endif // !AUTO_BED_LEVELING_GRID
@@ -1985,6 +2012,8 @@ inline void gcode_G28() {
1985 2012
    *     Not supported by non-linear delta printer bed leveling.
1986 2013
    *     Example: "G29 P4"
1987 2014
    *
2015
+   *  S  Set the XY travel speed between probe points (in mm/min)
2016
+   *
1988 2017
    *  V  Set the verbose level (0-4). Example: "G29 V3"
1989 2018
    *
1990 2019
    *  T  Generate a Bed Topology Report. Example: "G29 P5 T" for a detailed report.
@@ -2005,12 +2034,6 @@ inline void gcode_G28() {
2005 2034
    *     Usage: "G29 E" or "G29 e"
2006 2035
    *
2007 2036
    */
2008
-
2009
-  // Use one of these defines to specify the origin
2010
-  // for a topographical map to be printed for your bed.
2011
-  enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
2012
-  #define TOPO_ORIGIN OriginFrontLeft
2013
-
2014 2037
   inline void gcode_G29() {
2015 2038
 
2016 2039
     // Prevent user from running a G29 without first homing in X and Y
@@ -2046,12 +2069,14 @@ inline void gcode_G28() {
2046 2069
       int auto_bed_leveling_grid_points = AUTO_BED_LEVELING_GRID_POINTS;
2047 2070
       #ifndef DELTA
2048 2071
         if (code_seen('P')) auto_bed_leveling_grid_points = code_value_long();
2049
-        if (auto_bed_leveling_grid_points < 2 || auto_bed_leveling_grid_points > AUTO_BED_LEVELING_GRID_POINTS) {
2072
+        if (auto_bed_leveling_grid_points < 2) {
2050 2073
           SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n");
2051 2074
           return;
2052 2075
         }
2053 2076
       #endif
2054 2077
 
2078
+      xy_travel_speed = code_seen('S') ? code_value_long() : XY_TRAVEL_SPEED;
2079
+
2055 2080
       int left_probe_bed_position = code_seen('L') ? code_value_long() : LEFT_PROBE_BED_POSITION,
2056 2081
           right_probe_bed_position = code_seen('R') ? code_value_long() : RIGHT_PROBE_BED_POSITION,
2057 2082
           front_probe_bed_position = code_seen('F') ? code_value_long() : FRONT_PROBE_BED_POSITION,
@@ -2228,14 +2253,15 @@ inline void gcode_G28() {
2228 2253
 
2229 2254
       if (verbose_level) {
2230 2255
         SERIAL_PROTOCOLPGM("Eqn coefficients: a: ");
2231
-        SERIAL_PROTOCOL(plane_equation_coefficients[0] + 0.0001);
2256
+        SERIAL_PROTOCOL_F(plane_equation_coefficients[0], 8);
2232 2257
         SERIAL_PROTOCOLPGM(" b: ");
2233
-        SERIAL_PROTOCOL(plane_equation_coefficients[1] + 0.0001);
2258
+        SERIAL_PROTOCOL_F(plane_equation_coefficients[1], 8);
2234 2259
         SERIAL_PROTOCOLPGM(" d: ");
2235
-        SERIAL_PROTOCOLLN(plane_equation_coefficients[2] + 0.0001);
2260
+        SERIAL_PROTOCOL_F(plane_equation_coefficients[2], 8);
2261
+        SERIAL_EOL;
2236 2262
         if (verbose_level > 2) {
2237 2263
           SERIAL_PROTOCOLPGM("Mean of sampled points: ");
2238
-          SERIAL_PROTOCOL_F(mean, 6);
2264
+          SERIAL_PROTOCOL_F(mean, 8);
2239 2265
           SERIAL_EOL;
2240 2266
         }
2241 2267
       }
@@ -2246,15 +2272,20 @@ inline void gcode_G28() {
2246 2272
 
2247 2273
         SERIAL_PROTOCOLPGM(" \nBed Height Topography: \n");
2248 2274
         #if TOPO_ORIGIN == OriginFrontLeft
2275
+          SERIAL_PROTOCOLPGM("+-----------+\n");
2276
+          SERIAL_PROTOCOLPGM("|...Back....|\n");
2277
+          SERIAL_PROTOCOLPGM("|Left..Right|\n");
2278
+          SERIAL_PROTOCOLPGM("|...Front...|\n");
2279
+          SERIAL_PROTOCOLPGM("+-----------+\n");
2249 2280
           for (yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--)
2250 2281
         #else
2251 2282
           for (yy = 0; yy < auto_bed_leveling_grid_points; yy++)
2252 2283
         #endif
2253 2284
           {
2254 2285
             #if TOPO_ORIGIN == OriginBackRight
2255
-              for (xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--)
2256
-            #else
2257 2286
               for (xx = 0; xx < auto_bed_leveling_grid_points; xx++)
2287
+            #else
2288
+              for (xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--)
2258 2289
             #endif
2259 2290
               {
2260 2291
                 int ind =
@@ -2333,6 +2364,11 @@ inline void gcode_G28() {
2333 2364
   #elif not defined(SERVO_ENDSTOPS)
2334 2365
     retract_z_probe();
2335 2366
   #endif
2367
+    
2368
+  #ifdef Z_PROBE_END_SCRIPT
2369
+    enquecommands_P(PSTR(Z_PROBE_END_SCRIPT));
2370
+    st_synchronize();
2371
+  #endif
2336 2372
   }
2337 2373
 
2338 2374
   #ifndef Z_PROBE_SLED
@@ -3480,16 +3516,34 @@ inline void gcode_M203() {
3480 3516
 }
3481 3517
 
3482 3518
 /**
3483
- * M204: Set Default Acceleration and/or Default Filament Acceleration in mm/sec^2 (M204 S3000 T7000)
3519
+ * M204: Set Accelerations in mm/sec^2 (M204 P1200 R3000 T3000)
3484 3520
  *
3485
- *    S = normal moves
3486
- *    T = filament only moves
3521
+ *    P = Printing moves
3522
+ *    R = Retract only (no X, Y, Z) moves
3523
+ *    T = Travel (non printing) moves
3487 3524
  *
3488 3525
  *  Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
3489 3526
  */
3490 3527
 inline void gcode_M204() {
3491
-  if (code_seen('S')) acceleration = code_value();
3492
-  if (code_seen('T')) retract_acceleration = code_value();
3528
+  if (code_seen('P'))
3529
+  {
3530
+    acceleration = code_value();
3531
+    SERIAL_ECHOPAIR("Setting Printing Acceleration: ", acceleration );
3532
+    SERIAL_EOL;
3533
+  }
3534
+  if (code_seen('R'))
3535
+  {
3536
+    retract_acceleration = code_value();
3537
+    SERIAL_ECHOPAIR("Setting Retract Acceleration: ", retract_acceleration );
3538
+    SERIAL_EOL;
3539
+  }
3540
+  if (code_seen('T'))
3541
+  {
3542
+    travel_acceleration = code_value();
3543
+    SERIAL_ECHOPAIR("Setting Travel Acceleration: ", travel_acceleration );
3544
+    SERIAL_EOL;
3545
+  }
3546
+  
3493 3547
 }
3494 3548
 
3495 3549
 /**
@@ -4099,11 +4153,11 @@ inline void gcode_M400() { st_synchronize(); }
4099 4153
 #ifdef FILAMENT_SENSOR
4100 4154
 
4101 4155
   /**
4102
-   * M404: Display or set the nominal filament width (3mm, 1.75mm ) N<3.0>
4156
+   * M404: Display or set the nominal filament width (3mm, 1.75mm ) W<3.0>
4103 4157
    */
4104 4158
   inline void gcode_M404() {
4105 4159
     #if FILWIDTH_PIN > -1
4106
-      if (code_seen('N')) {
4160
+      if (code_seen('W')) {
4107 4161
         filament_width_nominal = code_value();
4108 4162
       }
4109 4163
       else {
@@ -4329,6 +4383,11 @@ inline void gcode_M503() {
4329 4383
       plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], fr60, active_extruder); //move z back
4330 4384
       plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], lastpos[E_AXIS], fr60, active_extruder); //final untretract
4331 4385
     #endif        
4386
+
4387
+    #ifdef FILAMENT_RUNOUT_SENSOR
4388
+      filrunoutEnqued = false;
4389
+    #endif
4390
+    
4332 4391
   }
4333 4392
 
4334 4393
 #endif // FILAMENTCHANGEENABLE
@@ -4383,7 +4442,7 @@ inline void gcode_M503() {
4383 4442
  * M907: Set digital trimpot motor current using axis codes X, Y, Z, E, B, S
4384 4443
  */
4385 4444
 inline void gcode_M907() {
4386
-  #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
4445
+  #if HAS_DIGIPOTSS
4387 4446
     for (int i=0;i<NUM_AXIS;i++)
4388 4447
       if (code_seen(axis_codes[i])) digipot_current(i, code_value());
4389 4448
     if (code_seen('B')) digipot_current(4, code_value());
@@ -4406,7 +4465,7 @@ inline void gcode_M907() {
4406 4465
   #endif
4407 4466
 }
4408 4467
 
4409
-#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
4468
+#if HAS_DIGIPOTSS
4410 4469
 
4411 4470
   /**
4412 4471
    * M908: Control digital trimpot directly (M908 P<pin> S<current>)
@@ -4418,7 +4477,7 @@ inline void gcode_M907() {
4418 4477
       );
4419 4478
   }
4420 4479
 
4421
-#endif // DIGIPOTSS_PIN
4480
+#endif // HAS_DIGIPOTSS
4422 4481
 
4423 4482
 // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
4424 4483
 inline void gcode_M350() {
@@ -4436,7 +4495,7 @@ inline void gcode_M350() {
4436 4495
  */
4437 4496
 inline void gcode_M351() {
4438 4497
   #if defined(X_MS1_PIN) && X_MS1_PIN > -1
4439
-    if (code_seen('S')) switch((int)code_value()) {
4498
+    if (code_seen('S')) switch(code_value_long()) {
4440 4499
       case 1:
4441 4500
         for(int i=0;i<NUM_AXIS;i++) if (code_seen(axis_codes[i])) microstep_ms(i, code_value(), -1);
4442 4501
         if (code_seen('B')) microstep_ms(4, code_value(), -1);
@@ -4635,7 +4694,7 @@ void process_commands() {
4635 4694
   }
4636 4695
 
4637 4696
   else if (code_seen('M')) {
4638
-    switch( (int)code_value() ) {
4697
+    switch( code_value_long() ) {
4639 4698
       #ifdef ULTIPANEL
4640 4699
         case 0: // M0 - Unconditional stop - Wait for user button press on LCD
4641 4700
         case 1: // M1 - Conditional stop - Wait for user button press on LCD
@@ -5005,11 +5064,11 @@ void process_commands() {
5005 5064
         gcode_M907();
5006 5065
         break;
5007 5066
 
5008
-      #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
5067
+      #if HAS_DIGIPOTSS
5009 5068
         case 908: // M908 Control digital trimpot directly.
5010 5069
           gcode_M908();
5011 5070
           break;
5012
-      #endif // DIGIPOTSS_PIN
5071
+      #endif // HAS_DIGIPOTSS
5013 5072
 
5014 5073
       case 350: // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
5015 5074
         gcode_M350();
@@ -5367,41 +5426,34 @@ void prepare_arc_move(char isclockwise) {
5367 5426
   #endif
5368 5427
 #endif
5369 5428
 
5370
-unsigned long lastMotor = 0; //Save the time for when a motor was turned on last
5371
-unsigned long lastMotorCheck = 0;
5429
+unsigned long lastMotor = 0; // Last time a motor was turned on
5430
+unsigned long lastMotorCheck = 0; // Last time the state was checked
5372 5431
 
5373
-void controllerFan()
5374
-{
5375
-  if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
5376
-  {
5377
-    lastMotorCheck = millis();
5378
-	
5379
-    if((READ(X_ENABLE_PIN) == (X_ENABLE_ON)) || (READ(Y_ENABLE_PIN) == (Y_ENABLE_ON)) || (READ(Z_ENABLE_PIN) == (Z_ENABLE_ON)) || (soft_pwm_bed > 0)
5380
-    #if EXTRUDERS > 2
5381
-       || (READ(E2_ENABLE_PIN) == (E_ENABLE_ON))
5382
-    #endif
5383
-    #if EXTRUDER > 1
5384
-      #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5385
-       || (READ(X2_ENABLE_PIN) == (X_ENABLE_ON))
5432
+void controllerFan() {
5433
+  uint32_t ms = millis();
5434
+  if (ms >= lastMotorCheck + 2500) { // Not a time critical function, so we only check every 2500ms
5435
+    lastMotorCheck = ms;
5436
+    if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || soft_pwm_bed > 0
5437
+      || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
5438
+      #if EXTRUDERS > 1
5439
+        || E1_ENABLE_READ == E_ENABLE_ON
5440
+        #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5441
+          || X2_ENABLE_READ == X_ENABLE_ON
5442
+        #endif
5443
+        #if EXTRUDERS > 2
5444
+          || E2_ENABLE_READ == E_ENABLE_ON
5445
+          #if EXTRUDERS > 3
5446
+            || E3_ENABLE_READ == E_ENABLE_ON
5447
+          #endif
5448
+        #endif
5386 5449
       #endif
5387
-       || (READ(E1_ENABLE_PIN) == (E_ENABLE_ON))
5388
-    #endif
5389
-       || (READ(E0_ENABLE_PIN) == (E_ENABLE_ON))) //If any of the drivers are enabled...
5390
-    {
5391
-      lastMotor = millis(); //... set time to NOW so the fan will turn on
5392
-    }
5393
-
5394
-    if ((millis() - lastMotor) >= (CONTROLLERFAN_SECS*1000UL) || lastMotor == 0) //If the last time any driver was enabled, is longer since than CONTROLLERSEC...
5395
-    {
5396
-        digitalWrite(CONTROLLERFAN_PIN, 0);
5397
-        analogWrite(CONTROLLERFAN_PIN, 0);
5398
-    }
5399
-    else
5400
-    {
5401
-        // allows digital or PWM fan output to be used (see M42 handling)
5402
-        digitalWrite(CONTROLLERFAN_PIN, CONTROLLERFAN_SPEED);
5403
-        analogWrite(CONTROLLERFAN_PIN, CONTROLLERFAN_SPEED);
5450
+    ) {
5451
+      lastMotor = ms; //... set time to NOW so the fan will turn on
5404 5452
     }
5453
+    uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? 0 : CONTROLLERFAN_SPEED;
5454
+    // allows digital or PWM fan output to be used (see M42 handling)
5455
+    digitalWrite(CONTROLLERFAN_PIN, speed);
5456
+    analogWrite(CONTROLLERFAN_PIN, speed);
5405 5457
   }
5406 5458
 }
5407 5459
 #endif
@@ -5525,6 +5577,12 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
5525 5577
    const int KILL_DELAY = 10000;
5526 5578
 #endif
5527 5579
 
5580
+#if defined(FILRUNOUT_PIN) && FILRUNOUT_PIN > -1
5581
+    if(card.sdprinting) {
5582
+      if(!(READ(FILRUNOUT_PIN))^FIL_RUNOUT_INVERTING)
5583
+      filrunout();        }
5584
+#endif
5585
+
5528 5586
 #if defined(HOME_PIN) && HOME_PIN > -1
5529 5587
    static int homeDebounceCount = 0;   // poor man's debouncing count
5530 5588
    const int HOME_DEBOUNCE_DELAY = 10000;
@@ -5611,7 +5669,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
5611 5669
     if( (millis() - previous_millis_cmd) >  EXTRUDER_RUNOUT_SECONDS*1000 )
5612 5670
     if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
5613 5671
     {
5614
-     bool oldstatus=READ(E0_ENABLE_PIN);
5672
+     bool oldstatus=E0_ENABLE_READ;
5615 5673
      enable_e0();
5616 5674
      float oldepos=current_position[E_AXIS];
5617 5675
      float oldedes=destination[E_AXIS];
@@ -5623,7 +5681,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
5623 5681
      plan_set_e_position(oldepos);
5624 5682
      previous_millis_cmd=millis();
5625 5683
      st_synchronize();
5626
-     WRITE(E0_ENABLE_PIN,oldstatus);
5684
+     E0_ENABLE_WRITE(oldstatus);
5627 5685
     }
5628 5686
   #endif
5629 5687
   #if defined(DUAL_X_CARRIAGE)
@@ -5673,6 +5731,16 @@ void kill()
5673 5731
   while(1) { /* Intentionally left empty */ } // Wait for reset
5674 5732
 }
5675 5733
 
5734
+#ifdef FILAMENT_RUNOUT_SENSOR
5735
+   void filrunout()
5736
+   {
5737
+      if filrunoutEnqued == false {
5738
+         filrunoutEnqued = true;
5739
+         enquecommand("M600");
5740
+      }
5741
+   }
5742
+#endif
5743
+
5676 5744
 void Stop()
5677 5745
 {
5678 5746
   disable_heater();

+ 9
- 9
Marlin/Sd2Card.cpp View File

@@ -35,14 +35,14 @@
35 35
  */
36 36
 static void spiInit(uint8_t spiRate) {
37 37
   // See avr processor documentation
38
-  SPCR = (1 << SPE) | (1 << MSTR) | (spiRate >> 1);
39
-  SPSR = spiRate & 1 || spiRate == 6 ? 0 : 1 << SPI2X;
38
+  SPCR = BIT(SPE) | BIT(MSTR) | (spiRate >> 1);
39
+  SPSR = spiRate & 1 || spiRate == 6 ? 0 : BIT(SPI2X);
40 40
 }
41 41
 //------------------------------------------------------------------------------
42 42
 /** SPI receive a byte */
43 43
 static uint8_t spiRec() {
44 44
   SPDR = 0XFF;
45
-  while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
45
+  while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
46 46
   return SPDR;
47 47
 }
48 48
 //------------------------------------------------------------------------------
@@ -52,18 +52,18 @@ void spiRead(uint8_t* buf, uint16_t nbyte) {
52 52
   if (nbyte-- == 0) return;
53 53
   SPDR = 0XFF;
54 54
   for (uint16_t i = 0; i < nbyte; i++) {
55
-    while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
55
+    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
56 56
     buf[i] = SPDR;
57 57
     SPDR = 0XFF;
58 58
   }
59
-  while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
59
+  while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
60 60
   buf[nbyte] = SPDR;
61 61
 }
62 62
 //------------------------------------------------------------------------------
63 63
 /** SPI send a byte */
64 64
 static void spiSend(uint8_t b) {
65 65
   SPDR = b;
66
-  while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
66
+  while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
67 67
 }
68 68
 //------------------------------------------------------------------------------
69 69
 /** SPI send block - only one call so force inline */
@@ -71,12 +71,12 @@ static inline __attribute__((always_inline))
71 71
   void spiSendBlock(uint8_t token, const uint8_t* buf) {
72 72
   SPDR = token;
73 73
   for (uint16_t i = 0; i < 512; i += 2) {
74
-    while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
74
+    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
75 75
     SPDR = buf[i];
76
-    while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
76
+    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
77 77
     SPDR = buf[i + 1];
78 78
   }
79
-  while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
79
+  while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
80 80
 }
81 81
 //------------------------------------------------------------------------------
82 82
 #else  // SOFTWARE_SPI

+ 4
- 4
Marlin/Sd2PinMap.h View File

@@ -334,9 +334,9 @@ static inline __attribute__((always_inline))
334 334
   void setPinMode(uint8_t pin, uint8_t mode) {
335 335
   if (__builtin_constant_p(pin) && pin < digitalPinCount) {
336 336
     if (mode) {
337
-      *digitalPinMap[pin].ddr |= 1 << digitalPinMap[pin].bit;
337
+      *digitalPinMap[pin].ddr |= BIT(digitalPinMap[pin].bit);
338 338
     } else {
339
-      *digitalPinMap[pin].ddr &= ~(1 << digitalPinMap[pin].bit);
339
+      *digitalPinMap[pin].ddr &= ~BIT(digitalPinMap[pin].bit);
340 340
     }
341 341
   } else {
342 342
     badPinNumber();
@@ -354,9 +354,9 @@ static inline __attribute__((always_inline))
354 354
   void fastDigitalWrite(uint8_t pin, uint8_t value) {
355 355
   if (__builtin_constant_p(pin) && pin < digitalPinCount) {
356 356
     if (value) {
357
-      *digitalPinMap[pin].port |= 1 << digitalPinMap[pin].bit;
357
+      *digitalPinMap[pin].port |= BIT(digitalPinMap[pin].bit);
358 358
     } else {
359
-      *digitalPinMap[pin].port &= ~(1 << digitalPinMap[pin].bit);
359
+      *digitalPinMap[pin].port &= ~BIT(digitalPinMap[pin].bit);
360 360
     }
361 361
   } else {
362 362
     badPinNumber();

+ 2
- 2
Marlin/SdBaseFile.h View File

@@ -171,9 +171,9 @@ static inline uint8_t FAT_SECOND(uint16_t fatTime) {
171 171
   return 2*(fatTime & 0X1F);
172 172
 }
173 173
 /** Default date for file timestamps is 1 Jan 2000 */
174
-uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
174
+uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | BIT(5) | 1;
175 175
 /** Default time for file timestamp is 1 am */
176
-uint16_t const FAT_DEFAULT_TIME = (1 << 11);
176
+uint16_t const FAT_DEFAULT_TIME = BIT(11);
177 177
 //------------------------------------------------------------------------------
178 178
 /**
179 179
  * \class SdBaseFile

+ 1
- 1
Marlin/SdVolume.cpp View File

@@ -360,7 +360,7 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
360 360
   blocksPerCluster_ = fbs->sectorsPerCluster;
361 361
   // determine shift that is same as multiply by blocksPerCluster_
362 362
   clusterSizeShift_ = 0;
363
-  while (blocksPerCluster_ != (1 << clusterSizeShift_)) {
363
+  while (blocksPerCluster_ != BIT(clusterSizeShift_)) {
364 364
     // error if not power of 2
365 365
     if (clusterSizeShift_++ > 7) goto fail;
366 366
   }

+ 1
- 0
Marlin/boards.h View File

@@ -14,6 +14,7 @@
14 14
 #define BOARD_RAMPS_13_EEB      34   // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
15 15
 #define BOARD_RAMPS_13_EFF      35   // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
16 16
 #define BOARD_RAMPS_13_EEF      36   // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
17
+#define BOARD_FELIX2            37   // Felix 2.0+ Electronics Board (RAMPS like)
17 18
 #define BOARD_DUEMILANOVE_328P  4    // Duemilanove w/ ATMega328P pin assignments
18 19
 #define BOARD_GEN6              5    // Gen6
19 20
 #define BOARD_GEN6_DELUXE       51   // Gen6 deluxe

+ 903
- 0
Marlin/configurator/config/Configuration.h View File

@@ -0,0 +1,903 @@
1
+#ifndef CONFIGURATION_H
2
+#define CONFIGURATION_H
3
+
4
+#include "boards.h"
5
+
6
+//===========================================================================
7
+//============================= Getting Started =============================
8
+//===========================================================================
9
+/*
10
+Here are some standard links for getting your machine calibrated:
11
+ * http://reprap.org/wiki/Calibration
12
+ * http://youtu.be/wAL9d7FgInk
13
+ * http://calculator.josefprusa.cz
14
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
15
+ * http://www.thingiverse.com/thing:5573
16
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
17
+ * http://www.thingiverse.com/thing:298812
18
+*/
19
+
20
+// This configuration file contains the basic settings.
21
+// Advanced settings can be found in Configuration_adv.h
22
+// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
23
+
24
+//===========================================================================
25
+//============================= DELTA Printer ===============================
26
+//===========================================================================
27
+// For a Delta printer replace the configuration files with the files in the
28
+// example_configurations/delta directory.
29
+//
30
+
31
+//===========================================================================
32
+//============================= SCARA Printer ===============================
33
+//===========================================================================
34
+// For a Delta printer replace the configuration files with the files in the
35
+// example_configurations/SCARA directory.
36
+//
37
+
38
+// @section info
39
+
40
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
41
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
42
+// build by the user have been successfully uploaded into firmware.
43
+#define STRING_VERSION "1.0.2"
44
+#define STRING_URL "reprap.org"
45
+#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
46
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
47
+#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
48
+//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
49
+
50
+// @section machine
51
+
52
+// SERIAL_PORT selects which serial port should be used for communication with the host.
53
+// This allows the connection of wireless adapters (for instance) to non-default port pins.
54
+// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
55
+// :[0,1,2,3,4,5,6,7]
56
+#define SERIAL_PORT 0
57
+
58
+// This determines the communication speed of the printer
59
+// :[2400,9600,19200,38400,57600,115200,250000]
60
+#define BAUDRATE 250000
61
+
62
+// This enables the serial port associated to the Bluetooth interface
63
+//#define BTENABLED              // Enable BT interface on AT90USB devices
64
+
65
+// The following define selects which electronics board you have.
66
+// Please choose the name from boards.h that matches your setup
67
+#ifndef MOTHERBOARD
68
+  #define MOTHERBOARD BOARD_ULTIMAKER
69
+#endif
70
+
71
+// Define this to set a custom name for your generic Mendel,
72
+// #define CUSTOM_MENDEL_NAME "This Mendel"
73
+
74
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
75
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
76
+// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
77
+
78
+// This defines the number of extruders
79
+// :[1,2,3,4]
80
+#define EXTRUDERS 1
81
+
82
+//// The following define selects which power supply you have. Please choose the one that matches your setup
83
+// 1 = ATX
84
+// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
85
+// :{1:'ATX',2:'X-Box 360'}
86
+#define POWER_SUPPLY 1
87
+
88
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
89
+// #define PS_DEFAULT_OFF
90
+
91
+// @section temperature
92
+
93
+//===========================================================================
94
+//============================= Thermal Settings ============================
95
+//===========================================================================
96
+//
97
+//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
98
+//
99
+//// Temperature sensor settings:
100
+// -2 is thermocouple with MAX6675 (only for sensor 0)
101
+// -1 is thermocouple with AD595
102
+// 0 is not used
103
+// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
104
+// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
105
+// 3 is Mendel-parts thermistor (4.7k pullup)
106
+// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
107
+// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
108
+// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
109
+// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
110
+// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
111
+// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
112
+// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
113
+// 10 is 100k RS thermistor 198-961 (4.7k pullup)
114
+// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
115
+// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
116
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
117
+// 20 is the PT100 circuit found in the Ultimainboard V2.x
118
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
119
+//
120
+//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
121
+//                          (but gives greater accuracy and more stable PID)
122
+// 51 is 100k thermistor - EPCOS (1k pullup)
123
+// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
124
+// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
125
+//
126
+// 1047 is Pt1000 with 4k7 pullup
127
+// 1010 is Pt1000 with 1k pullup (non standard)
128
+// 147 is Pt100 with 4k7 pullup
129
+// 110 is Pt100 with 1k pullup (non standard)
130
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
131
+//     Use it for Testing or Development purposes. NEVER for production machine.
132
+//     #define DUMMY_THERMISTOR_998_VALUE 25
133
+//     #define DUMMY_THERMISTOR_999_VALUE 100
134
+// :{ 0: "Not used", 4: "10k !! do not use for a hotend. Bad resolution at high temp. !!", 1: "100k / 4.7k - EPCOS", 51: "100k / 1k - EPCOS", 6: "100k / 4.7k EPCOS - Not as accurate as Table 1", 5: "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", 7: "100k / 4.7k Honeywell 135-104LAG-J01", 71: "100k / 4.7k Honeywell 135-104LAF-J01", 8: "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", 9: "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", 10: "100k / 4.7k RS 198-961", 11: "100k / 4.7k beta 3950 1%", 12: "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", 13: "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", 60: "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", 55: "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", 2: "200k / 4.7k - ATC Semitec 204GT-2", 52: "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", 3: "Mendel-parts / 4.7k", 1047: "Pt1000 / 4.7k", 1010: "Pt1000 / 1k (non standard)", 20: "PT100 (Ultimainboard V2.x)", 147: "Pt100 / 4.7k", 110: "Pt100 / 1k (non-standard)", 998: "Dummy 1", 999: "Dummy 2" }
135
+#define TEMP_SENSOR_0 -1
136
+#define TEMP_SENSOR_1 -1
137
+#define TEMP_SENSOR_2 0
138
+#define TEMP_SENSOR_3 0
139
+#define TEMP_SENSOR_BED 0
140
+
141
+// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
142
+//#define TEMP_SENSOR_1_AS_REDUNDANT
143
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
144
+
145
+// Actual temperature must be close to target for this long before M109 returns success
146
+#define TEMP_RESIDENCY_TIME 10  // (seconds)
147
+#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
148
+#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
149
+
150
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
151
+// to check that the wiring to the thermistor is not broken.
152
+// Otherwise this would lead to the heater being powered on all the time.
153
+#define HEATER_0_MINTEMP 5
154
+#define HEATER_1_MINTEMP 5
155
+#define HEATER_2_MINTEMP 5
156
+#define HEATER_3_MINTEMP 5
157
+#define BED_MINTEMP 5
158
+
159
+// When temperature exceeds max temp, your heater will be switched off.
160
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
161
+// You should use MINTEMP for thermistor short/failure protection.
162
+#define HEATER_0_MAXTEMP 275
163
+#define HEATER_1_MAXTEMP 275
164
+#define HEATER_2_MAXTEMP 275
165
+#define HEATER_3_MAXTEMP 275
166
+#define BED_MAXTEMP 150
167
+
168
+// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
169
+// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
170
+// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
171
+//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
172
+
173
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
174
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
175
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
176
+
177
+//===========================================================================
178
+//============================= PID Settings ================================
179
+//===========================================================================
180
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
181
+
182
+// Comment the following line to disable PID and enable bang-bang.
183
+#define PIDTEMP
184
+#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
185
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
186
+#ifdef PIDTEMP
187
+  //#define PID_DEBUG // Sends debug data to the serial port.
188
+  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
189
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
190
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
191
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
192
+  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
193
+                                  // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
194
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
195
+  #define K1 0.95 //smoothing factor within the PID
196
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
197
+
198
+// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
199
+// Ultimaker
200
+    #define  DEFAULT_Kp 22.2
201
+    #define  DEFAULT_Ki 1.08
202
+    #define  DEFAULT_Kd 114
203
+
204
+// MakerGear
205
+//    #define  DEFAULT_Kp 7.0
206
+//    #define  DEFAULT_Ki 0.1
207
+//    #define  DEFAULT_Kd 12
208
+
209
+// Mendel Parts V9 on 12V
210
+//    #define  DEFAULT_Kp 63.0
211
+//    #define  DEFAULT_Ki 2.25
212
+//    #define  DEFAULT_Kd 440
213
+#endif // PIDTEMP
214
+
215
+//===========================================================================
216
+//============================= PID > Bed Temperature Control ===============
217
+//===========================================================================
218
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
219
+//
220
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
221
+// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
222
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
223
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
224
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
225
+// shouldn't use bed PID until someone else verifies your hardware works.
226
+// If this is enabled, find your own PID constants below.
227
+//#define PIDTEMPBED
228
+//
229
+//#define BED_LIMIT_SWITCHING
230
+
231
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
232
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
233
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
234
+// so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
235
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
236
+
237
+#ifdef PIDTEMPBED
238
+//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
239
+//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
240
+    #define  DEFAULT_bedKp 10.00
241
+    #define  DEFAULT_bedKi .023
242
+    #define  DEFAULT_bedKd 305.4
243
+
244
+//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
245
+//from pidautotune
246
+//    #define  DEFAULT_bedKp 97.1
247
+//    #define  DEFAULT_bedKi 1.41
248
+//    #define  DEFAULT_bedKd 1675.16
249
+
250
+// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
251
+#endif // PIDTEMPBED
252
+
253
+// @section extruder
254
+
255
+//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
256
+//can be software-disabled for whatever purposes by
257
+#define PREVENT_DANGEROUS_EXTRUDE
258
+//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
259
+#define PREVENT_LENGTHY_EXTRUDE
260
+
261
+#define EXTRUDE_MINTEMP 170
262
+#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
263
+
264
+//===========================================================================
265
+//============================= Thermal Runaway Protection ==================
266
+//===========================================================================
267
+/*
268
+This is a feature to protect your printer from burn up in flames if it has
269
+a thermistor coming off place (this happened to a friend of mine recently and
270
+motivated me writing this feature).
271
+
272
+The issue: If a thermistor come off, it will read a lower temperature than actual.
273
+The system will turn the heater on forever, burning up the filament and anything
274
+else around.
275
+
276
+After the temperature reaches the target for the first time, this feature will 
277
+start measuring for how long the current temperature stays below the target 
278
+minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
279
+
280
+If it stays longer than _PERIOD, it means the thermistor temperature
281
+cannot catch up with the target, so something *may be* wrong. Then, to be on the
282
+safe side, the system will he halt.
283
+
284
+Bear in mind the count down will just start AFTER the first time the 
285
+thermistor temperature is over the target, so you will have no problem if
286
+your extruder heater takes 2 minutes to hit the target on heating.
287
+
288
+*/
289
+// If you want to enable this feature for all your extruder heaters,
290
+// uncomment the 2 defines below:
291
+
292
+// Parameters for all extruder heaters
293
+//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
294
+//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
295
+
296
+// If you want to enable this feature for your bed heater,
297
+// uncomment the 2 defines below:
298
+
299
+// Parameters for the bed heater
300
+//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
301
+//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
302
+
303
+
304
+//===========================================================================
305
+//============================= Mechanical Settings =========================
306
+//===========================================================================
307
+
308
+// @section machine
309
+
310
+// Uncomment this option to enable CoreXY kinematics
311
+// #define COREXY
312
+
313
+// Enable this option for Toshiba steppers
314
+// #define CONFIG_STEPPERS_TOSHIBA
315
+
316
+// @section homing
317
+
318
+// coarse Endstop Settings
319
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
320
+
321
+#ifndef ENDSTOPPULLUPS
322
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
323
+  // #define ENDSTOPPULLUP_XMAX
324
+  // #define ENDSTOPPULLUP_YMAX
325
+  // #define ENDSTOPPULLUP_ZMAX
326
+  // #define ENDSTOPPULLUP_XMIN
327
+  // #define ENDSTOPPULLUP_YMIN
328
+  // #define ENDSTOPPULLUP_ZMIN
329
+#endif
330
+
331
+#ifdef ENDSTOPPULLUPS
332
+  #define ENDSTOPPULLUP_XMAX
333
+  #define ENDSTOPPULLUP_YMAX
334
+  #define ENDSTOPPULLUP_ZMAX
335
+  #define ENDSTOPPULLUP_XMIN
336
+  #define ENDSTOPPULLUP_YMIN
337
+  #define ENDSTOPPULLUP_ZMIN
338
+#endif
339
+
340
+// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
341
+const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
342
+const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
343
+const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
344
+const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
345
+const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
346
+const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
347
+//#define DISABLE_MAX_ENDSTOPS
348
+//#define DISABLE_MIN_ENDSTOPS
349
+
350
+// @section machine
351
+
352
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
353
+// :{0:'Low',1:'High'}
354
+#define X_ENABLE_ON 0
355
+#define Y_ENABLE_ON 0
356
+#define Z_ENABLE_ON 0
357
+#define E_ENABLE_ON 0 // For all extruders
358
+
359
+// Disables axis when it's not being used.
360
+#define DISABLE_X false
361
+#define DISABLE_Y false
362
+#define DISABLE_Z false
363
+
364
+// @section extruder
365
+
366
+#define DISABLE_E false // For all extruders
367
+#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
368
+
369
+// @section machine
370
+
371
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
372
+#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
373
+#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
374
+#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
375
+
376
+// @section extruder
377
+
378
+// For direct drive extruder v9 set to true, for geared extruder set to false.
379
+#define INVERT_E0_DIR false   // Direct drive extruder v9: true. Geared extruder: false
380
+#define INVERT_E1_DIR false   // Direct drive extruder v9: true. Geared extruder: false
381
+#define INVERT_E2_DIR false   // Direct drive extruder v9: true. Geared extruder: false
382
+#define INVERT_E3_DIR false   // Direct drive extruder v9: true. Geared extruder: false
383
+
384
+// @section homing
385
+
386
+// ENDSTOP SETTINGS:
387
+// Sets direction of endstops when homing; 1=MAX, -1=MIN
388
+// :[-1,1]
389
+#define X_HOME_DIR -1
390
+#define Y_HOME_DIR -1
391
+#define Z_HOME_DIR -1
392
+
393
+#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
394
+#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
395
+
396
+// @section machine
397
+
398
+// Travel limits after homing (units are in mm)
399
+#define X_MIN_POS 0
400
+#define Y_MIN_POS 0
401
+#define Z_MIN_POS 0
402
+#define X_MAX_POS 205
403
+#define Y_MAX_POS 205
404
+#define Z_MAX_POS 200
405
+
406
+// @section hidden
407
+
408
+#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
409
+#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
410
+#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
411
+
412
+
413
+//===========================================================================
414
+//============================= Bed Auto Leveling ===========================
415
+//===========================================================================
416
+
417
+// @section bedlevel
418
+
419
+//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
420
+#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
421
+
422
+#ifdef ENABLE_AUTO_BED_LEVELING
423
+
424
+  // There are 2 different ways to specify probing locations
425
+  //
426
+  // - "grid" mode
427
+  //   Probe several points in a rectangular grid.
428
+  //   You specify the rectangle and the density of sample points.
429
+  //   This mode is preferred because there are more measurements.
430
+  //
431
+  // - "3-point" mode
432
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
433
+  //   You specify the XY coordinates of all 3 points.
434
+
435
+  // Enable this to sample the bed in a grid (least squares solution)
436
+  // Note: this feature generates 10KB extra code size
437
+  #define AUTO_BED_LEVELING_GRID
438
+
439
+  #ifdef AUTO_BED_LEVELING_GRID
440
+
441
+    // Use one of these defines to specify the origin
442
+    // for a topographical map to be printed for your bed.
443
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
444
+    #define TOPO_ORIGIN OriginFrontLeft
445
+
446
+    // The edges of the rectangle in which to probe
447
+    #define LEFT_PROBE_BED_POSITION 15
448
+    #define RIGHT_PROBE_BED_POSITION 170
449
+    #define FRONT_PROBE_BED_POSITION 20
450
+    #define BACK_PROBE_BED_POSITION 170
451
+
452
+    // Set the number of grid points per dimension
453
+    // You probably don't need more than 3 (squared=9)
454
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
455
+
456
+
457
+  #else  // !AUTO_BED_LEVELING_GRID
458
+
459
+      // Arbitrary points to probe. A simple cross-product
460
+      // is used to estimate the plane of the bed.
461
+      #define ABL_PROBE_PT_1_X 15
462
+      #define ABL_PROBE_PT_1_Y 180
463
+      #define ABL_PROBE_PT_2_X 15
464
+      #define ABL_PROBE_PT_2_Y 20
465
+      #define ABL_PROBE_PT_3_X 170
466
+      #define ABL_PROBE_PT_3_Y 20
467
+
468
+  #endif // AUTO_BED_LEVELING_GRID
469
+
470
+
471
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
472
+  // X and Y offsets must be integers
473
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
474
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
475
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
476
+
477
+  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
478
+                                        // Be sure you have this distance over your Z_MAX_POS in case
479
+
480
+  #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
481
+
482
+  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
483
+  #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
484
+
485
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
486
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
487
+
488
+  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
489
+  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
490
+  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
491
+
492
+//  #define PROBE_SERVO_DEACTIVATION_DELAY 300
493
+
494
+
495
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
496
+//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
497
+
498
+  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
499
+                          // When defined, it will:
500
+                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
501
+                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
502
+                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
503
+                          // - Block Z homing only when the probe is outside bed area.
504
+
505
+  #ifdef Z_SAFE_HOMING
506
+
507
+    #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
508
+    #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)
509
+
510
+  #endif
511
+
512
+#endif // ENABLE_AUTO_BED_LEVELING
513
+
514
+
515
+// @section homing
516
+
517
+// The position of the homing switches
518
+//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
519
+//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
520
+
521
+// Manual homing switch locations:
522
+// For deltabots this means top and center of the Cartesian print volume.
523
+#ifdef MANUAL_HOME_POSITIONS
524
+  #define MANUAL_X_HOME_POS 0
525
+  #define MANUAL_Y_HOME_POS 0
526
+  #define MANUAL_Z_HOME_POS 0
527
+  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
528
+#endif
529
+
530
+// @section movement
531
+
532
+//// MOVEMENT SETTINGS
533
+#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
534
+#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
535
+
536
+// default settings
537
+
538
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
539
+#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
540
+#define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
541
+
542
+#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
543
+#define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
544
+
545
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
546
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
547
+// For the other hotends it is their distance from the extruder 0 hotend.
548
+// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
549
+// #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
550
+
551
+// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
552
+#define DEFAULT_XYJERK                20.0    // (mm/sec)
553
+#define DEFAULT_ZJERK                 0.4     // (mm/sec)
554
+#define DEFAULT_EJERK                 5.0    // (mm/sec)
555
+
556
+
557
+//=============================================================================
558
+//============================= Additional Features ===========================
559
+//=============================================================================
560
+
561
+// @section more
562
+
563
+// Custom M code points
564
+#define CUSTOM_M_CODES
565
+#ifdef CUSTOM_M_CODES
566
+  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
567
+  #define Z_PROBE_OFFSET_RANGE_MIN -15
568
+  #define Z_PROBE_OFFSET_RANGE_MAX -5
569
+#endif
570
+
571
+// @section extras
572
+
573
+// EEPROM
574
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
575
+// M500 - stores parameters in EEPROM
576
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
577
+// M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
578
+//define this to enable EEPROM support
579
+//#define EEPROM_SETTINGS
580
+//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
581
+// please keep turned on if you can.
582
+//#define EEPROM_CHITCHAT
583
+
584
+// @section temperature
585
+
586
+// Preheat Constants
587
+#define PLA_PREHEAT_HOTEND_TEMP 180
588
+#define PLA_PREHEAT_HPB_TEMP 70
589
+#define PLA_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
590
+
591
+#define ABS_PREHEAT_HOTEND_TEMP 240
592
+#define ABS_PREHEAT_HPB_TEMP 100
593
+#define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
594
+
595
+//==============================LCD and SD support=============================
596
+// @section lcd
597
+
598
+// Define your display language below. Replace (en) with your language code and uncomment.
599
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
600
+// See also language.h
601
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
602
+
603
+// Character based displays can have different extended charsets.
604
+#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
605
+//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
606
+
607
+//#define ULTRA_LCD  //general LCD support, also 16x2
608
+//#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
609
+//#define SDSUPPORT // Enable SD Card Support in Hardware Console
610
+//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
611
+//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
612
+//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
613
+//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
614
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
615
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
616
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
617
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
618
+
619
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
620
+// http://reprap.org/wiki/PanelOne
621
+//#define PANEL_ONE
622
+
623
+// The MaKr3d Makr-Panel with graphic controller and SD support
624
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
625
+//#define MAKRPANEL
626
+
627
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
628
+// http://panucatt.com
629
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
630
+//#define VIKI2
631
+//#define miniVIKI
632
+
633
+// The RepRapDiscount Smart Controller (white PCB)
634
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
635
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
636
+
637
+// The GADGETS3D G3D LCD/SD Controller (blue PCB)
638
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
639
+//#define G3D_PANEL
640
+
641
+// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
642
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
643
+//
644
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
645
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
646
+
647
+// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
648
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
649
+//#define REPRAPWORLD_KEYPAD
650
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
651
+
652
+// The Elefu RA Board Control Panel
653
+// http://www.elefu.com/index.php?route=product/product&product_id=53
654
+// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
655
+//#define RA_CONTROL_PANEL
656
+
657
+// @section hidden
658
+
659
+//automatic expansion
660
+#if defined (MAKRPANEL)
661
+ #define DOGLCD
662
+ #define SDSUPPORT
663
+ #define ULTIPANEL
664
+ #define NEWPANEL
665
+ #define DEFAULT_LCD_CONTRAST 17
666
+#endif
667
+
668
+#if defined(miniVIKI) || defined(VIKI2)
669
+ #define ULTRA_LCD  //general LCD support, also 16x2
670
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
671
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
672
+ 
673
+  #ifdef miniVIKI
674
+   #define DEFAULT_LCD_CONTRAST 95
675
+  #else
676
+   #define DEFAULT_LCD_CONTRAST 40
677
+  #endif
678
+  
679
+ #define ENCODER_PULSES_PER_STEP 4
680
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
681
+#endif
682
+
683
+#if defined (PANEL_ONE)
684
+ #define SDSUPPORT
685
+ #define ULTIMAKERCONTROLLER
686
+#endif
687
+
688
+#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
689
+ #define DOGLCD
690
+ #define U8GLIB_ST7920
691
+ #define REPRAP_DISCOUNT_SMART_CONTROLLER
692
+#endif
693
+
694
+#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
695
+ #define ULTIPANEL
696
+ #define NEWPANEL
697
+#endif
698
+
699
+#if defined(REPRAPWORLD_KEYPAD)
700
+  #define NEWPANEL
701
+  #define ULTIPANEL
702
+#endif
703
+#if defined(RA_CONTROL_PANEL)
704
+ #define ULTIPANEL
705
+ #define NEWPANEL
706
+ #define LCD_I2C_TYPE_PCA8574
707
+ #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
708
+#endif
709
+
710
+//I2C PANELS
711
+
712
+//#define LCD_I2C_SAINSMART_YWROBOT
713
+#ifdef LCD_I2C_SAINSMART_YWROBOT
714
+  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
715
+  // Make sure it is placed in the Arduino libraries directory.
716
+  #define LCD_I2C_TYPE_PCF8575
717
+  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
718
+  #define NEWPANEL
719
+  #define ULTIPANEL
720
+#endif
721
+
722
+// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
723
+//#define LCD_I2C_PANELOLU2
724
+#ifdef LCD_I2C_PANELOLU2
725
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
726
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
727
+  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
728
+  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
729
+  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
730
+  #define LCD_I2C_TYPE_MCP23017
731
+  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
732
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
733
+  #define NEWPANEL
734
+  #define ULTIPANEL
735
+
736
+  #ifndef ENCODER_PULSES_PER_STEP
737
+	#define ENCODER_PULSES_PER_STEP 4
738
+  #endif
739
+
740
+  #ifndef ENCODER_STEPS_PER_MENU_ITEM
741
+	#define ENCODER_STEPS_PER_MENU_ITEM 1
742
+  #endif
743
+
744
+
745
+  #ifdef LCD_USE_I2C_BUZZER
746
+	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
747
+	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
748
+  #endif
749
+
750
+#endif
751
+
752
+// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
753
+//#define LCD_I2C_VIKI
754
+#ifdef LCD_I2C_VIKI
755
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
756
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
757
+  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
758
+  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
759
+  #define LCD_I2C_TYPE_MCP23017
760
+  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
761
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
762
+  #define NEWPANEL
763
+  #define ULTIPANEL
764
+#endif
765
+
766
+// Shift register panels
767
+// ---------------------
768
+// 2 wire Non-latching LCD SR from:
769
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
770
+
771
+//#define SAV_3DLCD
772
+#ifdef SAV_3DLCD
773
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
774
+   #define NEWPANEL
775
+   #define ULTIPANEL
776
+#endif
777
+
778
+
779
+#ifdef ULTIPANEL
780
+//  #define NEWPANEL  //enable this if you have a click-encoder panel
781
+  #define SDSUPPORT
782
+  #define ULTRA_LCD
783
+  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
784
+    #define LCD_WIDTH 22
785
+    #define LCD_HEIGHT 5
786
+  #else
787
+    #define LCD_WIDTH 20
788
+    #define LCD_HEIGHT 4
789
+  #endif
790
+#else //no panel but just LCD
791
+  #ifdef ULTRA_LCD
792
+  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
793
+    #define LCD_WIDTH 22
794
+    #define LCD_HEIGHT 5
795
+  #else
796
+    #define LCD_WIDTH 16
797
+    #define LCD_HEIGHT 2
798
+  #endif
799
+  #endif
800
+#endif
801
+
802
+// @section lcd
803
+
804
+// default LCD contrast for dogm-like LCD displays
805
+#ifdef DOGLCD
806
+# ifndef DEFAULT_LCD_CONTRAST
807
+#  define DEFAULT_LCD_CONTRAST 32
808
+# endif
809
+#endif
810
+
811
+// @section extras
812
+
813
+// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
814
+//#define FAST_PWM_FAN
815
+
816
+// Temperature status LEDs that display the hotend and bet temperature.
817
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
818
+// Otherwise the RED led is on. There is 1C hysteresis.
819
+//#define TEMP_STAT_LEDS
820
+
821
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
822
+// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
823
+// is too low, you should also increment SOFT_PWM_SCALE.
824
+//#define FAN_SOFT_PWM
825
+
826
+// Incrementing this by 1 will double the software PWM frequency,
827
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
828
+// However, control resolution will be halved for each increment;
829
+// at zero value, there are 128 effective control positions.
830
+#define SOFT_PWM_SCALE 0
831
+
832
+// M240  Triggers a camera by emulating a Canon RC-1 Remote
833
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
834
+// #define PHOTOGRAPH_PIN     23
835
+
836
+// SF send wrong arc g-codes when using Arc Point as fillet procedure
837
+//#define SF_ARC_FIX
838
+
839
+// Support for the BariCUDA Paste Extruder.
840
+//#define BARICUDA
841
+
842
+//define BlinkM/CyzRgb Support
843
+//#define BLINKM
844
+
845
+/*********************************************************************\
846
+* R/C SERVO support
847
+* Sponsored by TrinityLabs, Reworked by codexmas
848
+**********************************************************************/
849
+
850
+// Number of servos
851
+//
852
+// If you select a configuration below, this will receive a default value and does not need to be set manually
853
+// set it manually if you have more servos than extruders and wish to manually control some
854
+// leaving it undefined or defining as 0 will disable the servo subsystem
855
+// If unsure, leave commented / disabled
856
+//
857
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
858
+
859
+// Servo Endstops
860
+//
861
+// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
862
+// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500.
863
+//
864
+//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
865
+//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
866
+
867
+/**********************************************************************\
868
+ * Support for a filament diameter sensor
869
+ * Also allows adjustment of diameter at print time (vs  at slicing)
870
+ * Single extruder only at this point (extruder 0)
871
+ * 
872
+ * Motherboards
873
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
874
+ * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
875
+ * 301 - Rambo  - uses Analog input 3
876
+ * Note may require analog pins to be defined for different motherboards
877
+ **********************************************************************/
878
+// Uncomment below to enable
879
+//#define FILAMENT_SENSOR
880
+
881
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
882
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
883
+
884
+#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
885
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
886
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
887
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
888
+
889
+//defines used in the code
890
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
891
+
892
+//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
893
+//#define FILAMENT_LCD_DISPLAY
894
+
895
+
896
+
897
+
898
+
899
+
900
+#include "Configuration_adv.h"
901
+#include "thermistortables.h"
902
+
903
+#endif //__CONFIGURATION_H

+ 584
- 0
Marlin/configurator/config/Configuration_adv.h View File

@@ -0,0 +1,584 @@
1
+#ifndef CONFIGURATION_ADV_H
2
+#define CONFIGURATION_ADV_H
3
+
4
+// @section temperature
5
+
6
+//===========================================================================
7
+//=============================Thermal Settings  ============================
8
+//===========================================================================
9
+
10
+#ifdef BED_LIMIT_SWITCHING
11
+  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
12
+#endif
13
+#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
14
+
15
+//// Heating sanity check:
16
+// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
17
+// If the temperature has not increased at the end of that period, the target temperature is set to zero.
18
+// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
19
+//  differ by at least 2x WATCH_TEMP_INCREASE
20
+//#define WATCH_TEMP_PERIOD 40000 //40 seconds
21
+//#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
22
+
23
+#ifdef PIDTEMP
24
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
25
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
26
+  #define PID_ADD_EXTRUSION_RATE
27
+  #ifdef PID_ADD_EXTRUSION_RATE
28
+    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
29
+  #endif
30
+#endif
31
+
32
+
33
+//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
34
+//The maximum buffered steps/sec of the extruder motor are called "se".
35
+//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
36
+// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
37
+// you exit the value by any M109 without F*
38
+// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
39
+// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
40
+#define AUTOTEMP
41
+#ifdef AUTOTEMP
42
+  #define AUTOTEMP_OLDWEIGHT 0.98
43
+#endif
44
+
45
+//Show Temperature ADC value
46
+//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
47
+//#define SHOW_TEMP_ADC_VALUES
48
+
49
+// @section extruder
50
+
51
+//  extruder run-out prevention.
52
+//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
53
+//#define EXTRUDER_RUNOUT_PREVENT
54
+#define EXTRUDER_RUNOUT_MINTEMP 190
55
+#define EXTRUDER_RUNOUT_SECONDS 30.
56
+#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
57
+#define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
58
+#define EXTRUDER_RUNOUT_EXTRUDE 100
59
+
60
+// @section temperature
61
+
62
+//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
63
+//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
64
+#define TEMP_SENSOR_AD595_OFFSET 0.0
65
+#define TEMP_SENSOR_AD595_GAIN   1.0
66
+
67
+//This is for controlling a fan to cool down the stepper drivers
68
+//it will turn on when any driver is enabled
69
+//and turn off after the set amount of seconds from last driver being disabled again
70
+#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
71
+#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
72
+#define CONTROLLERFAN_SPEED 255  // == full speed
73
+
74
+// When first starting the main fan, run it at full speed for the
75
+// given number of milliseconds.  This gets the fan spinning reliably
76
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
77
+//#define FAN_KICKSTART_TIME 100
78
+
79
+// @section extruder
80
+
81
+// Extruder cooling fans
82
+// Configure fan pin outputs to automatically turn on/off when the associated
83
+// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
84
+// Multiple extruders can be assigned to the same pin in which case
85
+// the fan will turn on when any selected extruder is above the threshold.
86
+#define EXTRUDER_0_AUTO_FAN_PIN -1
87
+#define EXTRUDER_1_AUTO_FAN_PIN -1
88
+#define EXTRUDER_2_AUTO_FAN_PIN -1
89
+#define EXTRUDER_3_AUTO_FAN_PIN -1
90
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
91
+#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
92
+
93
+
94
+//===========================================================================
95
+//=============================Mechanical Settings===========================
96
+//===========================================================================
97
+
98
+// @section homing
99
+
100
+#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
101
+
102
+
103
+// @section hidden
104
+
105
+
106
+//// AUTOSET LOCATIONS OF LIMIT SWITCHES
107
+//// Added by ZetaPhoenix 09-15-2012
108
+#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
109
+  #define X_HOME_POS MANUAL_X_HOME_POS
110
+  #define Y_HOME_POS MANUAL_Y_HOME_POS
111
+  #define Z_HOME_POS MANUAL_Z_HOME_POS
112
+#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
113
+  //X axis
114
+  #if X_HOME_DIR == -1
115
+    #ifdef BED_CENTER_AT_0_0
116
+      #define X_HOME_POS X_MAX_LENGTH * -0.5
117
+    #else
118
+      #define X_HOME_POS X_MIN_POS
119
+    #endif //BED_CENTER_AT_0_0
120
+  #else
121
+    #ifdef BED_CENTER_AT_0_0
122
+      #define X_HOME_POS X_MAX_LENGTH * 0.5
123
+    #else
124
+      #define X_HOME_POS X_MAX_POS
125
+    #endif //BED_CENTER_AT_0_0
126
+  #endif //X_HOME_DIR == -1
127
+
128
+  //Y axis
129
+  #if Y_HOME_DIR == -1
130
+    #ifdef BED_CENTER_AT_0_0
131
+      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
132
+    #else
133
+      #define Y_HOME_POS Y_MIN_POS
134
+    #endif //BED_CENTER_AT_0_0
135
+  #else
136
+    #ifdef BED_CENTER_AT_0_0
137
+      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
138
+    #else
139
+      #define Y_HOME_POS Y_MAX_POS
140
+    #endif //BED_CENTER_AT_0_0
141
+  #endif //Y_HOME_DIR == -1
142
+
143
+  // Z axis
144
+  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
145
+    #define Z_HOME_POS Z_MIN_POS
146
+  #else
147
+    #define Z_HOME_POS Z_MAX_POS
148
+  #endif //Z_HOME_DIR == -1
149
+#endif //End auto min/max positions
150
+//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
151
+
152
+// @section extras
153
+
154
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
155
+
156
+// A single Z stepper driver is usually used to drive 2 stepper motors.
157
+// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
158
+// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
159
+// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
160
+// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
161
+//#define Z_DUAL_STEPPER_DRIVERS
162
+
163
+#ifdef Z_DUAL_STEPPER_DRIVERS
164
+  #undef EXTRUDERS
165
+  #define EXTRUDERS 1
166
+#endif
167
+
168
+// Same again but for Y Axis.
169
+//#define Y_DUAL_STEPPER_DRIVERS
170
+
171
+// Define if the two Y drives need to rotate in opposite directions
172
+#define INVERT_Y2_VS_Y_DIR true
173
+
174
+#ifdef Y_DUAL_STEPPER_DRIVERS
175
+  #undef EXTRUDERS
176
+  #define EXTRUDERS 1
177
+#endif
178
+
179
+#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
180
+  #error "You cannot have dual drivers for both Y and Z"
181
+#endif
182
+
183
+// Enable this for dual x-carriage printers.
184
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
185
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
186
+// allowing faster printing speeds.
187
+//#define DUAL_X_CARRIAGE
188
+#ifdef DUAL_X_CARRIAGE
189
+// Configuration for second X-carriage
190
+// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
191
+// the second x-carriage always homes to the maximum endstop.
192
+#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
193
+#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
194
+#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
195
+#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
196
+    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
197
+    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
198
+    // without modifying the firmware (through the "M218 T1 X???" command).
199
+    // Remember: you should set the second extruder x-offset to 0 in your slicer.
200
+
201
+// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
202
+#define X2_ENABLE_PIN 29
203
+#define X2_STEP_PIN 25
204
+#define X2_DIR_PIN 23
205
+
206
+// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
207
+//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
208
+//                           as long as it supports dual x-carriages. (M605 S0)
209
+//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
210
+//                           that additional slicer support is not required. (M605 S1)
211
+//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
212
+//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
213
+//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
214
+
215
+// This is the default power-up mode which can be later using M605.
216
+#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
217
+
218
+// Default settings in "Auto-park Mode"
219
+#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
220
+#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
221
+
222
+// Default x offset in duplication mode (typically set to half print bed width)
223
+#define DEFAULT_DUPLICATION_X_OFFSET 100
224
+
225
+#endif //DUAL_X_CARRIAGE
226
+
227
+// @section homing
228
+
229
+//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
230
+#define X_HOME_RETRACT_MM 5
231
+#define Y_HOME_RETRACT_MM 5
232
+#define Z_HOME_RETRACT_MM 2
233
+//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
234
+
235
+// @section machine
236
+
237
+#define AXIS_RELATIVE_MODES {false, false, false, false}
238
+
239
+// @section hidden
240
+
241
+#ifdef CONFIG_STEPPERS_TOSHIBA
242
+  #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
243
+#else
244
+  #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
245
+#endif
246
+
247
+// @section machine
248
+
249
+//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
250
+#define INVERT_X_STEP_PIN false
251
+#define INVERT_Y_STEP_PIN false
252
+#define INVERT_Z_STEP_PIN false
253
+#define INVERT_E_STEP_PIN false
254
+
255
+//default stepper release if idle. Set to 0 to deactivate.
256
+#define DEFAULT_STEPPER_DEACTIVE_TIME 60
257
+
258
+#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
259
+#define DEFAULT_MINTRAVELFEEDRATE     0.0
260
+
261
+// @section lcd
262
+
263
+// Feedrates for manual moves along X, Y, Z, E from panel
264
+#ifdef ULTIPANEL
265
+#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
266
+#endif
267
+
268
+//Comment to disable setting feedrate multiplier via encoder
269
+#ifdef ULTIPANEL
270
+    #define ULTIPANEL_FEEDMULTIPLY
271
+#endif
272
+
273
+// @section extras
274
+
275
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
276
+#define DEFAULT_MINSEGMENTTIME        20000
277
+
278
+// If defined the movements slow down when the look ahead buffer is only half full
279
+#define SLOWDOWN
280
+
281
+// Frequency limit
282
+// See nophead's blog for more info
283
+// Not working O
284
+//#define XY_FREQUENCY_LIMIT  15
285
+
286
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
287
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
288
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
289
+#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
290
+
291
+// MS1 MS2 Stepper Driver Microstepping mode table
292
+#define MICROSTEP1 LOW,LOW
293
+#define MICROSTEP2 HIGH,LOW
294
+#define MICROSTEP4 LOW,HIGH
295
+#define MICROSTEP8 HIGH,HIGH
296
+#define MICROSTEP16 HIGH,HIGH
297
+
298
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
299
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
300
+
301
+// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
302
+#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
303
+
304
+// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
305
+//#define DIGIPOT_I2C
306
+// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
307
+#define DIGIPOT_I2C_NUM_CHANNELS 8
308
+// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
309
+#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
310
+
311
+//===========================================================================
312
+//=============================Additional Features===========================
313
+//===========================================================================
314
+
315
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
316
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
317
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
318
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
319
+
320
+//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
321
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
322
+
323
+// @section lcd
324
+
325
+#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
326
+#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
327
+
328
+#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
329
+// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
330
+// using:
331
+//#define MENU_ADDAUTOSTART
332
+
333
+// Show a progress bar on HD44780 LCDs for SD printing
334
+//#define LCD_PROGRESS_BAR
335
+
336
+#ifdef LCD_PROGRESS_BAR
337
+  // Amount of time (ms) to show the bar
338
+  #define PROGRESS_BAR_BAR_TIME 2000
339
+  // Amount of time (ms) to show the status message
340
+  #define PROGRESS_BAR_MSG_TIME 3000
341
+  // Amount of time (ms) to retain the status message (0=forever)
342
+  #define PROGRESS_MSG_EXPIRE   0
343
+  // Enable this to show messages for MSG_TIME then hide them
344
+  //#define PROGRESS_MSG_ONCE
345
+  #ifdef DOGLCD
346
+    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
347
+  #endif
348
+  #ifdef FILAMENT_LCD_DISPLAY
349
+    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
350
+  #endif
351
+#endif
352
+
353
+// @section more
354
+
355
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
356
+//#define USE_WATCHDOG
357
+
358
+#ifdef USE_WATCHDOG
359
+// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
360
+// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
361
+//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
362
+//#define WATCHDOG_RESET_MANUAL
363
+#endif
364
+
365
+// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
366
+//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
367
+
368
+// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
369
+// it can e.g. be used to change z-positions in the print startup phase in real-time
370
+// does not respect endstops!
371
+//#define BABYSTEPPING
372
+#ifdef BABYSTEPPING
373
+  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
374
+  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
375
+  #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
376
+
377
+  #ifdef COREXY
378
+    #error BABYSTEPPING not implemented for COREXY yet.
379
+  #endif
380
+
381
+  #ifdef DELTA
382
+    #ifdef BABYSTEP_XY
383
+      #error BABYSTEPPING only implemented for Z axis on deltabots.
384
+    #endif
385
+  #endif
386
+#endif
387
+
388
+// extruder advance constant (s2/mm3)
389
+//
390
+// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
391
+//
392
+// Hooke's law says:		force = k * distance
393
+// Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
394
+// so: v ^ 2 is proportional to number of steps we advance the extruder
395
+//#define ADVANCE
396
+
397
+#ifdef ADVANCE
398
+  #define EXTRUDER_ADVANCE_K .0
399
+
400
+  #define D_FILAMENT 2.85
401
+  #define STEPS_MM_E 836
402
+  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
403
+  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
404
+
405
+#endif // ADVANCE
406
+
407
+// Arc interpretation settings:
408
+#define MM_PER_ARC_SEGMENT 1
409
+#define N_ARC_CORRECTION 25
410
+
411
+const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
412
+
413
+// @section lcd
414
+
415
+// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
416
+// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
417
+// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
418
+// be commented out otherwise
419
+#define SDCARDDETECTINVERTED
420
+
421
+// @section hidden
422
+
423
+#ifdef ULTIPANEL
424
+ #undef SDCARDDETECTINVERTED
425
+#endif
426
+
427
+// Power Signal Control Definitions
428
+// By default use ATX definition
429
+#ifndef POWER_SUPPLY
430
+  #define POWER_SUPPLY 1
431
+#endif
432
+// 1 = ATX
433
+#if (POWER_SUPPLY == 1)
434
+  #define PS_ON_AWAKE  LOW
435
+  #define PS_ON_ASLEEP HIGH
436
+#endif
437
+// 2 = X-Box 360 203W
438
+#if (POWER_SUPPLY == 2)
439
+  #define PS_ON_AWAKE  HIGH
440
+  #define PS_ON_ASLEEP LOW
441
+#endif
442
+
443
+// @section temperature
444
+
445
+// Control heater 0 and heater 1 in parallel.
446
+//#define HEATERS_PARALLEL
447
+
448
+//===========================================================================
449
+//=============================Buffers           ============================
450
+//===========================================================================
451
+
452
+// @section hidden
453
+
454
+// The number of linear motions that can be in the plan at any give time.
455
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
456
+#if defined SDSUPPORT
457
+  #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
458
+#else
459
+  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
460
+#endif
461
+
462
+// @section more
463
+
464
+//The ASCII buffer for receiving from the serial:
465
+#define MAX_CMD_SIZE 96
466
+#define BUFSIZE 4
467
+
468
+// @section extras
469
+
470
+// Firmware based and LCD controlled retract
471
+// M207 and M208 can be used to define parameters for the retraction.
472
+// The retraction can be called by the slicer using G10 and G11
473
+// until then, intended retractions can be detected by moves that only extrude and the direction.
474
+// the moves are than replaced by the firmware controlled ones.
475
+
476
+// #define FWRETRACT  //ONLY PARTIALLY TESTED
477
+#ifdef FWRETRACT
478
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
479
+  #define RETRACT_LENGTH 3               //default retract length (positive mm)
480
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
481
+  #define RETRACT_FEEDRATE 45            //default feedrate for retracting (mm/s)
482
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
483
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
484
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
485
+  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
486
+#endif
487
+
488
+//adds support for experimental filament exchange support M600; requires display
489
+#ifdef ULTIPANEL
490
+  #define FILAMENTCHANGEENABLE
491
+  #ifdef FILAMENTCHANGEENABLE
492
+    #define FILAMENTCHANGE_XPOS 3
493
+    #define FILAMENTCHANGE_YPOS 3
494
+    #define FILAMENTCHANGE_ZADD 10
495
+    #define FILAMENTCHANGE_FIRSTRETRACT -2
496
+    #define FILAMENTCHANGE_FINALRETRACT -100
497
+  #endif
498
+#endif
499
+
500
+#ifdef FILAMENTCHANGEENABLE
501
+  #ifdef EXTRUDER_RUNOUT_PREVENT
502
+    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
503
+  #endif
504
+#endif
505
+
506
+//===========================================================================
507
+//=============================  Define Defines  ============================
508
+//===========================================================================
509
+
510
+// @section hidden
511
+
512
+#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
513
+  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
514
+#endif
515
+
516
+#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
517
+  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
518
+#endif
519
+
520
+#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
521
+  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
522
+#endif
523
+
524
+#if TEMP_SENSOR_0 > 0
525
+  #define THERMISTORHEATER_0 TEMP_SENSOR_0
526
+  #define HEATER_0_USES_THERMISTOR
527
+#endif
528
+#if TEMP_SENSOR_1 > 0
529
+  #define THERMISTORHEATER_1 TEMP_SENSOR_1
530
+  #define HEATER_1_USES_THERMISTOR
531
+#endif
532
+#if TEMP_SENSOR_2 > 0
533
+  #define THERMISTORHEATER_2 TEMP_SENSOR_2
534
+  #define HEATER_2_USES_THERMISTOR
535
+#endif
536
+#if TEMP_SENSOR_3 > 0
537
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
538
+  #define HEATER_3_USES_THERMISTOR
539
+#endif
540
+#if TEMP_SENSOR_BED > 0
541
+  #define THERMISTORBED TEMP_SENSOR_BED
542
+  #define BED_USES_THERMISTOR
543
+#endif
544
+#if TEMP_SENSOR_0 == -1
545
+  #define HEATER_0_USES_AD595
546
+#endif
547
+#if TEMP_SENSOR_1 == -1
548
+  #define HEATER_1_USES_AD595
549
+#endif
550
+#if TEMP_SENSOR_2 == -1
551
+  #define HEATER_2_USES_AD595
552
+#endif
553
+#if TEMP_SENSOR_3 == -1
554
+  #define HEATER_3_USES_AD595
555
+#endif
556
+#if TEMP_SENSOR_BED == -1
557
+  #define BED_USES_AD595
558
+#endif
559
+#if TEMP_SENSOR_0 == -2
560
+  #define HEATER_0_USES_MAX6675
561
+#endif
562
+#if TEMP_SENSOR_0 == 0
563
+  #undef HEATER_0_MINTEMP
564
+  #undef HEATER_0_MAXTEMP
565
+#endif
566
+#if TEMP_SENSOR_1 == 0
567
+  #undef HEATER_1_MINTEMP
568
+  #undef HEATER_1_MAXTEMP
569
+#endif
570
+#if TEMP_SENSOR_2 == 0
571
+  #undef HEATER_2_MINTEMP
572
+  #undef HEATER_2_MAXTEMP
573
+#endif
574
+#if TEMP_SENSOR_3 == 0
575
+  #undef HEATER_3_MINTEMP
576
+  #undef HEATER_3_MAXTEMP
577
+#endif
578
+#if TEMP_SENSOR_BED == 0
579
+  #undef BED_MINTEMP
580
+  #undef BED_MAXTEMP
581
+#endif
582
+
583
+
584
+#endif //__CONFIGURATION_ADV_H

+ 1
- 0
Marlin/configurator/config/_htaccess View File

@@ -0,0 +1 @@
1
+Header set Access-Control-Allow-Origin "*"

+ 59
- 0
Marlin/configurator/config/boards.h View File

@@ -0,0 +1,59 @@
1
+#ifndef BOARDS_H
2
+#define BOARDS_H
3
+
4
+#define BOARD_UNKNOWN -1
5
+
6
+#define BOARD_GEN7_CUSTOM       10   // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
7
+#define BOARD_GEN7_12           11   // Gen7 v1.1, v1.2
8
+#define BOARD_GEN7_13           12   // Gen7 v1.3
9
+#define BOARD_GEN7_14           13   // Gen7 v1.4
10
+#define BOARD_CHEAPTRONIC       2    // Cheaptronic v1.0
11
+#define BOARD_SETHI             20   // Sethi 3D_1
12
+#define BOARD_RAMPS_OLD         3    // MEGA/RAMPS up to 1.2
13
+#define BOARD_RAMPS_13_EFB      33   // RAMPS 1.3 / 1.4 (Extruder, Fan, Bed)
14
+#define BOARD_RAMPS_13_EEB      34   // RAMPS 1.3 / 1.4 (Extruder0, Extruder1, Bed)
15
+#define BOARD_RAMPS_13_EFF      35   // RAMPS 1.3 / 1.4 (Extruder, Fan, Fan)
16
+#define BOARD_RAMPS_13_EEF      36   // RAMPS 1.3 / 1.4 (Extruder0, Extruder1, Fan)
17
+#define BOARD_DUEMILANOVE_328P  4    // Duemilanove w/ ATMega328P pin assignments
18
+#define BOARD_GEN6              5    // Gen6
19
+#define BOARD_GEN6_DELUXE       51   // Gen6 deluxe
20
+#define BOARD_SANGUINOLOLU_11   6    // Sanguinololu < 1.2
21
+#define BOARD_SANGUINOLOLU_12   62   // Sanguinololu 1.2 and above
22
+#define BOARD_MELZI             63   // Melzi
23
+#define BOARD_STB_11            64   // STB V1.1
24
+#define BOARD_AZTEEG_X1         65   // Azteeg X1
25
+#define BOARD_MELZI_1284        66   // Melzi with ATmega1284 (MaKr3d version)
26
+#define BOARD_AZTEEG_X3         67   // Azteeg X3
27
+#define BOARD_AZTEEG_X3_PRO     68   // Azteeg X3 Pro
28
+#define BOARD_ULTIMAKER         7    // Ultimaker
29
+#define BOARD_ULTIMAKER_OLD     71   // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
30
+#define BOARD_ULTIMAIN_2        72   // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
31
+#define BOARD_3DRAG             77   // 3Drag
32
+#define BOARD_K8200             78   // Vellemann K8200 (derived from 3Drag)
33
+#define BOARD_TEENSYLU          8    // Teensylu
34
+#define BOARD_RUMBA             80   // Rumba
35
+#define BOARD_PRINTRBOARD       81   // Printrboard (AT90USB1286)
36
+#define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
37
+#define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
38
+#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
39
+#define BOARD_GEN3_PLUS         9    // Gen3+
40
+#define BOARD_GEN3_MONOLITHIC   22   // Gen3 Monolithic Electronics
41
+#define BOARD_MEGATRONICS       70   // Megatronics
42
+#define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
43
+#define BOARD_MEGATRONICS_1     702  // Minitronics v1.0
44
+#define BOARD_MEGATRONICS_3     703  // Megatronics v3.0
45
+#define BOARD_OMCA_A            90   // Alpha OMCA board
46
+#define BOARD_OMCA              91   // Final OMCA board
47
+#define BOARD_RAMBO             301  // Rambo
48
+#define BOARD_ELEFU_3           21   // Elefu Ra Board (v3)
49
+#define BOARD_5DPRINT           88   // 5DPrint D8 Driver Board
50
+#define BOARD_LEAPFROG          999  // Leapfrog
51
+#define BOARD_WITBOX            41   // bq WITBOX
52
+#define BOARD_HEPHESTOS         42   // bq Prusa i3 Hephestos
53
+
54
+#define BOARD_99                99   // This is in pins.h but...?
55
+
56
+#define MB(board) (MOTHERBOARD==BOARD_##board)
57
+#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
58
+
59
+#endif //__BOARDS_H

+ 228
- 0
Marlin/configurator/config/language.h View File

@@ -0,0 +1,228 @@
1
+#ifndef LANGUAGE_H
2
+#define LANGUAGE_H
3
+
4
+#include "Configuration.h"
5
+
6
+#define LANGUAGE_CONCAT(M)       #M
7
+#define GENERATE_LANGUAGE_INCLUDE(M)  LANGUAGE_CONCAT(language_##M.h)
8
+
9
+
10
+// NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
11
+//
12
+//   ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
13
+//   ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
14
+
15
+// Languages
16
+// en    English
17
+// pl    Polish
18
+// fr    French
19
+// de    German
20
+// es    Spanish
21
+// ru    Russian
22
+// it    Italian
23
+// pt    Portuguese
24
+// pt-br Portuguese (Brazil)
25
+// fi    Finnish
26
+// an    Aragonese
27
+// nl    Dutch
28
+// ca    Catalan
29
+// eu    Basque-Euskera
30
+
31
+#ifndef LANGUAGE_INCLUDE
32
+  // pick your language from the list above
33
+  #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
34
+#endif
35
+
36
+#define PROTOCOL_VERSION "1.0"
37
+#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin"
38
+
39
+#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
40
+  #define MACHINE_NAME "Ultimaker"
41
+  #define FIRMWARE_URL "http://firmware.ultimaker.com"
42
+#elif MB(RUMBA)
43
+  #define MACHINE_NAME "Rumba"
44
+#elif MB(3DRAG)
45
+  #define MACHINE_NAME "3Drag"
46
+  #define FIRMWARE_URL "http://3dprint.elettronicain.it/"
47
+#elif MB(K8200)
48
+  #define MACHINE_NAME "K8200"
49
+#elif MB(5DPRINT)
50
+  #define MACHINE_NAME "Makibox"
51
+#elif MB(SAV_MKI)
52
+  #define MACHINE_NAME "SAV MkI"
53
+  #define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
54
+#elif MB(WITBOX)
55
+  #define MACHINE_NAME "WITBOX"
56
+  #define FIRMWARE_URL "http://www.bq.com/gb/downloads-witbox.html"
57
+#elif MB(HEPHESTOS)
58
+  #define MACHINE_NAME "HEPHESTOS"
59
+  #define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html"
60
+#else // Default firmware set to Mendel
61
+  #define MACHINE_NAME "Mendel"
62
+#endif
63
+
64
+#ifdef CUSTOM_MENDEL_NAME
65
+  #define MACHINE_NAME CUSTOM_MENDEL_NAME
66
+#endif
67
+
68
+#ifndef MACHINE_UUID
69
+   #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
70
+#endif
71
+
72
+
73
+#define STRINGIFY_(n) #n
74
+#define STRINGIFY(n) STRINGIFY_(n)
75
+
76
+
77
+// Common LCD messages
78
+
79
+  /* nothing here yet */
80
+
81
+// Common serial messages
82
+#define MSG_MARLIN "Marlin"
83
+
84
+// Serial Console Messages (do not translate those!)
85
+
86
+#define MSG_Enqueing                        "enqueing \""
87
+#define MSG_POWERUP                         "PowerUp"
88
+#define MSG_EXTERNAL_RESET                  " External Reset"
89
+#define MSG_BROWNOUT_RESET                  " Brown out Reset"
90
+#define MSG_WATCHDOG_RESET                  " Watchdog Reset"
91
+#define MSG_SOFTWARE_RESET                  " Software Reset"
92
+#define MSG_AUTHOR                          " | Author: "
93
+#define MSG_CONFIGURATION_VER               " Last Updated: "
94
+#define MSG_FREE_MEMORY                     " Free Memory: "
95
+#define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
96
+#define MSG_OK                              "ok"
97
+#define MSG_FILE_SAVED                      "Done saving file."
98
+#define MSG_ERR_LINE_NO                     "Line Number is not Last Line Number+1, Last Line: "
99
+#define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
100
+#define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
101
+#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
102
+#define MSG_FILE_PRINTED                    "Done printing file"
103
+#define MSG_BEGIN_FILE_LIST                 "Begin file list"
104
+#define MSG_END_FILE_LIST                   "End file list"
105
+#define MSG_M104_INVALID_EXTRUDER           "M104 Invalid extruder "
106
+#define MSG_M105_INVALID_EXTRUDER           "M105 Invalid extruder "
107
+#define MSG_M200_INVALID_EXTRUDER           "M200 Invalid extruder "
108
+#define MSG_M218_INVALID_EXTRUDER           "M218 Invalid extruder "
109
+#define MSG_M221_INVALID_EXTRUDER           "M221 Invalid extruder "
110
+#define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
111
+#define MSG_M109_INVALID_EXTRUDER           "M109 Invalid extruder "
112
+#define MSG_HEATING                         "Heating..."
113
+#define MSG_HEATING_COMPLETE                "Heating done."
114
+#define MSG_BED_HEATING                     "Bed Heating."
115
+#define MSG_BED_DONE                        "Bed done."
116
+#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
117
+#define MSG_COUNT_X                         " Count X: "
118
+#define MSG_ERR_KILLED                      "Printer halted. kill() called!"
119
+#define MSG_ERR_STOPPED                     "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
120
+#define MSG_RESEND                          "Resend: "
121
+#define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
122
+#define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
123
+#define MSG_INVALID_EXTRUDER                "Invalid extruder"
124
+#define MSG_X_MIN                           "x_min: "
125
+#define MSG_X_MAX                           "x_max: "
126
+#define MSG_Y_MIN                           "y_min: "
127
+#define MSG_Y_MAX                           "y_max: "
128
+#define MSG_Z_MIN                           "z_min: "
129
+#define MSG_Z_MAX                           "z_max: "
130
+#define MSG_M119_REPORT                     "Reporting endstop status"
131
+#define MSG_ENDSTOP_HIT                     "TRIGGERED"
132
+#define MSG_ENDSTOP_OPEN                    "open"
133
+#define MSG_HOTEND_OFFSET                   "Hotend offsets:"
134
+
135
+#define MSG_SD_CANT_OPEN_SUBDIR             "Cannot open subdir"
136
+#define MSG_SD_INIT_FAIL                    "SD init fail"
137
+#define MSG_SD_VOL_INIT_FAIL                "volume.init failed"
138
+#define MSG_SD_OPENROOT_FAIL                "openRoot failed"
139
+#define MSG_SD_CARD_OK                      "SD card ok"
140
+#define MSG_SD_WORKDIR_FAIL                 "workDir open failed"
141
+#define MSG_SD_OPEN_FILE_FAIL               "open failed, File: "
142
+#define MSG_SD_FILE_OPENED                  "File opened: "
143
+#define MSG_SD_SIZE                         " Size: "
144
+#define MSG_SD_FILE_SELECTED                "File selected"
145
+#define MSG_SD_WRITE_TO_FILE                "Writing to file: "
146
+#define MSG_SD_PRINTING_BYTE                "SD printing byte "
147
+#define MSG_SD_NOT_PRINTING                 "Not SD printing"
148
+#define MSG_SD_ERR_WRITE_TO_FILE            "error writing to file"
149
+#define MSG_SD_CANT_ENTER_SUBDIR            "Cannot enter subdir: "
150
+
151
+#define MSG_STEPPER_TOO_HIGH                "Steprate too high: "
152
+#define MSG_ENDSTOPS_HIT                    "endstops hit: "
153
+#define MSG_ERR_COLD_EXTRUDE_STOP           " cold extrusion prevented"
154
+#define MSG_ERR_LONG_EXTRUDE_STOP           " too long extrusion prevented"
155
+#define MSG_BABYSTEPPING_X                  "Babystepping X"
156
+#define MSG_BABYSTEPPING_Y                  "Babystepping Y"
157
+#define MSG_BABYSTEPPING_Z                  "Babystepping Z"
158
+#define MSG_SERIAL_ERROR_MENU_STRUCTURE     "Error in menu structure"
159
+
160
+#define MSG_ERR_EEPROM_WRITE                "Error writing to EEPROM!"
161
+
162
+// LCD Menu Messages
163
+
164
+// Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos
165
+//                                and https://www.sparkfun.com/datasheets/LCD/HD44780.pdf page 17-18
166
+#ifdef DOGLCD
167
+  #define STR_Ae "\304"               // 'Ä' U8glib
168
+  #define STR_ae "\344"               // 'ä'
169
+  #define STR_Oe "\326"               // 'Ö'
170
+  #define STR_oe STR_Oe               // 'ö'
171
+  #define STR_Ue "\334"               // 'Ü'
172
+  #define STR_ue STR_Ue               // 'ü'
173
+  #define STR_sz "\337"               // 'ß'
174
+  #define STR_h2 "\262"               // '²'
175
+  #define STR_h3 "\263"               // '³'
176
+  #define STR_Deg "\260"              // '°'
177
+  #define STR_THERMOMETER "\377"
178
+#else
179
+  #ifdef DISPLAY_CHARSET_HD44780_JAPAN // HD44780 ROM Code: A00 (Japan)
180
+    #define STR_ae "\xe1"
181
+    #define STR_Ae STR_ae
182
+    #define STR_oe "\357"
183
+    #define STR_Oe STR_oe
184
+    #define STR_ue "\365"
185
+    #define STR_Ue STR_ue
186
+    #define STR_sz "\342"
187
+    #define STR_h2 "2"
188
+    #define STR_h3 "3"
189
+    #define STR_Deg "\271"
190
+    #define STR_THERMOMETER "\002"
191
+  #endif
192
+  #ifdef DISPLAY_CHARSET_HD44780_WESTERN // HD44780 ROM Code: A02 (Western)
193
+    #define STR_Ae "\216"
194
+    #define STR_ae "\204"
195
+    #define STR_Oe "\211"
196
+    #define STR_oe "\204"
197
+    #define STR_Ue "\212"
198
+    #define STR_ue "\201"
199
+    #define STR_sz "\160"
200
+    #define STR_h2 "\262"
201
+    #define STR_h3 "\263"
202
+    #define STR_Deg "\337"
203
+    #define STR_THERMOMETER "\002"
204
+  #endif
205
+#endif
206
+/*
207
+#define TESTSTRING000 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
208
+#define TESTSTRING020 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
209
+#define TESTSTRING040 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
210
+#define TESTSTRING060 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
211
+#define TESTSTRING100 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
212
+#define TESTSTRING120 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
213
+#define TESTSTRING140 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
214
+#define TESTSTRING160 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
215
+#define TESTSTRING200 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
216
+#define TESTSTRING220 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
217
+#define TESTSTRING240 "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
218
+#define TESTSTRING260 "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
219
+#define TESTSTRING300 "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
220
+#define TESTSTRING320 "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
221
+#define TESTSTRING340 "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
222
+#define TESTSTRING360 "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
223
+*/
224
+
225
+#include LANGUAGE_INCLUDE
226
+#include "language_en.h"
227
+
228
+#endif //__LANGUAGE_H

+ 344
- 0
Marlin/configurator/css/configurator.css View File

@@ -0,0 +1,344 @@
1
+/* configurator.css */
2
+/* Styles for Marlin Configurator */
3
+
4
+.clear { clear: both; }
5
+
6
+/* Prevent selection except PRE tags */
7
+* {
8
+    -webkit-touch-callout: none;
9
+    -webkit-user-select: none;
10
+    -khtml-user-select: none;
11
+    -moz-user-select: none;
12
+    -ms-user-select: none;
13
+    user-select: none;
14
+	}
15
+pre {
16
+    -webkit-touch-callout: text;
17
+    -webkit-user-select: text;
18
+    -khtml-user-select: text;
19
+    -moz-user-select: text;
20
+    -ms-user-select: text;
21
+    user-select: text;
22
+	}
23
+
24
+body { margin: 0; padding: 0; background: #56A; color: #000; font-family: monospace; }
25
+#main {
26
+	max-width: 1100px;
27
+	margin: 0 auto 10px;
28
+ 	padding: 0 2%; width: 96%;
29
+	}
30
+
31
+h1, h2, h3, h4, h5, h6 { clear: both; }
32
+
33
+h1, p.info { font-family: sans-serif; }
34
+h1 {
35
+	height: 38px;
36
+	margin-bottom: -30px;
37
+	color: #FFF;
38
+	background: transparent url(logo.png) right top no-repeat;
39
+	}
40
+p.info { padding: 0; color: #000; }
41
+p.info span { color: #800; }
42
+
43
+#message { text-align: center; }
44
+#message { width: 80%; margin: 0 auto 0.25em; color: #FF0; }
45
+#message p { padding: 2px 0; font-weight: bold; border-radius: 0.8em; }
46
+#message p.message { color: #080; background: #CFC; }
47
+#message p.error { color: #F00; background: #FF4; }
48
+#message p.warning { color: #FF0; background: #BA4; }
49
+#message p.message span,
50
+#message p.error span,
51
+#message p.warning span {
52
+	color: #A00;
53
+	background: rgba(255, 255, 255, 1);
54
+	border: 1px solid rgba(0,0,0,0.5);
55
+	border-radius: 1em;
56
+	float: right;
57
+	margin-right: 0.5em;
58
+	padding: 0 3px;
59
+	font-family: sans-serif;
60
+	font-size: small;
61
+	position: relative;
62
+	top: -1px;
63
+	}
64
+
65
+#help strong { color: #0DD; }
66
+img { display: none; }
67
+
68
+/* Forms */
69
+
70
+#config_form {
71
+	display: block;
72
+	background: #EEE;
73
+	padding: 6px 20px 20px;
74
+	color: #000;
75
+	position: relative;
76
+	border-radius: 1.5em;
77
+	border-top-left-radius: 0;
78
+	}
79
+fieldset {
80
+	height: 16.1em;
81
+	overflow-y: scroll;
82
+	overflow-x: hidden;
83
+	margin-top: 10px;
84
+	}
85
+label, input, select, textarea { display: block; float: left; margin: 1px 0; }
86
+label.newline, textarea, fieldset { clear: both; }
87
+label {
88
+	width: 120px; /* label area */
89
+	height: 1em;
90
+	padding: 10px 460px 10px 1em;
91
+	margin-right: -450px;
92
+	text-align: right;
93
+	}
94
+label.blocked, label.added.blocked, label.added.blocked.sublabel { color: #AAA; }
95
+
96
+label.added.sublabel {
97
+	width: auto;
98
+	margin: 11px -2.5em 0 1em;
99
+	padding: 0 3em 0 0;
100
+	font-style: italic;
101
+	color: #444;
102
+	}
103
+label+label.added.sublabel {
104
+	margin-left: 0;
105
+	}
106
+
107
+input[type="text"], select { margin: 0.75em 0 0; }
108
+input[type="checkbox"], input[type="radio"], input[type="file"] { margin: 1em 0 0; }
109
+input[type="checkbox"].enabler, input[type="radio"].enabler { margin-left: 1em; }
110
+
111
+input:disabled { color: #BBB; }
112
+
113
+#config_form input[type="text"].subitem { width: 4em; }
114
+#config_form input[type="text"].subitem+.subitem { margin-left: 4px; }
115
+
116
+input[type="text"].added { width: 20em; }
117
+label.added {
118
+	width: 265px; /* label area */
119
+	height: 1em;
120
+	padding: 10px 370px 10px 1em;
121
+	margin-right: -360px;
122
+	text-align: right;
123
+	}
124
+
125
+ul.tabs { padding: 0; list-style: none; }
126
+ul.tabs li { display: inline; }
127
+ul.tabs li a,
128
+ul.tabs li a.active:hover,
129
+ul.tabs li a.active:active {
130
+	display: block;
131
+	float: left;
132
+	background: #1E4059;
133
+	color: #CCC;
134
+	font-size: 110%;
135
+	border-radius: 0.25em 0.25em 0 0;
136
+	margin: 0 4px 0 0;
137
+	padding: 2px 8px;
138
+	text-decoration: none;
139
+	font-family: georgia,"times new roman",times;
140
+	}
141
+ul.tabs li a.active:link,
142
+ul.tabs li a.active:visited {
143
+	background: #DDD;
144
+	color: #06F;
145
+	cursor: default;
146
+	margin-top: -4px;
147
+	padding-bottom: 4px;
148
+	padding-top: 4px;
149
+	}
150
+ul.tabs li a:hover,
151
+ul.tabs li a:active {
152
+	background: #000;
153
+	color: #FFF;
154
+	}
155
+
156
+fieldset { display: none; border: 1px solid #AAA; border-radius: 1em; }
157
+fieldset legend { display: none; }
158
+
159
+.hilightable span {
160
+	display: block;
161
+	float: left;
162
+	width: 100%;
163
+	height: 1.3em;
164
+	background: rgba(225,255,0,1);
165
+	margin: 0 -100% -1em 0;
166
+	}
167
+
168
+#serial_stepper { padding-top: 0.75em; display: block; float: left; }
169
+/*#SERIAL_PORT { display: none; }*/
170
+
171
+/* Tooltips */
172
+
173
+#tooltip {
174
+	display: none;
175
+	max-width: 30em;
176
+	padding: 8px;
177
+	border: 2px solid #73d699;
178
+	border-radius: 1em;
179
+	position: absolute;
180
+	z-index: 999;
181
+	font-family: sans-serif;
182
+	font-size: 85%;
183
+	color: #000;
184
+	line-height: 1.1;
185
+	background: #e2ff99; /* Old browsers */
186
+	background: -moz-linear-gradient(top,  #e2ff99 0%, #73d699 100%); /* FF3.6+ */
187
+	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e2ff99), color-stop(100%,#73d699)); /* Chrome,Safari4+ */
188
+	background: -webkit-linear-gradient(top,  #e2ff99 0%,#73d699 100%); /* Chrome10+,Safari5.1+ */
189
+	background: -o-linear-gradient(top,  #e2ff99 0%,#73d699 100%); /* Opera 11.10+ */
190
+	background: -ms-linear-gradient(top,  #e2ff99 0%,#73d699 100%); /* IE10+ */
191
+	background: linear-gradient(to bottom,  #e2ff99 0%,#73d699 100%); /* W3C */
192
+	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2ff99', endColorstr='#73d699',GradientType=0 ); /* IE6-9 */
193
+	-webkit-box-shadow: 0px 6px 25px -4px rgba(0,0,0,0.75);
194
+	-moz-box-shadow: 0px 6px 25px -4px rgba(0,0,0,0.75);
195
+	box-shadow: 0px 6px 25px -4px rgba(0,0,0,0.75);
196
+	}
197
+#tooltip>span {
198
+	position: absolute;
199
+	content: "";
200
+	width: 0;
201
+	height: 0;
202
+	border-left: 8px solid transparent;
203
+	border-right: 8px solid transparent;
204
+	border-top: 8px solid #73d699;
205
+	z-index: 999;
206
+	bottom: -10px;
207
+	left: 20px;
208
+	}
209
+#tooltip>strong { color: #00B; }
210
+
211
+/* Tooltips Checkbox */
212
+
213
+#tipson {
214
+	width: auto;
215
+	height: auto;
216
+	padding: 0;
217
+	margin-right: 0;
218
+	float: right;
219
+	font-weight: bold;
220
+	font-size: 100%;
221
+	font-family: helvetica;
222
+	text-align: left;
223
+	cursor: pointer;
224
+	}
225
+#tipson input { float: none; display: inline; cursor: pointer; }
226
+
227
+/* Config Text */
228
+
229
+pre.config {
230
+	height: 25em;
231
+	padding: 10px;
232
+	border: 2px solid #888;
233
+	border-radius: 5px;
234
+	overflow: auto;
235
+	clear: both;
236
+	background-color: #FFF;
237
+	color: #000;
238
+	font-family: "Fira Mono", monospace;
239
+	font-size: small;
240
+	}
241
+
242
+/* Pre Headers */
243
+
244
+h2 {
245
+	width: 100%;
246
+	margin: 12px -300px 4px 0;
247
+	padding: 0;
248
+	float: left;
249
+	}
250
+
251
+/* Disclosure Widget */
252
+
253
+span.disclose, a.download, a.download-all {︎
254
+	display: block;
255
+	float: right;
256
+	margin-top: 12px;
257
+	}
258
+
259
+span.disclose {
260
+	margin-right: -10px; /* total width */
261
+	margin-left: 14px;
262
+	width: 0;
263
+	height: 0;
264
+	position: relative;
265
+	left: 3px;
266
+	top: 3px;
267
+	cursor: pointer;
268
+	border-left: 8px solid transparent;
269
+	border-right: 8px solid transparent;
270
+	border-top: 10px solid #000;
271
+	}
272
+span.disclose.closed {
273
+	margin-right: -8px; /* total width */
274
+	margin-left: 10px;
275
+	left: 0;
276
+	top: 0;
277
+	border-top: 8px solid transparent;
278
+	border-bottom: 8px solid transparent;
279
+	border-right: 10px solid #000;
280
+	}
281
+span.disclose.almost {
282
+    -ms-transform: rotate(45deg); /* IE 9 */
283
+    -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
284
+    transform: rotate(45deg);
285
+	}
286
+span.disclose.closed.almost {
287
+	left: 1px;
288
+	top: 3px;
289
+    -ms-transform: rotate(315deg); /* IE 9 */
290
+    -webkit-transform: rotate(315deg); /* Chrome, Safari, Opera */
291
+    transform: rotate(315deg);
292
+	}
293
+
294
+/* Download Button */
295
+
296
+a.download, a.download-all {
297
+	visibility: hidden;
298
+	padding: 2px;
299
+	border: 1px solid #494;
300
+	border-radius: 4px;
301
+	margin: 12px 0 0;
302
+	background: #FFF;
303
+	color: #494;
304
+	font-family: sans-serif;
305
+	font-size: small;
306
+	font-weight: bold;
307
+	text-decoration: none;
308
+	}
309
+a.download-all { margin: 9px 2em 0; color: #449; border-color: #449; }
310
+
311
+input[type="text"].one_of_2 { max-width: 15%; }
312
+input[type="text"].one_of_3 { max-width: 10%; }
313
+input[type="text"].one_of_4 { max-width: 7%; }
314
+
315
+select.one_of_2 { max-width: 15%; }
316
+select.one_of_3 { max-width: 10%; }
317
+select.one_of_4 { max-width: 14%; }
318
+select.one_of_4+span.label+select.one_of_4+span.label { clear: both; margin-left: 265px; padding-left: 1.75em; }
319
+select.one_of_4+span.label+select.one_of_4+span.label+select.one_of_4+span.label { clear: none; margin-left: 1em; padding-left: 0; }
320
+
321
+@media all and (min-width: 1140px) {
322
+
323
+	#main { max-width: 10000px; }
324
+
325
+	fieldset { float: left; width: 50%; height: auto; }
326
+
327
+	#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
328
+
329
+	pre.config { height: 20em; }
330
+
331
+	.disclose { display: none; }
332
+
333
+	input[type="text"].one_of_2 { max-width: 15%; }
334
+	input[type="text"].one_of_3 { max-width: 9%; }
335
+	input[type="text"].one_of_4 { max-width: 8%; }
336
+
337
+	select.one_of_2 { max-width: 15%; }
338
+	select.one_of_3 { max-width: 10%; }
339
+	select.one_of_4 { max-width: 16%; }
340
+
341
+}
342
+
343
+/*label.blocked, .blocked { display: none; }*/
344
+

BIN
Marlin/configurator/css/logo.png View File


+ 117
- 0
Marlin/configurator/index.html View File

@@ -0,0 +1,117 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="UTF-8">
5
+    <title>Marlin Firmware Configurator</title>
6
+    <link href='http://fonts.googleapis.com/css?family=Fira+Mono&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' />
7
+    <script src="js/jquery-2.1.3.min.js"></script>
8
+    <script src="js/binarystring.js"></script>
9
+    <script src="js/binaryfileuploader.js"></script>
10
+    <script src="js/FileSaver.min.js"></script>
11
+    <script src="js/jszip.min.js"></script>
12
+    <script src="js/jcanvas.js"></script>
13
+    <script src="js/jstepper.js"></script>
14
+    <script src="js/configurator.js"></script>
15
+    <link rel="stylesheet" href="css/configurator.css" type="text/css" media="all" />
16
+  </head>
17
+  <body>
18
+    <section id="main">
19
+      <h1>Marlin Configurator</h1>
20
+      <p class="info">Select presets (coming soon), modify, and download.</p>
21
+
22
+      <div id="message"></div>
23
+      <div id="tabs"></div>
24
+
25
+      <form id="config_form">
26
+
27
+        <div id="tooltip"></div>
28
+
29
+        <label>Drop Files:</label><input type="file" id="file-upload" />
30
+        <label id="tipson"><input type="checkbox" checked /> ?</label>
31
+        <a href="" class="download-all">Download Zip</a>
32
+
33
+        <fieldset id="machine">
34
+          <legend>Machine</legend>
35
+
36
+          <label class="newline">Serial Port:</label><select name="SERIAL_PORT"></select><div id="serial_stepper"></div>
37
+
38
+          <label>Baud Rate:</label><select name="BAUDRATE"></select>
39
+
40
+          <label>AT90USB BT IF:</label>
41
+            <input name="BTENABLED" type="checkbox" value="1" checked />
42
+
43
+          <label class="newline">Motherboard:</label><select name="MOTHERBOARD"></select>
44
+
45
+          <label class="newline">Custom Name:</label><input name="CUSTOM_MENDEL_NAME" type="text" size="14" maxlength="12" value="" />
46
+
47
+          <label class="newline">Machine UUID:</label><input name="MACHINE_UUID" type="text" size="38" maxlength="36" value="" />
48
+
49
+          <label class="newline">Extruders:</label><select name="EXTRUDERS"></select>
50
+
51
+          <label class="newline">Power Supply:</label><select name="POWER_SUPPLY"></select>
52
+
53
+          <label>PS Default Off:</label>
54
+            <input name="PS_DEFAULT_OFF" type="checkbox" value="1" checked />
55
+        </fieldset>
56
+
57
+        <fieldset id="homing">
58
+          <legend>Homing</legend>
59
+        </fieldset>
60
+
61
+        <fieldset id="temperature">
62
+          <legend>Temperature</legend>
63
+          <label class="newline">Temp Sensor 0:</label><select name="TEMP_SENSOR_0"></select>
64
+          <label class="newline">Temp Sensor 1:</label><select name="TEMP_SENSOR_1"></select>
65
+          <label class="newline">Temp Sensor 2:</label><select name="TEMP_SENSOR_2"></select>
66
+          <label class="newline">Bed Temp Sensor:</label><select name="TEMP_SENSOR_BED"></select>
67
+
68
+          <label>Max Diff:</label>
69
+            <input name="MAX_REDUNDANT_TEMP_SENSOR_DIFF" type="text" size="3" maxlength="2" />
70
+
71
+          <label>Temp Residency Time (s):</label>
72
+            <input name="TEMP_RESIDENCY_TIME" type="text" size="3" maxlength="2" />
73
+        </fieldset>
74
+
75
+        <fieldset id="extruder">
76
+          <legend>Extruder</legend>
77
+        </fieldset>
78
+
79
+        <fieldset id="lcd">
80
+          <legend>LCD / SD</legend>
81
+        </fieldset>
82
+
83
+        <fieldset id="bedlevel">
84
+          <legend>Bed Leveling</legend>
85
+        </fieldset>
86
+
87
+        <fieldset id="extras">
88
+          <legend>Extras</legend>
89
+        </fieldset>
90
+
91
+        <fieldset id="info">
92
+          <legend>Info</legend>
93
+        </fieldset>
94
+
95
+        <fieldset id="more">
96
+          <legend>More…</legend>
97
+        </fieldset>
98
+
99
+        <section id="config_text">
100
+          <h2>Configuration.h</h2>
101
+          <span class="disclose"></span>
102
+          <a href="" class="download">Download</a>
103
+          <pre class="hilightable config"></pre>
104
+        </section>
105
+
106
+        <section id="config_adv_text">
107
+          <h2>Configuration_adv.h</h2>
108
+          <span class="disclose"></span>
109
+          <a href="" class="download">Download</a>
110
+          <pre class="hilightable config"></pre>
111
+        </section>
112
+
113
+        <br class="clear" />
114
+      </form>
115
+    </section>
116
+  </body>
117
+</html>

+ 2
- 0
Marlin/configurator/js/FileSaver.min.js View File

@@ -0,0 +1,2 @@
1
+/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
2
+var saveAs=saveAs||typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(view){"use strict";if(typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var doc=view.document,get_URL=function(){return view.URL||view.webkitURL||view},save_link=doc.createElementNS("http://www.w3.org/1999/xhtml","a"),can_use_save_link="download"in save_link,click=function(node){var event=doc.createEvent("MouseEvents");event.initMouseEvent("click",true,false,view,0,0,0,0,0,false,false,false,false,0,null);node.dispatchEvent(event)},webkit_req_fs=view.webkitRequestFileSystem,req_fs=view.requestFileSystem||webkit_req_fs||view.mozRequestFileSystem,throw_outside=function(ex){(view.setImmediate||view.setTimeout)(function(){throw ex},0)},force_saveable_type="application/octet-stream",fs_min_size=0,arbitrary_revoke_timeout=500,revoke=function(file){var revoker=function(){if(typeof file==="string"){get_URL().revokeObjectURL(file)}else{file.remove()}};if(view.chrome){revoker()}else{setTimeout(revoker,arbitrary_revoke_timeout)}},dispatch=function(filesaver,event_types,event){event_types=[].concat(event_types);var i=event_types.length;while(i--){var listener=filesaver["on"+event_types[i]];if(typeof listener==="function"){try{listener.call(filesaver,event||filesaver)}catch(ex){throw_outside(ex)}}}},FileSaver=function(blob,name){var filesaver=this,type=blob.type,blob_changed=false,object_url,target_view,dispatch_all=function(){dispatch(filesaver,"writestart progress write writeend".split(" "))},fs_error=function(){if(blob_changed||!object_url){object_url=get_URL().createObjectURL(blob)}if(target_view){target_view.location.href=object_url}else{var new_tab=view.open(object_url,"_blank");if(new_tab==undefined&&typeof safari!=="undefined"){view.location.href=object_url}}filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url)},abortable=function(func){return function(){if(filesaver.readyState!==filesaver.DONE){return func.apply(this,arguments)}}},create_if_not_found={create:true,exclusive:false},slice;filesaver.readyState=filesaver.INIT;if(!name){name="download"}if(can_use_save_link){object_url=get_URL().createObjectURL(blob);save_link.href=object_url;save_link.download=name;click(save_link);filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url);return}if(view.chrome&&type&&type!==force_saveable_type){slice=blob.slice||blob.webkitSlice;blob=slice.call(blob,0,blob.size,force_saveable_type);blob_changed=true}if(webkit_req_fs&&name!=="download"){name+=".download"}if(type===force_saveable_type||webkit_req_fs){target_view=view}if(!req_fs){fs_error();return}fs_min_size+=blob.size;req_fs(view.TEMPORARY,fs_min_size,abortable(function(fs){fs.root.getDirectory("saved",create_if_not_found,abortable(function(dir){var save=function(){dir.getFile(name,create_if_not_found,abortable(function(file){file.createWriter(abortable(function(writer){writer.onwriteend=function(event){target_view.location.href=file.toURL();filesaver.readyState=filesaver.DONE;dispatch(filesaver,"writeend",event);revoke(file)};writer.onerror=function(){var error=writer.error;if(error.code!==error.ABORT_ERR){fs_error()}};"writestart progress write abort".split(" ").forEach(function(event){writer["on"+event]=filesaver["on"+event]});writer.write(blob);filesaver.abort=function(){writer.abort();filesaver.readyState=filesaver.DONE};filesaver.readyState=filesaver.WRITING}),fs_error)}),fs_error)};dir.getFile(name,{create:false},abortable(function(file){file.remove();save()}),abortable(function(ex){if(ex.code===ex.NOT_FOUND_ERR){save()}else{fs_error()}}))}),fs_error)}),fs_error)},FS_proto=FileSaver.prototype,saveAs=function(blob,name){return new FileSaver(blob,name)};FS_proto.abort=function(){var filesaver=this;filesaver.readyState=filesaver.DONE;dispatch(filesaver,"abort")};FS_proto.readyState=FS_proto.INIT=0;FS_proto.WRITING=1;FS_proto.DONE=2;FS_proto.error=FS_proto.onwritestart=FS_proto.onprogress=FS_proto.onwrite=FS_proto.onabort=FS_proto.onerror=FS_proto.onwriteend=null;return saveAs}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return saveAs})}

+ 79
- 0
Marlin/configurator/js/binaryfileuploader.js View File

@@ -0,0 +1,79 @@
1
+function BinaryFileUploader(o) {
2
+	this.options = null;
3
+
4
+
5
+	this._defaultOptions = {
6
+		element: null, // HTML file element
7
+		onFileLoad: function(file) {
8
+			console.log(file.toString());
9
+		}
10
+	};
11
+
12
+
13
+	this._init = function(o) {
14
+		if (!this.hasFileUploaderSupport()) return;
15
+
16
+		this._verifyDependencies();
17
+
18
+		this.options = this._mergeObjects(this._defaultOptions, o);
19
+		this._verifyOptions();
20
+
21
+		this.addFileChangeListener();
22
+	}
23
+
24
+
25
+	this.hasFileUploaderSupport = function() {
26
+		return !!(window.File && window.FileReader && window.FileList && window.Blob);
27
+	}
28
+
29
+	this.addFileChangeListener = function() {
30
+		this.options.element.addEventListener(
31
+			'change',
32
+			this._bind(this, this.onFileChange)
33
+		);
34
+	}
35
+
36
+	this.onFileChange = function(e) {
37
+		// TODO accept multiple files
38
+		var file = e.target.files[0],
39
+		    reader = new FileReader();
40
+
41
+		reader.onload = this._bind(this, this.onFileLoad);
42
+		reader.readAsBinaryString(file);
43
+	}
44
+
45
+	this.onFileLoad = function(e) {
46
+		var content = e.target.result,
47
+		    string  = new BinaryString(content);
48
+		this.options.onFileLoad(string);
49
+	}
50
+
51
+
52
+	this._mergeObjects = function(starting, override) {
53
+		var merged = starting;
54
+		for (key in override) merged[key] = override[key];
55
+
56
+		return merged;
57
+	}
58
+
59
+	this._verifyOptions = function() {
60
+		if (!(this.options.element && this.options.element.type && this.options.element.type === 'file')) {
61
+			throw 'Invalid element param in options. Must be a file upload DOM element';
62
+		}
63
+
64
+		if (typeof this.options.onFileLoad !== 'function') {
65
+			throw 'Invalid onFileLoad param in options. Must be a function';
66
+		}
67
+	}
68
+
69
+	this._verifyDependencies = function() {
70
+		if (!window.BinaryString) throw 'BinaryString is missing. Check that you\'ve correctly included it';
71
+	}
72
+
73
+	// helper function for binding methods to objects
74
+	this._bind = function(object, method) {
75
+		return function() {return method.apply(object, arguments);};
76
+	}
77
+
78
+	this._init(o);
79
+}

+ 168
- 0
Marlin/configurator/js/binarystring.js View File

@@ -0,0 +1,168 @@
1
+function BinaryString(source) {
2
+	this._source = null;
3
+	this._bytes  = [];
4
+	this._pos    = 0;
5
+	this._length = 0;
6
+
7
+	this._init = function(source) {
8
+		this._source = source;
9
+		this._bytes  = this._stringToBytes(this._source);
10
+		this._length = this._bytes.length;
11
+	}
12
+
13
+	this.current = function() {return this._pos;}
14
+
15
+	this.rewind  = function() {return this.jump(0);}
16
+	this.end     = function() {return this.jump(this.length()  - 1);}
17
+	this.next    = function() {return this.jump(this.current() + 1);}
18
+	this.prev    = function() {return this.jump(this.current() - 1);}
19
+
20
+	this.jump = function(pos) {
21
+		if (pos < 0 || pos >= this.length()) return false;
22
+
23
+		this._pos = pos;
24
+		return true;
25
+	}
26
+
27
+	this.readByte = function(pos) {
28
+		pos = (typeof pos == 'number') ? pos : this.current();
29
+		return this.readBytes(1, pos)[0];
30
+	}
31
+
32
+	this.readBytes = function(length, pos) {
33
+		length = length || 1;
34
+		pos    = (typeof pos == 'number') ? pos : this.current();
35
+
36
+		if (pos          >  this.length() ||
37
+		    pos          <  0             ||
38
+		    length       <= 0             ||
39
+		    pos + length >  this.length() ||
40
+		    pos + length <  0
41
+		) {
42
+			return false;
43
+		}
44
+
45
+		var bytes = [];
46
+		
47
+		for (var i = pos; i < pos + length; i++) {
48
+			bytes.push(this._bytes[i]);
49
+		}
50
+
51
+		return bytes;
52
+	}
53
+
54
+	this.length = function() {return this._length;}
55
+
56
+	this.toString = function() {
57
+		var string = '',
58
+		    length = this.length();
59
+
60
+		for (var i = 0; i < length; i++) {
61
+			string += String.fromCharCode(this.readByte(i));
62
+		}
63
+
64
+		return string;
65
+	}
66
+
67
+	this.toUtf8 = function() {
68
+		var inc    = 0,
69
+		    string = '',
70
+		    length = this.length();
71
+
72
+		// determine if first 3 characters are the BOM
73
+		// then skip them in output if so
74
+		if (length >= 3               &&
75
+		    this.readByte(0) === 0xEF &&
76
+		    this.readByte(1) === 0xBB &&
77
+		    this.readByte(2) === 0xBF
78
+		) {
79
+			inc = 3;
80
+		}
81
+
82
+		for (; inc < length; inc++) {
83
+			var byte1 = this.readByte(inc),
84
+			    byte2 = 0,
85
+			    byte3 = 0,
86
+			    byte4 = 0,
87
+			    code1 = 0,
88
+			    code2 = 0,
89
+			    point = 0;
90
+
91
+			switch (true) {
92
+				// single byte character; same as ascii
93
+				case (byte1 < 0x80):
94
+					code1 = byte1;
95
+					break;
96
+
97
+				// 2 byte character
98
+				case (byte1 >= 0xC2 && byte1 < 0xE0):
99
+					byte2 = this.readByte(++inc);
100
+
101
+					code1 = ((byte1 & 0x1F) << 6) +
102
+					         (byte2 & 0x3F);
103
+					break;
104
+
105
+				// 3 byte character
106
+				case (byte1 >= 0xE0 && byte1 < 0xF0):
107
+					byte2 = this.readByte(++inc);
108
+					byte3 = this.readByte(++inc);
109
+
110
+					code1 = ((byte1 & 0xFF) << 12) +
111
+					        ((byte2 & 0x3F) <<  6) +
112
+					         (byte3 & 0x3F);
113
+					break;
114
+
115
+				// 4 byte character
116
+				case (byte1 >= 0xF0 && byte1 < 0xF5):
117
+					byte2 = this.readByte(++inc);
118
+					byte3 = this.readByte(++inc);
119
+					byte4 = this.readByte(++inc);
120
+
121
+					point = ((byte1 & 0x07) << 18) +
122
+					        ((byte2 & 0x3F) << 12) +
123
+					        ((byte3 & 0x3F) <<  6) +
124
+					         (byte4 & 0x3F)
125
+					point -= 0x10000;
126
+
127
+					code1 = (point >> 10)    + 0xD800;
128
+					code2 = (point &  0x3FF) + 0xDC00;
129
+					break;
130
+
131
+				default:
132
+					throw 'Invalid byte ' + this._byteToString(byte1) + ' whilst converting to UTF-8';
133
+					break;
134
+			}
135
+
136
+			string += (code2) ? String.fromCharCode(code1, code2)
137
+			                  : String.fromCharCode(code1);
138
+		}
139
+
140
+		return string;
141
+	}
142
+
143
+	this.toArray  = function() {return this.readBytes(this.length() - 1, 0);} 
144
+
145
+
146
+	this._stringToBytes = function(str) {
147
+		var bytes = [],
148
+		    chr   = 0;
149
+
150
+		for (var i = 0; i < str.length; i++) {
151
+			chr = str.charCodeAt(i);
152
+			bytes.push(chr & 0xFF);
153
+		}
154
+
155
+		return bytes;
156
+	}
157
+
158
+	this._byteToString = function(byte) {
159
+		var asString = byte.toString(16).toUpperCase();
160
+		while (asString.length < 2) {
161
+			asString = '0' + asString;
162
+		}
163
+
164
+		return '0x' + asString;
165
+	}
166
+
167
+	this._init(source);
168
+}

+ 1414
- 0
Marlin/configurator/js/configurator.js
File diff suppressed because it is too large
View File


+ 524
- 0
Marlin/configurator/js/jcanvas.js View File

@@ -0,0 +1,524 @@
1
+/*!
2
+  jCanvas v2.2.1
3
+  Caleb Evans
4
+  2.2.1 revisions by Thinkyhead
5
+*/
6
+
7
+(function($, document, Math, Number, undefined) {
8
+
9
+// jC global object
10
+var jC = {};
11
+jC.originals = {
12
+	width: 20,
13
+	height: 20,
14
+	cornerRadius: 0,
15
+	fillStyle: 'transparent',
16
+	strokeStyle: 'transparent',
17
+	strokeWidth: 5,
18
+	strokeCap: 'butt',
19
+	strokeJoin: 'miter',
20
+	shadowX: 0,
21
+	shadowY: 0,
22
+	shadowBlur: 10,
23
+	shadowColor: 'transparent',
24
+	x: 0, y: 0,
25
+	x1: 0, y1: 0,
26
+	radius: 10,
27
+	start: 0,
28
+	end: 360,
29
+	ccw: false,
30
+	inDegrees: true,
31
+	fromCenter: true,
32
+	closed: false,
33
+	sides: 3,
34
+	angle: 0,
35
+	text: '',
36
+	font: 'normal 12pt sans-serif',
37
+	align: 'center',
38
+	baseline: 'middle',
39
+	source: '',
40
+	repeat: 'repeat'
41
+};
42
+// Duplicate original defaults
43
+jC.defaults = $.extend({}, jC.originals);
44
+
45
+// Set global properties
46
+function setGlobals(context, map) {
47
+	context.fillStyle = map.fillStyle;
48
+	context.strokeStyle = map.strokeStyle;
49
+	context.lineWidth = map.strokeWidth;
50
+	context.lineCap = map.strokeCap;
51
+	context.lineJoin = map.strokeJoin;
52
+	context.shadowOffsetX = map.shadowX;
53
+	context.shadowOffsetY = map.shadowY;
54
+	context.shadowBlur = map.shadowBlur;
55
+	context.shadowColor = map.shadowColor;
56
+}
57
+
58
+// Close path if chosen
59
+function closePath(context, map) {
60
+	if (map.closed === true) {
61
+		context.closePath();
62
+		context.fill();
63
+		context.stroke();
64
+	} else {
65
+		context.fill();
66
+		context.stroke();
67
+		context.closePath();
68
+	}
69
+}
70
+
71
+// Measure angles in degrees if chosen
72
+function checkUnits(map) {
73
+	if (map.inDegrees === true) {
74
+		return Math.PI / 180;
75
+	} else {
76
+		return 1;
77
+	}
78
+}
79
+
80
+// Set canvas defaults
81
+$.fn.canvas = function(args) {
82
+	// Reset defaults if no value is passed
83
+	if (typeof args === 'undefined') {
84
+		jC.defaults = jC.originals;
85
+	} else {
86
+		jC.defaults = $.extend({}, jC.defaults, args);
87
+	}
88
+	return this;
89
+};
90
+
91
+// Load canvas
92
+$.fn.loadCanvas = function(context) {
93
+	if (typeof context === 'undefined') {context = '2d';}
94
+	return this[0].getContext(context);
95
+};
96
+
97
+// Create gradient
98
+$.fn.gradient = function(args) {
99
+	var ctx = this.loadCanvas(),
100
+		// Specify custom defaults
101
+		gDefaults = {
102
+			x1: 0, y1: 0,
103
+			x2: 0, y2: 0,
104
+			r1: 10, r2: 100
105
+		},
106
+		params = $.extend({}, gDefaults, args),
107
+		gradient, stops = 0, percent, i;
108
+		
109
+	// Create radial gradient if chosen
110
+	if (typeof args.r1 === 'undefined' && typeof args.r2 === 'undefined') {
111
+		gradient = ctx.createLinearGradient(params.x1, params.y1, params.x2, params.y2);
112
+	} else {
113
+		gradient = ctx.createRadialGradient(params.x1, params.y1, params.r1, params.x2, params.y2, params.r2);
114
+	}
115
+	
116
+	// Count number of color stops
117
+	for (i=1; i<=Number.MAX_VALUE; i+=1) {
118
+		if (params['c' + i]) {
119
+			stops += 1;
120
+		} else {
121
+			break;
122
+		}
123
+	}
124
+	
125
+	// Calculate color stop percentages if absent
126
+	for (i=1; i<=stops; i+=1) {
127
+		percent = Math.round((100 / (stops-1)) * (i-1)) / 100;
128
+		if (typeof params['s' + i] === 'undefined') {
129
+			params['s' + i] = percent;
130
+		}
131
+		gradient.addColorStop(params['s' + i], params['c' + i]);
132
+	}
133
+	return gradient;
134
+};
135
+
136
+// Create pattern
137
+$.fn.pattern = function(args) {
138
+	var ctx = this.loadCanvas(),
139
+		params = $.extend({}, jC.defaults, args),
140
+		pattern,
141
+		img = document.createElement('img');
142
+	img.src = params.source;
143
+	
144
+	// Create pattern
145
+	function create() {
146
+		if (img.complete === true) {
147
+			// Create pattern
148
+			pattern = ctx.createPattern(img, params.repeat);
149
+		} else {
150
+			throw "The pattern has not loaded yet";
151
+		}
152
+	}
153
+	try {
154
+		create();
155
+	} catch(error) {
156
+		img.onload = create;
157
+	}
158
+	return pattern;
159
+};
160
+
161
+// Clear canvas
162
+$.fn.clearCanvas = function(args) {
163
+	var ctx = this.loadCanvas(),
164
+		params = $.extend({}, jC.defaults, args);
165
+
166
+	// Draw from center if chosen
167
+	if (params.fromCenter === true) {
168
+		params.x -= params.width / 2;
169
+		params.y -= params.height / 2;
170
+	}
171
+
172
+	// Clear entire canvas if chosen
173
+	ctx.beginPath();
174
+	if (typeof args === 'undefined') {
175
+		ctx.clearRect(0, 0, this.width(), this.height());
176
+	} else {
177
+		ctx.clearRect(params.x, params.y, params.width, params.height);
178
+	} 
179
+	ctx.closePath();
180
+	return this;
181
+};
182
+
183
+// Save canvas
184
+$.fn.saveCanvas = function() {
185
+	var ctx = this.loadCanvas();
186
+	ctx.save();
187
+	return this;
188
+};
189
+
190
+// Restore canvas
191
+$.fn.restoreCanvas = function() {
192
+	var ctx = this.loadCanvas();
193
+	ctx.restore();
194
+	return this;
195
+};
196
+
197
+// Scale canvas
198
+$.fn.scaleCanvas = function(args) {
199
+	var ctx = this.loadCanvas(),
200
+		params = $.extend({}, jC.defaults, args);
201
+	ctx.save();
202
+	ctx.translate(params.x, params.y);
203
+	ctx.scale(params.width, params.height);
204
+	ctx.translate(-params.x, -params.y)
205
+	return this;
206
+};
207
+
208
+// Translate canvas
209
+$.fn.translateCanvas = function(args) {
210
+	var ctx = this.loadCanvas(),
211
+		params = $.extend({}, jC.defaults, args);
212
+	ctx.save();
213
+	ctx.translate(params.x, params.y);		
214
+	return this;
215
+};
216
+
217
+// Rotate canvas
218
+$.fn.rotateCanvas = function(args) {
219
+	var ctx = this.loadCanvas(),
220
+		params = $.extend({}, jC.defaults, args),
221
+		toRad = checkUnits(params);
222
+	
223
+	ctx.save();
224
+	ctx.translate(params.x, params.y);
225
+	ctx.rotate(params.angle * toRad);
226
+	ctx.translate(-params.x, -params.y);
227
+	return this;
228
+};
229
+
230
+// Draw rectangle
231
+$.fn.drawRect = function(args) {
232
+	var ctx = this.loadCanvas(),
233
+		params = $.extend({}, jC.defaults, args),
234
+		toRad = checkUnits(params),
235
+		x1, y1, x2, y2, r;
236
+	setGlobals(ctx, params);
237
+	
238
+	// Draw from center if chosen
239
+	if (params.fromCenter === true) {
240
+		params.x -= params.width / 2;
241
+		params.y -= params.height / 2;
242
+	}
243
+		
244
+	// Draw rounded rectangle if chosen
245
+	if (params.cornerRadius > 0) {
246
+		x1 = params.x;
247
+		y1 = params.y;
248
+		x2 = params.x + params.width;
249
+		y2 = params.y + params.height;
250
+		r = params.cornerRadius;
251
+		if ((x2 - x1) - (2 * r) < 0) {
252
+			r = (x2 - x1) / 2;
253
+		}
254
+		if ((y2 - y1) - (2 * r) < 0) {
255
+			r = (y2 - y1) / 2;
256
+		}
257
+		ctx.beginPath();
258
+		ctx.moveTo(x1+r,y1);
259
+		ctx.lineTo(x2-r,y1);
260
+		ctx.arc(x2-r, y1+r, r, 270*toRad, 360*toRad, false);
261
+		ctx.lineTo(x2,y2-r);
262
+		ctx.arc(x2-r, y2-r, r, 0, 90*toRad, false);
263
+		ctx.lineTo(x1+r,y2);
264
+		ctx.arc(x1+r, y2-r, r, 90*toRad, 180*toRad, false);
265
+		ctx.lineTo(x1,y1+r);
266
+		ctx.arc(x1+r, y1+r, r, 180*toRad, 270*toRad, false);
267
+		ctx.fill();
268
+		ctx.stroke();
269
+		ctx.closePath();
270
+	} else {
271
+		ctx.fillRect(params.x, params.y, params.width, params.height);
272
+		ctx.strokeRect(params.x, params.y, params.width, params.height);
273
+	}
274
+	return this;
275
+};
276
+
277
+// Draw arc
278
+$.fn.drawArc = function(args) {
279
+	var ctx = this.loadCanvas(),
280
+		params = $.extend({}, jC.defaults, args),
281
+		toRad = checkUnits(params);
282
+		setGlobals(ctx, params);
283
+	
284
+	// Draw from center if chosen
285
+	if (params.fromCenter === false) {
286
+		params.x += params.radius;
287
+		params.y += params.radius;
288
+	}
289
+	
290
+	ctx.beginPath();
291
+	ctx.arc(params.x, params.y, params.radius, (params.start*toRad)-(Math.PI/2), (params.end*toRad)-(Math.PI/2), params.ccw);
292
+	// Close path if chosen
293
+	closePath(ctx, params);
294
+	return this;
295
+};
296
+
297
+// Draw ellipse
298
+$.fn.drawEllipse = function(args) {
299
+	var ctx = this.loadCanvas(),
300
+		params = $.extend({}, jC.defaults, args),
301
+		controlW = params.width * (4/3);
302
+		setGlobals(ctx, params);
303
+	
304
+	// Draw from center if chosen
305
+	if (params.fromCenter === false) {
306
+		params.x += params.width / 2;
307
+		params.y += params.height / 2;
308
+	}
309
+	
310
+	// Increment coordinates to prevent negative values
311
+	params.x += 1e-10;
312
+	params.y += 1e-10;
313
+	
314
+	// Create ellipse
315
+	ctx.beginPath();
316
+	ctx.moveTo(params.x, params.y-params.height/2);
317
+	ctx.bezierCurveTo(params.x-controlW/2,params.y-params.height/2,
318
+		params.x-controlW/2,params.y+params.height/2,
319
+		params.x,params.y+params.height/2);
320
+	ctx.bezierCurveTo(params.x+controlW/2,params.y+params.height/2,
321
+		params.x+controlW/2,params.y-params.height/2,
322
+		params.x,params.y-params.height/2);
323
+	ctx.closePath();
324
+	ctx.fill();
325
+	ctx.stroke();
326
+	return this;
327
+};
328
+
329
+// Draw line
330
+$.fn.drawLine = function(args) {
331
+	var ctx = this.loadCanvas(),
332
+		params = $.extend({}, jC.defaults, args),
333
+		max = Number.MAX_VALUE, l,
334
+		lx, ly;
335
+	setGlobals(ctx, params);
336
+	
337
+	// Draw each point
338
+	ctx.beginPath();
339
+	ctx.moveTo(params.x1, params.y1);
340
+	for (l=2; l<max; l+=1) {
341
+		lx = params['x' + l];
342
+		ly = params['y' + l];
343
+		// Stop loop when all points are drawn
344
+		if (typeof lx === 'undefined' || typeof ly === 'undefined') {
345
+			break;
346
+		}
347
+		ctx.lineTo(lx, ly);
348
+	}
349
+	// Close path if chosen
350
+	closePath(ctx, params);
351
+	return this;
352
+};
353
+
354
+// Draw quadratic curve
355
+$.fn.drawQuad = function(args) {
356
+	var ctx = this.loadCanvas(),
357
+		params = $.extend({}, jC.defaults, args),
358
+		max = Number.MAX_VALUE, l,
359
+		lx, ly, lcx, lcy;
360
+	setGlobals(ctx, params);
361
+	
362
+	// Draw each point
363
+	ctx.beginPath();
364
+	ctx.moveTo(params.x1, params.y1);
365
+	for (l=2; l<max; l+=1) {
366
+		lx = params['x' + l];
367
+    if (typeof lx === 'undefined') break;
368
+		ly = params['y' + l];
369
+    if (typeof ly === 'undefined') break;
370
+		lcx = params['cx' + (l-1)];
371
+    if (typeof lcx === 'undefined') break;
372
+		lcy = params['cy' + (l-1)];
373
+    if (typeof lcy === 'undefined') break;
374
+		ctx.quadraticCurveTo(lcx, lcy, lx, ly);
375
+	}
376
+	// Close path if chosen
377
+	closePath(ctx, params);
378
+	return this;
379
+};
380
+
381
+// Draw Bezier curve
382
+$.fn.drawBezier = function(args) {
383
+	var ctx = this.loadCanvas(),
384
+		params = $.extend({}, jC.defaults, args),
385
+		max = Number.MAX_VALUE,
386
+		l=2, lc=1, lx, ly, lcx1, lcy1, lcx2, lcy2, i;
387
+	setGlobals(ctx, params);
388
+
389
+	// Draw each point
390
+	ctx.beginPath();
391
+	ctx.moveTo(params.x1, params.y1);
392
+	for (i=2; i<max; i+=1) {
393
+		lx = params['x' + l];
394
+    if (typeof lx === 'undefined') break;
395
+		ly = params['y' + l];
396
+    if (typeof ly === 'undefined') break;
397
+		lcx1 = params['cx' + lc];
398
+    if (typeof lcx1 === 'undefined') break;
399
+		lcy1 = params['cy' + lc];
400
+    if (typeof lcy1 === 'undefined') break;
401
+		lcx2 = params['cx' + (lc+1)];
402
+    if (typeof lcx2 === 'undefined') break;
403
+		lcy2 = params['cy' + (lc+1)];
404
+    if (typeof lcy2 === 'undefined') break;
405
+		ctx.bezierCurveTo(lcx1, lcy1, lcx2, lcy2, lx, ly);
406
+		l += 1;
407
+		lc += 2;
408
+	}
409
+	// Close path if chosen
410
+	closePath(ctx, params);
411
+	return this;
412
+};
413
+
414
+// Draw text
415
+$.fn.drawText = function(args) {
416
+	var ctx = this.loadCanvas(),
417
+		params = $.extend({}, jC.defaults, args);
418
+	setGlobals(ctx, params);
419
+	
420
+	// Set text-specific properties
421
+	ctx.textBaseline = params.baseline;
422
+	ctx.textAlign = params.align;
423
+	ctx.font = params.font;
424
+	
425
+	ctx.strokeText(params.text, params.x, params.y);
426
+	ctx.fillText(params.text, params.x, params.y);
427
+	return this;
428
+};
429
+
430
+// Draw image
431
+$.fn.drawImage = function(args) {
432
+	var ctx = this.loadCanvas(),
433
+		params = $.extend({}, jC.defaults, args),
434
+		// Define image source
435
+		img = document.createElement('img');
436
+  	img.src = params.source;
437
+	  setGlobals(ctx, params);
438
+
439
+	// Draw image function
440
+	function draw() {
441
+		if (img.complete) {
442
+
443
+  		var scaleFac = img.width / img.height;
444
+
445
+			// If width/height are specified
446
+			if (typeof args.width !== 'undefined' && typeof args.height !== 'undefined') {
447
+				img.width = args.width;
448
+				img.height = args.height;
449
+			// If width is specified
450
+			} else if (typeof args.width !== 'undefined' && typeof args.height === 'undefined') {
451
+				img.width = args.width;
452
+				img.height = img.width / scaleFac;
453
+			// If height is specified
454
+			} else if (typeof args.width === 'undefined' && typeof args.height !== 'undefined') {
455
+				img.height = args.height;
456
+				img.width = img.height * scaleFac;
457
+			}
458
+		
459
+			// Draw from center if chosen
460
+			if (params.fromCenter === true) {
461
+				params.x -= img.width / 2;
462
+				params.y -= img.height / 2;
463
+			}
464
+
465
+			// Draw image
466
+			ctx.drawImage(img, params.x, params.y, img.width, img.height);
467
+		} else {
468
+			throw "The image has not loaded yet.";
469
+		}
470
+	}
471
+
472
+  function dodraw() {
473
+    // console.log("dodraw...");
474
+    try {
475
+  	  // console.log("dodraw...try...");
476
+      draw();
477
+    }
478
+    catch(error) {
479
+      // console.log("dodraw...catch: " + error);
480
+    }
481
+  }
482
+
483
+	// Draw image if already loaded
484
+  // console.log("--------------------");
485
+  // console.log("drawImage " + img.src);
486
+	try {
487
+    // console.log("try...");
488
+		draw();
489
+	} catch(error) {
490
+    // console.log("catch: " + error);
491
+		img.onload = dodraw;
492
+	}
493
+	return this;
494
+};
495
+
496
+// Draw polygon
497
+$.fn.drawPolygon = function(args) {
498
+	var ctx = this.loadCanvas(),
499
+		params = $.extend({}, jC.defaults, args),
500
+		theta, dtheta, x, y,
501
+		toRad = checkUnits(params), i;
502
+	setGlobals(ctx, params);
503
+	
504
+	if (params.sides >= 3) {		
505
+		// Calculate points and draw
506
+		theta = (Math.PI/2) + (Math.PI/params.sides) + (params.angle*toRad);
507
+		dtheta = (Math.PI*2) / params.sides;
508
+		for (i=0; i<params.sides; i+=1) {
509
+			x = params.x + (params.radius * Math.cos(theta)) + 1e-10;
510
+			y = params.y + (params.radius * Math.sin(theta)) + 1e-10;
511
+			if (params.fromCenter === false) {
512
+				x += params.radius;
513
+				y += params.radius;
514
+			}
515
+			ctx.lineTo(x, y);
516
+			theta += dtheta;
517
+		}
518
+		closePath(ctx, params);
519
+	}
520
+	return this;
521
+};
522
+
523
+return window.jCanvas = jC;
524
+}(jQuery, document, Math, Number));

+ 4
- 0
Marlin/configurator/js/jquery-2.1.3.min.js
File diff suppressed because it is too large
View File


+ 220
- 0
Marlin/configurator/js/jstepper.js View File

@@ -0,0 +1,220 @@
1
+/*!
2
+ * jQuery "stepper" Plugin
3
+ * version 0.0.1
4
+ * @requires jQuery v1.3.2 or later
5
+ * @requires jCanvas
6
+ *
7
+ * Authored 2011-06-11 Scott Lahteine (thinkyhead.com)
8
+ *
9
+ *  A very simple numerical stepper.
10
+ *  TODO: place arrows based on div size, make 50/50 width
11
+ *
12
+ *  Usage example:
13
+ *
14
+ *  $('#mydiv').jstepper({
15
+ *    min: 1,
16
+ *    max: 4,
17
+ *    val: 1,
18
+ *    arrowWidth: 15,
19
+ *    arrowHeight: '22px',
20
+ *    color: '#FFF',
21
+ *    acolor: '#F70',
22
+ *    hcolor: '#FF0',
23
+ *    id: 'select-me',
24
+ *    stepperClass: 'inner',
25
+ *    textStyle: {width:'1.5em',fontSize:'20px',textAlign:'center'},
26
+ *    onChange: function(v) { },
27
+ *  });
28
+ *
29
+ */
30
+;(function($) {
31
+  var un = 'undefined';
32
+
33
+  $.jstepperArrows = [
34
+    { name:'prev', poly:[[1.0,0],[0,0.5],[1.0,1.0]] },
35
+    { name:'next', poly:[[0,0],[1.0,0.5],[0,1.0]] }
36
+  ];
37
+
38
+ 	$.fn.jstepper = function(args) {
39
+
40
+		return this.each(function() {
41
+
42
+      var defaults = {
43
+        min: 1,
44
+        max: null,
45
+        val: null,
46
+        active: true,
47
+        placeholder: null,
48
+        arrowWidth: 0,
49
+        arrowHeight: 0,
50
+        color: '#FFF',
51
+        hcolor: '#FF0',
52
+        acolor: '#F80',
53
+        id: '',
54
+        stepperClass: '',
55
+        textStyle: '',
56
+        onChange: (function(v){ if (typeof console.log !== 'undefined') console.log("val="+v); })
57
+      };
58
+
59
+      args = $.extend(defaults, args || {});
60
+
61
+		  var min = args.min * 1,
62
+          max = (args.max !== null) ? args.max * 1 : min,
63
+          span = max - min + 1,
64
+          val = (args.val !== null) ? args.val * 1 : min,
65
+          active = !args.disabled,
66
+          placeholder = args.placeholder,
67
+          arrowWidth = 1 * args.arrowWidth.toString().replace(/px/,''),
68
+          arrowHeight = 1 * args.arrowHeight.toString().replace(/px/,''),
69
+          color = args.color,
70
+          hcolor = args.hcolor,
71
+          acolor = args.acolor,
72
+			    $prev = $('<a href="#prev" style="cursor:w-resize;"><canvas/></a>'),
73
+			    $marq = $('<div class="number"/>').css({float:'left',textAlign:'center'}),
74
+			    $next = $('<a href="#next" style="cursor:e-resize;"><canvas/></a>'),
75
+			    arrow = [ $prev.find('canvas')[0], $next.find('canvas')[0] ],
76
+			    $stepper = $('<span class="jstepper"/>').append($prev).append($marq).append($next).append('<div style="clear:both;"/>'),
77
+			    onChange = args.onChange;
78
+
79
+      if (args.id) $stepper[0].id = args.id;
80
+      if (args.stepperClass) $stepper.addClass(args.stepperClass);
81
+      if (args.textStyle) $marq.css(args.textStyle);
82
+
83
+      // replace a span, but embed elsewhere
84
+      if (this.tagName == 'SPAN') {
85
+        var previd = this.id;
86
+        $(this).replaceWith($stepper);
87
+        if (previd) $stepper.attr('id',previd);
88
+      }
89
+      else {
90
+        $(this).append($stepper);
91
+      }
92
+
93
+      // hook to call functions on this object
94
+      $stepper[0].ui = {
95
+
96
+        refresh: function() {
97
+          this.updateNumber();
98
+          this._drawArrow(0, 1);
99
+          this._drawArrow(1, 1);
100
+          return this;
101
+        },
102
+
103
+        _drawArrow: function(i,state) {
104
+          var $elm = $(arrow[i]),
105
+              desc = $.jstepperArrows[i],
106
+              fillStyle = (state == 2) ? hcolor : (state == 3) ? acolor : color,
107
+              draw = { fillStyle: fillStyle },
108
+              w = $elm.width(), h = $elm.height();
109
+
110
+          if (w <= 0) w = $elm.attr('width');
111
+          if (h <= 0) h = $elm.attr('height');
112
+
113
+          $.each(desc.poly,function(i,v){
114
+            ++i;
115
+            draw['x'+i] = v[0] * w;
116
+            draw['y'+i] = v[1] * h;
117
+          });
118
+          $elm.restoreCanvas().clearCanvas().drawLine(draw);
119
+        },
120
+
121
+        updateNumber: function() {
122
+          $marq.html((active || placeholder === null) ? val.toString() : placeholder);
123
+          return this;
124
+        },
125
+
126
+        _doclick: function(i) {
127
+          this.add(i ? 1 : -1);
128
+          this._drawArrow(i, 3);
129
+          var self = this;
130
+          setTimeout(function(){ self._drawArrow(i, 2); }, 50);
131
+        },
132
+
133
+        add: function(x) {
134
+          val = (((val - min) + x + span) % span) + min;
135
+          this.updateNumber();
136
+          this.didChange(val);
137
+          return this;
138
+        },
139
+
140
+        min: function(v) {
141
+          if (typeof v === un) return min;
142
+          this.setRange(v,max);
143
+          return this;
144
+        },
145
+
146
+        max: function(v) {
147
+          if (typeof v === un) return max;
148
+          this.setRange(min,v);
149
+          return this;
150
+        },
151
+
152
+        val: function(v) {
153
+          if (typeof v === un) return val;
154
+          val = (((v - min) + span) % span) + min;
155
+          this.updateNumber();
156
+          return this;
157
+        },
158
+
159
+        setRange: function(lo, hi, ini) {
160
+          if (lo > hi) hi = (lo += hi -= lo) - hi;
161
+          min = lo; max = hi; span = hi - lo + 1;
162
+          if (typeof ini !== un) val = ini;
163
+          if (val < min) val = min;
164
+          if (val > max) val = max;
165
+          this.updateNumber();
166
+          return this;
167
+        },
168
+
169
+        active: function(a) {
170
+          if (typeof a === un) return active;
171
+          (active = a) ? $marq.removeClass('inactive') : $marq.addClass('inactive');
172
+          this.updateNumber();
173
+          return this;
174
+        },
175
+
176
+        disable: function() { this.active(false); return this; },
177
+        enable: function() { this.active(true); return this; },
178
+
179
+        clearPlaceholder: function() {
180
+          this.setPlaceholder(null);
181
+          return this;
182
+        },
183
+        setPlaceholder: function(p) {
184
+          placeholder = p;
185
+          if (!active) this.updateNumber();
186
+          return this;
187
+        },
188
+
189
+        didChange: onChange
190
+
191
+      };
192
+
193
+      // set hover and click for each arrow
194
+      $.each($.jstepperArrows, function(i,desc) {
195
+        var $elm = $(arrow[i]),
196
+            w = arrowWidth ? arrowWidth : $elm.width() ? $elm.width() : 15,
197
+            h = arrowHeight ? arrowHeight : $elm.height() ? $elm.height() : 24;
198
+        $elm[0]._index = i;
199
+        $elm
200
+          .css({float:'left'})
201
+          .attr({width:w,height:h,'class':desc.name})
202
+          .hover(
203
+            function(e) { $stepper[0].ui._drawArrow(e.target._index, 2); },
204
+            function(e) { $stepper[0].ui._drawArrow(e.target._index, 1); }
205
+          )
206
+          .click(function(e){
207
+            $stepper[0].ui._doclick(e.target._index);
208
+            return false;
209
+          });
210
+      });
211
+
212
+      // init the visuals first time
213
+  		$stepper[0].ui.refresh();
214
+
215
+		}); // this.each
216
+
217
+  }; // $.fn.jstepper
218
+
219
+})( jQuery );
220
+

+ 14
- 0
Marlin/configurator/js/jszip.min.js
File diff suppressed because it is too large
View File


+ 3
- 3
Marlin/dogm_lcd_implementation.h View File

@@ -24,9 +24,9 @@
24 24
   #define BLEN_A 0
25 25
   #define BLEN_B 1
26 26
   #define BLEN_C 2
27
-  #define EN_A (1<<BLEN_A)
28
-  #define EN_B (1<<BLEN_B)
29
-  #define EN_C (1<<BLEN_C)
27
+  #define EN_A BIT(BLEN_A)
28
+  #define EN_B BIT(BLEN_B)
29
+  #define EN_C BIT(BLEN_C)
30 30
   #define LCD_CLICKED (buttons&EN_C)
31 31
 #endif
32 32
 

+ 852
- 0
Marlin/example_configurations/Felix/Configuration.h View File

@@ -0,0 +1,852 @@
1
+#ifndef CONFIGURATION_H
2
+#define CONFIGURATION_H
3
+
4
+#include "boards.h"
5
+
6
+//===========================================================================
7
+//============================= Getting Started =============================
8
+//===========================================================================
9
+/*
10
+Here are some standard links for getting your machine calibrated:
11
+ * http://reprap.org/wiki/Calibration
12
+ * http://youtu.be/wAL9d7FgInk
13
+ * http://calculator.josefprusa.cz
14
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
15
+ * http://www.thingiverse.com/thing:5573
16
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
17
+ * http://www.thingiverse.com/thing:298812
18
+*/
19
+
20
+// This configuration file contains the basic settings.
21
+// Advanced settings can be found in Configuration_adv.h
22
+// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
23
+
24
+//===========================================================================
25
+//============================= DELTA Printer ===============================
26
+//===========================================================================
27
+// For a Delta printer replace the configuration files with the files in the
28
+// example_configurations/delta directory.
29
+//
30
+
31
+//===========================================================================
32
+//============================= SCARA Printer ===============================
33
+//===========================================================================
34
+// For a Delta printer replace the configuration files with the files in the
35
+// example_configurations/SCARA directory.
36
+//
37
+
38
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
39
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
+// build by the user have been successfully uploaded into firmware.
41
+#define STRING_VERSION "1.0.2"
42
+#define STRING_URL "reprap.org"
43
+#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
+#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
46
+//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
47
+
48
+// SERIAL_PORT selects which serial port should be used for communication with the host.
49
+// This allows the connection of wireless adapters (for instance) to non-default port pins.
50
+// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
51
+#define SERIAL_PORT 0
52
+
53
+// This determines the communication speed of the printer
54
+#define BAUDRATE 250000
55
+
56
+// This enables the serial port associated to the Bluetooth interface
57
+//#define BTENABLED              // Enable BT interface on AT90USB devices
58
+
59
+// The following define selects which electronics board you have.
60
+// Please choose the name from boards.h that matches your setup
61
+#ifndef MOTHERBOARD
62
+  #define MOTHERBOARD BOARD_FELIX2
63
+#endif
64
+
65
+// Define this to set a custom name for your generic Mendel,
66
+// #define CUSTOM_MENDEL_NAME "This Mendel"
67
+
68
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
69
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
70
+// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
71
+
72
+// This defines the number of extruders
73
+#define EXTRUDERS 1
74
+
75
+//// The following define selects which power supply you have. Please choose the one that matches your setup
76
+// 1 = ATX
77
+// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
78
+
79
+#define POWER_SUPPLY 1
80
+
81
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
82
+#define PS_DEFAULT_OFF
83
+
84
+//===========================================================================
85
+//============================= Thermal Settings ============================
86
+//===========================================================================
87
+//
88
+//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
89
+//
90
+//// Temperature sensor settings:
91
+// -2 is thermocouple with MAX6675 (only for sensor 0)
92
+// -1 is thermocouple with AD595
93
+// 0 is not used
94
+// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
95
+// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
96
+// 3 is Mendel-parts thermistor (4.7k pullup)
97
+// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
98
+// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
99
+// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
100
+// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
101
+// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
102
+// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
103
+// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
104
+// 10 is 100k RS thermistor 198-961 (4.7k pullup)
105
+// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106
+// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108
+// 20 is the PT100 circuit found in the Ultimainboard V2.x
109
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110
+//
111
+//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
112
+//                          (but gives greater accuracy and more stable PID)
113
+// 51 is 100k thermistor - EPCOS (1k pullup)
114
+// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
115
+// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
116
+//
117
+// 1047 is Pt1000 with 4k7 pullup
118
+// 1010 is Pt1000 with 1k pullup (non standard)
119
+// 147 is Pt100 with 4k7 pullup
120
+// 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
125
+
126
+#define TEMP_SENSOR_0 1
127
+#define TEMP_SENSOR_1 0
128
+#define TEMP_SENSOR_2 0
129
+#define TEMP_SENSOR_3 0
130
+#define TEMP_SENSOR_BED 1
131
+
132
+// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
133
+//#define TEMP_SENSOR_1_AS_REDUNDANT
134
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
135
+
136
+// Actual temperature must be close to target for this long before M109 returns success
137
+#define TEMP_RESIDENCY_TIME 15  // (seconds)
138
+#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
139
+#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
140
+
141
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
142
+// to check that the wiring to the thermistor is not broken.
143
+// Otherwise this would lead to the heater being powered on all the time.
144
+#define HEATER_0_MINTEMP 5
145
+#define HEATER_1_MINTEMP 5
146
+#define HEATER_2_MINTEMP 5
147
+#define HEATER_3_MINTEMP 5
148
+#define BED_MINTEMP 5
149
+
150
+// When temperature exceeds max temp, your heater will be switched off.
151
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
152
+// You should use MINTEMP for thermistor short/failure protection.
153
+#define HEATER_0_MAXTEMP 275
154
+#define HEATER_1_MAXTEMP 275
155
+#define HEATER_2_MAXTEMP 275
156
+#define HEATER_3_MAXTEMP 275
157
+#define BED_MAXTEMP 150
158
+
159
+// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
160
+// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
161
+// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
162
+//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
163
+
164
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
165
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
166
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
167
+
168
+//===========================================================================
169
+//============================= PID Settings ================================
170
+//===========================================================================
171
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
172
+
173
+// Comment the following line to disable PID and enable bang-bang.
174
+#define PIDTEMP
175
+#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
176
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
177
+#ifdef PIDTEMP
178
+  //#define PID_DEBUG // Sends debug data to the serial port.
179
+  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
180
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
181
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
182
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
183
+  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
184
+                                  // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
+  #define K1 0.95 //smoothing factor within the PID
187
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188
+
189
+  // Felix 2.0+ electronics with v4 Hotend
190
+  #define DEFAULT_Kp 12
191
+  #define DEFAULT_Ki 0.84
192
+  #define DEFAULT_Kd 85
193
+
194
+#endif // PIDTEMP
195
+
196
+//===========================================================================
197
+//============================= PID > Bed Temperature Control ===============
198
+//===========================================================================
199
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
200
+//
201
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
202
+// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
203
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
204
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
205
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
206
+// shouldn't use bed PID until someone else verifies your hardware works.
207
+// If this is enabled, find your own PID constants below.
208
+#define PIDTEMPBED
209
+//
210
+//#define BED_LIMIT_SWITCHING
211
+
212
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
213
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
214
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
215
+// so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
216
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
217
+
218
+#ifdef PIDTEMPBED
219
+// Felix Foil Heater
220
+   #define DEFAULT_bedKp 103.37
221
+   #define DEFAULT_bedKi 2.79
222
+   #define DEFAULT_bedKd 956.94
223
+
224
+// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
225
+#endif // PIDTEMPBED
226
+
227
+
228
+//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
229
+//can be software-disabled for whatever purposes by
230
+#define PREVENT_DANGEROUS_EXTRUDE
231
+//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
232
+#define PREVENT_LENGTHY_EXTRUDE
233
+
234
+#define EXTRUDE_MINTEMP 170
235
+#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
236
+
237
+//===========================================================================
238
+//============================= Thermal Runaway Protection ==================
239
+//===========================================================================
240
+/*
241
+This is a feature to protect your printer from burn up in flames if it has
242
+a thermistor coming off place (this happened to a friend of mine recently and
243
+motivated me writing this feature).
244
+
245
+The issue: If a thermistor come off, it will read a lower temperature than actual.
246
+The system will turn the heater on forever, burning up the filament and anything
247
+else around.
248
+
249
+After the temperature reaches the target for the first time, this feature will
250
+start measuring for how long the current temperature stays below the target
251
+minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
252
+
253
+If it stays longer than _PERIOD, it means the thermistor temperature
254
+cannot catch up with the target, so something *may be* wrong. Then, to be on the
255
+safe side, the system will he halt.
256
+
257
+Bear in mind the count down will just start AFTER the first time the
258
+thermistor temperature is over the target, so you will have no problem if
259
+your extruder heater takes 2 minutes to hit the target on heating.
260
+
261
+*/
262
+// If you want to enable this feature for all your extruder heaters,
263
+// uncomment the 2 defines below:
264
+
265
+// Parameters for all extruder heaters
266
+//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds
267
+//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius
268
+
269
+// If you want to enable this feature for your bed heater,
270
+// uncomment the 2 defines below:
271
+
272
+// Parameters for the bed heater
273
+//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds
274
+//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius
275
+
276
+
277
+//===========================================================================
278
+//============================= Mechanical Settings =========================
279
+//===========================================================================
280
+
281
+// Uncomment the following line to enable CoreXY kinematics
282
+// #define COREXY
283
+
284
+// coarse Endstop Settings
285
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
286
+
287
+#ifndef ENDSTOPPULLUPS
288
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
289
+  // #define ENDSTOPPULLUP_XMAX
290
+  // #define ENDSTOPPULLUP_YMAX
291
+  // #define ENDSTOPPULLUP_ZMAX
292
+  // #define ENDSTOPPULLUP_XMIN
293
+  // #define ENDSTOPPULLUP_YMIN
294
+  // #define ENDSTOPPULLUP_ZMIN
295
+#endif
296
+
297
+#ifdef ENDSTOPPULLUPS
298
+  #define ENDSTOPPULLUP_XMAX
299
+  #define ENDSTOPPULLUP_YMAX
300
+  #define ENDSTOPPULLUP_ZMAX
301
+  #define ENDSTOPPULLUP_XMIN
302
+  #define ENDSTOPPULLUP_YMIN
303
+  #define ENDSTOPPULLUP_ZMIN
304
+#endif
305
+
306
+// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
307
+const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308
+const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
309
+const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
310
+const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
311
+const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
312
+const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
313
+#define DISABLE_MAX_ENDSTOPS
314
+//#define DISABLE_MIN_ENDSTOPS
315
+
316
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
317
+#define X_ENABLE_ON 0
318
+#define Y_ENABLE_ON 0
319
+#define Z_ENABLE_ON 0
320
+#define E_ENABLE_ON 0 // For all extruders
321
+
322
+// Disables axis when it's not being used.
323
+#define DISABLE_X false
324
+#define DISABLE_Y false
325
+#define DISABLE_Z false
326
+#define DISABLE_E false // For all extruders
327
+#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
328
+
329
+#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
330
+#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
331
+#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
332
+#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
333
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
334
+#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
335
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
336
+
337
+// ENDSTOP SETTINGS:
338
+// Sets direction of endstops when homing; 1=MAX, -1=MIN
339
+#define X_HOME_DIR -1
340
+#define Y_HOME_DIR -1
341
+#define Z_HOME_DIR -1
342
+
343
+#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
344
+#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
345
+
346
+// Travel limits after homing (units are in mm)
347
+#define X_MAX_POS 255
348
+#define X_MIN_POS 0
349
+#define Y_MAX_POS 205
350
+#define Y_MIN_POS 0
351
+#define Z_MAX_POS 235
352
+#define Z_MIN_POS 0
353
+
354
+#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
355
+#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
356
+#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
357
+
358
+
359
+//===========================================================================
360
+//============================= Bed Auto Leveling ===========================
361
+//===========================================================================
362
+
363
+//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
364
+//#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
365
+
366
+#ifdef ENABLE_AUTO_BED_LEVELING
367
+
368
+// There are 2 different ways to pick the X and Y locations to probe:
369
+
370
+//  - "grid" mode
371
+//    Probe every point in a rectangular grid
372
+//    You must specify the rectangle, and the density of sample points
373
+//    This mode is preferred because there are more measurements.
374
+//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
375
+
376
+//  - "3-point" mode
377
+//    Probe 3 arbitrary points on the bed (that aren't colinear)
378
+//    You must specify the X & Y coordinates of all 3 points
379
+
380
+  #define AUTO_BED_LEVELING_GRID
381
+  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
382
+  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
383
+  // and least squares solution is calculated
384
+  // Note: this feature occupies 10'206 byte
385
+  #ifdef AUTO_BED_LEVELING_GRID
386
+
387
+    // Use one of these defines to specify the origin
388
+    // for a topographical map to be printed for your bed.
389
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
390
+    #define TOPO_ORIGIN OriginFrontLeft
391
+
392
+    // set the rectangle in which to probe
393
+    #define LEFT_PROBE_BED_POSITION 15
394
+    #define RIGHT_PROBE_BED_POSITION 170
395
+    #define BACK_PROBE_BED_POSITION 180
396
+    #define FRONT_PROBE_BED_POSITION 20
397
+
398
+     // set the number of grid points per dimension
399
+     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
400
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
401
+
402
+
403
+  #else  // not AUTO_BED_LEVELING_GRID
404
+    // with no grid, just probe 3 arbitrary points.  A simple cross-product
405
+    // is used to esimate the plane of the print bed
406
+
407
+      #define ABL_PROBE_PT_1_X 15
408
+      #define ABL_PROBE_PT_1_Y 180
409
+      #define ABL_PROBE_PT_2_X 15
410
+      #define ABL_PROBE_PT_2_Y 20
411
+      #define ABL_PROBE_PT_3_X 170
412
+      #define ABL_PROBE_PT_3_Y 20
413
+
414
+  #endif // AUTO_BED_LEVELING_GRID
415
+
416
+
417
+  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
418
+  // X and Y offsets must be integers
419
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
420
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
421
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
422
+
423
+  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
424
+                                        // Be sure you have this distance over your Z_MAX_POS in case
425
+
426
+  #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
427
+
428
+  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
429
+  #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
430
+
431
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
432
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
433
+
434
+  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
435
+  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
436
+  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
437
+
438
+//  #define PROBE_SERVO_DEACTIVATION_DELAY 300
439
+
440
+
441
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
442
+//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
443
+
444
+  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
445
+                          // When defined, it will:
446
+                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
447
+                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
448
+                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
449
+                          // - Block Z homing only when the probe is outside bed area.
450
+
451
+  #ifdef Z_SAFE_HOMING
452
+
453
+    #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
454
+    #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)
455
+
456
+  #endif
457
+
458
+  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
459
+    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
460
+      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
461
+	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
462
+	  #endif
463
+	#else
464
+      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
465
+	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
466
+	  #endif
467
+	#endif
468
+    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
469
+      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
470
+	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
471
+	  #endif
472
+	#else
473
+      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
474
+	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
475
+	  #endif
476
+	#endif
477
+
478
+
479
+  #endif
480
+
481
+#endif // ENABLE_AUTO_BED_LEVELING
482
+
483
+
484
+// The position of the homing switches
485
+//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
486
+//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
487
+
488
+//Manual homing switch locations:
489
+// For deltabots this means top and center of the Cartesian print volume.
490
+#define MANUAL_X_HOME_POS 0
491
+#define MANUAL_Y_HOME_POS 0
492
+#define MANUAL_Z_HOME_POS 0
493
+//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
494
+
495
+//// MOVEMENT SETTINGS
496
+#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
497
+#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
498
+
499
+// default settings
500
+
501
+// default steps per unit for Felix 2.0/3.0: 0.00249mm x/y rounding error with 3mm pitch HTD belt and 14 tooth pulleys. 0 z error.
502
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {76.190476, 76.190476, 1600, 164}
503
+#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
504
+#define DEFAULT_MAX_ACCELERATION      {5000,5000,100,80000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
505
+
506
+#define DEFAULT_ACCELERATION          1750 //1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
507
+#define DEFAULT_RETRACT_ACCELERATION  5000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
508
+#define DEFAULT_TRAVEL_ACCELERATION   3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
509
+
510
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
511
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
512
+// For the other hotends it is their distance from the extruder 0 hotend.
513
+// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
514
+// #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
515
+
516
+// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
517
+#define DEFAULT_XYJERK                10   // (mm/sec)
518
+#define DEFAULT_ZJERK                 0.3  //0.4   // (mm/sec)
519
+#define DEFAULT_EJERK                 5.0    // (mm/sec)
520
+
521
+
522
+//=============================================================================
523
+//============================= Additional Features ===========================
524
+//=============================================================================
525
+
526
+// Custom M code points
527
+#define CUSTOM_M_CODES
528
+#ifdef CUSTOM_M_CODES
529
+  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
530
+  #define Z_PROBE_OFFSET_RANGE_MIN -15
531
+  #define Z_PROBE_OFFSET_RANGE_MAX -5
532
+#endif
533
+
534
+
535
+// EEPROM
536
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
537
+// M500 - stores parameters in EEPROM
538
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
539
+// M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
540
+//define this to enable EEPROM support
541
+//#define EEPROM_SETTINGS
542
+//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
543
+// please keep turned on if you can.
544
+//#define EEPROM_CHITCHAT
545
+
546
+// Preheat Constants
547
+#define PLA_PREHEAT_HOTEND_TEMP 180
548
+#define PLA_PREHEAT_HPB_TEMP 70
549
+#define PLA_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
550
+
551
+#define ABS_PREHEAT_HOTEND_TEMP 240
552
+#define ABS_PREHEAT_HPB_TEMP 100
553
+#define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
554
+
555
+//==============================LCD and SD support=============================
556
+
557
+// Define your display language below. Replace (en) with your language code and uncomment.
558
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
559
+// See also language.h
560
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
561
+
562
+// Character based displays can have different extended charsets.
563
+//#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
564
+//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
565
+
566
+//#define ULTRA_LCD  //general LCD support, also 16x2
567
+//#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
568
+//#define SDSUPPORT // Enable SD Card Support in Hardware Console
569
+//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
570
+//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
571
+//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
572
+//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
573
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
574
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
575
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
576
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
577
+
578
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
579
+// http://reprap.org/wiki/PanelOne
580
+//#define PANEL_ONE
581
+
582
+// The MaKr3d Makr-Panel with graphic controller and SD support
583
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
584
+//#define MAKRPANEL
585
+
586
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
587
+// http://panucatt.com
588
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
589
+//#define VIKI2
590
+//#define miniVIKI
591
+
592
+// The RepRapDiscount Smart Controller (white PCB)
593
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
594
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
595
+
596
+// The GADGETS3D G3D LCD/SD Controller (blue PCB)
597
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
598
+//#define G3D_PANEL
599
+
600
+// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
601
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
602
+//
603
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
604
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
605
+
606
+// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
607
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
608
+//#define REPRAPWORLD_KEYPAD
609
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
610
+
611
+// The Elefu RA Board Control Panel
612
+// http://www.elefu.com/index.php?route=product/product&product_id=53
613
+// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
614
+//#define RA_CONTROL_PANEL
615
+
616
+//automatic expansion
617
+#if defined (MAKRPANEL)
618
+ #define DOGLCD
619
+ #define SDSUPPORT
620
+ #define ULTIPANEL
621
+ #define NEWPANEL
622
+ #define DEFAULT_LCD_CONTRAST 17
623
+#endif
624
+
625
+#if defined(miniVIKI) || defined(VIKI2)
626
+ #define ULTRA_LCD  //general LCD support, also 16x2
627
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
628
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
629
+
630
+  #ifdef miniVIKI
631
+   #define DEFAULT_LCD_CONTRAST 95
632
+  #else
633
+   #define DEFAULT_LCD_CONTRAST 40
634
+  #endif
635
+
636
+ #define ENCODER_PULSES_PER_STEP 4
637
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
638
+#endif
639
+
640
+#if defined (PANEL_ONE)
641
+ #define SDSUPPORT
642
+ #define ULTIMAKERCONTROLLER
643
+#endif
644
+
645
+#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
646
+ #define DOGLCD
647
+ #define U8GLIB_ST7920
648
+ #define REPRAP_DISCOUNT_SMART_CONTROLLER
649
+#endif
650
+
651
+#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
652
+ #define ULTIPANEL
653
+ #define NEWPANEL
654
+#endif
655
+
656
+#if defined(REPRAPWORLD_KEYPAD)
657
+  #define NEWPANEL
658
+  #define ULTIPANEL
659
+#endif
660
+#if defined(RA_CONTROL_PANEL)
661
+ #define ULTIPANEL
662
+ #define NEWPANEL
663
+ #define LCD_I2C_TYPE_PCA8574
664
+ #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
665
+#endif
666
+
667
+//I2C PANELS
668
+
669
+//#define LCD_I2C_SAINSMART_YWROBOT
670
+#ifdef LCD_I2C_SAINSMART_YWROBOT
671
+  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
672
+  // Make sure it is placed in the Arduino libraries directory.
673
+  #define LCD_I2C_TYPE_PCF8575
674
+  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
675
+  #define NEWPANEL
676
+  #define ULTIPANEL
677
+#endif
678
+
679
+// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
680
+//#define LCD_I2C_PANELOLU2
681
+#ifdef LCD_I2C_PANELOLU2
682
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
683
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
684
+  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
685
+  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
686
+  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
687
+  #define LCD_I2C_TYPE_MCP23017
688
+  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
689
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
690
+  #define NEWPANEL
691
+  #define ULTIPANEL
692
+
693
+  #ifndef ENCODER_PULSES_PER_STEP
694
+	#define ENCODER_PULSES_PER_STEP 4
695
+  #endif
696
+
697
+  #ifndef ENCODER_STEPS_PER_MENU_ITEM
698
+	#define ENCODER_STEPS_PER_MENU_ITEM 1
699
+  #endif
700
+
701
+
702
+  #ifdef LCD_USE_I2C_BUZZER
703
+	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
704
+	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
705
+  #endif
706
+
707
+#endif
708
+
709
+// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
710
+//#define LCD_I2C_VIKI
711
+#ifdef LCD_I2C_VIKI
712
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
713
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
714
+  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
715
+  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
716
+  #define LCD_I2C_TYPE_MCP23017
717
+  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
718
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
719
+  #define NEWPANEL
720
+  #define ULTIPANEL
721
+#endif
722
+
723
+// Shift register panels
724
+// ---------------------
725
+// 2 wire Non-latching LCD SR from:
726
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
727
+
728
+//#define SAV_3DLCD
729
+#ifdef SAV_3DLCD
730
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
731
+   #define NEWPANEL
732
+   #define ULTIPANEL
733
+#endif
734
+
735
+
736
+#ifdef ULTIPANEL
737
+  #define NEWPANEL  //enable this if you have a click-encoder panel
738
+  #define SDSUPPORT
739
+  #define ULTRA_LCD
740
+  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
741
+    #define LCD_WIDTH 22
742
+    #define LCD_HEIGHT 5
743
+  #else
744
+    #define LCD_WIDTH 20
745
+    #define LCD_HEIGHT 4
746
+  #endif
747
+#else //no panel but just LCD
748
+  #ifdef ULTRA_LCD
749
+  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
750
+    #define LCD_WIDTH 22
751
+    #define LCD_HEIGHT 5
752
+  #else
753
+    #define LCD_WIDTH 16
754
+    #define LCD_HEIGHT 2
755
+  #endif
756
+  #endif
757
+#endif
758
+
759
+// default LCD contrast for dogm-like LCD displays
760
+#ifdef DOGLCD
761
+# ifndef DEFAULT_LCD_CONTRAST
762
+#  define DEFAULT_LCD_CONTRAST 32
763
+# endif
764
+#endif
765
+
766
+// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
767
+#define FAST_PWM_FAN
768
+
769
+// Temperature status LEDs that display the hotend and bet temperature.
770
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
771
+// Otherwise the RED led is on. There is 1C hysteresis.
772
+//#define TEMP_STAT_LEDS
773
+
774
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
775
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
776
+// is too low, you should also increment SOFT_PWM_SCALE.
777
+//#define FAN_SOFT_PWM
778
+
779
+// Incrementing this by 1 will double the software PWM frequency,
780
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
781
+// However, control resolution will be halved for each increment;
782
+// at zero value, there are 128 effective control positions.
783
+#define SOFT_PWM_SCALE 0
784
+
785
+// M240  Triggers a camera by emulating a Canon RC-1 Remote
786
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
787
+// #define PHOTOGRAPH_PIN     23
788
+
789
+// SF send wrong arc g-codes when using Arc Point as fillet procedure
790
+//#define SF_ARC_FIX
791
+
792
+// Support for the BariCUDA Paste Extruder.
793
+//#define BARICUDA
794
+
795
+//define BlinkM/CyzRgb Support
796
+//#define BLINKM
797
+
798
+/*********************************************************************\
799
+* R/C SERVO support
800
+* Sponsored by TrinityLabs, Reworked by codexmas
801
+**********************************************************************/
802
+
803
+// Number of servos
804
+//
805
+// If you select a configuration below, this will receive a default value and does not need to be set manually
806
+// set it manually if you have more servos than extruders and wish to manually control some
807
+// leaving it undefined or defining as 0 will disable the servo subsystem
808
+// If unsure, leave commented / disabled
809
+//
810
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
811
+
812
+// Servo Endstops
813
+//
814
+// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
815
+// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500.
816
+//
817
+//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
818
+//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
819
+
820
+/**********************************************************************\
821
+ * Support for a filament diameter sensor
822
+ * Also allows adjustment of diameter at print time (vs  at slicing)
823
+ * Single extruder only at this point (extruder 0)
824
+ *
825
+ * Motherboards
826
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
827
+ * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
828
+ * 301 - Rambo  - uses Analog input 3
829
+ * Note may require analog pins to be defined for different motherboards
830
+ **********************************************************************/
831
+// Uncomment below to enable
832
+//#define FILAMENT_SENSOR
833
+
834
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
835
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
836
+
837
+#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
838
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
839
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
840
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
841
+
842
+//defines used in the code
843
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
844
+
845
+//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
846
+//#define FILAMENT_LCD_DISPLAY
847
+
848
+
849
+#include "Configuration_adv.h"
850
+#include "thermistortables.h"
851
+
852
+#endif //__CONFIGURATION_H

+ 852
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -0,0 +1,852 @@
1
+#ifndef CONFIGURATION_H
2
+#define CONFIGURATION_H
3
+
4
+#include "boards.h"
5
+
6
+//===========================================================================
7
+//============================= Getting Started =============================
8
+//===========================================================================
9
+/*
10
+Here are some standard links for getting your machine calibrated:
11
+ * http://reprap.org/wiki/Calibration
12
+ * http://youtu.be/wAL9d7FgInk
13
+ * http://calculator.josefprusa.cz
14
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
15
+ * http://www.thingiverse.com/thing:5573
16
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
17
+ * http://www.thingiverse.com/thing:298812
18
+*/
19
+
20
+// This configuration file contains the basic settings.
21
+// Advanced settings can be found in Configuration_adv.h
22
+// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
23
+
24
+//===========================================================================
25
+//============================= DELTA Printer ===============================
26
+//===========================================================================
27
+// For a Delta printer replace the configuration files with the files in the
28
+// example_configurations/delta directory.
29
+//
30
+
31
+//===========================================================================
32
+//============================= SCARA Printer ===============================
33
+//===========================================================================
34
+// For a Delta printer replace the configuration files with the files in the
35
+// example_configurations/SCARA directory.
36
+//
37
+
38
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
39
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
40
+// build by the user have been successfully uploaded into firmware.
41
+#define STRING_VERSION "1.0.2"
42
+#define STRING_URL "reprap.org"
43
+#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
+#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
46
+//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
47
+
48
+// SERIAL_PORT selects which serial port should be used for communication with the host.
49
+// This allows the connection of wireless adapters (for instance) to non-default port pins.
50
+// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
51
+#define SERIAL_PORT 0
52
+
53
+// This determines the communication speed of the printer
54
+#define BAUDRATE 250000
55
+
56
+// This enables the serial port associated to the Bluetooth interface
57
+//#define BTENABLED              // Enable BT interface on AT90USB devices
58
+
59
+// The following define selects which electronics board you have.
60
+// Please choose the name from boards.h that matches your setup
61
+#ifndef MOTHERBOARD
62
+  #define MOTHERBOARD BOARD_FELIX2
63
+#endif
64
+
65
+// Define this to set a custom name for your generic Mendel,
66
+// #define CUSTOM_MENDEL_NAME "This Mendel"
67
+
68
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
69
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
70
+// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
71
+
72
+// This defines the number of extruders
73
+#define EXTRUDERS 2
74
+
75
+//// The following define selects which power supply you have. Please choose the one that matches your setup
76
+// 1 = ATX
77
+// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
78
+
79
+#define POWER_SUPPLY 1
80
+
81
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
82
+#define PS_DEFAULT_OFF
83
+
84
+//===========================================================================
85
+//============================= Thermal Settings ============================
86
+//===========================================================================
87
+//
88
+//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
89
+//
90
+//// Temperature sensor settings:
91
+// -2 is thermocouple with MAX6675 (only for sensor 0)
92
+// -1 is thermocouple with AD595
93
+// 0 is not used
94
+// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
95
+// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
96
+// 3 is Mendel-parts thermistor (4.7k pullup)
97
+// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
98
+// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
99
+// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
100
+// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
101
+// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
102
+// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
103
+// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
104
+// 10 is 100k RS thermistor 198-961 (4.7k pullup)
105
+// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
106
+// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
107
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
108
+// 20 is the PT100 circuit found in the Ultimainboard V2.x
109
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
110
+//
111
+//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
112
+//                          (but gives greater accuracy and more stable PID)
113
+// 51 is 100k thermistor - EPCOS (1k pullup)
114
+// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
115
+// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
116
+//
117
+// 1047 is Pt1000 with 4k7 pullup
118
+// 1010 is Pt1000 with 1k pullup (non standard)
119
+// 147 is Pt100 with 4k7 pullup
120
+// 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
125
+
126
+#define TEMP_SENSOR_0 1
127
+#define TEMP_SENSOR_1 1
128
+#define TEMP_SENSOR_2 0
129
+#define TEMP_SENSOR_3 0
130
+#define TEMP_SENSOR_BED 1
131
+
132
+// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
133
+//#define TEMP_SENSOR_1_AS_REDUNDANT
134
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
135
+
136
+// Actual temperature must be close to target for this long before M109 returns success
137
+#define TEMP_RESIDENCY_TIME 15  // (seconds)
138
+#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
139
+#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
140
+
141
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
142
+// to check that the wiring to the thermistor is not broken.
143
+// Otherwise this would lead to the heater being powered on all the time.
144
+#define HEATER_0_MINTEMP 5
145
+#define HEATER_1_MINTEMP 5
146
+#define HEATER_2_MINTEMP 5
147
+#define HEATER_3_MINTEMP 5
148
+#define BED_MINTEMP 5
149
+
150
+// When temperature exceeds max temp, your heater will be switched off.
151
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
152
+// You should use MINTEMP for thermistor short/failure protection.
153
+#define HEATER_0_MAXTEMP 275
154
+#define HEATER_1_MAXTEMP 275
155
+#define HEATER_2_MAXTEMP 275
156
+#define HEATER_3_MAXTEMP 275
157
+#define BED_MAXTEMP 150
158
+
159
+// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
160
+// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
161
+// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
162
+//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
163
+
164
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
165
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
166
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
167
+
168
+//===========================================================================
169
+//============================= PID Settings ================================
170
+//===========================================================================
171
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
172
+
173
+// Comment the following line to disable PID and enable bang-bang.
174
+#define PIDTEMP
175
+#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
176
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
177
+#ifdef PIDTEMP
178
+  //#define PID_DEBUG // Sends debug data to the serial port.
179
+  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
180
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
181
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
182
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
183
+  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
184
+                                  // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
+  #define K1 0.95 //smoothing factor within the PID
187
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188
+
189
+  // Felix 2.0+ electronics with v4 Hotend
190
+  #define DEFAULT_Kp 12
191
+  #define DEFAULT_Ki 0.84
192
+  #define DEFAULT_Kd 85
193
+
194
+#endif // PIDTEMP
195
+
196
+//===========================================================================
197
+//============================= PID > Bed Temperature Control ===============
198
+//===========================================================================
199
+// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
200
+//
201
+// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
202
+// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
203
+// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
204
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
205
+// If your configuration is significantly different than this and you don't understand the issues involved, you probably
206
+// shouldn't use bed PID until someone else verifies your hardware works.
207
+// If this is enabled, find your own PID constants below.
208
+#define PIDTEMPBED
209
+//
210
+//#define BED_LIMIT_SWITCHING
211
+
212
+// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
213
+// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
214
+// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
215
+// so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
216
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
217
+
218
+#ifdef PIDTEMPBED
219
+// Felix Foil Heater
220
+   #define DEFAULT_bedKp 103.37
221
+   #define DEFAULT_bedKi 2.79
222
+   #define DEFAULT_bedKd 956.94
223
+
224
+// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
225
+#endif // PIDTEMPBED
226
+
227
+
228
+//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
229
+//can be software-disabled for whatever purposes by
230
+#define PREVENT_DANGEROUS_EXTRUDE
231
+//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
232
+#define PREVENT_LENGTHY_EXTRUDE
233
+
234
+#define EXTRUDE_MINTEMP 170
235
+#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
236
+
237
+//===========================================================================
238
+//============================= Thermal Runaway Protection ==================
239
+//===========================================================================
240
+/*
241
+This is a feature to protect your printer from burn up in flames if it has
242
+a thermistor coming off place (this happened to a friend of mine recently and
243
+motivated me writing this feature).
244
+
245
+The issue: If a thermistor come off, it will read a lower temperature than actual.
246
+The system will turn the heater on forever, burning up the filament and anything
247
+else around.
248
+
249
+After the temperature reaches the target for the first time, this feature will
250
+start measuring for how long the current temperature stays below the target
251
+minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
252
+
253
+If it stays longer than _PERIOD, it means the thermistor temperature
254
+cannot catch up with the target, so something *may be* wrong. Then, to be on the
255
+safe side, the system will he halt.
256
+
257
+Bear in mind the count down will just start AFTER the first time the
258
+thermistor temperature is over the target, so you will have no problem if
259
+your extruder heater takes 2 minutes to hit the target on heating.
260
+
261
+*/
262
+// If you want to enable this feature for all your extruder heaters,
263
+// uncomment the 2 defines below:
264
+
265
+// Parameters for all extruder heaters
266
+//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds
267
+//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius
268
+
269
+// If you want to enable this feature for your bed heater,
270
+// uncomment the 2 defines below:
271
+
272
+// Parameters for the bed heater
273
+//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds
274
+//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius
275
+
276
+
277
+//===========================================================================
278
+//============================= Mechanical Settings =========================
279
+//===========================================================================
280
+
281
+// Uncomment the following line to enable CoreXY kinematics
282
+// #define COREXY
283
+
284
+// coarse Endstop Settings
285
+#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
286
+
287
+#ifndef ENDSTOPPULLUPS
288
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
289
+  // #define ENDSTOPPULLUP_XMAX
290
+  // #define ENDSTOPPULLUP_YMAX
291
+  // #define ENDSTOPPULLUP_ZMAX
292
+  // #define ENDSTOPPULLUP_XMIN
293
+  // #define ENDSTOPPULLUP_YMIN
294
+  // #define ENDSTOPPULLUP_ZMIN
295
+#endif
296
+
297
+#ifdef ENDSTOPPULLUPS
298
+  #define ENDSTOPPULLUP_XMAX
299
+  #define ENDSTOPPULLUP_YMAX
300
+  #define ENDSTOPPULLUP_ZMAX
301
+  #define ENDSTOPPULLUP_XMIN
302
+  #define ENDSTOPPULLUP_YMIN
303
+  #define ENDSTOPPULLUP_ZMIN
304
+#endif
305
+
306
+// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
307
+const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308
+const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
309
+const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
310
+const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
311
+const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
312
+const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
313
+#define DISABLE_MAX_ENDSTOPS
314
+//#define DISABLE_MIN_ENDSTOPS
315
+
316
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
317
+#define X_ENABLE_ON 0
318
+#define Y_ENABLE_ON 0
319
+#define Z_ENABLE_ON 0
320
+#define E_ENABLE_ON 0 // For all extruders
321
+
322
+// Disables axis when it's not being used.
323
+#define DISABLE_X false
324
+#define DISABLE_Y false
325
+#define DISABLE_Z false
326
+#define DISABLE_E false // For all extruders
327
+#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
328
+
329
+#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
330
+#define INVERT_Y_DIR true     // for Mendel set to true, for Orca set to false
331
+#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
332
+#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
333
+#define INVERT_E1_DIR true    // for direct drive extruder v9 set to true, for geared extruder set to false
334
+#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
335
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
336
+
337
+// ENDSTOP SETTINGS:
338
+// Sets direction of endstops when homing; 1=MAX, -1=MIN
339
+#define X_HOME_DIR -1
340
+#define Y_HOME_DIR -1
341
+#define Z_HOME_DIR -1
342
+
343
+#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
344
+#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
345
+
346
+// Travel limits after homing (units are in mm)
347
+#define X_MAX_POS 255
348
+#define X_MIN_POS 0
349
+#define Y_MAX_POS 205
350
+#define Y_MIN_POS 0
351
+#define Z_MAX_POS 235
352
+#define Z_MIN_POS 0
353
+
354
+#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
355
+#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
356
+#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
357
+
358
+
359
+//===========================================================================
360
+//============================= Bed Auto Leveling ===========================
361
+//===========================================================================
362
+
363
+//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
364
+//#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
365
+
366
+#ifdef ENABLE_AUTO_BED_LEVELING
367
+
368
+// There are 2 different ways to pick the X and Y locations to probe:
369
+
370
+//  - "grid" mode
371
+//    Probe every point in a rectangular grid
372
+//    You must specify the rectangle, and the density of sample points
373
+//    This mode is preferred because there are more measurements.
374
+//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
375
+
376
+//  - "3-point" mode
377
+//    Probe 3 arbitrary points on the bed (that aren't colinear)
378
+//    You must specify the X & Y coordinates of all 3 points
379
+
380
+  #define AUTO_BED_LEVELING_GRID
381
+  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
382
+  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
383
+  // and least squares solution is calculated
384
+  // Note: this feature occupies 10'206 byte
385
+  #ifdef AUTO_BED_LEVELING_GRID
386
+
387
+    // Use one of these defines to specify the origin
388
+    // for a topographical map to be printed for your bed.
389
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
390
+    #define TOPO_ORIGIN OriginFrontLeft
391
+
392
+    // set the rectangle in which to probe
393
+    #define LEFT_PROBE_BED_POSITION 15
394
+    #define RIGHT_PROBE_BED_POSITION 170
395
+    #define BACK_PROBE_BED_POSITION 180
396
+    #define FRONT_PROBE_BED_POSITION 20
397
+
398
+     // set the number of grid points per dimension
399
+     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
400
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
401
+
402
+
403
+  #else  // not AUTO_BED_LEVELING_GRID
404
+    // with no grid, just probe 3 arbitrary points.  A simple cross-product
405
+    // is used to esimate the plane of the print bed
406
+
407
+      #define ABL_PROBE_PT_1_X 15
408
+      #define ABL_PROBE_PT_1_Y 180
409
+      #define ABL_PROBE_PT_2_X 15
410
+      #define ABL_PROBE_PT_2_Y 20
411
+      #define ABL_PROBE_PT_3_X 170
412
+      #define ABL_PROBE_PT_3_Y 20
413
+
414
+  #endif // AUTO_BED_LEVELING_GRID
415
+
416
+
417
+  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
418
+  // X and Y offsets must be integers
419
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
420
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
421
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
422
+
423
+  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
424
+                                        // Be sure you have this distance over your Z_MAX_POS in case
425
+
426
+  #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
427
+
428
+  #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
429
+  #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
430
+
431
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
432
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
433
+
434
+  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
435
+  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
436
+  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
437
+
438
+//  #define PROBE_SERVO_DEACTIVATION_DELAY 300
439
+
440
+
441
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
442
+//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
443
+
444
+  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
445
+                          // When defined, it will:
446
+                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
447
+                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
448
+                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
449
+                          // - Block Z homing only when the probe is outside bed area.
450
+
451
+  #ifdef Z_SAFE_HOMING
452
+
453
+    #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
454
+    #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)
455
+
456
+  #endif
457
+
458
+  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
459
+    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
460
+      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
461
+	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
462
+	  #endif
463
+	#else
464
+      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
465
+	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
466
+	  #endif
467
+	#endif
468
+    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
469
+      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
470
+	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
471
+	  #endif
472
+	#else
473
+      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
474
+	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
475
+	  #endif
476
+	#endif
477
+
478
+
479
+  #endif
480
+
481
+#endif // ENABLE_AUTO_BED_LEVELING
482
+
483
+
484
+// The position of the homing switches
485
+//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
486
+//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
487
+
488
+//Manual homing switch locations:
489
+// For deltabots this means top and center of the Cartesian print volume.
490
+#define MANUAL_X_HOME_POS 0
491
+#define MANUAL_Y_HOME_POS 0
492
+#define MANUAL_Z_HOME_POS 0
493
+//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
494
+
495
+//// MOVEMENT SETTINGS
496
+#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
497
+#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
498
+
499
+// default settings
500
+
501
+// default steps per unit for Felix 2.0/3.0: 0.00249mm x/y rounding error with 3mm pitch HTD belt and 14 tooth pulleys. 0 z error.
502
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {76.190476, 76.190476, 1600, 164}
503
+#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
504
+#define DEFAULT_MAX_ACCELERATION      {5000,5000,100,80000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
505
+
506
+#define DEFAULT_ACCELERATION          1750 //1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
507
+#define DEFAULT_RETRACT_ACCELERATION  5000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
508
+#define DEFAULT_TRAVEL_ACCELERATION   3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
509
+
510
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
511
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
512
+// For the other hotends it is their distance from the extruder 0 hotend.
513
+// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
514
+// #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
515
+
516
+// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
517
+#define DEFAULT_XYJERK                10   // (mm/sec)
518
+#define DEFAULT_ZJERK                 0.3  //0.4   // (mm/sec)
519
+#define DEFAULT_EJERK                 5.0    // (mm/sec)
520
+
521
+
522
+//=============================================================================
523
+//============================= Additional Features ===========================
524
+//=============================================================================
525
+
526
+// Custom M code points
527
+#define CUSTOM_M_CODES
528
+#ifdef CUSTOM_M_CODES
529
+  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
530
+  #define Z_PROBE_OFFSET_RANGE_MIN -15
531
+  #define Z_PROBE_OFFSET_RANGE_MAX -5
532
+#endif
533
+
534
+
535
+// EEPROM
536
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
537
+// M500 - stores parameters in EEPROM
538
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
539
+// M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
540
+//define this to enable EEPROM support
541
+//#define EEPROM_SETTINGS
542
+//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
543
+// please keep turned on if you can.
544
+//#define EEPROM_CHITCHAT
545
+
546
+// Preheat Constants
547
+#define PLA_PREHEAT_HOTEND_TEMP 180
548
+#define PLA_PREHEAT_HPB_TEMP 70
549
+#define PLA_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
550
+
551
+#define ABS_PREHEAT_HOTEND_TEMP 240
552
+#define ABS_PREHEAT_HPB_TEMP 100
553
+#define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
554
+
555
+//==============================LCD and SD support=============================
556
+
557
+// Define your display language below. Replace (en) with your language code and uncomment.
558
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
559
+// See also language.h
560
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
561
+
562
+// Character based displays can have different extended charsets.
563
+//#define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
564
+//#define DISPLAY_CHARSET_HD44780_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one.
565
+
566
+//#define ULTRA_LCD  //general LCD support, also 16x2
567
+//#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
568
+//#define SDSUPPORT // Enable SD Card Support in Hardware Console
569
+//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
570
+//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
571
+//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
572
+//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
573
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
574
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
575
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
576
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
577
+
578
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
579
+// http://reprap.org/wiki/PanelOne
580
+//#define PANEL_ONE
581
+
582
+// The MaKr3d Makr-Panel with graphic controller and SD support
583
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
584
+//#define MAKRPANEL
585
+
586
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
587
+// http://panucatt.com
588
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
589
+//#define VIKI2
590
+//#define miniVIKI
591
+
592
+// The RepRapDiscount Smart Controller (white PCB)
593
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
594
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
595
+
596
+// The GADGETS3D G3D LCD/SD Controller (blue PCB)
597
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
598
+//#define G3D_PANEL
599
+
600
+// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
601
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
602
+//
603
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
604
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
605
+
606
+// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
607
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
608
+//#define REPRAPWORLD_KEYPAD
609
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
610
+
611
+// The Elefu RA Board Control Panel
612
+// http://www.elefu.com/index.php?route=product/product&product_id=53
613
+// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
614
+//#define RA_CONTROL_PANEL
615
+
616
+//automatic expansion
617
+#if defined (MAKRPANEL)
618
+ #define DOGLCD
619
+ #define SDSUPPORT
620
+ #define ULTIPANEL
621
+ #define NEWPANEL
622
+ #define DEFAULT_LCD_CONTRAST 17
623
+#endif
624
+
625
+#if defined(miniVIKI) || defined(VIKI2)
626
+ #define ULTRA_LCD  //general LCD support, also 16x2
627
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
628
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
629
+
630
+  #ifdef miniVIKI
631
+   #define DEFAULT_LCD_CONTRAST 95
632
+  #else
633
+   #define DEFAULT_LCD_CONTRAST 40
634
+  #endif
635
+
636
+ #define ENCODER_PULSES_PER_STEP 4
637
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
638
+#endif
639
+
640
+#if defined (PANEL_ONE)
641
+ #define SDSUPPORT
642
+ #define ULTIMAKERCONTROLLER
643
+#endif
644
+
645
+#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
646
+ #define DOGLCD
647
+ #define U8GLIB_ST7920
648
+ #define REPRAP_DISCOUNT_SMART_CONTROLLER
649
+#endif
650
+
651
+#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
652
+ #define ULTIPANEL
653
+ #define NEWPANEL
654
+#endif
655
+
656
+#if defined(REPRAPWORLD_KEYPAD)
657
+  #define NEWPANEL
658
+  #define ULTIPANEL
659
+#endif
660
+#if defined(RA_CONTROL_PANEL)
661
+ #define ULTIPANEL
662
+ #define NEWPANEL
663
+ #define LCD_I2C_TYPE_PCA8574
664
+ #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
665
+#endif
666
+
667
+//I2C PANELS
668
+
669
+//#define LCD_I2C_SAINSMART_YWROBOT
670
+#ifdef LCD_I2C_SAINSMART_YWROBOT
671
+  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
672
+  // Make sure it is placed in the Arduino libraries directory.
673
+  #define LCD_I2C_TYPE_PCF8575
674
+  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
675
+  #define NEWPANEL
676
+  #define ULTIPANEL
677
+#endif
678
+
679
+// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
680
+//#define LCD_I2C_PANELOLU2
681
+#ifdef LCD_I2C_PANELOLU2
682
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
683
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
684
+  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
685
+  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
686
+  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
687
+  #define LCD_I2C_TYPE_MCP23017
688
+  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
689
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
690
+  #define NEWPANEL
691
+  #define ULTIPANEL
692
+
693
+  #ifndef ENCODER_PULSES_PER_STEP
694
+	#define ENCODER_PULSES_PER_STEP 4
695
+  #endif
696
+
697
+  #ifndef ENCODER_STEPS_PER_MENU_ITEM
698
+	#define ENCODER_STEPS_PER_MENU_ITEM 1
699
+  #endif
700
+
701
+
702
+  #ifdef LCD_USE_I2C_BUZZER
703
+	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
704
+	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
705
+  #endif
706
+
707
+#endif
708
+
709
+// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
710
+//#define LCD_I2C_VIKI
711
+#ifdef LCD_I2C_VIKI
712
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
713
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
714
+  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
715
+  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
716
+  #define LCD_I2C_TYPE_MCP23017
717
+  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
718
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
719
+  #define NEWPANEL
720
+  #define ULTIPANEL
721
+#endif
722
+
723
+// Shift register panels
724
+// ---------------------
725
+// 2 wire Non-latching LCD SR from:
726
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
727
+
728
+//#define SAV_3DLCD
729
+#ifdef SAV_3DLCD
730
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
731
+   #define NEWPANEL
732
+   #define ULTIPANEL
733
+#endif
734
+
735
+
736
+#ifdef ULTIPANEL
737
+  #define NEWPANEL  //enable this if you have a click-encoder panel
738
+  #define SDSUPPORT
739
+  #define ULTRA_LCD
740
+  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
741
+    #define LCD_WIDTH 22
742
+    #define LCD_HEIGHT 5
743
+  #else
744
+    #define LCD_WIDTH 20
745
+    #define LCD_HEIGHT 4
746
+  #endif
747
+#else //no panel but just LCD
748
+  #ifdef ULTRA_LCD
749
+  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
750
+    #define LCD_WIDTH 22
751
+    #define LCD_HEIGHT 5
752
+  #else
753
+    #define LCD_WIDTH 16
754
+    #define LCD_HEIGHT 2
755
+  #endif
756
+  #endif
757
+#endif
758
+
759
+// default LCD contrast for dogm-like LCD displays
760
+#ifdef DOGLCD
761
+# ifndef DEFAULT_LCD_CONTRAST
762
+#  define DEFAULT_LCD_CONTRAST 32
763
+# endif
764
+#endif
765
+
766
+// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
767
+#define FAST_PWM_FAN
768
+
769
+// Temperature status LEDs that display the hotend and bet temperature.
770
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
771
+// Otherwise the RED led is on. There is 1C hysteresis.
772
+//#define TEMP_STAT_LEDS
773
+
774
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
775
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
776
+// is too low, you should also increment SOFT_PWM_SCALE.
777
+//#define FAN_SOFT_PWM
778
+
779
+// Incrementing this by 1 will double the software PWM frequency,
780
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
781
+// However, control resolution will be halved for each increment;
782
+// at zero value, there are 128 effective control positions.
783
+#define SOFT_PWM_SCALE 0
784
+
785
+// M240  Triggers a camera by emulating a Canon RC-1 Remote
786
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
787
+// #define PHOTOGRAPH_PIN     23
788
+
789
+// SF send wrong arc g-codes when using Arc Point as fillet procedure
790
+//#define SF_ARC_FIX
791
+
792
+// Support for the BariCUDA Paste Extruder.
793
+//#define BARICUDA
794
+
795
+//define BlinkM/CyzRgb Support
796
+//#define BLINKM
797
+
798
+/*********************************************************************\
799
+* R/C SERVO support
800
+* Sponsored by TrinityLabs, Reworked by codexmas
801
+**********************************************************************/
802
+
803
+// Number of servos
804
+//
805
+// If you select a configuration below, this will receive a default value and does not need to be set manually
806
+// set it manually if you have more servos than extruders and wish to manually control some
807
+// leaving it undefined or defining as 0 will disable the servo subsystem
808
+// If unsure, leave commented / disabled
809
+//
810
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
811
+
812
+// Servo Endstops
813
+//
814
+// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
815
+// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500.
816
+//
817
+//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
818
+//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
819
+
820
+/**********************************************************************\
821
+ * Support for a filament diameter sensor
822
+ * Also allows adjustment of diameter at print time (vs  at slicing)
823
+ * Single extruder only at this point (extruder 0)
824
+ *
825
+ * Motherboards
826
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
827
+ * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
828
+ * 301 - Rambo  - uses Analog input 3
829
+ * Note may require analog pins to be defined for different motherboards
830
+ **********************************************************************/
831
+// Uncomment below to enable
832
+//#define FILAMENT_SENSOR
833
+
834
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
835
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
836
+
837
+#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
838
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
839
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
840
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
841
+
842
+//defines used in the code
843
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially
844
+
845
+//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status.  Status will appear for 5 sec.
846
+//#define FILAMENT_LCD_DISPLAY
847
+
848
+
849
+#include "Configuration_adv.h"
850
+#include "thermistortables.h"
851
+
852
+#endif //__CONFIGURATION_H

+ 541
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -0,0 +1,541 @@
1
+#ifndef CONFIGURATION_ADV_H
2
+#define CONFIGURATION_ADV_H
3
+
4
+//===========================================================================
5
+//=============================Thermal Settings  ============================
6
+//===========================================================================
7
+
8
+#ifdef BED_LIMIT_SWITCHING
9
+  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
10
+#endif
11
+#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
12
+
13
+//// Heating sanity check:
14
+// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
15
+// If the temperature has not increased at the end of that period, the target temperature is set to zero.
16
+// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
17
+//  differ by at least 2x WATCH_TEMP_INCREASE
18
+//#define WATCH_TEMP_PERIOD 40000 //40 seconds
19
+//#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
20
+
21
+#ifdef PIDTEMP
22
+  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
23
+  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
24
+  #define PID_ADD_EXTRUSION_RATE
25
+  #ifdef PID_ADD_EXTRUSION_RATE
26
+    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
27
+  #endif
28
+#endif
29
+
30
+
31
+//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
32
+//The maximum buffered steps/sec of the extruder motor are called "se".
33
+//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
34
+// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
35
+// you exit the value by any M109 without F*
36
+// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
37
+// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
38
+#define AUTOTEMP
39
+#ifdef AUTOTEMP
40
+  #define AUTOTEMP_OLDWEIGHT 0.98
41
+#endif
42
+
43
+//Show Temperature ADC value
44
+//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
45
+//#define SHOW_TEMP_ADC_VALUES
46
+
47
+//  extruder run-out prevention.
48
+//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
49
+//#define EXTRUDER_RUNOUT_PREVENT
50
+#define EXTRUDER_RUNOUT_MINTEMP 190
51
+#define EXTRUDER_RUNOUT_SECONDS 30.
52
+#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
53
+#define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
54
+#define EXTRUDER_RUNOUT_EXTRUDE 100
55
+
56
+//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
57
+//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
58
+#define TEMP_SENSOR_AD595_OFFSET 0.0
59
+#define TEMP_SENSOR_AD595_GAIN   1.0
60
+
61
+//This is for controlling a fan to cool down the stepper drivers
62
+//it will turn on when any driver is enabled
63
+//and turn off after the set amount of seconds from last driver being disabled again
64
+#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
65
+#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
66
+#define CONTROLLERFAN_SPEED 255  // == full speed
67
+
68
+// When first starting the main fan, run it at full speed for the
69
+// given number of milliseconds.  This gets the fan spinning reliably
70
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
71
+//#define FAN_KICKSTART_TIME 100
72
+
73
+// Extruder cooling fans
74
+// Configure fan pin outputs to automatically turn on/off when the associated
75
+// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
76
+// Multiple extruders can be assigned to the same pin in which case
77
+// the fan will turn on when any selected extruder is above the threshold.
78
+#define EXTRUDER_0_AUTO_FAN_PIN -1
79
+#define EXTRUDER_1_AUTO_FAN_PIN -1
80
+#define EXTRUDER_2_AUTO_FAN_PIN -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN -1
82
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
83
+#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
84
+
85
+
86
+//===========================================================================
87
+//=============================Mechanical Settings===========================
88
+//===========================================================================
89
+
90
+#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91
+
92
+
93
+//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
+//// Added by ZetaPhoenix 09-15-2012
95
+#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
+  #define X_HOME_POS MANUAL_X_HOME_POS
97
+  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
+  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
+#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
+  //X axis
101
+  #if X_HOME_DIR == -1
102
+    #ifdef BED_CENTER_AT_0_0
103
+      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
+    #else
105
+      #define X_HOME_POS X_MIN_POS
106
+    #endif //BED_CENTER_AT_0_0
107
+  #else
108
+    #ifdef BED_CENTER_AT_0_0
109
+      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
+    #else
111
+      #define X_HOME_POS X_MAX_POS
112
+    #endif //BED_CENTER_AT_0_0
113
+  #endif //X_HOME_DIR == -1
114
+
115
+  //Y axis
116
+  #if Y_HOME_DIR == -1
117
+    #ifdef BED_CENTER_AT_0_0
118
+      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
+    #else
120
+      #define Y_HOME_POS Y_MIN_POS
121
+    #endif //BED_CENTER_AT_0_0
122
+  #else
123
+    #ifdef BED_CENTER_AT_0_0
124
+      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
+    #else
126
+      #define Y_HOME_POS Y_MAX_POS
127
+    #endif //BED_CENTER_AT_0_0
128
+  #endif //Y_HOME_DIR == -1
129
+
130
+  // Z axis
131
+  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
+    #define Z_HOME_POS Z_MIN_POS
133
+  #else
134
+    #define Z_HOME_POS Z_MAX_POS
135
+  #endif //Z_HOME_DIR == -1
136
+#endif //End auto min/max positions
137
+//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
+
139
+
140
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141
+
142
+// A single Z stepper driver is usually used to drive 2 stepper motors.
143
+// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
144
+// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
145
+// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
146
+// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147
+//#define Z_DUAL_STEPPER_DRIVERS
148
+
149
+#ifdef Z_DUAL_STEPPER_DRIVERS
150
+  #undef EXTRUDERS
151
+  #define EXTRUDERS 1
152
+#endif
153
+
154
+// Same again but for Y Axis.
155
+//#define Y_DUAL_STEPPER_DRIVERS
156
+
157
+// Define if the two Y drives need to rotate in opposite directions
158
+#define INVERT_Y2_VS_Y_DIR true
159
+
160
+#ifdef Y_DUAL_STEPPER_DRIVERS
161
+  #undef EXTRUDERS
162
+  #define EXTRUDERS 1
163
+#endif
164
+
165
+#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
+  #error "You cannot have dual drivers for both Y and Z"
167
+#endif
168
+
169
+// Enable this for dual x-carriage printers.
170
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
171
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
172
+// allowing faster printing speeds.
173
+//#define DUAL_X_CARRIAGE
174
+#ifdef DUAL_X_CARRIAGE
175
+// Configuration for second X-carriage
176
+// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
177
+// the second x-carriage always homes to the maximum endstop.
178
+#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
179
+#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
180
+#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
181
+#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
182
+    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
183
+    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
184
+    // without modifying the firmware (through the "M218 T1 X???" command).
185
+    // Remember: you should set the second extruder x-offset to 0 in your slicer.
186
+
187
+// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
188
+#define X2_ENABLE_PIN 29
189
+#define X2_STEP_PIN 25
190
+#define X2_DIR_PIN 23
191
+
192
+// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
193
+//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
194
+//                           as long as it supports dual x-carriages. (M605 S0)
195
+//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
196
+//                           that additional slicer support is not required. (M605 S1)
197
+//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
198
+//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
199
+//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
200
+
201
+// This is the default power-up mode which can be later using M605.
202
+#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
203
+
204
+// Default settings in "Auto-park Mode"
205
+#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
206
+#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
207
+
208
+// Default x offset in duplication mode (typically set to half print bed width)
209
+#define DEFAULT_DUPLICATION_X_OFFSET 100
210
+
211
+#endif //DUAL_X_CARRIAGE
212
+
213
+//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
214
+#define X_HOME_RETRACT_MM 5
215
+#define Y_HOME_RETRACT_MM 5
216
+#define Z_HOME_RETRACT_MM 3
217
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
218
+//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
219
+
220
+#define AXIS_RELATIVE_MODES {false, false, false, false}
221
+#ifdef CONFIG_STEPPERS_TOSHIBA
222
+#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
223
+#else
224
+#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
225
+#endif
226
+//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
227
+#define INVERT_X_STEP_PIN false
228
+#define INVERT_Y_STEP_PIN false
229
+#define INVERT_Z_STEP_PIN false
230
+#define INVERT_E_STEP_PIN false
231
+
232
+//default stepper release if idle. Set to 0 to deactivate.
233
+#define DEFAULT_STEPPER_DEACTIVE_TIME 60
234
+
235
+#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
236
+#define DEFAULT_MINTRAVELFEEDRATE     0.0
237
+
238
+// Feedrates for manual moves along X, Y, Z, E from panel
239
+#ifdef ULTIPANEL
240
+#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
241
+#endif
242
+
243
+//Comment to disable setting feedrate multiplier via encoder
244
+#ifdef ULTIPANEL
245
+    #define ULTIPANEL_FEEDMULTIPLY
246
+#endif
247
+
248
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
249
+#define DEFAULT_MINSEGMENTTIME        20000
250
+
251
+// If defined the movements slow down when the look ahead buffer is only half full
252
+#define SLOWDOWN
253
+
254
+// Frequency limit
255
+// See nophead's blog for more info
256
+// Not working O
257
+//#define XY_FREQUENCY_LIMIT  15
258
+
259
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
260
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
261
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
262
+#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263
+
264
+// MS1 MS2 Stepper Driver Microstepping mode table
265
+#define MICROSTEP1 LOW,LOW
266
+#define MICROSTEP2 HIGH,LOW
267
+#define MICROSTEP4 LOW,HIGH
268
+#define MICROSTEP8 HIGH,HIGH
269
+#define MICROSTEP16 HIGH,HIGH
270
+
271
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272
+#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273
+
274
+// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
+#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276
+
277
+// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
+//#define DIGIPOT_I2C
279
+// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
280
+#define DIGIPOT_I2C_NUM_CHANNELS 8
281
+// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
282
+#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
283
+
284
+//===========================================================================
285
+//=============================Additional Features===========================
286
+//===========================================================================
287
+
288
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
289
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
290
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
291
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
292
+
293
+//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
294
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
295
+
296
+#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
297
+#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
298
+
299
+#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
300
+// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
301
+// using:
302
+//#define MENU_ADDAUTOSTART
303
+
304
+// Show a progress bar on HD44780 LCDs for SD printing
305
+//#define LCD_PROGRESS_BAR
306
+
307
+#ifdef LCD_PROGRESS_BAR
308
+  // Amount of time (ms) to show the bar
309
+  #define PROGRESS_BAR_BAR_TIME 2000
310
+  // Amount of time (ms) to show the status message
311
+  #define PROGRESS_BAR_MSG_TIME 3000
312
+  // Amount of time (ms) to retain the status message (0=forever)
313
+  #define PROGRESS_MSG_EXPIRE   0
314
+  // Enable this to show messages for MSG_TIME then hide them
315
+  //#define PROGRESS_MSG_ONCE
316
+  #ifdef DOGLCD
317
+    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
318
+  #endif
319
+  #ifdef FILAMENT_LCD_DISPLAY
320
+    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
321
+  #endif
322
+#endif
323
+
324
+// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
325
+//#define USE_WATCHDOG
326
+
327
+#ifdef USE_WATCHDOG
328
+// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
329
+// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
330
+//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
331
+//#define WATCHDOG_RESET_MANUAL
332
+#endif
333
+
334
+// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
335
+//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
336
+
337
+// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
338
+// it can e.g. be used to change z-positions in the print startup phase in real-time
339
+// does not respect endstops!
340
+//#define BABYSTEPPING
341
+#ifdef BABYSTEPPING
342
+  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
343
+  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
344
+  #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
345
+
346
+  #ifdef COREXY
347
+    #error BABYSTEPPING not implemented for COREXY yet.
348
+  #endif
349
+
350
+  #ifdef DELTA
351
+    #ifdef BABYSTEP_XY
352
+      #error BABYSTEPPING only implemented for Z axis on deltabots.
353
+    #endif
354
+  #endif
355
+#endif
356
+
357
+// extruder advance constant (s2/mm3)
358
+//
359
+// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
360
+//
361
+// Hooke's law says:		force = k * distance
362
+// Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
363
+// so: v ^ 2 is proportional to number of steps we advance the extruder
364
+//#define ADVANCE
365
+
366
+#ifdef ADVANCE
367
+  #define EXTRUDER_ADVANCE_K .0
368
+
369
+  #define D_FILAMENT 2.85
370
+  #define STEPS_MM_E 836
371
+  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
372
+  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
373
+
374
+#endif // ADVANCE
375
+
376
+// Arc interpretation settings:
377
+#define MM_PER_ARC_SEGMENT 1
378
+#define N_ARC_CORRECTION 25
379
+
380
+const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
381
+
382
+// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
383
+// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
384
+// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
385
+// be commented out otherwise
386
+#define SDCARDDETECTINVERTED
387
+
388
+//#ifdef ULTIPANEL
389
+// #undef SDCARDDETECTINVERTED
390
+//#endif
391
+
392
+// Power Signal Control Definitions
393
+// By default use ATX definition
394
+#ifndef POWER_SUPPLY
395
+  #define POWER_SUPPLY 1
396
+#endif
397
+// 1 = ATX
398
+#if (POWER_SUPPLY == 1)
399
+  #define PS_ON_AWAKE  LOW
400
+  #define PS_ON_ASLEEP HIGH
401
+#endif
402
+// 2 = X-Box 360 203W
403
+#if (POWER_SUPPLY == 2)
404
+  #define PS_ON_AWAKE  HIGH
405
+  #define PS_ON_ASLEEP LOW
406
+#endif
407
+
408
+// Control heater 0 and heater 1 in parallel.
409
+//#define HEATERS_PARALLEL
410
+
411
+//===========================================================================
412
+//=============================Buffers           ============================
413
+//===========================================================================
414
+
415
+// The number of linear motions that can be in the plan at any give time.
416
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
417
+#if defined SDSUPPORT
418
+  #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
419
+#else
420
+  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
421
+#endif
422
+
423
+
424
+//The ASCII buffer for receiving from the serial:
425
+#define MAX_CMD_SIZE 96
426
+#define BUFSIZE 4
427
+
428
+
429
+// Firmware based and LCD controlled retract
430
+// M207 and M208 can be used to define parameters for the retraction.
431
+// The retraction can be called by the slicer using G10 and G11
432
+// until then, intended retractions can be detected by moves that only extrude and the direction.
433
+// the moves are than replaced by the firmware controlled ones.
434
+
435
+// #define FWRETRACT  //ONLY PARTIALLY TESTED
436
+#ifdef FWRETRACT
437
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
438
+  #define RETRACT_LENGTH 3               //default retract length (positive mm)
439
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
440
+  #define RETRACT_FEEDRATE 45            //default feedrate for retracting (mm/s)
441
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
442
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
443
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
444
+  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
445
+#endif
446
+
447
+//adds support for experimental filament exchange support M600; requires display
448
+#ifdef ULTIPANEL
449
+  #define FILAMENTCHANGEENABLE
450
+  #ifdef FILAMENTCHANGEENABLE
451
+    #define FILAMENTCHANGE_XPOS 3
452
+    #define FILAMENTCHANGE_YPOS 3
453
+    #define FILAMENTCHANGE_ZADD 10
454
+    #define FILAMENTCHANGE_FIRSTRETRACT -2
455
+    #define FILAMENTCHANGE_FINALRETRACT -100
456
+  #endif
457
+#endif
458
+
459
+#ifdef FILAMENTCHANGEENABLE
460
+  #ifdef EXTRUDER_RUNOUT_PREVENT
461
+    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
+  #endif
463
+#endif
464
+
465
+//===========================================================================
466
+//=============================  Define Defines  ============================
467
+//===========================================================================
468
+
469
+#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
470
+  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
471
+#endif
472
+
473
+#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
474
+  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
475
+#endif
476
+
477
+#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
478
+  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
479
+#endif
480
+
481
+#if TEMP_SENSOR_0 > 0
482
+  #define THERMISTORHEATER_0 TEMP_SENSOR_0
483
+  #define HEATER_0_USES_THERMISTOR
484
+#endif
485
+#if TEMP_SENSOR_1 > 0
486
+  #define THERMISTORHEATER_1 TEMP_SENSOR_1
487
+  #define HEATER_1_USES_THERMISTOR
488
+#endif
489
+#if TEMP_SENSOR_2 > 0
490
+  #define THERMISTORHEATER_2 TEMP_SENSOR_2
491
+  #define HEATER_2_USES_THERMISTOR
492
+#endif
493
+#if TEMP_SENSOR_3 > 0
494
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
495
+  #define HEATER_3_USES_THERMISTOR
496
+#endif
497
+#if TEMP_SENSOR_BED > 0
498
+  #define THERMISTORBED TEMP_SENSOR_BED
499
+  #define BED_USES_THERMISTOR
500
+#endif
501
+#if TEMP_SENSOR_0 == -1
502
+  #define HEATER_0_USES_AD595
503
+#endif
504
+#if TEMP_SENSOR_1 == -1
505
+  #define HEATER_1_USES_AD595
506
+#endif
507
+#if TEMP_SENSOR_2 == -1
508
+  #define HEATER_2_USES_AD595
509
+#endif
510
+#if TEMP_SENSOR_3 == -1
511
+  #define HEATER_3_USES_AD595
512
+#endif
513
+#if TEMP_SENSOR_BED == -1
514
+  #define BED_USES_AD595
515
+#endif
516
+#if TEMP_SENSOR_0 == -2
517
+  #define HEATER_0_USES_MAX6675
518
+#endif
519
+#if TEMP_SENSOR_0 == 0
520
+  #undef HEATER_0_MINTEMP
521
+  #undef HEATER_0_MAXTEMP
522
+#endif
523
+#if TEMP_SENSOR_1 == 0
524
+  #undef HEATER_1_MINTEMP
525
+  #undef HEATER_1_MAXTEMP
526
+#endif
527
+#if TEMP_SENSOR_2 == 0
528
+  #undef HEATER_2_MINTEMP
529
+  #undef HEATER_2_MAXTEMP
530
+#endif
531
+#if TEMP_SENSOR_3 == 0
532
+  #undef HEATER_3_MINTEMP
533
+  #undef HEATER_3_MAXTEMP
534
+#endif
535
+#if TEMP_SENSOR_BED == 0
536
+  #undef BED_MINTEMP
537
+  #undef BED_MAXTEMP
538
+#endif
539
+
540
+
541
+#endif //__CONFIGURATION_ADV_H

+ 60
- 0
Marlin/example_configurations/Felix/README.md View File

@@ -0,0 +1,60 @@
1
+# Felix 2.0/3.0 Configuration for Marlin Firmware
2
+
3
+Bringing silky smooth prints to Felix.
4
+
5
+## Build HOWTO
6
+
7
+  - Install the latest non-beta Arduino software IDE/toolset: http://www.arduino.cc/en/Main/Software
8
+  - Download the Marlin firmware
9
+    - [Latest developement version](https://github.com/MarlinFirmware/Marlin/tree/Development)
10
+    - [Stable version](https://github.com/MarlinFirmware/Marlin/tree/Development)
11
+  - In both cases use the "Download Zip" button on the right.
12
+
13
+```
14
+cd Marlin/Marlin
15
+cp example_configurations/Felix/Configuration_adv.h .
16
+```
17
+
18
+The next step depends on your setup:
19
+
20
+### Single Extruder Configuration
21
+
22
+    cp example_configurations/Felix/Configuration.h .
23
+
24
+### Dual Extruder Configuration
25
+
26
+    cp example_configurations/Felix/Configuration_DUAL.h Configuration.h
27
+
28
+### Compile Firmware
29
+
30
+  - Start the Arduino IDE.
31
+  - Select Tools -> Board -> Arduino Mega 2560
32
+  - Select the correct serial port in Tools -> Serial Port (usually /dev/ttyUSB0)
33
+  - Open Marlin.pde or .ino
34
+  - Click the Verify/Compile button
35
+
36
+### Flash Firmware
37
+
38
+#### Connected directly via USB
39
+
40
+  - Click the Upload button. If all goes well the firmware is uploading
41
+
42
+#### Remote update
43
+
44
+Find the latest Arduino build:
45
+
46
+    ls -altr /tmp/
47
+    drwxr-xr-x 5 chrono users 12288 Mar 3 21:41 build6072035599686630843.tmp
48
+
49
+Copy the firmware to your printer host:
50
+
51
+    scp /tmp/build6072035599686630843.tmp/Marlin.cpp.hex a.b.c.d:/tmp/
52
+
53
+Connect to your printer host via ssh, stop Octoprint or any other service that may block your USB device and make sure you have avrdude installed, then run:
54
+
55
+    avrdude -C/etc/avrdude.conf -v -v -v -patmega2560 -cwiring -P/dev/ttyUSB0 \
56
+    -b115200 -D -Uflash:w:/tmp/Marlin.cpp.hex:i
57
+
58
+## Acknowledgements
59
+
60
+Mashed together and tested on https://apollo.open-resource.org/mission:resources:picoprint based on collaborative teamwork of @andrewsil1 and @thinkyhead.

+ 12
- 2
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -408,11 +408,18 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
408 408
 
409 409
   #ifdef AUTO_BED_LEVELING_GRID
410 410
 
411
+    // Use one of these defines to specify the origin
412
+    // for a topographical map to be printed for your bed.
413
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
414
+    #define TOPO_ORIGIN OriginFrontLeft
415
+
411 416
     // The edges of the rectangle in which to probe
412 417
     #define LEFT_PROBE_BED_POSITION 15
413 418
     #define RIGHT_PROBE_BED_POSITION 170
414 419
     #define FRONT_PROBE_BED_POSITION 20
415 420
     #define BACK_PROBE_BED_POSITION 170
421
+    
422
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
416 423
 
417 424
     // Set the number of grid points per dimension
418 425
     // You probably don't need more than 3 (squared=9)
@@ -499,8 +506,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
499 506
 #define DEFAULT_MAX_FEEDRATE          {250, 250, 3.3, 25}    // (mm/sec)
500 507
 #define DEFAULT_MAX_ACCELERATION      {3000,3000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
501 508
 
502
-#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
503
-#define DEFAULT_RETRACT_ACCELERATION  1000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
509
+#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
510
+#define DEFAULT_RETRACT_ACCELERATION  1000   // E acceleration in mm/s^2 for retracts
511
+#define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
512
+
513
+
504 514
 
505 515
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
506 516
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -214,6 +214,7 @@
214 214
 #define X_HOME_RETRACT_MM 5
215 215
 #define Y_HOME_RETRACT_MM 5
216 216
 #define Z_HOME_RETRACT_MM 2
217
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
217 218
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
218 219
 
219 220
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 11
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -413,12 +413,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
413 413
 
414 414
   #ifdef AUTO_BED_LEVELING_GRID
415 415
 
416
+    // Use one of these defines to specify the origin
417
+    // for a topographical map to be printed for your bed.
418
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
419
+    #define TOPO_ORIGIN OriginFrontLeft
420
+
416 421
     // The edges of the rectangle in which to probe
417 422
     #define LEFT_PROBE_BED_POSITION 15
418 423
     #define RIGHT_PROBE_BED_POSITION 170
419 424
     #define FRONT_PROBE_BED_POSITION 20
420 425
     #define BACK_PROBE_BED_POSITION 170
421 426
 
427
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this    
428
+    
422 429
     // Set the number of grid points per dimension
423 430
     // You probably don't need more than 3 (squared=9)
424 431
     #define AUTO_BED_LEVELING_GRID_POINTS 2
@@ -504,8 +511,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
504 511
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 500}    // (mm/sec)
505 512
 #define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
506 513
 
507
-#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
508
-#define DEFAULT_RETRACT_ACCELERATION  1000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
514
+#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
515
+#define DEFAULT_RETRACT_ACCELERATION  1000   // E acceleration in mm/s^2 for retracts
516
+#define DEFAULT_TRAVEL_ACCELERATION   1000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
517
+
509 518
 
510 519
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
511 520
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).

+ 1
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -214,6 +214,7 @@
214 214
 #define X_HOME_RETRACT_MM 5
215 215
 #define Y_HOME_RETRACT_MM 5
216 216
 #define Z_HOME_RETRACT_MM 3
217
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
217 218
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
218 219
 
219 220
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 12
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -437,12 +437,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
437 437
 
438 438
   #ifdef AUTO_BED_LEVELING_GRID
439 439
 
440
+    // Use one of these defines to specify the origin
441
+    // for a topographical map to be printed for your bed.
442
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
443
+    #define TOPO_ORIGIN OriginFrontLeft
444
+
440 445
     // The edges of the rectangle in which to probe
441 446
     #define LEFT_PROBE_BED_POSITION 15
442 447
     #define RIGHT_PROBE_BED_POSITION 170
443 448
     #define FRONT_PROBE_BED_POSITION 20
444 449
     #define BACK_PROBE_BED_POSITION 170
445 450
 
451
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this    
452
+    
446 453
     // Set the number of grid points per dimension
447 454
     // You probably don't need more than 3 (squared=9)
448 455
     #define AUTO_BED_LEVELING_GRID_POINTS 2
@@ -529,8 +536,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
529 536
 #define DEFAULT_MAX_FEEDRATE          {300, 300, 30, 25}    // (mm/sec)
530 537
 #define DEFAULT_MAX_ACCELERATION      {300,300,20,1000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
531 538
 
532
-#define DEFAULT_ACCELERATION          400    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
533
-#define DEFAULT_RETRACT_ACCELERATION  2000  // X, Y, Z and E max acceleration in mm/s^2 for retracts
539
+#define DEFAULT_ACCELERATION          400    // X, Y, Z and E acceleration in mm/s^2 for printing moves
540
+#define DEFAULT_RETRACT_ACCELERATION  2000   // E acceleration in mm/s^2 for retracts
541
+#define DEFAULT_TRAVEL_ACCELERATION   400    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
542
+
543
+
534 544
 
535 545
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
536 546
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -214,6 +214,7 @@
214 214
 #define X_HOME_RETRACT_MM 3
215 215
 #define Y_HOME_RETRACT_MM 3
216 216
 #define Z_HOME_RETRACT_MM 3
217
+#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
217 218
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
218 219
 #ifdef SCARA
219 220
 	#define QUICK_HOME //SCARA needs Quickhome

+ 10
- 2
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -407,12 +407,19 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
407 407
 
408 408
   #ifdef AUTO_BED_LEVELING_GRID
409 409
 
410
+    // Use one of these defines to specify the origin
411
+    // for a topographical map to be printed for your bed.
412
+    enum { OriginBackLeft, OriginFrontLeft, OriginBackRight, OriginFrontRight };
413
+    #define TOPO_ORIGIN OriginFrontLeft
414
+
410 415
     // The edges of the rectangle in which to probe
411 416
     #define LEFT_PROBE_BED_POSITION 15
412 417
     #define RIGHT_PROBE_BED_POSITION 170
413 418
     #define FRONT_PROBE_BED_POSITION 20
414 419
     #define BACK_PROBE_BED_POSITION 170
415 420
 
421
+    #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
422
+    
416 423
     // Set the number of grid points per dimension
417 424
     // You probably don't need more than 3 (squared=9)
418 425
     #define AUTO_BED_LEVELING_GRID_POINTS 2
@@ -498,8 +505,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
498 505
 #define DEFAULT_MAX_FEEDRATE          {350, 350, 7.2, 80}    // (mm/sec)
499 506
 #define DEFAULT_MAX_ACCELERATION      {1000,1000,10,1000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
500 507
 
501
-#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
502
-#define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
508
+#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
509
+#define DEFAULT_RETRACT_ACCELERATION  3000   // E acceleration in mm/s^2 for retracts
510
+#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
503 511
 
504 512
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
505 513
 // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).

+ 0
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save