Skip to content

Conversation

@ddemidov
Copy link
Member

@ddemidov ddemidov commented Nov 7, 2015

Ref #47

@ddemidov
Copy link
Member Author

ddemidov commented Nov 7, 2015

The demo depends on #76.

rhempel added a commit that referenced this pull request Nov 7, 2015
@rhempel rhempel merged commit ac18ae1 into ev3dev:master Nov 7, 2015
@ddemidov ddemidov deleted the demo branch November 7, 2015 15:47
@rhempel
Copy link
Member

rhempel commented Nov 7, 2015

Thanks for adding this, what I'll do is post about it to the ev3dev.org site - there's not much going on there right now.

@ddemidov
Copy link
Member Author

ddemidov commented Nov 7, 2015

There is a slight issue I had with the new bindings while implementing this. The boostc version stopped the motors in their destructors, and pure python version does not. When something goes wrong in the middle of the script (that is, an exception is thrown and the script exits prematurely), motors keep rotating, and there is no easy way to stop the motors. May be we should reintroduce the boostc behavior?

@ensonic
Copy link
Contributor

ensonic commented Nov 7, 2015

+1 I'll do this on the code generated by open-roberta too.

@rhempel
Copy link
Member

rhempel commented Nov 7, 2015

Good idea - destructors should reset the peripheral - this may apply for sensors as well...

@ddemidov
Copy link
Member Author

ddemidov commented Nov 7, 2015

How do you reset a sensor?

@ddemidov ddemidov mentioned this pull request Nov 7, 2015
@ensonic
Copy link
Contributor

ensonic commented Nov 7, 2015

Maybe @rhempel meant to restore e.g. the mode.

@ddemidov
Copy link
Member Author

ddemidov commented Nov 7, 2015

But then we either need a concept of default mode for each sensor type, or to remember the state the sensor had at construction time.

@rhempel
Copy link
Member

rhempel commented Nov 7, 2015

I just mean to consider resetting the sensor. For example the NXT light sensor allowed to use the LED as a multi colored light. The destructor should turn the light off. I see the motor destructor PR is done - leave the sensors for later - it won't break anything :-)

@ddemidov ddemidov mentioned this pull request Nov 7, 2015
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.

3 participants