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

Wheel Simulator Not Incrementing Wheel_Position #19

Open
dforegger opened this issue Aug 24, 2016 · 2 comments
Open

Wheel Simulator Not Incrementing Wheel_Position #19

dforegger opened this issue Aug 24, 2016 · 2 comments

Comments

@dforegger
Copy link

It looks like the wheel_position is not getting updated running on linux-mint.

simulator/linux-mint16_64/gl_server layout/wheel.json
mapping server address 10.0.0.32:7890 to channel 0
OPC: Listening on port 7890
OPC: Client connected from 127.0.0.1
OPC: Client closed connection

I modified dewb-wheelSpinEffect to print wheel_position, ie:
def wheelSpinEffect(system, state):
print state.wheel_position
for pixel in system:
#...

The result:

python client/python/wheel.py -l layout/wheel.json -f 60 --sim -i
WARNING: python-rtmidi not found, MIDI event input will not be available.
Listening for OSC messages on port 7000
Client 0 at 127.0.0.1:7890 protocol opc on channel 0
*** sending pixels forever (control-c to exit)...
Press ENTER to cycle effects
Running effect dewb-demoEffect
Running effect dewb-alignTestEffect
Running effect dewb-anotherSimpleExampleEffect
Running effect dewb-demoEffect
Running effect dewb-radialExampleEffect
Running effect dewb-simpleExampleEffect
Running effect dewb-wheelSpinEffect
0.0
0.0
0.0
0.0
0.0

(Some output whitespace modified for github formatting)

If you don't have any ideas offhand I'll take a look tonight at the source to try to debug it.
Thanks!
~DF

@dforegger dforegger changed the title Wheel Server Not Animating Wheel Simulator Not Incrementing Wheel_Position Aug 25, 2016
@Dewb
Copy link
Owner

Dewb commented Aug 25, 2016

Wheel speed defaults to 0. You can send an OSC message like /wheel/speed 0.3 to port 7000 to start it spinning, but that doesn't make it super easy to simulate. The default should have been nonzero for easier simulation, but I didn't want to make physical setup confusing. I'll think about this a bit.

In the meantime, you can just change line 99 in wheel.py to something other than zero to see the wheel spinning in simulation. Sorry for the confusion!

@dforegger
Copy link
Author

Thanks! I assumed the /wheel/speed was being used elsewhere but couldn't find it.
I've got it working by adding a param to the options that only works if --sim is used. It then sends a message with the speed when the simulator is started. I'll clean it up and send a pull request later tonight.

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

2 participants