Rev 935 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 935 | Rev 936 | ||
---|---|---|---|
Line 285... | Line 285... | ||
285 | break; |
285 | break; |
286 | case 3: |
286 | case 3: |
287 | // change to z-Axis |
287 | // change to z-Axis |
288 | break; |
288 | break; |
289 | case 4: |
289 | case 4: |
290 | ROT_ON; // find Min and Max of the Z-axis |
290 | RED_ON; // find Min and Max of the Z-axis |
291 | if(MM3.z_axis < z_min) z_min = MM3.z_axis; |
291 | if(MM3.z_axis < z_min) z_min = MM3.z_axis; |
292 | if(MM3.z_axis > z_max) z_max = MM3.z_axis; |
292 | if(MM3.z_axis > z_max) z_max = MM3.z_axis; |
293 | break; |
293 | break; |
294 | case 5: |
294 | case 5: |
295 | // calc range of all axis |
295 | // calc range of all axis |
Line 326... | Line 326... | ||
326 | int16_t x_min = 0, x_max = 0, y_min = 0, y_max = 0, z_min = 0, z_max = 0; |
326 | int16_t x_min = 0, x_max = 0, y_min = 0, y_max = 0, z_min = 0, z_max = 0; |
327 | uint8_t measurement = 50, beeper = 0; |
327 | uint8_t measurement = 50, beeper = 0; |
328 | uint16_t timer; |
328 | uint16_t timer; |
Line 329... | Line 329... | ||
329 | 329 | ||
330 | GRN_ON; |
330 | GRN_ON; |
Line 331... | Line 331... | ||
331 | ROT_OFF; |
331 | RED_OFF; |
332 | 332 | ||
333 | // get maximum and minimum reading of all axis |
333 | // get maximum and minimum reading of all axis |
334 | while (measurement) |
334 | while (measurement) |
Line 353... | Line 353... | ||
353 | if (MM3.z_axis > z_max) z_max = MM3.z_axis; |
353 | if (MM3.z_axis > z_max) z_max = MM3.z_axis; |
354 | else if (MM3.z_axis < z_min) z_min = MM3.z_axis; |
354 | else if (MM3.z_axis < z_min) z_min = MM3.z_axis; |
Line 355... | Line 355... | ||
355 | 355 | ||
356 | if (!beeper) |
356 | if (!beeper) |
357 | { |
357 | { |
358 | ROT_FLASH; |
358 | RED_FLASH; |
359 | GRN_FLASH; |
359 | GRN_FLASH; |
360 | BeepTime = 50; |
360 | BeepTime = 50; |
361 | beeper = 50; |
361 | beeper = 50; |
362 | } |
362 | } |