Forum > Windows CE

WINCE slow redraw

(1/2) > >>

NunoB:
Hi guys, this is my first post in here, so go easy on me :)

I've been developing a WinCE6 application in my free time. I bought one of those touchscreen chinese car head units with wince a couple of years ago for my 2015 BMW118d, and although it has all functionalities you could imagine, it has some quirks I'd like to solve, by implementing my own software. At least until I decide to move on to an Android unit.

These are the device's specs, according to WR-Tools RESINFO:

--- Quote ---NOWADA
NWD_308 multi-platform 6.0
Windows Embedded CE 6.0
156 MB RAM
ARM11 -308-
800x480, 65536 colors
--- End quote ---

This baby is capable of reproducing 1080p video content without hickups, but I believe that the original software uses some sort of acceleration.

Anyway, I've been able to reproduce all original functionalities with Lazarus, including COM port habilities (Bluetooth, CANBUS and GPS), and now I'm trying to improve my GUI by adding scroll easing (like easeinoutquad for example) on the main menu.

The problem is that, although easing works, redraw is very slow. It's slow in the emulator, and less slow on the device itself, but still slow, like 2fps.
I've attached a simple example source code with emulator, if any of you is willing to advise, please download it.
Extract it, execute Device_Emulator_Launcher.exe and click on 'Start Device'.
Then, once the emulator starts, navigate to 'My Device'->'StorageCard'->'BMWConcept' and execute bmwconcept.exe.

When the app starts, click on the highlighted button on the attached image.

https://nofile.io/f/rF47wRUVsjc/MicrosoftDeviceEmulator_copy.zip


So, what I'm trying to achieve, is it possible with Lazarus? Or am I trying to do too much with the hardware I've got?

Thanks for your help and your precious time!

donalejo:
Hello the problem is use in the proyect this line :

     Application.ApplicationType := atPDA;
Example:

program bmwconcept;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, mainform
  { you can add units after this };

{$R *.res}

begin
  RequireDerivedFormResource:=True;

     Application.ApplicationType := atPDA;
  Application.Initialize;
  Application.CreateForm(TMain, Main);
  Application.Run;

end.
                       

Your indicate use the app a PDA, is longer documentation about this.

Saludos desde Argentina

NunoB:
Hi, donalejo, thanks for trying to help.

Unfortunately, as soon as I use the ApplicationType directive, the application refuses to run.

This is the output on lcldebug.log:


--- Quote ---[FORMS.PP] ExceptionOccurred
  Sender=EListError
  Exception=Cannot use find on unsorted list
  Stack trace:
  $0004FFB4
  $0017DE94
  $0010D038
  $00103AAC
  $F101FFFC
TApplication.HandleException Cannot use find on unsorted list
  Stack trace:
  $0004FFB4
  $0017DE94
  $0010D038
  $00103AAC
  $F101FFFC
[FORMS.PP] ExceptionOccurred
--- End quote ---

This happens whether I use atPDA, atDefault or atDesktop.

I tested your suggestion on the example code I posted, where I'm not even using lists, so could this be a bug?

Thanks.

avra:

--- Quote from: NunoB on March 07, 2018, 09:53:45 pm ---I tested your suggestion on the example code I posted, where I'm not even using lists, so could this be a bug?
--- End quote ---
Shouldn't this error text at least ring a bell to you: "Exception=Cannot use find on unsorted list"?

Thaddy:
Correct (unless trunk, where I believe it falls back to locate, at least I remember that was discussed on the bug tracker)).
Use locate instead of find. Or sort the list if speed is important.

Navigation

[0] Message Index

[#] Next page

Go to full version