2019年7月29日

HUD #3: DirectFB周り・続き

前回の続き。
(!!!)  *** ONCE [no mode found for 320x240] *** [fbdev.c:1360 in dfb_fbdev_find_mode()]
と怒られているので、modeに"320x240" と書いたらダメなんだろうなぁ、.directfbrc でググってみて https://bitset.jp/blog/raspi_framebuffer_1 を発見。




$ fbset -fb /dev/fb1
mode "320x240"
    geometry 320 240 320 240 16
    timings 0 0 0 0 0 0 0
    nonstd 1
    rgba 5/11,6/5,5/0,0/0
endmode
・・・なるほど、これを /etc/fb.modes に書けばいいのか。
$ make run
g++ test.cpp -I /usr/include/directfb -ldirectfb -o test
./test
(*) Direct/Thread: Started 'SigHandler' (959) [CRITICAL - OTHER/0] <8388608>...

   ~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2012-2015  DirectFB integrated media GmbH
        (c) 2001-2015  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core.
(!) Direct/Modules: Unable to dlopen `/usr/lib/arm-linux-gnueabihf/directfb-1.7-7/systems/libdirectfb_mesa_system.so'!
    --> /usr/lib/arm-linux-gnueabihf/directfb-1.7-7/systems/libdirectfb_mesa_system.so: undefined symbol: glEGLImageTargetRenderbufferStorageOES
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (960) [MESSAGING - OTHER/0] <8388608>...
(*) DirectFB/FBDev: Found 'fb_ili9340' (ID 0) with frame buffer at 0x00000000, 150k (MMIO 0x00000000, 0k)
(*) DirectFB/Input: Hot-plug detection enabled with Input Hub Driver
(*) Direct/Thread: Started 'PS/2 Input' (961) [INPUT - OTHER/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(!) DirectFB/Keyboard: Could not open() /dev/tty0!
    --> Permission denied
(*) DirectFB/Graphics: Generic Software Rasterizer 0.7 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Thread: Started 'Genefx' (962) [DEFAULT - OTHER/0] <8388608>...
(*) FBDev/Mode: Setting 320x240 RGB16
(*) FBDev/Mode: Switched to 320x240 (virtual 320x240) at 16 bit (RGB16), pitch 640
(*) FBDev/Mode: Setting 320x240 RGB16
(*) FBDev/Mode: Switched to 320x240 (virtual 320x240) at 16 bit (RGB16), pitch 640
(*) FBDev/Mode: Setting 320x240 RGB16
(*) FBDev/Mode: Switched to 320x240 (virtual 320x240) at 16 bit (RGB16), pitch 640
(*) FBDev/Mode: Setting 320x240 RGB16
(*) FBDev/Mode: Switched to 320x240 (virtual 320x240) at 16 bit (RGB16), pitch 640
 (!!!)  *** UNIMPLEMENTED [fusion_dispatch] *** [fusion.c:3937]
DONE!
$
・・・うむ、エラー消えた。
ということで DirectFBを使う土台が整った。

この先、HUDを何で実装していくかということになるが、
  • pygame + Python-OBD
    • Pythonに不慣れ、というかインデントで階層表現させる言語仕様を生理的に受け付けないのでなぁ。。。
  • C++で
    • DirectFB周りも OBD周りも支援が得られないのは これはこれでしんどい、、、
どっちがいいんだろうなぁ、諦めて Pythonに手を出しとくところなのか??

0 件のコメント:

コメントを投稿