-
Notifications
You must be signed in to change notification settings - Fork 14
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
getInfraredSensorSeek: 'float' object is not subscriptable #78
Comments
Like like a bug in the code generator (https://github.com/OpenRoberta/openroberta-lab/blob/develop/RobotEV3/src/main/java/de/fhg/iais/roberta/visitor/codegen/Ev3PythonVisitor.java) - I am not sure where the Another issue could be the version of the robertalab package on your ev3dev image. I never had the resources to update it beyond stretch and the stretch images itself are not updated :/ So you'll need to ssh in and update the package. We're in the process of including the hal functions in the code directly to avoid this problem, but we're not done with it yet. |
Yes, you cannot plug the '0' into the logic block because ORL treats the return value of
Do I have to add a special repository to update it? I already tried updating: robot@ev3dev:~$ sudo apt update
[sudo] password for robot:
Get:1 http://security.debian.org stretch/updates InRelease [53.0 kB]
Ign:2 http://httpredir.debian.org/debian stretch InRelease
Hit:3 http://httpredir.debian.org/debian stretch Release
Hit:4 http://archive.ev3dev.org/debian stretch InRelease
Get:6 http://security.debian.org stretch/updates/main armel Packages [614 kB]
Fetched 667 kB in 39s (16.9 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
86 packages can be upgraded. Run 'apt list --upgradable' to see them.
robot@ev3dev:~$ sudo apt install openrobertalab
Reading package lists... Done
Building dependency tree
Reading state information... Done
openrobertalab is already the newest version (1.7.4+1.0.0).
0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded. |
can anybody tell me how i am Beginner in Open source Can you tell me How I can also Contribute |
Steps to reproduce
Expected result
The code should evaluate the first item in the list returned by
getInfraredSensorSeek()
.Actual result
getInfraredSensorSeek()
seems to return a float.This is the traceback:
Further information
Maybe #56 is related?
If I change the python code like this it works as expected:
If the beacon is left of the sensor (when looking from behind the sensor) the values are positive (up to 25?) else negative (down to -25?).
Further Questions
How is the sensor supposed to work? Is it similar to lejos getSeekMode?
The text was updated successfully, but these errors were encountered: