Skip to content

Commit

Permalink
Bugfix for MINP: it is a long
Browse files Browse the repository at this point in the history
When implementing the MINP (MSTA input) it was overseen,
that MSTA is defined as 32 bit (where only 15 bits are used).
Correct this: use long instead of short.
  • Loading branch information
tboegi committed Feb 6, 2024
1 parent 2dc3101 commit 4a902d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion motorApp/SoftMotorSrc/devSoft.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void soft_dinp_func(struct motorRecord *mr, short newdinp)
}
}

void soft_minp_func(struct motorRecord *mr, short newminp)
void soft_minp_func(struct motorRecord *mr, long newminp)
{
msta_field status;
unsigned int old_RA_DONE;
Expand Down
2 changes: 1 addition & 1 deletion motorApp/SoftMotorSrc/devSoft.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct motor_node {
extern long soft_init(int);
extern long soft_init_record(void *);
extern void soft_dinp_func(struct motorRecord *, short);
extern void soft_minp_func(struct motorRecord *, short);
extern void soft_minp_func(struct motorRecord *, long);
extern void soft_rdbl_func(struct motorRecord *, double);
extern void soft_rinp_func(struct motorRecord *, long);
extern void soft_motor_callback(CALLBACK *);
Expand Down
2 changes: 1 addition & 1 deletion motorApp/SoftMotorSrc/devSoftAux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ STATIC void soft_dinp(struct event_handler_args args)

STATIC void soft_minp(struct event_handler_args args)
{
soft_minp_func((struct motorRecord *) args.usr, *((short *) args.dbr));
soft_minp_func((struct motorRecord *) args.usr, *((long *) args.dbr));
}


Expand Down

0 comments on commit 4a902d0

Please sign in to comment.