Will rtapi_print print a float?
I believe it will now
%e and %g give me f= F[00000000:bff40000] for 1.25
They come out right in Axis messages, but like that in dmesg
I am only trying to find out what (int)-1.25 is
yeah. I know it wasn't possible, but I thought jepler had added it some time in the recent past
you need to use fabs
I want to keep only the fractional part of a float, but f - (int)f doesn't seem to quite work
is there a fint?
no, just a=b, where a is an int variable
and b is a float
there may be an fmod
x mod 1 = the fractional part of x
(if there's an fmod. if not you get 0 all the time :) )
% doesn't work, I know that much
no, that's definitely for ints
Actually, I am getting what I asked for, but not what I want.
fmod() is for modulo of floating-point numbers, but I'd have to check whether it's in rtapi_math.h..
I actually want -0.25 to be 0.75. The actual code is working fine for keeping just the fraction.
I want f - floor(f) I think
from what little bit you described, I think so too
.. and floor() is in rtapi_math.h
andypugh, are these sines/cosines, where you know the number is in (-1 .. 1) ?
Given an angle between 0 and 1 full rotation, I want to add or subtract an angle and still be between 0 and 1 rotations.
ok. so add 1 and then f-floor(f)
floor -1.5 is -2
Floor -0.1 is -1 (as I understand it)
you can never get -1.5 if you start with a and b in the range of 0 to 1
a-b will range from -1 to 1
so (f+1) - floor(f+1) should be the answer you need
-0.1 - (floor(-0.1)) = -0.1 - (-1) = 0.9 (I hope)
yes, that should be true. floor should round toward -inf
And that does seem to work
Time to be away to the land of nod
When compiling EMC2, at the end of the configure script it prints something similar to "next run make" and "then run sudo make setuid". In the wiki page Installing_EMC2 (Sections 2.4 & 2.5) there is the same, but also in-between them there is "make install-menus". I have been doing the "make install-menus" in-between (as per the wiki) and I was wondering if the configure script should have the "make install-menus" echo line added?
It's a simple enough change, but I thought there should be a little public discussion first, so here you go.
I think that only needs to be done once - after that you will have the items in the meny
OK. Would it need to be done again if some item was added to the menu? Would it hurt anything if it was done each time? My menu still seems to point to the "release" manuals (earlier date), which is what I would want. (Maybe I *should* add separate menu items for the 2.4_branch manuals, though ("today's" date). So maybe add a note to the wiki about not needing make install-menus on a re-compile?
I don't know if there are any issues with doing it every time
Ha, there are none *that I know of*, lol
if you don't configure --enable-build-documentation, then you don't get new docs, so that may explain why those menu items don't get changed (maybe)
Ah, I always --enable-build-documentation. I believe always, anyway, unless on one occasion I forgot to for some reason.
So there's the "I'm not sure" part.
in that case someone else should answer, because I'm only guessing :)
No problem, I appreciate your advice as always. That's why I thought I'd better ask about this, I'm not real sure what's going on there either.
With winter coming on, did you ever get your Hardinge working?
It's in an outside (unheated?) shed/garage, as I recall.
nope, I haven't moved it an inch since I (finally) got it off th etrailer
haven't had much time in the last 18 months or so (which is good and bad)
I also have a bug on master to report (2.4.5 seems to be fine). Master of a couple days-weeks ago (not sure) when printing from classicladder (using print button in ladder viewer) to "create a PDF document" (on the Desktop) would immediately crash classicladder. (Axis remained running.)
So I updated master to the current level. Now, on the first printing attempt, nothing happens (and no document appears). On the second printing attempt, classicladder crashes (disappears) as before. Axis remains running.
I hope this is easily repeatable for others with standard config files, I didn't test that way, but I could if it would help. Let me know if it seems to be dependent on the stuff I'm setting up here specifically.
printing was a problem before, which I thought had been fixed
(you could try loading a standard config and printing ...)
I don't know if there are any extra packages necessary to print from CL
OK, I'll try it, which config is the most popular or generic that you think I should use? Oh, there's a thought, maybe it's just me? I loaded all that document stuff, LyX, a whole bunch of stuff. Others need to test printing from master too, I think.
isn't there a sim-<something>-cl config?
Yeah, lots of sims. How about the 3-axis sim?
Oh, yeah, that's a good idea, not much of a ladder there.
Maybe you have something better than the 3-axis-sim?
You were right, there is a demo_sim_cl so I tried that. I made a couple of attempts on both 2.4.5 and master, and now I'm more confused than before, but I think it's broken on both. I've had it crash immediately upon printing, and I've had two attempts at printing with nothing printed, but nothing crashed. But it's getting late and my reports are getting unreliable, so I'm giving up for now.
Also I forgot to mention that in every case I changed the PDF printer from A4 to US letter, if that makes a difference.
hm, printing multiple times worked for me, but my system is not like most of our users' systems: debian squeeze, amd64. emc v2.4_branch, demo_sim_cl, letter or A4 paper sizes.
the pdf-related stuff for package building shouldn't be relevant
valgrind does indicate one potential problem, which seems to be deep inside the printing APIs .. http://pastebin.ca/raw/1995433
ah, it's a zlib buglet fixed in a newer version of zlib (184.108.40.206) than debian squeeze has (220.127.116.11). - Avoid access of uninitialized data for first inflateReset2 call [Gomes] http://www.zlib.net/ChangeLog.txt
I also didn't get a crash on emc2 master on ubuntu lucid running in qemu and displaying using X-over-ssh
each time I've printed, I've gotten output.pdf in the config directory
(that was 32-bit ubuntu lucid, so about like user systems)
good morning (or whatever diurnal greeting is currently appropriate for your timezone)
did you find last bugs with new version of coverity?
micges: the last few commits i made were fixing bugs found by coverity, yes
there are still over 1000 "defects"
can you pastebin them?
coverity recently upgraded the version of the "prevent" static analyzer that they use on their free-for-open-source "scan" service
the old version found something like 25 bugs, and the new one found... 1130
if you mail me (seb at highlab dot com) i can get you an account so you can access our bug report
the one I happened to look at was a (potential) real problem
whats that 'coverity' ? a debugger ?
it's a code analysis program
thanks , its free ?
it looks through the code and finds potential bugs, so you (the programmer) can fix them
yes and no. they have a free service for open source projects
otherwise you get to pay for it
SWPadnos, cool, thanks
many $ x1000 ?
there's no guarantee that they will accept an open source project for the free service though, they have a choice
so not-for-us ...
give them a chance to survive by asking them for a gpl license
their software actually grew out of a program that I believe was open source for a little while
it was the "Stanford checker", they analyzed the linux kernel for a few years while they were developing it
then I guess some of the students graduated or something, and brought the code with them (some technology transfer deal most likely)
coverity is a company, which makes a product called prevent
prevent evolved from the stanford checker
they are now :)
prevent is a static source code analysis system - it reads the source code and finds problems with it
alSMT is now known as Al_Smt
jepler: Thanks for looking into the printing problems, I'll try print bug hunting again after a while. I took a bunch of ladder screenshots for now and I've got to get back to my original problem. Alligators, swamp, etc. Thanks again, more bug reports on printing later.
ries_ is now known as ries
qq-: i've found nasty bug with libv4l2 plugin for camunits so hope it'll be here today :)
i'm building package now
it works with mplayer : http://paste.debian.net/100156/
i hope it'll work with camunits too :)
i'm cleaning patch now
bad things with debian is that all programs for cams try only /dev/video0 , and as udev change that for vary reason ... they fail ...
camview tries first 10:)
camview is a good exception
qq-: please upgrade libcamunits6 package
Setting up libcamunits6-dev (0.2.0-3) ...
qq-: broken :(
i've forgot to link it against libv4l
to load it you need to set LD_PRELOAD=/usr/lib/libv4l2.so environment
ah, forget , how to have in "input " Device , ah ..
try LD_PRELOAD=/usr/lib/libv4l2.so.0 camview
psha, now it WORKS, thanks a bunch
yes, but .... no stream , only ONE image
what's selected format?
fps = 0?
640x480 RGB24 , and yes fps go to 0 , bc off OpenGL
that was reported already
run it with full debug
CAM_DBG=all and LIBV4L2_...
[20:37:56] <qq-> http://paste.debian.net/100158/
btw what's your libv4l-0 version?
from my repo or stock?
rw-r--r-- 1 root root 36796 Nov 8 08:38 /usr/lib/libv4l2.so.0
not there ..
dpkg -l libv4l-0
it will print version
uh , 0.8.1-2
apt-get install libv4l-0=0.8.0-1
i've already removed it from repo
it will remove 26 packages ..
anyway will do
you need to downgrade it to stock version
from my buggy one :)
sure no pbm
Setting up libv4l-0 (0.8.0-1) ...
new version of libcamunits6 is landing in a minute
still no deps
wait another 10 minutes for another build :))
autoconf need to regenerate files before build
hope this time it'll build:)
hm, dependencies hell The following packages have unmet dependencies: v4l-utils: Depends: libv4l-0 (= 0.8.1-2) but 0.8.0-1 is installed.
downgrade it too
there is flag to apt-get to allow downgrades
ok. will may do that tomorrow ?
last try please :)
it finally built ok )
i can't reinstall ..
complaining about 0.8.1-2?
apt-get install v4l-utils=0.8.0-1 libv4l-0=0.8.0-1 qv4l2=0.8.0-1
and libv4l-dev if it's installed
so install libcamunits6 and try it
and that's all for today :)
and camview ?
plugins are in libcamunits6
same , i get image and oipengl kill the stream
s/ oipengl/ opengl , thanks to you
so let's continue tomorrow :)
psha, it works , but @ 320x240 RGB24
hm , but not for long times ~ 2-3 min
ok @ 320x240 RGB24 , adding crosshair fps go zerro, remove crosshair fps uo to normal , and all works
will be fixed in next build
cool , tks
is it working only for short time?
maybe i need to restore open/close workaround in input_v4l2.so
no , still working > 50 min
other thing that kill fps is if i increase the Display window
have to reload the digital cam
that's pretty strange...
maybe open/close are crucial for your cam
it like @ 320x240 but not higher
maybe it's cam limit?
in camview only , in qv4l2 it works 640x480 w/o issues
other thing , using a little Display (same in which worked previews @ 320x240) now it stream @ 640x480 ...
and stops ~2 min later ...
mine is still working in BGR mode
here too BGR is working but seems to be a correlation between the Display size and fps , in the way if Display size increase , fps descrease under "supported" valor , and it is killed gentle (descrease >descrease , too zerro )
that's extremly strange :)
qq-: what's your video card? and what's size of display?
camunits use opengl texture uploads
with blob driver?
but use vesa driver
select example driver in camview and set high framerate in it
so you'll see if it's video problem or not
i'm 640x480 @1 fps
there are controls in that unit
it's called 'menu' :)
example driver get my only RGB 640x480
checkbox, select 30 there
it only knows how to generate 640x480 rgb
no " select 30" there
in example input?
expand example unit controls
and select 30 in first checkbox
no 'expand example unit controls'
create chain from example input and opengl
now fps > 12 , but image freezed
that's bad :) but at least we know that it's somehow related to vesa driver...
do you have libgl1-mesa-swx11 installed?
again a dependencies issue
it will kill libglut
i mean what dep problems?
btw nv driver is working bad for you?
i would remove libgl1-mesa-swx11 to install opengl
libgl1-mesa-swx11 is opengl
but in sofware
it's replacement for libgl1-mesa-glx
psha, no tested (nv) squeeze come with nouveau
and it's not working? )
not for emc2 ..
nouveau get strange issue w/ emc2 , as change behavior of same taste combinations
and have you tried nv driver?
not binary nvidia one but old nv one
it seem that vesa with glx is not right choice :)
even vesa + swx11 is better
will try later
what packages are removed if you try to install swx11?
if a recall opengl
there is no package 'opengl'...
python-opengl depends on libgl1-mesa-glx | libgl1
swx11 provides libgl1
rc libgl1-mesa-swx11 , was installed but .. gone in deps hell
dependson | libgl1
i have libclutter installed and depending on libgl1-mesa-glx
and haskell opengl
everything else is retained untouched
psha, i'll try to have vesa + swx11 for tomorrow
now it's time for a sleep :)
thanks to you
+2 from here
psha, deps hell > http://paste.debian.net/100167/
aptitude is too smart and tries to do everything in one pass
libcamunits*-dev packages are optional
camunits is metapackage
Setting up libgl1-mesa-swx11 (7.7.1-4) .
Current status: 0 broken [-1].
so on vesa + swx11 same behaviors
last resort is nv + swx11
have an explanation of that: changed display size > change fps > kill fps ?
vesa's opengl is buggy :)
it's normal ?
it's not normal
but if it's failing with example input driver that's defenitely connected to rednering
psha, why not skip using mesa for cam ? cam can't do 2D (3D)
but another display plugin is needed
it's not hard to write it but netherless - it needs time
i have time ..
so there are two possibilities
first is to link camview with libosmesa
this will do completely software rendering
this is less intrusive method
that > don't need any mesa , isn't it ? >> LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv://
unfortunately not that yease
libv4l corrupts format enumerated
hm , here works
well (even here works)
they don't set bytesperline line
and camunits is heavily using it
in which file ?
in many places, for example for allocating opengl buffer
libv4l sets it to 0
and everything gets corrupted
mplayer uses xv video output
it's pretty difficult to add it to camunits
bot nothing impossible :)
it's 02:00 already