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

Servo / ServoGui attach fails #486

Open
MatsMRL opened this Issue Apr 7, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@MatsMRL
Copy link
Contributor

commented Apr 7, 2019

Attaching from the ServoGui no longer works.
did not find method - servo.attach(ard,0,Double)
It should be possible to attach/detach using both the name or the ServoController
as it was in previous releases

@supertick

This comment has been minimized.

Copy link
Contributor

commented Apr 7, 2019

Thanks Mats, I'm working on this now ..
I agree attach/detach should be able to use the a direct reference or a "name" - but that's not the problem.
The problem has to do with changes in the interface parameters to primitives.
Although, I thought I had put some implementation in to allow invoking based on primitives being coerced it failed.

I think kwatters was interested in "tightening" down the interface to primitives to avoid nulls. But this does not work, and even when it did, its less efficient. If you look into the details of invoking you find that it throws up, then tries to up-cast ... I did the upcast part, but not the coercion to primitives.

I'll write a post on MRL describing how interfaces which define service functions should not use primitives, but always the boxed counterparts e.g. Integer vs int - or somebody do a proficient method invoking/caching based on coercion.

I'll be fixing this by making sure all service interfaces do not have primitives

@supertick

This comment has been minimized.

Copy link
Contributor

commented Apr 7, 2019

Gah ! ... my mistake
glad I read your issue - and your right .. accidently took String/name out :(

So I need to test coercion to primitives to answer my initial confusion..

@supertick

This comment has been minimized.

Copy link
Contributor

commented Apr 7, 2019

primitives defined interface methods "work" but .. I'd say they are not optimial..
As to the rest ...
http://myrobotlab.org/content/servo-servocontrol-servocontroller-and-confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.