Napi Qt okosságok: vegyesválogatott 

1) Amikor a QTimerek szórakoznak.

Történt a marsjáróvezérlő programmal, hogy elkezdett néha lefagyni a navigáció. Némi debug után arra jutottam, hogy bizony néhány QTimer nem emittál timeOut() szignált. Hosszas szívózás után rájöttem a dolog nyitjára. A program több saját készítésű könyvtárat használ. (Képletöltő, képfeldolgozó, rovervezérlő). Ez sok szíváshoz vezet, azonban symlinkek nélkül így sikerült megoldanom a földbázis és a marsbázis közös komponenseinek kezelését. A rovervezérlő könyvtárban elkövettem azt az hibát, hogy nem QTimert használtam, hanem a QObject startTimer() és timerEvent(QTimerEvent *event) metódusait az időzítésre. Ez önnmagában nem hiba, sőt átláthatóbb kódot eredményezhet bizonyos esetekben. Azonban a killTimer(int timerid) függvényt csak ésszel szabad használni. A hiba pontos okát nem tudtam feltárni, de annyi bizonyos:

A) killTimer() -t nem hívunk meg nem megfelelően inicializált értékkel

B) killTimer() -t egy timerId-vel csak egyszer hívunk meg.


2) Amikor a windowsos build elbukik mert nem találja a LIBS+= -lsettings -L=../../libs/bin után a settings libet, holott az ott van.

A QtCreator újonnan szeret létrehozni egy shadow build könyvtárat, amiben a fordítás egy desktop nevű könyvtárban történik. Így nem
-L=../../libs/bin -el kell linkelni, hanem egyel fentebbi könyvtárba.


3) Miután sikerrel lefordítottuk a stuffot az alkamazás
QWidget: Must construct a QApplication before a QPaintDevice hibával elszáll.

Az alkalmazásunk és a libjeink azonos módban legyenek fordítva (debug vagy release)

És hogy legyen valami színes is a végére, ami unalmas, és semmitmondó mivel itthonról írok:

A marsbázis fut fostalicska OS-en is némi hekkelés árán.

BTW:
Még : 14 nap van hátra.
Az pontosan annyi mint: 336 óra.
Azaz 20160 perc

[ hozzászólás ] ( 1 megtekintés ) [ 0 trackbackek ] permalink ( 3.2 / 224 )
Upgrade routerstation firmware from Openwrt daily snapshot. 

Just a small note to myself, because I have forgotten it again.

Connect the RS board to your PC trough it's WAN port.
Give static IP to your PC in the 192.168.1.255 subnet.
(IP 192.168.1.1 mask: 255.0.0.0 gw: 192.168.1.20)

cd to your Openwrt's bin directory. (bin/ar71xx)
Power up your RS (trough POE) while holding down it's reset button.
You can release it when the RF led starts light.
Run tftp in the bin/ar71xx directory:

$tftp
binary
trace
put openwrt-ar71xx-ubnt-rs-squashfs-factory.bin


If the process is successful then wait 5-6 minutes. Once the upgrade is finished you the RS will reboot itself.
You will notice it because the wired connection is downed during the reset.

After the reboot it will wait a few minutes, because it erases jffs2 filesystem, and it is takes a long time.
Don't panic, it will finish it.


[ hozzászólás ] ( 13 megtekintés ) [ 0 trackbackek ] permalink ( 3.1 / 240 )
Ubuntu /usr/lib/cups/filter/pdftopdf failed 

Today I wanted to print some documents. Click print, wait nothing happends. I have checked the CUPS command panel, and it said, that the
/usr/lib/cups/filter/pdftopdf failed. Happiness. I have tried to run it, and

mm@lapos:~$ /usr/lib/cups/filter/pdftopdf
/usr/lib/cups/filter/pdftopdf: symbol lookup error: /usr/lib/cups/filter/pdftopdf: undefined symbol: _ZN13GfxColorSpace5parseEP6Object


This happends on my notebook running Ubuntu 9.10 Karmic Koala x86_64.

