hey guys,
this might be of use to some of you:
i've scripted a set of basic instruments in Python that might be of use to some of you.
the Youtube clip shows it attached to my UAV project.
for anyone who hasn't used it, Python is a particularly easy to use programming language that is used for all sorts of applications.
there are loads of add on libraries to do much of the hard work for you which makes it particularly useful for this sort of rapid development.
the Python code can be downloaded here under the name "cockpit.zip":
http://sites.google.com/site/mrdunk/Home/downloads
more detail on my UAV work here:
https://sites.google.com/site/mrdunk/Home
dunk.
Comments
it's the same version of the program.
yours should look the same as my screenshot.
the bright yellow you are seeing are part of the raw images.
pyGame should make the yellow bits transparent, letting the layer beneath show through.
so, in short, you should not be seeing any yellow.
as for the green part,
your talking about the background right?
hrmm... that should be grey. i had presumed that was just Vimeo messing with the colour pallet.
the line:
screen.fill(0x222222)
sets the background colour.
so i don't know what to recommend...
have you considered removing and re-installing Python and pyGame?
dunk.
Is that the normal colour scheme for the displays or a later version of the program ? (Mine is yellow and green).
Best wishes, Pete
on a windows VM i can't reproduce your findings.
it's a clean XP install running Python 2.6.6 and pyGame 1.9.1release-svn2575 .
it works fine for me.
is there anything unusual about the machine you are running?
i'm wondering if this is an issue between pyGame and your graphics card...
the Surface.set_colorkey call inpyGame that handles transparencies does have a flag for non accelerated displays.
http://www.pygame.org/docs/ref/surface.html#Surface.set_colorkey
dunk.
odd.
it's late here but i'll have a dig about tomorrow and see if i can find any information on transparencies working differently on Linux and windows.
they *should* work the same but it is possible we've run into a bug.
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32
IDLE 2.6.2 ==== No Subprocess ====
>>> import pygame
>>> pygame.__version__
'1.9.1release-svn2575'
>>>
that appears to be a problem with transparencies.
the yellow area should be transparent.
i suspect it's an issue with pyGame...
any idea what version of pyGame you are using?
i'm using '1.9.1release' on Linux.
you can find out by running the python interpreter then entering
pygame.__version__
dunk.
hi Rana,
hehe, that would kind of defeat the purpose of doing it my self though...
Simon,
hmm, not a bad idea. i think i have a windows virtual machine somewhere.
how does py2exe work?
anyone who uses my code will have to modify it to some extent to calibrate inputs, dial position on screen, etc.
is it possible to edit the python script in an executable made with py2exe or will it need re-compiled afterwards?
(i'm guessing not.)
hey Pete,
that's disappointing...
i don't run windows so it will take me a while to dig out a windows virtual machine to test it.
any chance of a screen shot?
dunk.
You might want to consider looking at py2exe to bundle up it up into a Windows execute for all those lacking python installs/experience.
Cheers,
Simon.