#qi-hardware IRC log for Wednesday, 2011-07-20

qi-bot[commit] Ayla: Added sections directories for the dingux build. (master) http://qi-hw.com/p/gmenu2x/5a2785101:17
wolfspraulgood morning :-)05:29
kyakindeed!06:08
wolfspraulkyak: yesterday I saw Niels uploading some NanoMap screenshots, well, I hope they ran on a NanoNote :-)06:11
wolfspraula good mapping app would be cool06:11
wolfsprauljust a viewer, but fast, with point of interest lookup, easy pre-downloading of a certain area/city, etc.06:11
qi-botThe build was successfull, see images here: http://fidelio.qi-hardware.com/~xiangfu/compile-log/openwrt-xburst.full_system-07192011-0403/07:29
kyakwolfspraul: yeah, it's a cool app and so far Niels kept it working on Ben (though it feels like he tends towards "desktop" features in NanoMap)07:55
viricxiangfu: ni hao08:48
viricxiangfu: you should see how 'offrss' makes PDFs for e-ink readers :)08:48
viricxiangfu: http://vicerveza.homeunix.net/~viric/cgi-bin/offrssdemo/acordem (Plan PDF)08:48
Aylamth: here's a patch for gmenu2x: http://pastebin.com/GJRMTEjP10:46
Aylamth: I don't know if you already worked on it, so I didn't commit it yet10:47
Aylathis does fix a lot of memory leaks :)10:49
larscAyla: delete should take NULL just fine, so there is no need to check for it10:50
Aylahi larsc 10:51
larschi10:51
Ayladoes delete also set the pointer back to NULL?10:51
larscnope10:51
Aylaok10:52
Aylathen here's a new one: http://pastebin.com/mAjKEA7c10:54
mthAyla: I haven't worked on it yet, so there is no risk of conflicts10:58
mthis "< list.end()" valid?11:00
mthusually I only see != being used there11:00
mthI don't know if iteration steps are ordered11:01
Aylait probably is valid, but I'd prefer having '!=' as well11:02
larsciirc it < list.end will not work11:06
larscbut my c++ is a bit rusty11:06
Aylacan I push the patch I uploaded?11:07
mthwhat does erase() do exactly?11:10
Aylait empties the vector11:11
Ayla(and call the destructor for each object contained on that vector)11:11
mth"voices.erase(voices.begin(), voices.end());" could be replaced by "voices.clear();" then11:17
mthactually, won't the destruction of the vector throw away all elements anyway?11:17
mththen nothing would have to be done in ~SettingsDialog11:17
Aylait will destroy the array, but I'm not sure about the elements contained on the array11:18
Aylajust because you can have pointers to external objects, used elsewhere on your program11:19
mththis says the element destructors are called: http://www.cplusplus.com/reference/stl/vector/~vector/11:19
mthpointers don't have destructors11:19
Aylathen it won't work11:20
Aylaand it does not work either with erase()11:20
mthpointers and STL containers are a problem that has only been solved in C++11 afaik11:20
mthin earlier C++ there is auto_ptr, but the problem with that is that the source becomes null on copy11:21
mthso if you accidentally pass a container by value, you have just destroyed the original11:22
AylaI now use this:11:31
AylaFixed a good number of memory leaks. 11:31
Aylaups11:31
Aylawrong copy/paste11:31
Aylafor (uint i=0; i<voices.size(); i++)11:32
Ayla    delete voices[i];11:32
Aylavoices.clear();11:32
mthapparently random-access iterators can be compared with "<": http://www.cplusplus.com/reference/std/iterator/11:33
mthbut "!=" works on any kind of iterator11:33
Aylaif you don't have any other remarks, I push the changes11:35
mthI'd prefer this approach: for (vector<MenuSetting *>::iterator it = voices->begin(); it != voices->end(); ++it)11:35
Aylaok.11:36
mththe clear() is not needed as the vector will be destructed automatically11:37
Aylarihgt11:37
Aylaright*11:37
Aylaso here's a new diff: http://pastebin.com/8nHBQr2b11:45
Aylaif I success to find the gmenu2x bug with the VTs tonight, I'll have a look at bootsplash11:47
mthpatch looks good now11:51
mththere is also still the problem with the thread that remains after exec11:52
AylaI'll be back tonight12:10
qi-bot[commit] Ayla: Fixed a good number of memory leaks. (master) http://qi-hw.com/p/gmenu2x/81a607c18:40
kristianpaulwpwrak_: http://elespectador.com/tecnologia/articulo-285801-argentina-sera-el-noveno-productor-mundial-de-blackberry19:04
wpwrak_kristianpaul: hmm ... probably a factory hall where they take the bottom shell, put the PCB in it, place the top shell on it, then squeeze19:15
wpwrak_kristianpaul: most of the "investment" were probably bribes ;-)19:16
wpwrak_kristianpaul: that whole "industry" in tierra del fuego is a bit of a scam19:16
methril_worka interesting new!!! 19:17
methril_workhttps://lkml.org/lkml/2011/7/19/30919:17
kyakwonder if it possible to turn Ben into a real time machine19:21
kyakperform some signal processing or whatever19:21
wpwrak_methril__: sounds promising19:21
wpwrak_kyak: would ubb-vga be real-time enough ? ;-)19:22
kyakwpwrak_: not sure. Can you halt all other tasks and do some processing in hard real time?19:23
wpwrak_kyak: i halt all other tasks, oh yes ;-)19:24
methril_workkyak, why you need a RT-Ben?19:24
wpwrak_kyak: although this is by simply disabling interrupts :)19:24
methril_workwpwrak_, is applying new RT concepts with UBB /)19:24
methril_work;)19:24
kyakmethril_work: it's a good question, probably i don't need it at all. But it's interesting and fun19:25
methril_workkyak, i know :)19:25
kyakwpwrak_: i might want to have a look into how you do it then :)19:25
wpwrak_grmbl. openscad seems to have sprouted a gazillion other little cad variants, each with a different feature set, and of course none really complete19:26
kyaki'm doing some steps to implement Ben NanoNote target support in MATLAB/Simulink.. It's hard to say where it's going, but it is interesting so far19:27
wpwrak_kyak: (ubb-vga) the dirty way :)19:27
kyakso far, no real time.. Just implement some things in Simulink and see it running on Ben, not real time19:27
methril_workkyak, but are you going to use RTAI or RT patch?19:27
wpwrak_kyak: there is one "interrupt" source. and that's a brief poll of the keyboard at the end of each frame :)19:28
kyakmethril_work: you should be using one of these, yes.. 19:28
kyaks/you/i19:28
kyakwpwrak_: do you do this from userspace?19:30
wpwrak_kyak: yup. look at the code. it's not very big. http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/tree/master/ubb-vga/ubb-vga.c19:31
kyakwpwrak_: this is intersting. Perhaps i can do the same when deploying my application - then i don't need the RT patch?19:32
wpwrak_kyak: if you don't mind halting the rest of the system, perhaps not19:33
wpwrak_kyak: the system survives this abuse. i.e., when ubb-vga exits, the ben returns to normal operation. the system time is probably off, though19:33
kyaknot only i don't mind doing that, but i'd like to do that :)19:33
wpwrak_perfect then :)19:34
kyaki liked the RTLinux approach though, when they have some RT governor and linux kernel is running inside of it19:35
kyakand then your real time application can step in and take the priority19:35
wpwrak_oh yes. it's a lot more versatile. also has quite different requirements than ubb-vga. ubb-vga is more a device driver than a proper RT task19:38
kyakwpwrak_: what if i want to visualize something while running such application? I will have to enable interrupts at least for LCD driver (if such thing is even possible) and this could also lead to loosing the real time schedule?19:38
kyaki don't quite understand why it is so easy to disable interrupts from userspace.. Would it work if started by regular user?19:45
kyakalso, the interrupts are relevant for device drivers, right? Would other running appplication cause any problems?19:48
wpwrak_kyak: you need to be root to do all this19:51
wpwrak_kyak: ubb-vga disables everything else. other drivers, other processes, etc.19:51
wpwrak_kyak: if your timing requirements are less crazy, you can leave the LCD display on. the refresh happens automatically. it just eats a bit of memory bandwidth and introduces memory access delays.19:52
kristianpaulwpwrak_: (scam) :-S, got it19:55
wpwrak_kyak: don't forget that ubb-vga is very sensitive to delays. each 18 ns it must deliver another pixel (4 bits)19:56
wpwrak_kyak: there's of course prefetching. de facto, the delay tolerance should be 1-2 us. if anything delays things beyond this, the timing falls apart.19:59
kristianpaulkyak: when is next "image" will be released?20:19
Action: kristianpaul want to play allegro games and check last nanomap :)20:19
kyakwpwrak_: cool, thanks for explanations :)20:44
kyakkristianpaul: you would have to ask xiangfu, but you can always try the latest "nightly" build20:45
kristianpaulkyak: there is Makefile or script that flash my nanonote from  "nightly" build?22:54
kristianpaulfreeze again when reading :S23:56
--- Thu Jul 21 201100:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!