I remember that there were a CUPS update few days ago. I have forced back the old version of cups, but it did not helped. So I have made a bit workaround with

mm@lapos:~$ sudo mv /usr/lib/cups/filter/pdftopdf /usr/lib/cups/filter/pdftopdf2
mm@lapos:~$ sudo /etc/init.d/cups restart

AAnd happiness.
Now I feel that once I will be angry to myself about this action, but currently I can print, and this is what is matter.

[ hozzászólás ] ( 5 megtekintés ) [ 0 trackbackek ] permalink ( 3.1 / 269 )
OpenWrt snapshot build failed 

Today I have tried to build my updated repo for my Netgear DG834GT, but it failed with:

cp: cannot stat `/home/mm/Projektek/netgear/openwrt/build_dir/linux-brcm63xx/compat-wireless-2010-03-03/drivers/net/wireless/ath/ath5k/ath5k.ko': No such file or directory
make[3]: *** [/home/mm/Projektek/netgear/openwrt/bin/brcm63xx/packages/kmod-ath5k_2.6.32.9+2010-03-03-3_brcm63xx.ipk] Error 1
make[3]: Leaving directory `/home/mm/Projektek/netgear/openwrt/package/mac80211'
make[2]: *** [package/mac80211/compile] Error 2
make[2]: Leaving directory `/home/mm/Projektek/netgear/openwrt'
make[1]: *** [/home/mm/Projektek/netgear/openwrt/staging_dir/target-mips_uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/mm/Projektek/netgear/openwrt'
make: *** [world] Error 2


Mostly if the daily openwrt snapshot building fails, the easiest thing to do, is rm -rf everything, and checkout a clean snapshot.
Of course this means, you have to recompile everything which wastes a lot of time.

I did not have so much humour to do it, so I have decided to do something else. I have updated my Routerstation repo, but it failed with the similar issue. As I the ath5k.ko is missing, because the compat-wireless-2010-03-03 package had not been compiled, but it had the hidden .configured and .built files.

I have removed all of these files with this command:

rm -rf /home/mm/Projektek/netgear/openwrt/build_dir/linux-brcm63xx/compat-wireless-2010-03-03/.built
rm -rf /home/mm/Projektek/netgear/openwrt/build_dir/linux-brcm63xx/compat-wireless-2010-03-03/.configured*
rm -rf /home/mm/Projektek/netgear/openwrt/build_dir/linux-brcm63xx/compat-wireless-2010-03-03/.prepare*


And now the build is done.

Conclusion
If your openwrt build fails with a missing file, or a directory you should find out in what package is in, and remove the hidden markup files (.build, .configured*)

[ hozzászólás ] ( 4 megtekintés ) [ 0 trackbackek ] permalink ( 3.1 / 233 )
Simplephpblog költöztetése ATW-re. 

Ahogy most elnézem siker van.

Átmásoltam, átírtam az sql configot, és működött az ékezeteket leszámítva. Ennek az volt az oka, hogy az atw ISO-8859-2 kódolást használ, amit a header("Content-Type:text/html; Charset=UTF-8";); sem képes felülbírálni. Nincs más hátra, mint előre.

Első lépésként visszacsinálni a nyelvi fájlban a

$lang_string['html_charset'] = 'iso-8859-2';
$lang_string['php_charset'] = 'iso-8859-2';

az új kódolásnak megfelelően. A fájlt pedig iso-8859-2-be meneteni.
Ez a blog szövegeit megjaívtja a postokét viszont nem.
Mivel ezek szöveg fájlokban vannak tárolva a contents mappában, ezért az összeset át kellene menteni iso-8859-2 kódolásra.

Erre ütöttem össze egy gyors parancsot:


find . -name "*.txt" -print0 | xargs -0 enconv -x ISO-8859-2


Ezt a contents mappában futtatva, értem el a jelenlegi eredményt. Öröm és bódottá.
[ hozzászólás ] ( 1 megtekintés ) [ 0 trackbackek ] permalink ( 2.9 / 288 )

<< <Előző | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Következő> >>

 
számláló