Opened up Magnetometer and Orientation in Android lazarus / 43-Android ---------------------------------------------------------------------- stab · 2013-08-10 08:48 Hi all, Opened up magnetometer and orientation in android. Attched is the code I've added to some files. Have also sent a message to Felipemdc so he can make a proper addition to his code. Am struggling to use this to make a compass using azimuth, pitch and roll to adjust magnetic field readings. Found code for rotation with quaternions but haven't got it to work yet. Regards stab ---------------------------------------------------------------------- felipemdc · 2013-08-14 06:11 Thanks, but: 1> Could you send a patch instead of files? Instructions to create a patch are here: http://wiki.freepascal.org/Creating_A_Patch 2> Could you open a bug tracker item and attach the patch to it and assign to me? It is better to have patches in the bug tracker instead of in the forum. ---------------------------------------------------------------------- stab · 2013-08-14 17:27 Hi, Run in to problems with make trying to follow the instrux in http://wiki.freepascal.org/Creating_A_Patch Downloaded Lazarus SVN development version through: 1. svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus - OK 2. svn update - OK 3. make - Error Compiling codetoolsfpcmsgs.pas Compiling unitdictionary.pas Compiling ctloadlaz.pas Compiling ctunitgroupgraph.pas 119236 lines compiled, 3.9 sec C:/lazarus/lazarus1.1/fpc/2.7.1/bin/i386-win32/cp.exe -f Makefile.compiled units/i386-win32/CodeTools.compiled make[1]: Leaving directory `C:/lazarus/patch/lazarus/components/codetools' make -C lcl LCL_PLATFORM=nogui make[1]: Entering directory `C:/lazarus/patch/lazarus/lcl' C:/lazarus/lazarus1.1/fpc/2.7.1/bin/i386-win32/rm.exe -f units/i386-win32/alllclunits.ppu C:/lazarus/lazarus1.1/fpc/2.7.1/bin/i386-win32/gmkdir.exe -p units/i386-win32 C:/lazarus/lazarus1.1/fpc/2.7.1/bin/i386-win32/ppc386.exe -gl  -Fu../packager/units/i386-win32 -Fu../components/lazutils/lib/i386-win32 -Fu. -Fuforms -Fuwidgetset -Fiinclude -FE. - FUunits/i386-win32 -di386 alllclunits.pp Free Pascal Compiler version 2.7.1 [2012/11/22] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling alllclunits.pp Compiling barchart.pp Compiling lclproc.pas lcl_defines.inc(8,4) Error: Illegal optimization specified "NOREMOVEEMPTYPROCS" Compiling fpcadds.pas fpcadds.pas(37,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[1]: *** [alllclunits.ppu] Error 1 make[1]: Leaving directory `C:/lazarus/patch/lazarus/lcl' make: *** [lazbuild] Error 2 Can you help out? Regards stab ---------------------------------------------------------------------- Leledumbo · 2013-08-15 13:33 I believe you'll need newer FPC (2012/11/22 is nearly 9 months old). 2.6.2 should be supported, trunk is not always but I seldom get a problem with it. ---------------------------------------------------------------------- BigChimp · 2013-08-15 13:49 What Leledumbo said. Laz trunk should compile with stable FPC (2.6.2 right now) as well as with FPC trunk though.