make sure all versions export envoder velocity pin
http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=34aaf4f
---
src/hal/drivers/hal_ppmc.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/hal/drivers/hal_ppmc.c b/src/hal/drivers/hal_ppmc.c
index 048bbf3..ed6d24f 100644
--- a/src/hal/drivers/hal_ppmc.c
+++ b/src/hal/drivers/hal_ppmc.c
@@ -2129,6 +2129,11 @@ static int export_encoders(slot_data_t *slot, bus_data_t *bus)
if (retval != 0) {
return retval;
}
+ retval = hal_pin_float_newf(HAL_OUT, &(slot->encoder[n].vel), comp_id,
+ "ppmc.%d.encoder.%02d.velocity",bus->busnum,bus->last_encoder);
+ if (retval != 0) {
+ return retval;
+ }
if (slot->ver >= 2) {
/* encoder index enable bit */
/* if the ver of the board firmware is >= 2 then the board supports
@@ -2138,11 +2143,6 @@ static int export_encoders(slot_data_t *slot, bus_data_t *bus)
if (retval != 0) {
return retval;
}
- retval = hal_pin_float_newf(HAL_OUT, &(slot->encoder[n].vel), comp_id,
- "ppmc.%d.encoder.%02d.velocity",bus->busnum,bus->last_encoder);
- if (retval != 0) {
- return retval;
- }
if (slot->use_timestamp) {
/* encoder time stamp function / velocity estimation */
/* only implemented on latest UPC right now */
|