These are chat archives for BinPy/BinPy

24th
May 2014
Sarwar Chahal
@axiom24
May 24 2014 16:05
@rvraghav93 link to your blog?
This message was deleted
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 18:09
@sarwarc rvraghav93.blogspot.com - Havent blogged much tho :smile:
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 19:24
@debugger22 I really need some help on the pyqt ( stepper motor ) ... I thot of making a small mini project in examples to show a stepper motor driver circuit using multivibrator, counter and this Stepper Motor along with an oscilloscope ... this gui doesnt work as expected when run as a code ... only works in line by line execution ... something to do with "qt's rule of app.exec must be in main thread" i.e GUI needs to work from MainThread could you look into it ?
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 19:43
actually work as MainThread ....
Sudhanshu Mishra
@debugger22
May 24 2014 20:28
Where's the code?
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 20:34
try this :
sm = StepperMotor("PaperFeeder", *[ Connector() for i in range(4) ])
# Note the error when initializing ( use ipython )
sm.rotate(steps = 10, rpm = 1) # This works
for i in range(10):
    sm.rotate(rpm = 1)
    sleep(1)
# Gui hangs and only when the for is exited the display is updated ....
# This doesnt get updated at all if run as a code as the MainThread is terminated at the end of for
Sudhanshu Mishra
@debugger22
May 24 2014 20:45
I got the issue
Qt isn't designed the way you are trying to use it
What is this error?
ERROR: Current Configuration is invalid. Restoring valid state from history.
ERROR: Restoration Failed, History invalid. Restoring history to 1000. Preserving the current angle
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 20:59
that is just to notify the user that the current leads configuration is not in SEQ
ya ... any workaround ?
Sudhanshu Mishra
@debugger22
May 24 2014 21:00
For working with Qt, we'll have to keep it in main thread and do other things in the main loop
I am not sure that we can do it in a library
Maybe it can be added in the separate repository
Which @coder006 will be working on, this summer.
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 21:02
U mean we can move StepperMotor to a separate repo ?
Sudhanshu Mishra
@debugger22
May 24 2014 21:02
yeah
Is there any issue according to you?
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 21:03
I proposed one oscilloscope too... that should also run in the bg :( any other gui tools like tkinter, wxpy there ?
or some subprocess instead of threading be used to do the work ?
Sudhanshu Mishra
@debugger22
May 24 2014 21:04
Can't help. Not good at GUI. :worried:
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 21:05
know any one who could help me ? :)
abt steppmotor into separate repo ... no probs ... create a BinPy-GUI-Tools !!
or simply BinPy-GUI
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 21:07
great ... how did i not notice this :P
The BinPy directory is a link ?
Sudhanshu Mishra
@debugger22
May 24 2014 21:08
git submodule
sort of
(Venkat) Raghav, Rajagopalan
@raghavrv
May 24 2014 21:08
great !!