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

Likely bug in mcpwm.c #795

Open
SkjoetConsulting opened this issue Jan 17, 2025 · 0 comments
Open

Likely bug in mcpwm.c #795

SkjoetConsulting opened this issue Jan 17, 2025 · 0 comments

Comments

@SkjoetConsulting
Copy link

Newbie to Vesc, just browsing the code..

The following code seems weird at least (line 2507)..

switch (comm_step) {
	case 1: curr_samp_volt = (1 << 0) || (1 << 2); break;
	case 2: curr_samp_volt = (1 << 1) || (1 << 2); break;
	case 3: curr_samp_volt = (1 << 1) || (1 << 2); break;
	case 4: curr_samp_volt = (1 << 0) || (1 << 1); break;
	case 5: curr_samp_volt = (1 << 0) || (1 << 1); break;
	case 6: curr_samp_volt = (1 << 0) || (1 << 2); break;
	default: break;
}

Probably a binary | was intended ?

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

No branches or pull requests

1 participant