philseeley / boatinstrument

Boat Instrument
GNU General Public License v3.0
3 stars 1 forks source link

Issues with boatinstrument on CoreMP135 #3

Open mgrouch opened 1 month ago

mgrouch commented 1 month ago

Hello,

I've managed to build and run boatinstrument on CoreMP135 with flutter-pi.

The build was done on CircleCI using these scripts:

https://github.com/bareboat-necessities/boatinstrument/tree/main/.circleci

It was published to github

https://github.com/bareboat-necessities/lysmarine_gen/releases/download/vTest/boatinstrument-0.0.1.1-flutterpi_arm32.tgz

Flutter-pi was installed on CoreMp135 using this script


sudo apt install cmake libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev \
 libdrm-dev libgbm-dev ttf-mscorefonts-installer fontconfig \
 libsystemd-dev libinput-dev libudev-dev  libxkbcommon-dev

sudo fc-cache

git clone --recursive https://github.com/ardera/flutter-pi

cd flutter-pi

mkdir build && cd build

cmake ..
make -j`nproc`

sudo make install

And running it:


wget https://github.com/bareboat-necessities/lysmarine_gen/releases/download/vTest/boatinstrument-0.0.1.1-flutterpi_arm32.tgz

gzip -cd boatinstrument-0.0.1.1-flutterpi_arm32.tgz | tar xvf -

flutter-pi --release ./boatinstrument

When I run it, it renders something but not everything


root@CoreMP135:~# flutter-pi --release ./boatinstrument
[locales] Warning: The system has no configured locale. The default "C" locale may or may not be supported by the app.
WARNING: Detected llvmpipe (ie. software rendering) as the OpenGL ES renderer.
         Check that flutter-pi has permission to use the 3D graphics hardware,
         or try running it as root.
         This warning will probably result in a "failed to set mode" error
         later on in the initialization.
egl_gbm_render_surface.c: Couldn't create GBM surface for rendering. gbm_surface_create_with_modifiers: Function not implemented
egl_gbm_render_surface.c: Will retry without modifiers
mgrouch commented 1 month ago

IMG_6950

mgrouch commented 1 month ago

Also when I move mouse I see these errors:

window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88
window.c: GBM BO has unsupported framebuffer stride 128, expected was: 88

I do not see mouse pointer

philseeley commented 1 month ago

Unfortunately I only have a headless RPi4 onboard and no HDMI monitor, so I'm unable to test the flutter-pi build at the moment.

What kind of Graphics rendering does the CoreMP135 have? I wonder if one on the -dimensions, --pixelformat or --videomode options to flutter-pi might help.

Perhaps raising this with Hannes over at flutter-pi might be worth a shot.

I'll have access to an HDMI display etc in a couple of months.

Cheers Phil

mgrouch commented 1 month ago

I've tested arm64 linux version on Bareboat Necessites OS and it works on HDMI touchscreen monitor.

https://github.com/bareboat-necessities/lysmarine_gen/releases/download/vTest/boatinstrument-0.0.1.1-linux-aarch64.tgz

mgrouch commented 1 month ago

@philseeley

big issue on pi is that swipe to next screen using touch gestures works only rarely. most of the times it doesn’t. Switching between pages almost unusable right now. not sure where to troubleshoot that in code.

Thanks

philseeley commented 1 month ago

@mgrouch that's very disappointing. I'm using a standard Flutter GestureDetector widget at:

https://github.com/philseeley/boatinstrument/blob/80540e32307d6d3b876f67ac9052e57975b1f6b5/lib/main.dart#L120C13-L120C28

I can create a debug branch and put a bunch of print statements so we can track if it's detecting any inputs at all.

Would that work for you?

As I don't currently have a monitor on my Pi I'm unable to debug this locally, sorry.

mgrouch commented 1 month ago

Yes I can try building and running version with debug statements. just please update version in .yaml file for it.

Thanks

philseeley commented 1 month ago

@mgrouch looks like I can reproduce the fault using VNC to my headless Pi4. So I can have a look at what's going on.

Looks like the pointer and clicks are initiating callbacks, but the values passed aren't what are expected.

It'll take a few days to get time to have a look.

Thanks for finding this.

mgrouch commented 1 month ago

@philseeley

latest version of BBN OS image bundles your boatinstrument

you might play with it to see how it integrates with everything else.

Download link

https://cloudsmith.io/~bbn-projects/repos/bbn-repo/packages/?q=lysmarine

thanks!

philseeley commented 1 month ago

@mgrouch did you managed to get things working on the CoreMP135?

mgrouch commented 3 weeks ago

There is a new suggestion on how to fix error with mouse on flutter-pi

https://github.com/ardera/flutter-pi/issues/437#issuecomment-2293663573

thanks