diff --git a/industry/foc/float/foc_ang_onfo.c b/industry/foc/float/foc_ang_onfo.c index eef0868fa..9ec8c3bea 100644 --- a/industry/foc/float/foc_ang_onfo.c +++ b/industry/foc/float/foc_ang_onfo.c @@ -50,7 +50,7 @@ struct foc_observer_f32_s { struct foc_observer_cfg_f32_s cfg; struct motor_aobserver_f32_s data; - float dir; + float sensor_dir; }; /**************************************************************************** @@ -198,7 +198,7 @@ static int foc_angle_onfo_cfg_f32(FAR foc_angle_f32_t *h, FAR void *cfg) /* Initialize with CW direction */ - ob->dir = DIR_CW; + ob->sensor_dir = DIR_CW; return OK; errout: @@ -264,7 +264,7 @@ static int foc_angle_onfo_dir_f32(FAR foc_angle_f32_t *h, float dir) /* Configure direction */ - ob->dir = dir; + ob->sensor_dir = dir; return OK; } diff --git a/industry/foc/float/foc_ang_osmo.c b/industry/foc/float/foc_ang_osmo.c index bf0e38536..c93c02635 100644 --- a/industry/foc/float/foc_ang_osmo.c +++ b/industry/foc/float/foc_ang_osmo.c @@ -41,7 +41,7 @@ struct foc_observer_f32_s { struct foc_observer_cfg_f32_s cfg; struct motor_aobserver_f32_s data; - float dir; + float sensor_dir; }; /**************************************************************************** @@ -188,7 +188,7 @@ static int foc_angle_osmo_cfg_f32(FAR foc_angle_f32_t *h, FAR void *cfg) /* Initialize with CW direction */ - ob->dir = DIR_CW; + ob->sensor_dir = DIR_CW; return OK; errout: @@ -254,7 +254,7 @@ static int foc_angle_osmo_dir_f32(FAR foc_angle_f32_t *h, float dir) /* Configure direction */ - ob->dir = dir; + ob->sensor_dir = dir; return OK; } diff --git a/industry/foc/float/foc_ang_qenco.c b/industry/foc/float/foc_ang_qenco.c index cfde17616..aaa36f5a8 100644 --- a/industry/foc/float/foc_ang_qenco.c +++ b/industry/foc/float/foc_ang_qenco.c @@ -48,7 +48,7 @@ struct foc_qenco_f32_s int32_t pos; int32_t offset; float one_by_posmax; - float dir; + float sensor_dir; float angle; struct foc_qenco_cfg_f32_s cfg; }; @@ -226,7 +226,7 @@ static int foc_angle_qe_cfg_f32(FAR foc_angle_f32_t *h, FAR void *cfg) /* Initialize with CW direction */ - qe->dir = DIR_CW; + qe->sensor_dir = DIR_CW; /* Reset offset */ @@ -303,7 +303,7 @@ static int foc_angle_qe_dir_f32(FAR foc_angle_f32_t *h, float dir) /* Configure direction */ - qe->dir = dir; + qe->sensor_dir = dir; return OK; } @@ -346,7 +346,7 @@ static int foc_angle_qe_run_f32(FAR foc_angle_f32_t *h, /* Get mechanical angle */ - qe->angle = (qe->dir * (qe->pos - qe->offset) * + qe->angle = (qe->sensor_dir * (qe->pos - qe->offset) * qe->one_by_posmax * MOTOR_ANGLE_M_MAX); /* Normalize angle */ diff --git a/industry/foc/float/foc_vel_odiv.c b/industry/foc/float/foc_vel_odiv.c index 41604f67d..cd3e5f56c 100644 --- a/industry/foc/float/foc_vel_odiv.c +++ b/industry/foc/float/foc_vel_odiv.c @@ -49,7 +49,7 @@ struct foc_div_f32_s struct foc_vel_div_f32_cfg_s cfg; struct motor_sobserver_div_f32_s data; struct motor_sobserver_f32_s o; - float dir; + float sensor_dir; }; /**************************************************************************** @@ -176,7 +176,7 @@ static int foc_velocity_div_cfg_f32(FAR foc_velocity_f32_t *h, FAR void *cfg) /* Initialize with CW direction */ - div->dir = DIR_CW; + div->sensor_dir = DIR_CW; return ret; } @@ -237,7 +237,7 @@ static int foc_velocity_div_dir_f32(FAR foc_velocity_f32_t *h, float dir) /* Set direction */ - div->dir = dir; + div->sensor_dir = dir; return OK; } @@ -273,7 +273,7 @@ static int foc_velocity_div_run_f32(FAR foc_velocity_f32_t *h, /* Copy data */ - out->velocity = div->dir * motor_sobserver_speed_get(&div->o); + out->velocity = div->sensor_dir * motor_sobserver_speed_get(&div->o); return OK; } diff --git a/industry/foc/float/foc_vel_opll.c b/industry/foc/float/foc_vel_opll.c index 8b20eba76..5e7cfc9be 100644 --- a/industry/foc/float/foc_vel_opll.c +++ b/industry/foc/float/foc_vel_opll.c @@ -49,7 +49,7 @@ struct foc_pll_f32_s struct foc_vel_pll_f32_cfg_s cfg; struct motor_sobserver_pll_f32_s data; struct motor_sobserver_f32_s o; - float dir; + float sensor_dir; }; /**************************************************************************** @@ -175,7 +175,7 @@ static int foc_velocity_pll_cfg_f32(FAR foc_velocity_f32_t *h, FAR void *cfg) /* Initialize with CW direction */ - pll->dir = DIR_CW; + pll->sensor_dir = DIR_CW; return ret; } @@ -235,7 +235,7 @@ static int foc_velocity_pll_dir_f32(FAR foc_velocity_f32_t *h, float dir) /* Set direction */ - pll->dir = dir; + pll->sensor_dir = dir; return OK; } @@ -271,7 +271,7 @@ static int foc_velocity_pll_run_f32(FAR foc_velocity_f32_t *h, /* Copy data */ - out->velocity = pll->dir * motor_sobserver_speed_get(&pll->o); + out->velocity = pll->sensor_dir * motor_sobserver_speed_get(&pll->o); return OK; }