pull/1/head
Simen Svale Skogsrud 2011-01-31 23:19:51 +01:00
rodzic 5694310a40
commit dad9db1b02
6 zmienionych plików z 6 dodań i 16 usunięć

Wyświetl plik

@ -394,7 +394,7 @@ uint8_t gc_execute_line(char *line) {
// As far as the parser is concerned, the position is now == target. In reality the
// motion control system might still be processing the action and the real tool position
// in any intermediate location.
memcpy(gc.position, target, sizeof(double)*3); // equivalent of: gc.position = target;
memcpy(gc.position, target, sizeof(double)*3); // gc.position[] = target[];
return(gc.status_code);
}

4
main.c
Wyświetl plik

@ -44,8 +44,8 @@ int main(void)
DDRD |= (1<<3)|(1<<4)|(1<<5);
for(;;){
sleep_mode();
sp_process(); // process the serial protocol
sleep_mode(); // Wait for it ...
sp_process(); // ... process the serial protocol
}
return 0; /* never reached */
}

Wyświetl plik

@ -29,7 +29,8 @@
#include "stepper_plan.h"
#include "wiring_serial.h"
int32_t position[3]; // The current position of the tool in absolute steps
// The current position of the tool in absolute steps
int32_t position[3];
void mc_init()
{

Wyświetl plik

@ -45,7 +45,7 @@ void mc_arc(double theta, double angular_travel, double radius, double linear_tr
// Dwell for a couple of time units
void mc_dwell(uint32_t milliseconds);
// Send the tool home
// Send the tool home (not implemented)
void mc_go_home();
#endif

Wyświetl plik

@ -25,7 +25,6 @@
#define ONE_MINUTE_OF_MICROSECONDS 60000000.0
#define TICKS_PER_MICROSECOND (F_CPU/1000000)
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
@ -41,10 +40,4 @@
#define Y_AXIS 1
#define Z_AXIS 2
// void scale_vector(double *target, double *source, double multiplier) {
// target[0] = source[0]*multiplier;
// target[1] = source[1]*multiplier;
// target[2] = source[2]*multiplier;
// }
#endif

Wyświetl plik

@ -66,10 +66,6 @@ volatile int block_buffer_tail; // Index of the block to process now
static uint8_t acceleration_management; // Acceleration management active?
// NOTE: See bottom of this module for a comment outlining the reasoning behind the mathematics of the
// following functions.
// Calculates the distance (not time) it takes to accelerate from initial_rate to target_rate using the
// given acceleration:
inline double estimate_acceleration_distance(double initial_rate, double target_rate, double acceleration) {