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

Full-range PWM commands in Lacquey firmware #235

Closed
PeterBowman opened this issue Sep 21, 2019 · 5 comments
Closed

Full-range PWM commands in Lacquey firmware #235

PeterBowman opened this issue Sep 21, 2019 · 5 comments

Comments

@PeterBowman
Copy link
Member

Commit cfd8d88#diff-68eeea6c71ceb478044ee0f4dc44b6a0 (#211) adds a new PWM control layer around the LacqueyFetch device, resembling more closely its internal way of actuating the motor. However, our firmware is severely limited in that only full-positive (+100%), full-negative (-100%) and stop (0%) commands are forwarded, thus ignoring the whole [-1,1] value range (source):

switch(data){
case 0xA0: // open hand
m.speed(1.0);
break;
case 0xC0: // close hand
m.speed(-1.0);
break;
case 0xF0: // loose hand
m.speed(0.0);
break;
default: // loose hand
m.speed(0.0);
break;
}

Here, data is a char. Make it a 32-bit float so that it matches 38176f1.

@jgvictores
Copy link
Member

Related:

* Not prioritary, just to point out. For starters, SerialServoBoard looks PositionControl-oriented, whereas we both agreed on exposing the more native PWM interface.

@jgvictores
Copy link
Member

Returning to the scope of the issue, yes, I totally agree we should recover the full range at firmware level.

@rsantos88 rsantos88 self-assigned this Oct 16, 2019
@rsantos88
Copy link
Contributor

Updated Lacquey firmware:
https://os.mbed.com/users/raulsr988/code/LacqueyFetch/rev/f31b6ddb9cd3/

@rsantos88
Copy link
Contributor

Note: Currently the previus firmware is installed on the Mbed.
Waiting to install the latest changes (38176f1) in Teo to be tested completely. Right now the tests have been done under Pcanview, sending messages directly to the Mbed. All works correctly. I'll close this issue

@PeterBowman
Copy link
Member Author

PeterBowman commented Oct 17, 2019

Just one more thing to finally mark this as closed: merge this change into firmware/LacqueyFetch/ (also update README).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants