2011-07-20 01:17 [commit] Ayla: Added sections directories for the dingux build. (master) http://qi-hw.com/p/gmenu2x/5a27851 2011-07-20 05:29 good morning :-) 2011-07-20 06:08 indeed! 2011-07-20 06:11 kyak: yesterday I saw Niels uploading some NanoMap screenshots, well, I hope they ran on a NanoNote :-) 2011-07-20 06:11 a good mapping app would be cool 2011-07-20 06:11 just a viewer, but fast, with point of interest lookup, easy pre-downloading of a certain area/city, etc. 2011-07-20 07:29 The build was successfull, see images here: http://fidelio.qi-hardware.com/~xiangfu/compile-log/openwrt-xburst.full_system-07192011-0403/ 2011-07-20 07:55 wolfspraul: 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) 2011-07-20 08:48 xiangfu: ni hao 2011-07-20 08:48 xiangfu: you should see how 'offrss' makes PDFs for e-ink readers :) 2011-07-20 08:48 xiangfu: http://vicerveza.homeunix.net/~viric/cgi-bin/offrssdemo/acordem (Plan PDF) 2011-07-20 10:46 mth: here's a patch for gmenu2x: http://pastebin.com/GJRMTEjP 2011-07-20 10:47 mth: I don't know if you already worked on it, so I didn't commit it yet 2011-07-20 10:49 this does fix a lot of memory leaks :) 2011-07-20 10:50 Ayla: delete should take NULL just fine, so there is no need to check for it 2011-07-20 10:51 hi larsc 2011-07-20 10:51 hi 2011-07-20 10:51 does delete also set the pointer back to NULL? 2011-07-20 10:51 nope 2011-07-20 10:52 ok 2011-07-20 10:54 then here's a new one: http://pastebin.com/mAjKEA7c 2011-07-20 10:58 Ayla: I haven't worked on it yet, so there is no risk of conflicts 2011-07-20 11:00 is "< list.end()" valid? 2011-07-20 11:00 usually I only see != being used there 2011-07-20 11:01 I don't know if iteration steps are ordered 2011-07-20 11:02 it probably is valid, but I'd prefer having '!=' as well 2011-07-20 11:06 iirc it < list.end will not work 2011-07-20 11:06 but my c++ is a bit rusty 2011-07-20 11:07 can I push the patch I uploaded? 2011-07-20 11:10 what does erase() do exactly? 2011-07-20 11:11 it empties the vector 2011-07-20 11:11 (and call the destructor for each object contained on that vector) 2011-07-20 11:17 "voices.erase(voices.begin(), voices.end());" could be replaced by "voices.clear();" then 2011-07-20 11:17 actually, won't the destruction of the vector throw away all elements anyway? 2011-07-20 11:17 then nothing would have to be done in ~SettingsDialog 2011-07-20 11:18 it will destroy the array, but I'm not sure about the elements contained on the array 2011-07-20 11:19 just because you can have pointers to external objects, used elsewhere on your program 2011-07-20 11:19 this says the element destructors are called: http://www.cplusplus.com/reference/stl/vector/~vector/ 2011-07-20 11:19 pointers don't have destructors 2011-07-20 11:20 then it won't work 2011-07-20 11:20 and it does not work either with erase() 2011-07-20 11:20 pointers and STL containers are a problem that has only been solved in C++11 afaik 2011-07-20 11:21 in earlier C++ there is auto_ptr, but the problem with that is that the source becomes null on copy 2011-07-20 11:22 so if you accidentally pass a container by value, you have just destroyed the original 2011-07-20 11:31 I now use this: 2011-07-20 11:31 Fixed a good number of memory leaks. 2011-07-20 11:31 ups 2011-07-20 11:31 wrong copy/paste 2011-07-20 11:32 for (uint i=0; i     delete voices[i]; 2011-07-20 11:32 voices.clear(); 2011-07-20 11:33 apparently random-access iterators can be compared with "<": http://www.cplusplus.com/reference/std/iterator/ 2011-07-20 11:33 but "!=" works on any kind of iterator 2011-07-20 11:35 if you don't have any other remarks, I push the changes 2011-07-20 11:35 I'd prefer this approach: for (vector::iterator it = voices->begin(); it != voices->end(); ++it) 2011-07-20 11:36 ok. 2011-07-20 11:37 the clear() is not needed as the vector will be destructed automatically 2011-07-20 11:37 rihgt 2011-07-20 11:37 right* 2011-07-20 11:45 so here's a new diff: http://pastebin.com/8nHBQr2b 2011-07-20 11:47 if I success to find the gmenu2x bug with the VTs tonight, I'll have a look at bootsplash 2011-07-20 11:51 patch looks good now 2011-07-20 11:52 there is also still the problem with the thread that remains after exec 2011-07-20 12:10 I'll be back tonight 2011-07-20 18:40 [commit] Ayla: Fixed a good number of memory leaks. (master) http://qi-hw.com/p/gmenu2x/81a607c 2011-07-20 19:04 wpwrak_: http://elespectador.com/tecnologia/articulo-285801-argentina-sera-el-noveno-productor-mundial-de-blackberry 2011-07-20 19:15 kristianpaul: hmm ... probably a factory hall where they take the bottom shell, put the PCB in it, place the top shell on it, then squeeze 2011-07-20 19:16 kristianpaul: most of the "investment" were probably bribes ;-) 2011-07-20 19:16 kristianpaul: that whole "industry" in tierra del fuego is a bit of a scam 2011-07-20 19:17 a interesting new!!! 2011-07-20 19:17 https://lkml.org/lkml/2011/7/19/309 2011-07-20 19:21 wonder if it possible to turn Ben into a real time machine 2011-07-20 19:21 perform some signal processing or whatever 2011-07-20 19:21 methril__: sounds promising 2011-07-20 19:22 kyak: would ubb-vga be real-time enough ? ;-) 2011-07-20 19:23 wpwrak_: not sure. Can you halt all other tasks and do some processing in hard real time? 2011-07-20 19:24 kyak: i halt all other tasks, oh yes ;-) 2011-07-20 19:24 kyak, why you need a RT-Ben? 2011-07-20 19:24 kyak: although this is by simply disabling interrupts :) 2011-07-20 19:24 wpwrak_, is applying new RT concepts with UBB /) 2011-07-20 19:24 ;) 2011-07-20 19:25 methril_work: it's a good question, probably i don't need it at all. But it's interesting and fun 2011-07-20 19:25 kyak, i know :) 2011-07-20 19:25 wpwrak_: i might want to have a look into how you do it then :) 2011-07-20 19:26 grmbl. openscad seems to have sprouted a gazillion other little cad variants, each with a different feature set, and of course none really complete 2011-07-20 19:27 i'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 far 2011-07-20 19:27 kyak: (ubb-vga) the dirty way :) 2011-07-20 19:27 so far, no real time.. Just implement some things in Simulink and see it running on Ben, not real time 2011-07-20 19:27 kyak, but are you going to use RTAI or RT patch? 2011-07-20 19:28 kyak: there is one "interrupt" source. and that's a brief poll of the keyboard at the end of each frame :) 2011-07-20 19:28 methril_work: you should be using one of these, yes.. 2011-07-20 19:28 s/you/i 2011-07-20 19:30 wpwrak_: do you do this from userspace? 2011-07-20 19:31 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.c 2011-07-20 19:32 wpwrak_: this is intersting. Perhaps i can do the same when deploying my application - then i don't need the RT patch? 2011-07-20 19:33 kyak: if you don't mind halting the rest of the system, perhaps not 2011-07-20 19:33 kyak: the system survives this abuse. i.e., when ubb-vga exits, the ben returns to normal operation. the system time is probably off, though 2011-07-20 19:33 not only i don't mind doing that, but i'd like to do that :) 2011-07-20 19:34 perfect then :) 2011-07-20 19:35 i liked the RTLinux approach though, when they have some RT governor and linux kernel is running inside of it 2011-07-20 19:35 and then your real time application can step in and take the priority 2011-07-20 19:38 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 task 2011-07-20 19:38 wpwrak_: 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? 2011-07-20 19:45 i don't quite understand why it is so easy to disable interrupts from userspace.. Would it work if started by regular user? 2011-07-20 19:48 also, the interrupts are relevant for device drivers, right? Would other running appplication cause any problems? 2011-07-20 19:51 kyak: you need to be root to do all this 2011-07-20 19:51 kyak: ubb-vga disables everything else. other drivers, other processes, etc. 2011-07-20 19:52 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. 2011-07-20 19:55 wpwrak_: (scam) :-S, got it 2011-07-20 19:56 kyak: don't forget that ubb-vga is very sensitive to delays. each 18 ns it must deliver another pixel (4 bits) 2011-07-20 19:59 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. 2011-07-20 20:19 kyak: when is next "image" will be released? 2011-07-20 20:19 want to play allegro games and check last nanomap :) 2011-07-20 20:44 wpwrak_: cool, thanks for explanations :) 2011-07-20 20:45 kristianpaul: you would have to ask xiangfu, but you can always try the latest "nightly" build 2011-07-20 22:54 kyak: there is Makefile or script that flash my nanonote from  "nightly" build? 2011-07-20 23:56 freeze again when reading :S