Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/emc/kinematics/switchkins.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int gui_forward_kins(const double *joints)
// genhexkins and identity kinematic types
// (similar needs for many parallel kinemtic machines)
int res;
KINEMATICS_FORWARD_FLAGS fflags;
KINEMATICS_FORWARD_FLAGS fflags = 0;
KINEMATICS_INVERSE_FLAGS iflags;
switch (kp.gui_kinstype) {
case 0: res = kfwd0(joints, &lastpose[0], &fflags, &iflags);break;
Expand Down
6 changes: 3 additions & 3 deletions src/emc/tp/sp_scurve.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ num initial calculation value
*/
double solute( double a, double b, double c, double d, double num){
double x ,x0 ,f ,f1;
int cnt = 0;
//int cnt = 0;
x = num;
do{
x0 = x;
f = (( a*x0 + b )*x0 + c )*x0 + d;
f1 = ( 3*a*x0 + 2*b )*x0 + c;
x = x0 - f / f1;
cnt++;
//cnt++;
} while ( fabs( x - x0 ) > 1e-6 );

//printf( "the value is %.14f \r\n", x );
Expand Down Expand Up @@ -1350,4 +1350,4 @@ double calcSCurveSpeedWithT(double amax, double jerk, double T) {

// Use fma to optimize multiply-add operations, improving numerical stability
return fma(jerk * T1, T1 + T2, 0.0);
}
}
8 changes: 5 additions & 3 deletions src/hal/drivers/mesa-hostmot2/hm2_modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static const char *error_codes[] = {
#define MBT_X_MASK 0x0f
#define MBT_T_MASK 0xf0

static inline bool mtypeiscompound(unsigned mtype) { return mtype >= MBT_ABCD && mtype <= MBT_HGFEDCBA; }
// static inline bool mtypeiscompound(unsigned mtype) { return mtype >= MBT_ABCD && mtype <= MBT_HGFEDCBA; }
static inline unsigned mtypeformat(unsigned mtype) { return mtype & MBT_X_MASK; }
static inline unsigned mtypetype(unsigned mtype) { return mtype & MBT_T_MASK; }
static inline bool mtypeisvalid(unsigned mtype) {
Expand Down Expand Up @@ -818,8 +818,9 @@ static void process(void *arg, long period)
// Are we handling init commands?
if(handling_inits(inst)) {
// Yes, prepare and send
hm2_modbus_cmd_t *cc;
retry_next_init:
hm2_modbus_cmd_t *cc = current_cmd(inst);
cc = current_cmd(inst);
if(0 == cc->cmd.func) {
// Special meta command
if(0 == cc->cmd.imetacmd) { // This is a delay command
Expand Down Expand Up @@ -2162,8 +2163,9 @@ static ssize_t read_mbccb(const hm2_modbus_inst_t *inst, const char *fname, hm2_
}

// Read the entire file
ssize_t err;
retry_read:
ssize_t err = read(fd, *pmbccb, sb.st_size);
err = read(fd, *pmbccb, sb.st_size);
if(err < 0) {
ssize_t rv = -errno;
if(errno == EINTR)
Expand Down
Loading