Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameters to specify maximum allowd time jump #202

Merged
merged 4 commits into from Apr 22, 2024

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented Apr 22, 2024

No description provided.

@at-wat at-wat self-assigned this Apr 22, 2024
@at-wat at-wat requested a review from Taka-Kazu April 22, 2024 02:33
{
if (g_P_set[YP_PARAM_MAX_TIME_JUMP_NEG][0] <= 0)
{
yprintf(OUTPUT_LV_ERROR, "ERROR: -MAX_TIME_JUMP must be > 0.0.\n");
Copy link

@Taka-Kazu Taka-Kazu Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[optional] MAX_TIME_JUMP is another parameter so use the name MAX_TIME_JUMP_NEG might be clearer here.

Suggested change
yprintf(OUTPUT_LV_ERROR, "ERROR: -MAX_TIME_JUMP must be > 0.0.\n");
yprintf(OUTPUT_LV_ERROR, "ERROR: MAX_TIME_JUMP_NEG must be > 0.0.\n");

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAX_TIME_JUMP_NEG is internal enum name and user can only specify -MAX_TIME_JUMP in the parameter file.
(This format was originally introduced to support different friction parameters for each rotation direction)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand now.

src/param.c Outdated
@@ -940,6 +940,36 @@ int set_paramptr(FILE* paramfile)
g_P_changed[YP_PARAM_TORQUE_UNIT][j] = ischanged_p(YP_PARAM_TORQUE_FINENESS, j);
}

if (g_P_set[YP_PARAM_MAX_TIME_JUMP][0])
{
if (g_P_set[YP_PARAM_MAX_TIME_JUMP][0] <= 0)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (g_P_set[YP_PARAM_MAX_TIME_JUMP][0] <= 0)
if (g_P[YP_PARAM_MAX_TIME_JUMP][0] <= 0)

@at-wat at-wat merged commit ebd19cf into master Apr 22, 2024
7 checks passed
@at-wat at-wat deleted the add-parameters-to-specify-max-time-jump branch April 22, 2024 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants