├── .gitignore ├── Data Examples ├── 2-3-09 16:29.log ├── 28-2-09 02:04.log ├── 31-1-08 10:52.log ├── Fiat Palio FIRE lean.Config ├── Fiat Palio FIRE lean.cfg ├── Fiat Palio FIRE lean.txt ├── Fiat Palio FIRE lean2.cfg ├── Fiat Palio FIRE rich.cfg ├── FiatTipo.cgf_deprecated_format_but_useful_info ├── README ├── comms20100421201222.bin └── unadeverdad.log ├── KNOWN_ISSUES ├── README ├── TODO ├── bin ├── ECUmanager_spanish.qm └── ECUmanager_spanish.ts ├── debian ├── changelog ├── changelog_old ├── compat ├── control ├── copyright ├── debhelper.log ├── dirs ├── ecumanager.1 ├── ecumanager.debhelper.log ├── ecumanager.substvars ├── files ├── manpages ├── rules └── source │ └── format ├── qt4application.pro ├── qt4application.pro.user └── src ├── 2Dgraph.cpp ├── 2Dgraph.h ├── ECUmanager_spanish.qm ├── ECUmanager_spanish.ts ├── ECUmanager_tr.pro ├── FreeEMS.h ├── Mapa3D.h ├── QInjectorTest.cpp ├── QInjectorTest.h ├── QMap3D.cpp ├── QMap3D.h ├── QPlayer.cpp ├── QPlayer.h ├── QSubViewer.cpp ├── QSubViewer.h ├── QViewer.cpp ├── QViewer.h ├── QuickTune.cpp ├── QuickTune.h ├── ReadMe ├── RenderArea.cpp ├── application.qrc ├── commCore_FreeEMS.cpp ├── commCore_FreeEMS.h ├── commthread.cpp ├── commthread.h ├── ecumanager.desktop ├── firm_updater.cpp ├── firm_updater.h ├── gmdb2.xpm ├── icons ├── amarok_album.png ├── amarok_burn.png ├── amarok_burn_big.png ├── amarok_configure.png ├── amarok_pause.png ├── amarok_play.png ├── amarok_visualizations.png ├── ecumanager-icon.png ├── editcopy.xpm ├── editcut.xpm ├── editpaste.xpm ├── filenew.xpm ├── fileopen.xpm ├── filesave.xpm ├── network-wired.png └── step_response.png ├── main.cpp ├── plotter.cpp ├── plotter.h ├── posixpatch ├── qrc_application.cpp ├── qt4application.cpp ├── qt4application.h ├── qt4applicationCREATETHINGS.cpp ├── qt4applicationEXTRAS.cpp ├── renderarea.h └── src.pro /.gitignore: -------------------------------------------------------------------------------- 1 | #Ignore the following files 2 | 3 | #binary: 4 | bin/ecumanager 5 | ecumanager 6 | 7 | #backups: 8 | *~ 9 | 10 | #mocs 11 | moc_* 12 | 13 | #objects: 14 | *.o 15 | 16 | #my config file 17 | qt4application.pro.* 18 | 19 | #automatically created files 20 | /src/qrc_application.cpp 21 | /Makefile 22 | /src/Makefile 23 | *.log 24 | 25 | #Ignore the following directories 26 | screenshots/ 27 | .pc/ 28 | -------------------------------------------------------------------------------- /Data Examples/2-3-09 16:29.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/Data Examples/2-3-09 16:29.log -------------------------------------------------------------------------------- /Data Examples/28-2-09 02:04.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/Data Examples/28-2-09 02:04.log -------------------------------------------------------------------------------- /Data Examples/31-1-08 10:52.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/Data Examples/31-1-08 10:52.log -------------------------------------------------------------------------------- /Data Examples/Fiat Palio FIRE lean.Config: -------------------------------------------------------------------------------- 1 | Fuel Map 2 | 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10001 3 | 130 680 720 760 790 820 820 870 930 930 940 920 900 880 860 860 860 860 850 850 850 850 4 | 120 660 700 750 770 800 860 900 910 910 930 940 960 950 920 880 810 820 830 840 850 880 5 | 110 660 680 730 750 780 820 860 890 910 920 930 950 930 920 860 800 830 840 850 860 880 6 | 100 620 660 700 730 740 760 810 860 870 880 870 840 840 840 830 840 850 860 880 880 880 7 | 90 590 630 670 700 720 720 770 840 830 850 840 840 840 840 830 830 830 840 860 860 870 8 | 80 570 600 630 660 690 700 750 820 820 830 830 830 830 830 830 830 840 840 840 850 850 9 | 70 490 560 560 630 650 670 730 800 810 820 820 810 800 800 800 800 810 810 820 820 820 10 | 60 460 500 450 600 620 650 710 790 800 810 800 780 780 780 780 780 780 780 780 780 790 11 | 50 450 400 420 480 510 530 560 600 600 600 620 620 640 650 660 670 750 750 750 750 750 12 | 40 400 370 440 370 370 400 400 370 370 370 370 370 370 370 370 370 450 450 450 450 450 13 | 30 300 300 350 350 360 360 370 350 350 350 350 350 350 350 350 350 400 400 400 450 450 14 | 20 300 330 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 15 | 16 | Ign Map (°BTDC) 17 | 18 | 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 19 | 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 20 | 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 21 | 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 22 | 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 23 | 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 24 | 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 25 | 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 26 | 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 27 | 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 28 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 29 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 30 | 31 | Fuel Advance (°BTDC) 32 | 33 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 34 | 35 | Engine Parameters 36 | 37 | Cylinders: 38 | 4 39 | Displacement (cm³): 40 | 1242 41 | FuelCut (RPM): 42 | 7000 43 | Idle (RPM): 44 | 800 45 | Launch ctrl (RPM): 46 | 3500 47 | Injector Flow (cm³/min): 48 | 150 49 | Injector DeadTime (microSec): 50 | 900 51 | Oxygen sensor type: 52 | Narrowband 53 | 54 | Temperature correction table (°C vs enrich %) 55 | -10 0.355556 56 | 0 0.333333 57 | 10 0.286111 58 | 20 0.222222 59 | 30 0.152778 60 | 40 0.105556 61 | 50 0.0638889 62 | 60 0.0333333 63 | 70 0.0111111 64 | 80 0.00277778 65 | 90 0 66 | 100 0 67 | 110 0 68 | 69 | Nitrous Control 70 | minimum RPM: 4500 71 | minimum MAP: 85 72 | minimum TP: 95 73 | 74 | Stage 1: 75 | Extra Fuel (ms) 1.8 76 | Ign Retard: 2.3 77 | 78 | Stage 2: 79 | Extra Fuel (ms) 2.6 80 | Ign Retard: 4 81 | 82 | Stage 3: 83 | Extra Fuel (ms) 3.5 84 | Ign Retard: 6.2 85 | 86 | Accel enrichment 87 | Source: MAP 88 | Threshold: 9 89 | Decay: 9 90 | Amplifier: 9 91 | -------------------------------------------------------------------------------- /Data Examples/Fiat Palio FIRE lean.cfg: -------------------------------------------------------------------------------- 1 | Fuel Map 2 | 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10001 3 | 130 680 720 760 790 820 820 870 930 930 940 920 900 880 860 860 860 860 850 850 850 850 4 | 120 660 700 750 770 800 860 900 910 910 930 940 960 950 920 880 810 820 830 840 850 880 5 | 110 660 680 730 750 780 820 860 890 910 920 930 950 930 920 860 800 830 840 850 860 880 6 | 100 620 660 700 730 740 760 810 860 870 880 870 840 840 840 830 840 850 860 880 880 880 7 | 90 590 630 670 700 720 720 770 840 830 850 840 840 840 840 830 830 830 840 860 860 870 8 | 80 570 600 630 660 690 700 750 820 820 830 830 830 830 830 830 830 840 840 840 850 850 9 | 70 490 560 560 630 650 670 730 800 810 820 820 810 800 800 800 800 810 810 820 820 820 10 | 60 460 500 450 600 620 650 710 790 800 810 800 780 780 780 780 780 780 780 780 780 790 11 | 50 450 400 420 480 510 530 560 600 600 600 620 620 640 650 660 670 750 750 750 750 750 12 | 40 400 370 440 370 370 400 400 370 370 370 370 370 370 370 370 370 450 450 450 450 450 13 | 30 300 300 350 350 360 360 370 350 350 350 350 350 350 350 350 350 400 400 400 450 450 14 | 20 300 330 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 15 | 16 | Ign Map (°BTDC) 17 | 18 | 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 19 | 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 20 | 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 21 | 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 22 | 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 23 | 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 24 | 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 25 | 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 26 | 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 27 | 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 28 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 29 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 30 | 31 | Fuel Advance (°BTDC) 32 | 33 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 34 | 35 | Engine Parameters 36 | 37 | Cylinders: 38 | 4 39 | Displacement (cm³): 40 | 1242 41 | FuelCut (RPM): 42 | 7000 43 | Idle (RPM): 44 | 800 45 | Launch ctrl (RPM): 46 | 3500 47 | Injector Flow (cm³/min): 48 | 150 49 | Injector DeadTime (microSec): 50 | 900 51 | Oxygen sensor type: 52 | Narrowband 53 | 54 | Temperature correction table (°C vs enrich %) 55 | -10 0.355556 56 | 0 0.333333 57 | 10 0.286111 58 | 20 0.222222 59 | 30 0.152778 60 | 40 0.105556 61 | 50 0.0638889 62 | 60 0.0333333 63 | 70 0.0111111 64 | 80 0.00277778 65 | 90 0 66 | 100 0 67 | 110 0 68 | 69 | Nitrous Control 70 | minimum RPM: 4500 71 | minimum MAP: 85 72 | minimum TP: 95 73 | 74 | Stage 1: 75 | Extra Fuel (ms) 1.8 76 | Ign Retard: 2.3 77 | 78 | Stage 2: 79 | Extra Fuel (ms) 2.6 80 | Ign Retard: 4 81 | 82 | Stage 3: 83 | Extra Fuel (ms) 3.5 84 | Ign Retard: 6.2 85 | 86 | Accel enrichment 87 | Source: MAP 88 | Threshold: 9 89 | Decay: 9 90 | Amplifier: 9 91 | -------------------------------------------------------------------------------- /Data Examples/Fiat Palio FIRE lean.txt: -------------------------------------------------------------------------------- 1 | Fuel Map 2 | 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10001 3 | 130 680 720 760 790 820 820 870 930 930 940 920 900 880 860 860 860 860 850 850 850 850 4 | 120 660 700 750 770 800 860 900 910 910 930 940 960 950 920 880 810 820 830 840 850 880 5 | 110 660 680 730 750 780 820 860 890 910 920 930 950 930 920 860 800 830 840 850 860 880 6 | 100 620 660 700 730 740 760 810 860 870 880 870 840 840 840 830 840 850 860 880 880 880 7 | 90 590 630 670 700 720 720 770 840 830 850 840 840 840 840 830 830 830 840 860 860 870 8 | 80 570 600 630 660 690 700 750 820 820 830 830 830 830 830 830 830 840 840 840 850 850 9 | 70 490 560 560 630 650 670 730 800 810 820 820 810 800 800 800 800 810 810 820 820 820 10 | 60 460 500 450 600 620 650 710 790 800 810 800 780 780 780 780 780 780 780 780 780 790 11 | 50 450 400 420 480 510 530 560 600 600 600 620 620 640 650 660 670 750 750 750 750 750 12 | 40 400 370 440 370 370 400 400 370 370 370 370 370 370 370 370 370 450 450 450 450 450 13 | 30 300 300 350 350 360 360 370 350 350 350 350 350 350 350 350 350 400 400 400 450 450 14 | 20 300 330 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 15 | 16 | Ign Map (°BTDC) 17 | 18 | 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 19 | 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 20 | 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 21 | 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 22 | 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 23 | 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 24 | 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 25 | 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 26 | 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 27 | 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 28 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 29 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 30 | 31 | Fuel Advance (°BTDC) 32 | 33 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 34 | 35 | Engine Parameters 36 | 37 | Cylinders: 38 | 4 39 | Displacement (cm³): 40 | 1242 41 | FuelCut (RPM): 42 | 7000 43 | Idle (RPM): 44 | 800 45 | Launch ctrl (RPM): 46 | 3500 47 | Injector Flow (cm³/min): 48 | 150 49 | Injector DeadTime (microSec): 50 | 900 51 | Oxygen sensor type: 52 | Narrowband 53 | 54 | Temperature correction table (°C vs enrich %) 55 | -10 0.355556 56 | 0 0.333333 57 | 10 0.286111 58 | 20 0.222222 59 | 30 0.152778 60 | 40 0.105556 61 | 50 0.0638889 62 | 60 0.0333333 63 | 70 0.0111111 64 | 80 0.00277778 65 | 90 0 66 | 100 0 67 | 110 0 68 | 69 | Nitrous Control 70 | minimum RPM: 4500 71 | minimum MAP: 85 72 | minimum TP: 95 73 | 74 | Stage 1: 75 | Extra Fuel (ms) 1.8 76 | Ign Retard: 2.3 77 | 78 | Stage 2: 79 | Extra Fuel (ms) 2.6 80 | Ign Retard: 4 81 | 82 | Stage 3: 83 | Extra Fuel (ms) 3.5 84 | Ign Retard: 6.2 85 | 86 | Accel enrichment 87 | Source: MAP 88 | Threshold: 9 89 | Decay: 9 90 | Amplifier: 9 91 | -------------------------------------------------------------------------------- /Data Examples/Fiat Palio FIRE lean2.cfg: -------------------------------------------------------------------------------- 1 | Fuel Map 2 | 3 | 680 720 760 790 820 820 870 930 930 940 920 900 880 860 500 500 500 500 500 500 500 4 | 660 700 750 770 800 860 900 910 910 930 940 960 950 920 880 810 820 830 840 850 880 5 | 660 680 730 750 780 820 860 890 910 920 930 950 930 920 860 800 830 840 850 860 880 6 | 620 660 700 730 740 760 810 860 870 880 870 840 840 840 830 840 850 860 880 880 880 7 | 590 630 670 700 720 720 770 840 830 850 840 840 840 840 830 830 830 840 860 860 870 8 | 570 600 630 660 690 700 750 820 820 830 830 830 830 830 830 830 840 840 840 850 850 9 | 490 560 560 630 650 670 730 800 810 820 820 810 800 800 800 800 810 810 820 820 820 10 | 460 500 450 600 620 650 710 790 800 810 800 780 780 780 780 780 780 780 780 780 790 11 | 450 400 420 480 510 530 560 600 600 600 620 620 640 650 660 670 750 750 750 750 750 12 | 400 370 440 370 370 400 400 370 370 370 370 370 370 370 370 370 720 720 720 720 720 13 | 300 300 350 350 360 360 370 350 350 350 350 350 350 350 350 350 680 680 680 680 680 14 | 300 330 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 340 15 | 16 | Ign Map (°BTDC) 17 | 18 | 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 19 | 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 20 | 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 21 | 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 22 | 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 23 | 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 24 | 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 25 | 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 26 | 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 27 | 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 28 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 29 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 30 | 31 | Fuel Advance (°BTDC) 32 | 33 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 34 | 35 | Engine Parameters 36 | 37 | Cylinders: 38 | 4 39 | Displacement (cm³): 40 | 1242 41 | FuelCut (RPM): 42 | 9000 43 | Idle (RPM): 44 | 800 45 | Launch ctrl (RPM): 46 | 3500 47 | Injector Flow (cm³/min): 48 | 150 49 | Injector DeadTime (microSec): 50 | 900 51 | Oxygen sensor type: 52 | Narrowband 53 | 54 | Temperature correction table (°C vs enrich %) 55 | -10 0.325 56 | 0 0.3 57 | 10 0.258333 58 | 20 0.2 59 | 30 0.138889 60 | 40 0.0972222 61 | 50 0.0583333 62 | 60 0.0305556 63 | 70 0.0111111 64 | 80 0.00277778 65 | 90 0 66 | 100 0 67 | 110 0 68 | 69 | Nitrous Control 70 | minimum RPM: 4500 71 | minimum MAP: 85 72 | minimum TP: 95 73 | 74 | Stage 1: 75 | Extra Fuel (ms) 1.8 76 | Ign Retard: 2.3 77 | 78 | Stage 2: 79 | Extra Fuel (ms) 2.6 80 | Ign Retard: 4 81 | 82 | Stage 3: 83 | Extra Fuel (ms) 3.5 84 | Ign Retard: 6.2 85 | 86 | Accel enrichment 87 | Source: TPS 88 | Treshold: 88 89 | Decay: 109 90 | Amplifier: 68 91 | -------------------------------------------------------------------------------- /Data Examples/Fiat Palio FIRE rich.cfg: -------------------------------------------------------------------------------- 1 | Fuel Map 2 | 3 | 680 720 760 790 820 820 870 930 930 940 920 900 880 860 500 500 500 500 500 500 500 4 | 660 700 750 770 800 860 900 910 910 930 940 960 950 920 880 810 820 830 840 850 880 5 | 660 680 730 750 780 820 860 890 910 920 930 950 930 920 860 800 830 840 850 860 880 6 | 620 660 700 730 740 760 810 860 870 880 870 840 840 840 830 840 850 860 880 880 880 7 | 590 630 670 700 720 720 770 840 830 850 840 840 840 840 830 830 830 840 860 860 870 8 | 570 600 630 660 690 700 750 820 820 830 830 830 830 830 830 830 840 840 840 850 850 9 | 490 560 560 630 650 670 730 800 810 820 820 810 800 800 800 800 810 810 820 820 820 10 | 460 500 450 600 620 650 710 790 800 810 800 780 780 780 780 780 780 780 780 780 790 11 | 450 400 420 540 570 630 690 750 770 780 780 750 750 750 750 750 750 750 750 750 750 12 | 400 370 440 500 540 570 620 690 720 730 720 720 720 720 720 720 720 720 720 720 720 13 | 300 300 350 370 480 500 550 600 680 680 680 680 680 680 680 680 680 680 680 680 680 14 | 233 330 340 400 480 500 550 600 680 680 680 680 680 680 680 680 680 680 680 680 680 15 | 16 | Ign Map (°BTDC) 17 | 18 | 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 45.20 19 | 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 40.40 20 | 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 35.60 21 | 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 30.80 22 | 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 26.00 23 | 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 21.20 24 | 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 16.40 25 | 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 11.60 26 | 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 6.80 27 | 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 28 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 29 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 30 | 31 | Fuel Advance (°BTDC) 32 | 33 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 34 | 35 | Engine Parameters 36 | 37 | Cylinders: 38 | 4 39 | Displacement (cm³): 40 | 1242 41 | FuelCut (RPM): 42 | 9000 43 | Idle (RPM): 44 | 800 45 | Launch ctrl (RPM): 46 | 3500 47 | Injector Flow (cm³/min): 48 | 150 49 | Injector DeadTime (microSec): 50 | 900 51 | Oxygen sensor type: 52 | Narrowband 53 | 54 | Temperature correction table (°C vs enrich %) 55 | -10 0.325 56 | 0 0.3 57 | 10 0.258333 58 | 20 0.2 59 | 30 0.138889 60 | 40 0.0972222 61 | 50 0.0583333 62 | 60 0.0305556 63 | 70 0.0111111 64 | 80 0.00277778 65 | 90 0 66 | 100 0 67 | 110 0 68 | 69 | Nitrous Control 70 | minimum RPM: 4500 71 | minimum MAP: 85 72 | minimum TP: 95 73 | 74 | Stage 1: 75 | Extra Fuel (ms) 1.8 76 | Ign Retard: 2.3 77 | 78 | Stage 2: 79 | Extra Fuel (ms) 2.6 80 | Ign Retard: 4 81 | 82 | Stage 3: 83 | Extra Fuel (ms) 3.5 84 | Ign Retard: 6.2 85 | -------------------------------------------------------------------------------- /Data Examples/FiatTipo.cgf_deprecated_format_but_useful_info: -------------------------------------------------------------------------------- 1 | Fuel Map 2 | 3 | 680 720 760 790 820 820 870 930 930 940 920 870 880 860 860 830 830 840 840 860 880 4 | 680 720 760 790 820 820 870 930 930 940 920 870 880 860 860 830 830 830 840 850 880 5 | 660 700 750 770 800 800 860 910 910 920 910 850 860 850 840 810 820 830 840 850 880 6 | 640 680 730 760 780 790 840 890 900 910 900 840 840 840 820 800 830 840 850 860 880 7 | 600 640 700 730 740 760 810 860 870 880 870 840 840 840 830 840 850 860 880 880 880 8 | 570 580 670 700 720 720 770 840 830 850 840 840 840 840 830 830 830 840 860 860 870 9 | 510 520 630 660 690 700 750 820 820 830 830 830 830 830 830 830 840 840 840 850 850 10 | 500 470 600 630 650 670 730 800 810 820 820 810 800 800 800 800 810 810 820 820 820 11 | 480 500 580 600 620 650 710 790 800 810 800 780 780 780 780 780 780 780 780 780 790 12 | 460 500 540 540 590 630 690 750 770 780 780 750 750 750 750 750 750 750 750 750 750 13 | 400 430 440 500 540 570 620 690 720 730 720 720 720 720 720 720 720 720 720 720 720 14 | 233 330 340 400 480 500 550 600 680 680 680 680 680 680 680 680 680 680 680 680 680 15 | 16 | Ign Map (°BTDC) 17 | 18 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 19 | 5.00 5.05 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 20 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 21 | 5.00 5.05 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 22 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 23 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 24 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 25 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 26 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 27 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 28 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 29 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 30 | 31 | Fuel Advance (°BTDC) 32 | 33 | 5.00 4.87 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 5.00 34 | 35 | Engine Parameters 36 | 37 | Cylinders: 38 | 4 39 | Displacement (cm³): 40 | 1600 41 | FuelCut (RPM): 42 | 9000 43 | Idle (RPM): 44 | 800 45 | Launch ctrl (RPM): 46 | 3500 47 | Injector Flow (cm³/min): 48 | 150 49 | Injector DeadTime (microSec): 50 | 900 51 | Oxygen sensor type: 52 | Narrowband 53 | 54 | Temperature correction table (°C vs enrich %) 55 | -10 0.325 56 | 0 0.3 57 | 10 0.258333 58 | 20 0.2 59 | 30 0.138889 60 | 40 0.0972222 61 | 50 0.0583333 62 | 60 0.0305556 63 | 70 0.0111111 64 | 80 0.00277778 65 | 90 0 66 | 100 0 67 | 110 0 68 | 69 | Nitrous Control 70 | minimum RPM: 4500 71 | minimum MAP: 85 72 | minimum TP: 95 73 | 74 | Stage 1: 75 | Extra Fuel (ms) 1.8 76 | Ign Retard: 2.3 77 | 78 | Stage 2: 79 | Extra Fuel (ms) 2.6 80 | Ign Retard: 4 81 | 82 | Stage 3: 83 | Extra Fuel (ms) 3.5 84 | Ign Retard: 6.2 85 | -------------------------------------------------------------------------------- /Data Examples/README: -------------------------------------------------------------------------------- 1 | 31-1-08 10:52.log is a binary datalog, open it for replaying with QViewer 2 | 3 | FiatTipo is a config file. It have VE table, ign table, parameters, etc. Open it through File->Open. Fiat Palio FIRE lean.txt is the one I used in my car 4 | -------------------------------------------------------------------------------- /Data Examples/comms20100421201222.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/Data Examples/comms20100421201222.bin -------------------------------------------------------------------------------- /Data Examples/unadeverdad.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/Data Examples/unadeverdad.log -------------------------------------------------------------------------------- /KNOWN_ISSUES: -------------------------------------------------------------------------------- 1 | *Can't playback a datalog file if it isn't connected to the device. 2 | *quicktune doesn't update the table colours and 3D surface 3 | *hang if open a config file while connected 4 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | To install ECUmanager in a x86 debian/ubuntu box: 2 | aptitude install libqt4-gui qwtplot3d-qt4-0 3 | install libqextserialport and ecumanager (check download section!: github.com/nitrousnrg/ECUmanager/archives/master) 4 | 5 | ECUmanager uses Qt4, so you need to resolve more dependencies to compile it under gnu/linux. 6 | 7 | apt-get install libqt4-dev libqwtplot3d-qt4-dev 8 | and libqextserialport-dev (also in downloads section) 9 | 10 | compile with: 11 | qmake-qt4 qt4application.pro -spec linux-g++ -r && make 12 | 13 | If you use QtCreator, just open qt4application.pro. 14 | To give it a try: 15 | apt-get install qtcreator 16 | 17 | For Windows users: 18 | install Qt Creator and open qt4application.pro with it. Then, build it. 19 | http://qt.nokia.com/downloads 20 | It will compile if you provide the qwtplot3d and qextserialport dll 21 | 22 | /DataExamples/Fiat Palio FIRE lean.cfg is the config file I use in my car. Try it (File->Open) 23 | 24 | Doubts? Issues? 25 | Post them here: 26 | http://www.diyefi.org/forum/viewforum.php?f=33 -or mail me-. 27 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | * Niecer, smarter, polited code. 2 | * Document with Doxygen 3 | * Port FreeEMS Protocol 4 | * A more flexible GUI 5 | * Better integrated GUI (3D surface background, quicktune fonts) -------------------------------------------------------------------------------- /bin/ECUmanager_spanish.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/bin/ECUmanager_spanish.qm -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | ecumanager (0.6.1) UNRELEASED; urgency=low 2 | 3 | * New serial port library version (now is using shared libraries). 4 | * Interface improvements. 5 | * Removed all extra source code, it totally depends on shared libs. 6 | 7 | -- Marcos Ariel Chaparro Tue, 20 Jul 2010 12:25:35 -0300 8 | 9 | ecumanager (0.6) UNRELEASED; urgency=low 10 | 11 | * Initial release. 12 | * Configurable serial port 13 | * man page created 14 | * Lintian compliant 15 | * Wider configuration dialog 16 | * debuild-able 17 | 18 | -- Marcos Ariel Chaparro Mon, 12 Jul 2010 11:57:29 -0300 19 | -------------------------------------------------------------------------------- /debian/changelog_old: -------------------------------------------------------------------------------- 1 | Added complete qextserialport library -not included in qmake project, but in QExtSerialPort directory. 2 | Almost fully multhithreaded communications. 3 | 4 | 2010-06-20 5 | *Warnings removed 6 | *First-time configuration don't need color settings. 7 | *Resize issues fixed 8 | 9 | 2010-06-21 10 | *quicktune hangs fixed. 11 | *README updated 12 | *3d surface fixed 13 | 14 | 2010-06-23 15 | *Added configurable main table headers 16 | 17 | 2010-06-27 18 | * Basic packet decoding 19 | * Compiles under windows 20 | 21 | 2010-06-29 22 | * Libraries are now separated from the source 23 | 24 | 2010-07-07 25 | * Configurable serial port 26 | * deb package created 27 | 28 | 2010-07-08 29 | * Compiled in debug mode, then stripped to be lintian compliant. 30 | * man page created 31 | * changelog for debian package created. It must be merged with this changelog eventually. 32 | * lintian compliant! 33 | * wider config dialog -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: ecumanager 2 | Section: utils 3 | Priority: extra 4 | Maintainer: Marcos Ariel Chaparro 5 | Build-Depends: debhelper (>= 7.4.12), libqt4-dev, libqt4-opengl-dev 6 | Standards-Version: 3.9.0 7 | Vcs-Git: http://github.com/nitrousnrg/ECUmanager.git 8 | 9 | Package: ecumanager 10 | Architecture: i386 11 | Depends: ${shlibs:Depends}, ${misc:Depends} 12 | Description: Engine Management System tuning tool. 13 | . 14 | Aimed to interact with FreeEMS, ECUmanager can display, 15 | datalog and configure the ECU parameters. 16 | . 17 | For more information visit www.diyefi.org/forum. -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | ECUmanager 2 | 3 | Files: * 4 | Copyright: © 2008 Marcos Ariel Chaparro 5 | License: GPL-2+ 6 | 7 | 2010-07-07 8 | 9 | This program is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | See /usr/share/common-licenses/(GPL-2) 20 | 21 | -------------------------------------------------------------------------------- /debian/debhelper.log: -------------------------------------------------------------------------------- 1 | dh_auto_configure 2 | dh_auto_build 3 | dh_auto_test 4 | dh_prep 5 | dh_installdirs 6 | dh_auto_install 7 | dh_install 8 | dh_installdocs 9 | dh_installchangelogs 10 | dh_installexamples 11 | dh_installman 12 | dh_installcatalogs 13 | dh_installcron 14 | dh_installdebconf 15 | dh_installemacsen 16 | dh_installifupdown 17 | dh_installinfo 18 | dh_pysupport 19 | dh_installinit 20 | dh_installmenu 21 | dh_installmime 22 | dh_installmodules 23 | dh_installlogcheck 24 | dh_installlogrotate 25 | dh_installpam 26 | dh_installppp 27 | dh_installudev 28 | dh_installwm 29 | dh_installxfonts 30 | dh_bugfiles 31 | dh_lintian 32 | dh_gconf 33 | dh_icons 34 | dh_perl 35 | dh_usrlocal 36 | dh_link 37 | dh_compress 38 | dh_fixperms 39 | dh_strip 40 | dh_makeshlibs 41 | dh_shlibdeps 42 | dh_installdeb 43 | -------------------------------------------------------------------------------- /debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | -------------------------------------------------------------------------------- /debian/ecumanager.1: -------------------------------------------------------------------------------- 1 | .\"Now idea how this was generated :S 2 | .de Sh \" Subsection 3 | .br 4 | .if t .Sp 5 | .ne 5 6 | .PP 7 | \fB\\$1\fR 8 | .PP 9 | .. 10 | .de Sp \" Vertical space (when we can't use .PP) 11 | .if t .sp .5v 12 | .if n .sp 13 | .. 14 | .de Ip \" List item 15 | .br 16 | .ie \\n(.$>=3 .ne \\$3 17 | .el .ne 3 18 | .IP "\\$1" \\$2 19 | .. 20 | .TH "ECUmanager" 1 "July 07, 2010" "Engine tuning utilities" "Manual" 21 | .SH NAME 22 | ECUmanager \- Advanced tuning application 23 | 24 | .SH "DESCRIPTION" 25 | 26 | .PP 27 | ECUmanager is a multiplatform Graphical User Interface for engine management systems\&. 28 | 29 | .PP 30 | ECUmanager also provides datalog analysis tools, like QViewer and playback options to view previously acquired data logs\&. 31 | 32 | .PP 33 | This application uses the serial port to communicate with EMS like Marcos Chaparro's pic-based ECU, or Fred Cooke's FreeEMS. The 34 | user must select which device is using in order to switch different protocols.\&. 35 | 36 | .SH "SEE ALSO" 37 | 38 | .PP 39 | More detailed development notes can be found at \fR \fB\fIhttp://www\&.diyefi\&.org/forum\fR\fR\fR\&. 40 | 41 | .SH "EXAMPLES" 42 | 43 | .PP 44 | To open a config file, go to File->Open and select a *.cfg file. For datalogs, use QViewer, or go to Datalogging->playback\&. 45 | 46 | .PP 47 | Take a look in the Data Examples/ directory for engine configuration examples, and datalogs\&. 48 | 49 | .IP 50 | \fB\fBECUmanager\fR \fB\fIhttp://www\&.github\&.com/nitrousnrg/ECUmanager\fR\fR\fR 51 | .SH "AUTHORS" 52 | 53 | .PP 54 | The maintainer of ECUmanager is Marcos Ariel Chaparro \&, with help of FreeEMS community\&. 55 | 56 | .SH AUTHOR 57 | Marcos Ariel Chaparro. 58 | -------------------------------------------------------------------------------- /debian/ecumanager.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_auto_configure 2 | dh_auto_build 3 | dh_auto_test 4 | dh_prep 5 | dh_installdirs 6 | dh_auto_install 7 | dh_install 8 | dh_installdocs 9 | dh_installchangelogs 10 | dh_installexamples 11 | dh_installman 12 | dh_installcatalogs 13 | dh_installcron 14 | dh_installdebconf 15 | dh_installemacsen 16 | dh_installifupdown 17 | dh_installinfo 18 | dh_pysupport 19 | dh_installinit 20 | dh_installmenu 21 | dh_installmime 22 | dh_installmodules 23 | dh_installlogcheck 24 | dh_installlogrotate 25 | dh_installpam 26 | dh_installppp 27 | dh_installudev 28 | dh_installwm 29 | dh_installxfonts 30 | dh_bugfiles 31 | dh_lintian 32 | dh_gconf 33 | dh_icons 34 | dh_perl 35 | dh_usrlocal 36 | dh_link 37 | dh_compress 38 | dh_fixperms 39 | dh_strip 40 | dh_makeshlibs 41 | dh_shlibdeps 42 | dh_installdeb 43 | dh_gencontrol 44 | dh_md5sums 45 | dh_builddeb 46 | -------------------------------------------------------------------------------- /debian/ecumanager.substvars: -------------------------------------------------------------------------------- 1 | shlibs:Depends=libc6 (>= 2.1.3), libc6 (>= 2.3.6-6~), libgcc1 (>= 1:4.1.1), libqextserialport, libqt4-opengl (>= 4:4.5.3), libqtcore4 (>= 4:4.6.1), libqtgui4 (>= 4:4.6.1), libqwtplot3d-qt4-0, libstdc++6 (>= 4.1.1) 2 | misc:Depends= 3 | -------------------------------------------------------------------------------- /debian/files: -------------------------------------------------------------------------------- 1 | ecumanager_0.6.1_i386.deb utils extra 2 | -------------------------------------------------------------------------------- /debian/manpages: -------------------------------------------------------------------------------- 1 | debian/ecumanager.1 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | override_dh_auto_build: 13 | qmake-qt4 qt4application.pro -spec linux-g++ -r 14 | 15 | %: 16 | dh $@ 17 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /qt4application.pro: -------------------------------------------------------------------------------- 1 | SUBDIRS += src 2 | TEMPLATE = subdirs 3 | -------------------------------------------------------------------------------- /src/2Dgraph.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #include 22 | #include "2Dgraph.h" 23 | 24 | //Water temp correction widget. Graphic control. 25 | graph2D::graph2D(QWidget *parent) : QWidget(parent) 26 | { 27 | setBackgroundRole(QPalette::Base); 28 | setAutoFillBackground(true); 29 | scribbling = false; 30 | //QPoint *punto = new QPoint[10]; 31 | 32 | columns = 13; 33 | 34 | for(int i=0; i<21;++i) 35 | { 36 | punto1[i].setX(i*20+20); 37 | punto1[i].setY(180); 38 | } 39 | } 40 | 41 | 42 | QSize graph2D::minimumSizeHint() const 43 | { 44 | return QSize(260, 200); 45 | } 46 | 47 | 48 | QSize graph2D::sizeHint() const 49 | { 50 | return QSize(300, 200); 51 | } 52 | 53 | 54 | void graph2D::paintEvent(QPaintEvent * /* event */) 55 | { 56 | QColor BackColor(150, 150, 150); 57 | 58 | //QPen pen; 59 | QPainter painter(this); 60 | painter.setPen(BackColor); 61 | painter.scale((float)width() / (20*columns), height() / 200.0); 62 | 63 | QFont newFont("Times", 6, QFont::Normal); 64 | setFont(newFont); 65 | QString num; 66 | for(int i=0;i<(columns-1);++i) 67 | { 68 | if(i<9) 69 | { 70 | painter.setPen(pen); 71 | num.setNum(scaleY[i+1]); 72 | painter.drawText(0, 20*(i+1)+3, num); 73 | painter.setPen(BackColor); 74 | painter.drawLine(20,20*i,20*columns,20*i); 75 | } 76 | painter.setPen(pen); 77 | num.setNum(scaleX[i]); 78 | painter.drawText(20*(i+1)-4,190,num); 79 | painter.setPen(BackColor); 80 | 81 | painter.drawLine(20*i+20,0,20*i+20,180); 82 | } 83 | painter.drawLine(20*columns-0.5,0,20*columns-0.5,180); 84 | painter.drawLine(20,180,20*columns,180); 85 | 86 | painter.setRenderHint(QPainter::Antialiasing); 87 | painter.setPen(pen); 88 | painter.drawPolyline(punto1,columns); 89 | } 90 | 91 | 92 | //x goes from 0 to 180 93 | bool graph2D::setPoint(int x, int y) 94 | { //y goes from 0 to 180 95 | if(x>260 ) 96 | return false; 97 | punto1[x/20].setX(x+20); 98 | punto1[x/20].setY(180-y); 99 | return true; 100 | } 101 | 102 | 103 | int graph2D::getPoint(int index) 104 | { 105 | return 180 - punto1[index].y(); 106 | } 107 | 108 | 109 | bool graph2D::setScaleX(int index,float number) 110 | { 111 | if(!(index < columns && index >= 0)) 112 | return false; 113 | else 114 | { 115 | scaleX[index] = number; 116 | return true; 117 | } 118 | } 119 | 120 | 121 | bool graph2D::setScaleY(int index,float number) 122 | { 123 | if(!(index < columns && index >= 0)) 124 | return false; 125 | else 126 | { 127 | scaleY[9-index] = number; 128 | return true; 129 | } 130 | } 131 | 132 | 133 | void graph2D::setColumns(int col) 134 | { 135 | columns = col; 136 | } 137 | 138 | 139 | void graph2D::mousePressEvent(QMouseEvent *event) 140 | { 141 | if (event->button() == Qt::LeftButton) 142 | scribbling = true; 143 | } 144 | 145 | 146 | void graph2D::mouseMoveEvent(QMouseEvent *event) 147 | { 148 | if ((event->buttons() & Qt::LeftButton) && scribbling) 149 | { 150 | if(event->x() >= 10 && event->y() < height()) 151 | { 152 | int index = (event->x()-10)*columns/width(); 153 | 154 | if(index>20) //I don't have more than 20 columns 155 | return; 156 | punto1[index].setX(index*20 + 20); 157 | if(event->y()*200/height() < 180) 158 | punto1[index].setY(event->y()*200/height()); 159 | else 160 | punto1[index].setY(180); 161 | 162 | emit valueChanged(index); 163 | update(); 164 | } 165 | } 166 | } 167 | 168 | 169 | void graph2D::mouseReleaseEvent(QMouseEvent *event) 170 | { 171 | if (event->button() == Qt::LeftButton && scribbling) 172 | { 173 | scribbling = false; 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /src/2Dgraph.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #ifndef DGRAPH_H 22 | #define DGRAPH_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | class QWidget; 29 | class QPen; 30 | class QWidget; 31 | 32 | class graph2D : public QWidget 33 | { 34 | Q_OBJECT 35 | 36 | public: 37 | 38 | graph2D(QWidget *parent = 0); 39 | 40 | bool setPoint(int,int); 41 | int getPoint(int index); 42 | bool setScaleX(int index,float number); 43 | bool setScaleY(int index,float number); 44 | void setColumns(int); 45 | QSize minimumSizeHint() const; 46 | QSize sizeHint() const; 47 | // void desplazar(float newValue); 48 | 49 | signals: 50 | void valueChanged(int); 51 | protected: 52 | void paintEvent(QPaintEvent *event); 53 | void mousePressEvent(QMouseEvent *event); 54 | void mouseMoveEvent(QMouseEvent *event); 55 | void mouseReleaseEvent(QMouseEvent *event); 56 | //private slots: 57 | 58 | private: 59 | int columns; 60 | QPen pen; 61 | QBrush brush; 62 | QPoint punto1[21]; 63 | bool scribbling; 64 | float scaleX[21]; 65 | float scaleY[21]; 66 | //QPoint punto[10]; 67 | //static const QPoint; 68 | }; 69 | #endif 70 | -------------------------------------------------------------------------------- /src/ECUmanager_spanish.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/ECUmanager_spanish.qm -------------------------------------------------------------------------------- /src/ECUmanager_tr.pro: -------------------------------------------------------------------------------- 1 | SOURCES = qt4application.cpp \ 2 | main.cpp \ 3 | posix_qextserialport.cpp \ 4 | qextserialbase.cpp \ 5 | qextserialport.cpp \ 6 | RenderArea.cpp \ 7 | plotter.cpp \ 8 | 2Dgraph.cpp \ 9 | firm_updater.cpp \ 10 | QViewer.cpp \ 11 | QSubViewer.cpp \ 12 | qt4applicationEXTRAS.cpp \ 13 | qwt3d_autoscaler.cpp \ 14 | qwt3d_axis.cpp \ 15 | qwt3d_color.cpp \ 16 | qwt3d_colorlegend.cpp \ 17 | qwt3d_coordsys.cpp \ 18 | qwt3d_dataviews.cpp \ 19 | qwt3d_drawable.cpp \ 20 | qwt3d_enrichment_std.cpp \ 21 | qwt3d_function.cpp \ 22 | qwt3d_gridmapping.cpp \ 23 | qwt3d_gridplot.cpp \ 24 | qwt3d_io.cpp \ 25 | qwt3d_io_gl2ps.cpp \ 26 | qwt3d_io_reader.cpp \ 27 | qwt3d_label.cpp \ 28 | qwt3d_lighting.cpp \ 29 | qwt3d_meshplot.cpp \ 30 | qwt3d_mousekeyboard.cpp \ 31 | qwt3d_movements.cpp \ 32 | qwt3d_parametricsurface.cpp \ 33 | qwt3d_plot.cpp \ 34 | qwt3d_scale.cpp \ 35 | qwt3d_surfaceplot.cpp \ 36 | qwt3d_types.cpp \ 37 | gl2ps.c \ 38 | QMap3D.cpp moc_qt4application.cpp \ 39 | moc_renderarea.cpp \ 40 | moc_plotter.cpp \ 41 | moc_2Dgraph.cpp \ 42 | moc_QViewer.cpp \ 43 | moc_QSubViewer.cpp \ 44 | moc_qwt3d_plot.cpp \ 45 | moc_qwt3d_surfaceplot.cpp \ 46 | moc_QMap3D.cpp \ 47 | qrc_application.cpp 48 | TRANSLATIONS = ECUmanager_spanish.ts 49 | -------------------------------------------------------------------------------- /src/FreeEMS.h: -------------------------------------------------------------------------------- 1 | #ifndef FREEEMS_H 2 | #define FREEEMS_H 3 | 4 | 5 | /* Header flag masks */ 6 | /* Always has flags (obviously) */ 7 | /* Always has payload ID so no flag */ 8 | /* Always has checksum, so no flag */ 9 | 10 | #define HEADER_HAS_LENGTH 1 11 | #define HEADER_IS_NACK (1<<1) 12 | #define HEADER_HAS_SEQUENCE (1<<2) 13 | #define HEADER_RESERVED_E (1<<3) 14 | #define HEADER_RESERVED_D (1<<4) 15 | #define HEADER_RESERVED_C (1<<5) 16 | #define HEADER_RESERVED_B (1<<6) 17 | #define HEADER_RESERVED_A (1<<7) 18 | 19 | /*&&&&&&&&&&&&&&&&&&&& Payload Type ID Name Value Pairs &&&&&&&&&&&&&&&&&&&&*/ 20 | 21 | /* Please note, requests use even ID numbers and their matching responses use */ 22 | /* the odd number immediately above the original request ID. There are a few */ 23 | /* examples where either a request is not required or a response not sent. In */ 24 | /* such cases the odd ID may be used for an packet asyncronously sent from */ 25 | /* the EMS to the PC. These will be well commented when present. */ 26 | 27 | 28 | /*&&&&&&&&&&&&&&&&&&&&&&&& Protocol Payload Type IDs &&&&&&&&&&&&&&&&&&&&&&&*/ 29 | 30 | /* Firmware Independent functions */ 31 | #define requestInterfaceVersion 0 32 | #define requestFirmwareVersion 2 33 | #define requestMaxPacketSize 4 34 | #define requestEchoPacketReturn 6 35 | #define requestSoftSystemReset 8 /* System comes up fresh, so no response */ 36 | //efine replytoSoftSystemReset 9 /* This is reserved */ 37 | #define requestHardSystemReset 10 /* System comes up fresh, so no response */ 38 | //efine replytoHardSystemReset 11 /* This is reserved */ 39 | 40 | 41 | //efine requestAsyncErrorCode 12 /* This is reserved */ 42 | #define asyncErrorCodePacket 13 /* NOTE : Unrequested error event code packet */ 43 | //efine requestAsyncDebugInfo 14 /* This is reserved */ 44 | #define asyncDebugInfoPacket 15 /* NOTE : Unrequested debug information packet */ 45 | 46 | 47 | /*&&&&&&&&&&&&&&&&&&&&&&&& Firmware Payload Type IDs &&&&&&&&&&&&&&&&&&&&&&&*/ 48 | 49 | /* Whole block manipulation */ 50 | #define replaceBlockInRAM 256 51 | #define replaceBlockInFlash 258 52 | #define retrieveBlockFromRAM 260 53 | #define retrieveBlockFromFlash 262 54 | #define burnBlockFromRamToFlash 264 55 | #define eraseAllBlocksFromFlash 266 56 | #define burnAllBlocksOfFlash 268 57 | 58 | /* Main table manipulation */ 59 | #define adjustMainTableCell 300 60 | #define adjustMainTableRPMAxis 302 61 | #define adjustMainTableLoadAxis 304 62 | 63 | /* 2d table manipulation */ 64 | #define adjust2dTableAxis 306 65 | #define adjust2dTableCell 308 66 | 67 | /* Datalog request packets */ 68 | #define requestBasicDatalog 400 69 | #define responseBasicDatalog 401 /* Defined because it can be used both synchronously and asynchronously */ 70 | #define requestConfigurableDatalog 402 71 | #define responseConfigurableDatalog 403 /* Defined because it can be used both synchronously and asynchronously */ 72 | #define setAsyncDatalogType 404 73 | 74 | /* Special function */ 75 | #define forwardPacketOverCAN 500 76 | #define forwardPacketOverOtherUART 502 77 | 78 | /* Generic memory grabber for debugging */ 79 | #define retrieveArbitraryMemory 600 80 | 81 | /* 8 payload IDs for testing purposes */ 82 | #define testPayloadIDPacketType0 65520 83 | #define testPayloadIDPacketType1 65522 84 | #define testPayloadIDPacketType2 65524 85 | #define testPayloadIDPacketType3 65526 86 | #define testPayloadIDPacketType4 65528 87 | #define testPayloadIDPacketType5 65530 88 | #define testPayloadIDPacketType6 65532 89 | #define testPayloadIDPacketType7 65534 90 | 91 | 92 | #define DERIVED_VARS_SIZE sizeof(DerivedVar) 93 | #define DERIVED_VARS_WIDTH IN_OUT_BANKS /* How many elements per array currently 2 at 25/6/08 */ 94 | #define DERIVED_VARS_UNIT 2 /* How large each element is in bytes (short = 2 bytes) */ 95 | /* Use this block to make it easy to manage the derived variables */ 96 | typedef struct { 97 | /* Calculated from core vars */ 98 | unsigned short LoadMain; /* Configurable unit of load */ 99 | // unsigned short LoadSecondary; 100 | 101 | unsigned short VEMain; /* Divide by 512 to get % */ 102 | // unsigned short VESecondary; 103 | 104 | unsigned short Lambda; /* Divide by 32768 to get Lamda */ 105 | unsigned short AirFlow; /* top half */ 106 | unsigned short densityAndFuel; /* bottom half */ 107 | 108 | unsigned short BasePW; /* In timer ticks of 0.8us */ 109 | unsigned short IDT; /* 0.8us ticks */ 110 | unsigned short ETE; /* 0.8us ticks */ 111 | signed short TFCTotal; /* Transient fuel correction */ 112 | 113 | unsigned short FinalPW; /* In timer ticks of 0.8us */ 114 | unsigned short RefPW; /* In timer ticks of 0.8us */ 115 | 116 | unsigned short sp1; /* */ 117 | unsigned short sp2; /* */ 118 | unsigned short sp3; /* */ 119 | unsigned short sp4; /* */ 120 | unsigned short sp5; /* */ 121 | 122 | // unsigned short ; /* */ 123 | } DerivedVar; 124 | 125 | 126 | #define RUNTIME_VARS_SIZE sizeof(RuntimeVar) 127 | #define RUNTIME_VARS_LENGTH 13 /* How many runtime vars */ 128 | #define RUNTIME_VARS_UNIT 2 /* How large each element is in bytes (short = 2 bytes) */ 129 | /* Use this block to manage the execution time of various functions loops and ISRs etc */ 130 | typedef struct { 131 | /* Engine position and RPM code runtimes */ 132 | unsigned short primaryInputLeadingRuntime; 133 | unsigned short primaryInputTrailingRuntime; 134 | unsigned short secondaryInputLeadingRuntime; 135 | unsigned short secondaryInputTrailingRuntime; 136 | 137 | /* Mathematics runtimes */ 138 | unsigned short calcsRuntime; 139 | unsigned short genCoreVarsRuntime; 140 | unsigned short genDerivedVarsRuntime; 141 | unsigned short mathTotalRuntime; 142 | unsigned short mathSumRuntime; 143 | 144 | unsigned short RTCRuntime; 145 | 146 | /* */ 147 | unsigned short mainLoopRuntime; 148 | unsigned short logSendingRuntime; 149 | unsigned short serialISRRuntime; 150 | } RuntimeVar; 151 | 152 | 153 | #define ISR_LATENCY_VARS_SIZE sizeof(ISRLatencyVar) 154 | #define ISR_LATENCY_VARS_LENGTH 2 /* How many latency vars */ 155 | #define ISR_LATENCY_VARS_UNIT 2 /* How large each element is in bytes (short = 2 bytes) */ 156 | /* Use this block to manage the execution time of various functions loops and ISRs etc */ 157 | typedef struct { 158 | /* Engine position and RPM code latencies */ 159 | unsigned short primaryInputLatency; 160 | unsigned short secondaryInputLatency; 161 | 162 | /* Injector latencies */ 163 | unsigned short Injector1Latency; 164 | unsigned short Injector2Latency; 165 | unsigned short Injector3Latency; 166 | unsigned short Injector4Latency; 167 | unsigned short Injector5Latency; 168 | unsigned short Injector6Latency; 169 | 170 | unsigned short DwellLatency; 171 | unsigned short IgniteLatency; 172 | 173 | /* Not an ISR, but important none the less */ 174 | unsigned short mathLatency; 175 | unsigned short mathSampleTimeStamp0; 176 | unsigned short mathSampleTimeStamp1; 177 | } ISRLatencyVar; 178 | 179 | 180 | #define CORE_VARS_SIZE sizeof(CoreVar) 181 | #define CORE_VARS_LENGTH 16 /* How many arrays */ 182 | #define CORE_VARS_UNIT 2 /* How large each element is in bytes (short = 2 bytes) */ 183 | /* Use this block to make it easy to manage the core variables */ 184 | typedef struct { 185 | /* Calculated and averaged from ADC0 readings */ 186 | unsigned short IAT; /* Inlet Air Temperature (MAT JS) : 0.0 - 655.35 (0.01 Kelvin (/100)) */ 187 | unsigned short CHT; /* Coolant / Head Temperature (CLT JS) : 0.0 - 655.35 (0.01 Kelvin (/100)) */ 188 | unsigned short TPS; /* Throttle Position Sensor (TPS JS) : 0.0 - 102.39 (0.001? % (/640)) */ 189 | unsigned short EGO; /* Exhaust Gas Oxygen (O2 JS) : 0.000 - 1.999999 (0.0001? lambda (/32768)) */ 190 | unsigned short MAP; /* Manifold Absolute Pressure (5euroh1) : 0.0 - 655.35 (0.01 kPa (/100)) */ 191 | unsigned short AAP; /* Atmospheric Absolute Pressure (6euroh1) : 0.0 - 655.35 (0.01 kPa (/100)) */ 192 | unsigned short BRV; /* Battery Reference Voltage (4euroh1) : 0.000 - 65.535 (0.001 Volts (/1000)) */ 193 | unsigned short MAT; /* Manifold Air Temperature (Spare JS) : 0.0 - 655.35 (0.01 Kelvin (/100)) */ 194 | 195 | /* Calculated and averaged from ADC1 readings */ 196 | unsigned short EGO2; /* Exhaust Gas Oxygen (NC) : 0.000 - 1.999999 (0.0001? lambda (/32768)) */ 197 | unsigned short IAP; /* Intercooler Absolute Pressure (NC) : 0.0 - 655.35 (0.01 kPa (/100)) */ 198 | unsigned short MAF; /* Mass Air Flow : 0.0 - 65535.0 (raw units from lookup) */ 199 | 200 | /* Calculated from MAP and TPS history */ 201 | unsigned short DMAP; /* Delta MAP kPa/second or similar */ 202 | unsigned short DTPS; /* Delta TPS %/second or similar */ 203 | 204 | /* Calculated from engine position data */ 205 | unsigned short RPM; /* Revolutions Per Minute (Calced) : 0 - 32767.5 (0.5 RPM (/2)) */ 206 | unsigned short DRPM; /* Delta RPM (Calced) : 0 - 32767.5 (0.5 RPM/Second (/2)) */ 207 | unsigned short DDRPM; /* Delta Delta RPM (Calced) : 0 - 32767.5 (0.5 RPM/Second^2 (/2)) */ 208 | } CoreVar; 209 | 210 | 211 | #define ADC_ARRAY_SIZE sizeof(ADCArray) 212 | #define ADC_ARRAY_LENGTH 16 /* How many arrays */ 213 | #define ADC_ARRAY_UNIT 2 /* How large each element is in bytes (short = 2 bytes) */ 214 | /* Use this block to ensure that the components are contiguous and we can then reference them via offsets and pointers */ 215 | typedef struct { 216 | /* ADC0 raw readings */ 217 | unsigned short IAT; /* Inlet Air Temperature (MAT JS) */ /* COMPULSORY! */ 218 | unsigned short CHT; /* Coolant / Head Temperature (CLT JS) */ /* COMPULSORY! */ 219 | unsigned short TPS; /* Throttle Position Sensor (TPS JS) */ /* Reduced performance without */ 220 | unsigned short EGO; /* Exhaust Gas Oxygen (O2 JS) */ /* Recommended */ 221 | unsigned short MAP; /* Manifold Absolute Pressure (5euroh1) */ /* COMPULSORY OR TPS OR MAF */ 222 | unsigned short AAP; /* Atmospheric Absolute Pressure (6euroh1) */ /* Recommended */ 223 | unsigned short BRV; /* Battery Reference Voltage (4euroh1) */ /* COMPULSORY! */ 224 | unsigned short MAT; /* Manifold Air Temperature (Spare JS) */ /* Could help heat soak issues */ 225 | 226 | /* ADC1 raw readings */ 227 | unsigned short EGO2; /* Exhaust Gas Oxygen (NC) */ /* V engine option */ 228 | unsigned short IAP; /* Intercooler Absolute Pressure (NC) */ /* Turbo engine option */ 229 | unsigned short MAF; /* Mass Air Flow (NC) */ /* OEM engine option */ 230 | unsigned short SpareADC3; /* Spare ADC1 port 3 (NC) */ 231 | unsigned short SpareADC4; /* Spare ADC1 port 4 (NC) */ 232 | unsigned short SpareADC5; /* Spare ADC1 port 5 (NC) */ 233 | unsigned short SpareADC6; /* Spare ADC1 port 6 (NC) */ 234 | unsigned short SpareADC7; /* Spare ADC1 port 7 (NC) */ 235 | } ADCArray; 236 | 237 | 238 | #define MAINTABLE_SIZE sizeof(mainTable) 239 | #define MAINTABLE_RPM_LENGTH 24 /* How many cells on the X axis */ 240 | #define MAINTABLE_LOAD_LENGTH 19 /* How many cells on the Y axis */ 241 | #define MAINTABLE_MAX_RPM_LENGTH 27 /* How many cells on the X axis max */ 242 | #define MAINTABLE_MAX_LOAD_LENGTH 21 /* How many cells on the Y axis max */ 243 | #define MAINTABLE_MAX_MAIN_LENGTH 462 /* 924B 462 shorts maximum main table length */ 244 | 245 | 246 | /** @struct maintable 247 | * 248 | * @brief Main Table Structure definition 249 | * 250 | * Use this block to manage the main VE, Lambda and Timing tables. Tables can 251 | * be made any size from 1x1 to 27x17 or 22x21 provided that the multiple of 252 | * the two doesn't exceed the max main length and neither axis exceeds it's 253 | * specified maximum. 254 | * 255 | * Currently the following tables use this structure: 256 | * - VETableMainFlash; 257 | * - VETableSecondaryFlash; 258 | * - VETableTertiaryFlash; 259 | * - LambdaTableFlash; 260 | * - IgnitionAdvanceTableMainFlash; 261 | * - IgnitionAdvanceTableSecondaryFlash; 262 | * - InjectionAdvanceTableMainFlash; 263 | * - InjectionAdvanceTableSecondaryFlash; 264 | * - VETableMainFlash2; 265 | * - VETableSecondaryFlash2; 266 | * - VETableTertiaryFlash2; 267 | * - LambdaTableFlash2; 268 | * - IgnitionAdvanceTableMainFlash2; 269 | * - IgnitionAdvanceTableSecondaryFlash2; 270 | * - InjectionAdvanceTableMainFlash2; 271 | * - InjectionAdvanceTableSecondaryFlash2; 272 | * 273 | * For a more detailed discussion of how this structure is actually used... 274 | * 275 | * @see lookupPagedMainTableCellValue 276 | * 277 | * @author Fred Cooke 278 | */ 279 | typedef struct { 280 | unsigned short RPMLength; /* The length of the RPM axis array */ 281 | unsigned short LoadLength; /* The length of the Load axis array */ 282 | unsigned short RPM[MAINTABLE_MAX_RPM_LENGTH]; /* The array of RPM (X) axis values */ 283 | unsigned short Load[MAINTABLE_MAX_LOAD_LENGTH]; /* The array of Load (Y) axis values */ 284 | unsigned short Table[MAINTABLE_MAX_MAIN_LENGTH]; /* The table as an array of values */ 285 | } mainTable; 286 | 287 | 288 | #define TWODTABLEUS_SIZE sizeof(twoDTableUS) 289 | #define TWODTABLEUS_LENGTH 16 290 | /* This block used for various curves */ 291 | typedef struct { 292 | unsigned short Axis[TWODTABLEUS_LENGTH]; 293 | unsigned short Values[TWODTABLEUS_LENGTH]; 294 | } twoDTableUS; 295 | 296 | 297 | #define TWODTABLESS_SIZE sizeof(twoDTableSS) 298 | #define TWODTABLESS_LENGTH 16 299 | /* This block used for various curves */ 300 | typedef struct { 301 | signed short Axis[TWODTABLESS_LENGTH]; 302 | signed short Values[TWODTABLESS_LENGTH]; 303 | } twoDTableSS; 304 | 305 | 306 | #define TWODTABLEMS_SIZE sizeof(twoDTableMS) 307 | #define TWODTABLEMS_LENGTH 16 308 | /* This block used for various curves */ 309 | typedef struct { 310 | unsigned short Axis[TWODTABLEMS_LENGTH]; 311 | signed short Values[TWODTABLEMS_LENGTH]; 312 | } twoDTableMS; 313 | 314 | 315 | #define TWODTABLEUC_SIZE sizeof(twoDTableUC) 316 | #define TWODTABLEUC_LENGTH 8 317 | /* This block used for various curves */ 318 | typedef struct { 319 | unsigned char Axis[TWODTABLEUC_LENGTH]; 320 | unsigned char Values[TWODTABLEUC_LENGTH]; 321 | } twoDTableUC; 322 | 323 | /* ECUmanager error codes for protocol */ 324 | #define start_byte_inconsistency_error 1 325 | #define stop_byte_inconsistency_error 2 326 | #define escape_byte_inconsistency_error 3 327 | #define bad_checksum_error 4 328 | #define payload_size_inconsistency_error 5 329 | 330 | 331 | typedef struct { 332 | unsigned long good; 333 | unsigned long start_byte_inconsistency; 334 | unsigned long stop_byte_inconsistency; 335 | unsigned long escape_byte_inconsistency; 336 | unsigned long bad_checksum; 337 | unsigned long payload_size_inconsistency; 338 | }statistic_t; 339 | #endif // FREEEMSSTRUCTS_H 340 | -------------------------------------------------------------------------------- /src/Mapa3D.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | /*#include "qwt3d_surfaceplot.h" 22 | #include "qwt3d_function.h" 23 | 24 | typedef Qwt3D::SurfacePlot SurfacePlot; 25 | 26 | class Plot: public SurfacePlot 27 | { 28 | Q_OBJECT 29 | public: 30 | Plot() 31 | { 32 | } 33 | 34 | };*/ 35 | -------------------------------------------------------------------------------- /src/QInjectorTest.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #include"QInjectorTest.h" 22 | 23 | QInjTester::QInjTester(QextSerialPort *port) 24 | { 25 | serial = port; 26 | setWindowTitle(tr("Injector tester")); 27 | move(380,80); 28 | //setGeometry(300,100,500,320); 29 | timeCount = 50; 30 | flowTimer = new QTimer(this); 31 | flowTimer->setSingleShot(true); 32 | pulseTimer = new QTimer(this); 33 | pulseTimer->setSingleShot(true); 34 | 35 | LCDFlowTimer = new QTimer(this); 36 | LCDPulseTimer = new QTimer(this); 37 | 38 | QGridLayout *grid = new QGridLayout; 39 | 40 | QTextEdit *editFlowHelp = new QTextEdit(tr("Choose test duration. Pressing\n" 41 | "the start button, the injector will " 42 | "remain open for the selected time, or until stop button is pressed.")); 43 | editFlowHelp->setReadOnly(true); 44 | 45 | QLabel *flowDurationLabel = new QLabel(tr("Duration (ms): ")); 46 | editFlowDuration = new QLineEdit("1000"); 47 | editFlowDuration->setAlignment(Qt::AlignRight); 48 | 49 | flowTimeLCD = new QLCDNumber(6); 50 | flowTimeLCD->setSegmentStyle(QLCDNumber::Filled); 51 | 52 | startFlowButton = new QPushButton(tr("Start")); 53 | stopFlowButton = new QPushButton(tr("Stop")); 54 | 55 | connect(startFlowButton,SIGNAL(released()),this,SLOT(startFlow())); 56 | connect(stopFlowButton,SIGNAL(released()),this,SLOT(stopFlow())); 57 | connect(flowTimer,SIGNAL(timeout()),this,SLOT(stopFlow())); 58 | connect(LCDFlowTimer,SIGNAL(timeout()),this,SLOT(displayFlowLCD())); 59 | 60 | QGroupBox *groupBox2 = new QGroupBox(tr("Flow Test")); 61 | QGridLayout *vbox2 = new QGridLayout; 62 | vbox2->addWidget(editFlowHelp,0,0); 63 | vbox2->addWidget(flowTimeLCD,1,0); 64 | vbox2->addWidget(flowDurationLabel,0,1); 65 | vbox2->addWidget(editFlowDuration,0,2); 66 | vbox2->addWidget(startFlowButton,1,1); 67 | vbox2->addWidget(stopFlowButton,1,2); 68 | groupBox2->setLayout(vbox2); 69 | 70 | QTextEdit *editPulseHelp = new QTextEdit(tr("Elija la duracion de la prueba (ms).\n" 71 | "Cuando pulse el boton Start,los inyectores se abriran el durante el tiempo elegido" 72 | " y no se cerraran hasta que termine la prueba o se presione el boton Stop.")); 73 | editPulseHelp->setReadOnly(true); 74 | 75 | QLabel *pulseDurationLabel = new QLabel(tr("Duration (ms): ")); 76 | editPulseDuration = new QLineEdit("1000"); 77 | editPulseDuration->setAlignment(Qt::AlignRight); 78 | 79 | QLabel *pulseONLabel = new QLabel(tr("ON time (ms): ")); 80 | editPulseON = new QLineEdit("2.5"); 81 | editPulseON->setAlignment(Qt::AlignRight); 82 | 83 | QLabel *pulseOFFLabel = new QLabel(tr("OFF time (ms): ")); 84 | editPulseOFF = new QLineEdit("2.5"); 85 | editPulseOFF->setAlignment(Qt::AlignRight); 86 | 87 | ONtime.entero = 2500; 88 | OFFtime.entero = 2500; 89 | 90 | pulseTimeLCD = new QLCDNumber(6); 91 | pulseTimeLCD->setSegmentStyle(QLCDNumber::Filled); 92 | 93 | pulseBar = new QProgressBar; 94 | pulseBar->setRange(0,5000); 95 | pulseBar->setValue(2500); 96 | 97 | startPulseButton = new QPushButton(tr("Start")); 98 | stopPulseButton = new QPushButton(tr("Stop")); 99 | 100 | connect(startPulseButton,SIGNAL(released()),this,SLOT(startPulse())); 101 | connect(stopPulseButton,SIGNAL(released()),this,SLOT(stopPulse())); 102 | connect(editPulseON,SIGNAL(textChanged(const QString)),this,SLOT(editONChange(const QString ))); 103 | connect(editPulseOFF,SIGNAL(textChanged(const QString)),this,SLOT(editOFFChange(const QString ))); 104 | connect(pulseTimer,SIGNAL(timeout()),this,SLOT(stopPulse())); 105 | connect(LCDPulseTimer,SIGNAL(timeout()),this,SLOT(displayPulseLCD())); 106 | 107 | QGroupBox *groupBox1 = new QGroupBox(tr("Pulse Test")); 108 | QGridLayout *vbox = new QGridLayout; 109 | vbox->addWidget(editPulseHelp,0,0,5,1); 110 | vbox->addWidget(pulseTimeLCD,6,0); 111 | vbox->addWidget(pulseDurationLabel,0,1); 112 | vbox->addWidget(editPulseDuration,0,2); 113 | vbox->addWidget(pulseONLabel,1,1); 114 | vbox->addWidget(editPulseON,1,2); 115 | vbox->addWidget(pulseOFFLabel,2,1); 116 | vbox->addWidget(editPulseOFF,2,2); 117 | vbox->addWidget(pulseBar,4,1,1,2); 118 | vbox->addWidget(startPulseButton,6,1); 119 | vbox->addWidget(stopPulseButton,6,2); 120 | groupBox1->setLayout(vbox); 121 | 122 | grid->addWidget(groupBox2,0,0,1,2); 123 | grid->addWidget(groupBox1,1,0,1,2); 124 | 125 | setLayout(grid); 126 | } 127 | 128 | 129 | QInjTester::~QInjTester() 130 | { 131 | delete serial; 132 | delete flowTimer; 133 | delete LCDFlowTimer; 134 | delete LCDPulseTimer; 135 | delete startFlowButton; 136 | delete stopFlowButton; 137 | delete startPulseButton; 138 | delete stopPulseButton; 139 | delete editFlowDuration; 140 | delete editPulseDuration; 141 | delete editPulseON; 142 | delete editPulseOFF; 143 | delete flowTimeLCD; 144 | delete pulseTimeLCD; 145 | } 146 | 147 | 148 | void QInjTester::startFlow() 149 | { 150 | timeCount = 50; 151 | QString string1 = editFlowDuration->text(); 152 | bool ok; 153 | string1.toInt(&ok,10); 154 | if(ok) 155 | { 156 | flowTimer->setInterval(string1.toUInt()); 157 | flowTimer->start(); 158 | LCDFlowTimer->start(50); 159 | serial->write("I"); 160 | } 161 | } 162 | 163 | 164 | void QInjTester::stopFlow() 165 | { 166 | if(timeCount != 50) 167 | { 168 | serial->write("I"); 169 | LCDFlowTimer->stop(); 170 | timeCount = 50; 171 | } 172 | //close(); 173 | } 174 | 175 | 176 | void QInjTester::editONChange(const QString text) 177 | { 178 | bool ok; 179 | text.toFloat(&ok); 180 | if(ok) 181 | { 182 | ONtime.entero = (int)(text.toFloat() * 1000); 183 | pulseBar->setRange(0,ONtime.entero + OFFtime.entero); 184 | pulseBar->setValue(ONtime.entero); 185 | } 186 | } 187 | 188 | 189 | void QInjTester::editOFFChange(const QString text) 190 | { 191 | bool ok; 192 | text.toFloat(&ok); 193 | if(ok) 194 | { 195 | OFFtime.entero = (int)(text.toFloat() * 1000); 196 | pulseBar->setRange(0,ONtime.entero + OFFtime.entero); 197 | pulseBar->reset(); 198 | pulseBar->setValue(ONtime.entero); 199 | } 200 | } 201 | 202 | 203 | void QInjTester::displayFlowLCD() 204 | { 205 | timeCount += 50; 206 | flowTimeLCD->display(timeCount); 207 | } 208 | 209 | 210 | void QInjTester::displayPulseLCD() 211 | { 212 | timeCount += 50; 213 | pulseTimeLCD->display(timeCount); 214 | } 215 | 216 | 217 | void QInjTester::startPulse() 218 | { 219 | timeCount = 50; 220 | QString string1 = editPulseDuration->text(); 221 | bool ok; 222 | string1.toInt(&ok,10); 223 | if(ok) 224 | { 225 | pulseTimer->setInterval(string1.toUInt()); 226 | pulseTimer->start(); 227 | LCDPulseTimer->start(50); 228 | 229 | QByteArray word("i"); 230 | 231 | aux.entero = 65536 - ONtime.entero*5; 232 | word.append(aux.byte[1]); 233 | word.append(aux.byte[0]); 234 | 235 | aux.entero = 65536 - OFFtime.entero*5; 236 | word.append(aux.byte[1]); 237 | word.append(aux.byte[0]); 238 | 239 | serial->write(word); 240 | } 241 | } 242 | 243 | 244 | void QInjTester::stopPulse() 245 | { 246 | if(timeCount != 50) 247 | { 248 | serial->write("i"); 249 | LCDPulseTimer->stop(); 250 | timeCount = 50; 251 | } 252 | //close(); 253 | } 254 | 255 | 256 | QSize QInjTester::minimumSizeHint() const 257 | { 258 | return QSize(30, 30); 259 | } 260 | 261 | 262 | QSize QInjTester::sizeHint() const 263 | { 264 | return QSize(500,700); 265 | } 266 | -------------------------------------------------------------------------------- /src/QInjectorTest.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #ifndef QINJECTORTEST_H 21 | #define QINJECTORTEST_H 22 | 23 | #include 24 | #include 25 | #include "qextserialport.h" 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class QWidget; 38 | 39 | class QInjTester : public QWidget 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | QInjTester(QextSerialPort *port); 45 | ~QInjTester(); 46 | 47 | QSize minimumSizeHint() const; 48 | QSize sizeHint() const; 49 | 50 | protected: 51 | 52 | private slots: 53 | void startFlow(); 54 | void stopFlow(); 55 | void startPulse(); 56 | void stopPulse(); 57 | void displayFlowLCD(); 58 | void displayPulseLCD(); 59 | void editONChange(const QString text); 60 | void editOFFChange(const QString text); 61 | 62 | private: 63 | int timeCount; 64 | QextSerialPort *serial; 65 | QTimer *flowTimer; 66 | QTimer *pulseTimer; 67 | QTimer *LCDFlowTimer; 68 | QTimer *LCDPulseTimer; 69 | QPushButton *startFlowButton; 70 | QPushButton *stopFlowButton; 71 | QPushButton *startPulseButton; 72 | QPushButton *stopPulseButton; 73 | QLineEdit *editFlowDuration; 74 | QLineEdit *editPulseDuration; 75 | QLineEdit *editPulseON; 76 | QLineEdit *editPulseOFF; 77 | QLCDNumber *flowTimeLCD; 78 | QLCDNumber *pulseTimeLCD; 79 | QProgressBar *pulseBar; 80 | 81 | union transformer 82 | { 83 | unsigned char byte[2]; 84 | int entero; 85 | }ONtime,OFFtime,aux; 86 | }; 87 | #endif 88 | -------------------------------------------------------------------------------- /src/QMap3D.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #include 22 | #include 23 | #include 24 | // #include 25 | #include 26 | #include 27 | #include 28 | 29 | // using namespace Qwt3D; 30 | /* 31 | class Rosenbrock : public Function 32 | { 33 | public: 34 | 35 | Rosenbrock(SurfacePlot& pw) 36 | :Function(pw) 37 | { 38 | } 39 | 40 | double operator()(double x, double y) 41 | { 42 | return log((1-x)*(1-x) + 100 * (y - x*x)*(y - x*x)) / 8; 43 | } 44 | }; 45 | */ 46 | /* 47 | class Plot : public SurfacePlot 48 | { 49 | public: 50 | Plot(); 51 | }; 52 | */ 53 | 54 | QMap3D::QMap3D(QPalette palette) 55 | { 56 | 57 | dataTable = (double **) malloc(12*sizeof(double*)); 58 | for(int i = 0;i<12;++i) 59 | dataTable[i] = (double *)malloc(21*sizeof(double)); 60 | for (int row=0; row<12; row++) 61 | for(int col=0;col<12;col++) 62 | dataTable[row][col]=0; 63 | //loadFromData(dataTable,12,21,0,21,0,12); 64 | 65 | 66 | RGBA rgb = Qt2GL(palette.window().color()); 67 | //RGBA rgb = Qt2GL(QColor(210,209,208)); 68 | setBackgroundColor(rgb); 69 | //setTitle("VE"); 70 | 71 | //coordinates()->axes[X1].setLabelString("MAP"); 72 | //coordinates()->axes[Y1].setLabelString("RPM"); 73 | 74 | setRotation(30,0,-55); 75 | setScale(1,1,1); 76 | setShift(0.15,0,0); 77 | setZoom(1.0); 78 | 79 | /* for (unsigned i=0; i!=coordinates()->axes.size(); ++i) 80 | { 81 | coordinates()->axes[i].setMajors(4); 82 | coordinates()->axes[i].setMinors(4); 83 | } 84 | */ 85 | 86 | //coordinates()->axes[Z1].setLabelString(QChar(0x38f)); // Omega - see http://www.unicode.org/charts/ 87 | 88 | //setCoordinateStyle(BOX); 89 | 90 | updateData(); 91 | updateGL(); 92 | } 93 | 94 | 95 | bool QMap3D::loadData(double data,int row, int column) 96 | { 97 | 98 | dataTable[row][column] = data; 99 | loadFromData(dataTable,12,21,0,10,0,10); 100 | 101 | return true; 102 | } 103 | 104 | 105 | void QMap3D::update() 106 | { 107 | updateGL(); 108 | } 109 | 110 | 111 | QSize QMap3D::minimumSizeHint() const 112 | { 113 | return QSize(100, 100); 114 | } 115 | 116 | 117 | QSize QMap3D::sizeHint() const 118 | { 119 | return QSize(300, 200); 120 | } 121 | 122 | 123 | QMap3D::~QMap3D() 124 | { 125 | for(int i = 0;i<12;++i) 126 | free(dataTable[i]); 127 | free(dataTable); 128 | } 129 | -------------------------------------------------------------------------------- /src/QMap3D.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #include 21 | #include 22 | #include 23 | 24 | using namespace Qwt3D; 25 | 26 | class QMap3D: public SurfacePlot 27 | { 28 | Q_OBJECT 29 | private: 30 | double **dataTable; 31 | union transformer 32 | { 33 | unsigned char byte[2]; 34 | int entero; 35 | }; 36 | public: 37 | QMap3D(QPalette palette); 38 | ~QMap3D(); 39 | 40 | QSize minimumSizeHint() const; 41 | QSize sizeHint() const; 42 | bool loadData(double data,int, int); 43 | void update(); 44 | 45 | }; 46 | -------------------------------------------------------------------------------- /src/QPlayer.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #include 21 | 22 | QPlayer::QPlayer(QTimer *timer1, QTimer *timer2, QFile *file1) 23 | { 24 | playTimer = timer1; 25 | refreshTimer = timer2; 26 | 27 | file = file1; 28 | QDesktopWidget *desktop = new QDesktopWidget; 29 | 30 | setWindowTitle("QPlayer"); 31 | setGeometry(desktop->width()-100, desktop->height()-60, 220, 25); 32 | 33 | xSize = 130; 34 | ySize = 30; 35 | busy = false; 36 | 37 | slider = new QSlider(Qt::Horizontal,this); 38 | QPushButton *playButton = new QPushButton(QIcon(":/icons/amarok_play.png"),""); 39 | QPushButton *pauseButton = new QPushButton(QIcon(":/icons/amarok_pause.png"),""); 40 | playButton->setFlat(true); 41 | pauseButton->setFlat(true); 42 | QHBoxLayout *layout = new QHBoxLayout; 43 | layout->addWidget(playButton); 44 | layout->addWidget(pauseButton); 45 | layout->addWidget(slider); 46 | 47 | connect(playButton, SIGNAL(released()), this, SLOT(play() ) ); 48 | connect(pauseButton,SIGNAL(released()), this, SLOT(pause()) ); 49 | connect(slider,SIGNAL(sliderReleased()), this, SLOT(seekFile()) ); 50 | connect(slider,SIGNAL(sliderPressed()), this, SLOT(sliderPress()) ); 51 | 52 | setLayout(layout); 53 | show(); 54 | } 55 | 56 | 57 | //Recibe el timer que controla el flujo de datos del archivo 58 | void QPlayer::setFileTimer(QTimer * timer) 59 | { 60 | playTimer = timer; 61 | } 62 | 63 | 64 | void QPlayer::setPosition(int pos) 65 | { 66 | slider->setValue(pos); 67 | } 68 | 69 | 70 | int QPlayer::pos() 71 | { return slider->value();} 72 | 73 | void QPlayer::sliderPress() 74 | { busy = true; } 75 | 76 | void QPlayer::seekFile() 77 | { 78 | file->seek(slider->value() * file->size() / 100); 79 | busy = false; 80 | } 81 | 82 | 83 | void QPlayer::play() 84 | { 85 | playTimer->start(); 86 | refreshTimer->start(); 87 | } 88 | 89 | 90 | void QPlayer::pause() 91 | { 92 | playTimer->stop(); 93 | refreshTimer->stop(); 94 | 95 | } 96 | 97 | 98 | bool QPlayer::isBusy() 99 | { return busy; } 100 | QSize QPlayer::minimumSizeHint() const 101 | { 102 | return QSize(20, 20); 103 | } 104 | 105 | 106 | QSize QPlayer::sizeHint() const 107 | { 108 | return QSize(xSize, ySize); 109 | } 110 | -------------------------------------------------------------------------------- /src/QPlayer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #ifndef QPLAYER_H 22 | #define QPLAYER_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | class QPlayer : public QWidget 33 | { 34 | Q_OBJECT 35 | public: 36 | QPlayer(QTimer*, QTimer*, QFile*); 37 | void setFileTimer(QTimer*); 38 | void setPosition(int); 39 | int pos(); 40 | bool isBusy(); 41 | QSize minimumSizeHint() const; 42 | QSize sizeHint() const; 43 | private: 44 | int xSize,ySize; 45 | QTimer *playTimer; 46 | QTimer *refreshTimer; 47 | QFile *file; 48 | QSlider *slider; 49 | bool busy; 50 | 51 | private slots: 52 | void play(); 53 | void pause(); 54 | void sliderPress(); 55 | void seekFile(); 56 | 57 | }; 58 | #endif 59 | -------------------------------------------------------------------------------- /src/QSubViewer.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #include "QSubViewer.h" 21 | 22 | QSubViewer::QSubViewer(QWidget *parent) : QWidget(parent) 23 | { 24 | //Display #1 25 | QGroupBox *groupBox = new QGroupBox(tr("")); 26 | QVBoxLayout *vLayout = new QVBoxLayout(); 27 | 28 | QLabel *yAxis = new QLabel(tr("y axis:")); 29 | comboY = new QComboBox(); 30 | comboY2 = new QComboBox(); 31 | comboY3 = new QComboBox(); 32 | 33 | QLabel *xAxis = new QLabel(tr("x axis:")); 34 | comboX = new QComboBox(); 35 | 36 | comboY->addItem("Lambda"); 37 | comboY->addItem("RPM"); 38 | comboY->addItem("VE"); 39 | comboY->addItem("MAP"); 40 | comboY->addItem("Air Temp"); 41 | comboY->addItem("WaterTemp"); 42 | comboY->addItem("Ign Advance"); 43 | comboY->addItem("Inj Advance"); 44 | comboY->addItem("Duty %"); 45 | comboY->addItem("Inj Time"); 46 | comboY->addItem("Throttle pos"); 47 | 48 | comboY2->addItem("Lambda"); 49 | comboY2->addItem("RPM"); 50 | comboY2->addItem("VE"); 51 | comboY2->addItem("MAP"); 52 | comboY2->addItem("Air Temp"); 53 | comboY2->addItem("WaterTemp"); 54 | comboY2->addItem("Ign Advance"); 55 | comboY2->addItem("Inj Advance"); 56 | comboY2->addItem("Duty %"); 57 | comboY2->addItem("Inj Time"); 58 | comboY2->addItem("Throttle pos"); 59 | 60 | comboY3->addItem("Lambda"); 61 | comboY3->addItem("RPM"); 62 | comboY3->addItem("VE"); 63 | comboY3->addItem("MAP"); 64 | comboY3->addItem("Air Temp"); 65 | comboY3->addItem("WaterTemp"); 66 | comboY3->addItem("Ign Advance"); 67 | comboY3->addItem("Inj Advance"); 68 | comboY3->addItem("Duty %"); 69 | comboY3->addItem("Inj Time"); 70 | comboY3->addItem("Throttle pos"); 71 | 72 | comboX->addItem("Time (sec)"); 73 | comboX->addItem("Lambda"); 74 | comboX->addItem("RPM"); 75 | comboX->addItem("VE"); 76 | comboX->addItem("MAP"); 77 | comboX->addItem("Air Temp"); 78 | comboX->addItem("WaterTemp"); 79 | comboX->addItem("Ign Advance"); 80 | comboX->addItem("Inj Advance"); 81 | comboX->addItem("Duty %"); 82 | comboX->addItem("Inj Time"); 83 | comboY->addItem("Throttle pos"); 84 | 85 | plot = new PlotArea(); 86 | plot->setScaleFactorX(2,false); 87 | plot->setScaleFactorX(1.2,false); 88 | plot->setSize(1200,200); 89 | vLayout->addWidget(yAxis); 90 | vLayout->addWidget(comboY); 91 | // vLayout->addWidget(comboY2); 92 | // vLayout->addWidget(comboY3); 93 | vLayout->addStretch(40); 94 | vLayout->addWidget(xAxis); 95 | vLayout->addWidget(comboX); 96 | 97 | QGridLayout *grid = new QGridLayout(); 98 | grid->addLayout(vLayout,0,0); 99 | grid->addWidget(plot,0,1); 100 | grid->setColumnMinimumWidth(1,440); 101 | grid->setColumnStretch(80,1); 102 | 103 | groupBox->setLayout(grid); 104 | 105 | QVBoxLayout *soyIgnorante = new QVBoxLayout(); 106 | soyIgnorante->addWidget(groupBox); 107 | 108 | setLayout(soyIgnorante); 109 | 110 | connect(comboY, SIGNAL(currentIndexChanged(int)),this, SIGNAL(valueChanged(int))); 111 | } 112 | 113 | 114 | void QSubViewer::setPoints(float newPoint, int size) 115 | { plot->setPoints(newPoint,size);} 116 | 117 | void QSubViewer::setChannel(int channel) 118 | { 119 | 120 | comboY->setCurrentIndex(channel); 121 | } 122 | 123 | 124 | void QSubViewer::clear() 125 | { 126 | plot->clear(); 127 | } 128 | 129 | 130 | int QSubViewer::getChannel() 131 | { return plot->getChannel();} 132 | 133 | void QSubViewer::desplazar(float newPoint) 134 | { plot->desplazar(newPoint);} 135 | 136 | void QSubViewer::setBackColor(QColor color) 137 | { plot->setBackColor(color);} 138 | 139 | void QSubViewer::setFontColor(QColor color) 140 | { plot->setFontColor(color);} 141 | 142 | void QSubViewer::setChannel1Color(QColor color) 143 | { plot->setChannel1Color(color);} 144 | 145 | QColor QSubViewer::getBackgroundColor() 146 | { return plot->getBackgroundColor();} 147 | 148 | QColor QSubViewer::getFontColor() 149 | { return plot->getFontColor();} 150 | 151 | QColor QSubViewer::getChannelColor(int i) 152 | { return plot->getChannelColor(i);} 153 | 154 | QSize QSubViewer::minimumSizeHint() const 155 | { 156 | return QSize(100, 100); 157 | } 158 | 159 | 160 | QSize QSubViewer::sizeHint() const 161 | { 162 | return QSize(150, 150); 163 | } 164 | -------------------------------------------------------------------------------- /src/QSubViewer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #ifndef QSUBVIEWER_H 22 | #define QSUBVIEWER_H 23 | 24 | #include "plotter.h" 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | class QSubViewer : public QWidget 33 | { 34 | Q_OBJECT 35 | public: 36 | QSubViewer(QWidget *parent = 0); 37 | QSize minimumSizeHint() const; 38 | QSize sizeHint() const; 39 | void clear(); 40 | void setBackColor(QColor color); 41 | void setFontColor(QColor color); 42 | void setChannel1Color(QColor color); 43 | void setPoints(float,int size); 44 | int getChannel(); 45 | QColor getBackgroundColor(); 46 | QColor getFontColor(); 47 | QColor getChannelColor(int); 48 | void desplazar(float); 49 | void setChannel(int); 50 | 51 | signals: 52 | void valueChanged(int); 53 | private: 54 | PlotArea *plot; 55 | QGridLayout *grid; 56 | QComboBox *comboY; 57 | QComboBox *comboY2; 58 | QComboBox *comboY3; 59 | QComboBox *comboX; 60 | 61 | }; 62 | #endif 63 | -------------------------------------------------------------------------------- /src/QViewer.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #include "QViewer.h" 21 | 22 | QViewer::QViewer() 23 | { 24 | versionName = "QViewer v0.2"; 25 | setWindowTitle(versionName); 26 | setWindowIcon(QIcon(":/icons/amarok_visualizations.png")); 27 | setGeometry(300,100,600,600); 28 | 29 | fileName = ""; 30 | online = false; 31 | 32 | openFileAct = new QAction(QIcon(":/icons/fileopen.xpm"), tr("&Open..."), this); 33 | openFileAct->setShortcut(tr("Ctrl+O")); 34 | openFileAct->setStatusTip(tr("Open an existing file")); 35 | connect(openFileAct, SIGNAL(triggered()), this, SLOT(openFile())); 36 | 37 | exportCsvAct = new QAction(tr("&Export to CSV"), this); 38 | exportCsvAct->setShortcut(tr("Ctrl+E")); 39 | exportCsvAct->setDisabled(true); 40 | exportCsvAct->setStatusTip(tr("Export opened file")); 41 | connect(exportCsvAct, SIGNAL(triggered()), this, SLOT(exportCsv())); 42 | 43 | printAct = new QAction(tr("Print"), this); 44 | printAct->setShortcut(tr("Ctrl+P")); 45 | printAct->setDisabled(true); 46 | connect(printAct, SIGNAL(triggered()), this, SLOT(printDialog())); 47 | 48 | fileMenu = menuBar()->addMenu(tr("&File")); 49 | fileMenu->addAction(openFileAct); 50 | fileMenu->addAction(exportCsvAct); 51 | fileMenu->addAction(printAct); 52 | 53 | channel[0] = PlotArea::MAP; 54 | channel[1] = PlotArea::injTime; 55 | channel[2] = PlotArea::RPM; 56 | 57 | QVBoxLayout *vMainLayout = new QVBoxLayout(); 58 | 59 | display = new QSubViewer[3]; 60 | 61 | connect(display ,SIGNAL(valueChanged(int)),this,SLOT(updateChannel0(int))); 62 | connect(display+1,SIGNAL(valueChanged(int)),this,SLOT(updateChannel1(int))); 63 | connect(display+2,SIGNAL(valueChanged(int)),this,SLOT(updateChannel2(int))); 64 | 65 | // display[1] = new QSubViewer(); 66 | // display[2] = new QSubViewer(); 67 | 68 | display[0].setChannel(PlotArea::MAP); 69 | display[1].setChannel(PlotArea::injTime); 70 | display[2].setChannel(PlotArea::RPM); 71 | 72 | vMainLayout->addWidget(display); 73 | vMainLayout->addWidget(display+1); 74 | vMainLayout->addWidget(display+2); 75 | 76 | window = new QWidget; 77 | window->setLayout(vMainLayout); 78 | 79 | setCentralWidget(window); 80 | 81 | readSettings(); 82 | } 83 | 84 | 85 | void QViewer::createDisplay() 86 | { 87 | } 88 | 89 | 90 | QSize QViewer::minimumSizeHint() const 91 | { 92 | return QSize(200, 200); 93 | } 94 | 95 | 96 | QSize QViewer::sizeHint() const 97 | { 98 | return QSize(300, 300); 99 | } 100 | 101 | 102 | QString QViewer::getVersion() 103 | { return versionName; } 104 | 105 | void QViewer::openFile() 106 | { 107 | fileName = QFileDialog::getOpenFileName(this, tr("Open File"),fileName,tr("Log Data(*.log)")); 108 | if (fileName.isEmpty()) 109 | return; 110 | 111 | exportCsvAct->setDisabled(false); 112 | printAct->setDisabled(false); 113 | 114 | file = new QFile(fileName); 115 | file->open( QIODevice::ReadOnly); 116 | 117 | plotChannelData(channel[0],0); 118 | plotChannelData(channel[1],1); 119 | plotChannelData(channel[2],2); 120 | 121 | plotChannelData(channel[0],0); 122 | plotChannelData(channel[1],1); 123 | plotChannelData(channel[2],2); 124 | online = false; 125 | 126 | } 127 | 128 | 129 | void QViewer::updateChannel0(int newChannel) 130 | { 131 | if(online) 132 | { 133 | channel[0] = newChannel; 134 | 135 | //setChannel(newChannel,0); 136 | } 137 | else 138 | { 139 | if(!fileName.isEmpty()) 140 | { 141 | plotChannelData(newChannel,0); 142 | 143 | } 144 | } 145 | } 146 | 147 | 148 | //esto es de negro 149 | void QViewer::updateChannel1(int newChannel) 150 | { 151 | if(!fileName.isEmpty()) 152 | { 153 | plotChannelData(newChannel,1); 154 | 155 | } 156 | } 157 | 158 | 159 | void QViewer::updateChannel2(int newChannel) 160 | { 161 | if(!fileName.isEmpty()) 162 | { 163 | plotChannelData(newChannel,2); 164 | 165 | } 166 | } 167 | 168 | 169 | //n is the display # 170 | void QViewer::setChannel(int newChannel,int n) 171 | { 172 | (display+n)->setChannel(newChannel); 173 | (display+n)->clear(); 174 | } 175 | 176 | 177 | void QViewer::plotChannelData(int channelData,int index) 178 | { 179 | file->reset(); 180 | bool twoBytes = false; 181 | 182 | switch(channelData) 183 | { 184 | case PlotArea::lambda: 185 | channelData = 255; //not implemented 186 | break; 187 | case PlotArea::RPM: 188 | channelData = 3; 189 | twoBytes = true; 190 | break; 191 | case PlotArea::VE: 192 | channelData = 5; 193 | twoBytes = true; 194 | break; 195 | case PlotArea::MAP: 196 | channelData = 1; 197 | break; 198 | case PlotArea::airTemp: 199 | channelData = 2; 200 | break; 201 | case PlotArea::injTime: 202 | channelData = 7; 203 | twoBytes = true; 204 | break; 205 | case PlotArea::waterTemp: 206 | channelData = 14; 207 | break; 208 | case PlotArea::throttle: 209 | channelData = 15; 210 | break; 211 | } 212 | 213 | int dataSize = file->size()/26; 214 | //int *realdata = new int[file->size()/12]; 215 | int n = 0; 216 | while(!file->atEnd()) 217 | { 218 | 219 | for(int i=0;i<5;++i) 220 | data[i] = data[i+1]; 221 | 222 | file->getChar(data+5); 223 | 224 | if(twoBytes) 225 | { 226 | if(data[2] == channelData) 227 | { 228 | if(( (data[4] == data[2]+1) || (data[2] == 15)) && ((data[2] == data[0]+1) || data[0]==15)) 229 | { 230 | // if(900 > n) 231 | auxTransformer.byte[1] = data[3]; 232 | auxTransformer.byte[0] = data[5]; 233 | display[index].setPoints(auxTransformer.entero/100,dataSize); 234 | //realdata[n] = 4;//data[5]; 235 | ++n; 236 | } 237 | } 238 | } 239 | else 240 | if(data[4] == channelData) 241 | if(( (data[4] == data[2]+1) || (data[2] == 15)) && ((data[2] == data[0]+1) || data[0]==15)) 242 | { 243 | // if(900 > n) 244 | display[index].setPoints(data[5],dataSize); 245 | //realdata[n] = 4;//data[5]; 246 | ++n; 247 | } 248 | } 249 | //display1->setPoints(realdata,n); 250 | 251 | //delete realdata; 252 | } 253 | 254 | 255 | bool QViewer::exportCsv() 256 | { 257 | bool ready = false; 258 | QString csvFileName=fileName; 259 | csvFileName.replace(".log",".csv"); 260 | 261 | csvFileName = QFileDialog::getSaveFileName(this,tr("Export to Comma Separated Value"), 262 | csvFileName, 263 | tr("CSV File(*.csv)")); 264 | if (csvFileName.isEmpty()) 265 | return false; 266 | 267 | file->reset(); 268 | 269 | QFile *csvFile = new QFile(csvFileName); 270 | csvFile->open(QIODevice::WriteOnly | QIODevice::Text); 271 | 272 | //header 273 | csvFile->write("MAP,air Temp,RPM,VE,inj Time,Duty,inj Adv,ign Adv,Dwell,water Temp,Throttle pos\n"); 274 | char buffer[] = {0,0,0,0,0,0,0,0,0,0}; 275 | while (!file->atEnd()) 276 | { 277 | int i; 278 | float duty; 279 | QByteArray string; 280 | for(i=0;i<7;++i) 281 | buffer[i] = buffer[i+1]; 282 | i=5; 283 | file->getChar(buffer+7); 284 | 285 | //if(((buffer[6] == buffer[4]+1) && ( (buffer[4] == buffer[2]+1 ) || ((buffer[4] == 13) && (buffer[6] == 1)))) || ((buffer[2] == 13) && (buffer[4] == 1)) ) 286 | if(((buffer[6] == buffer[4]+1) || ((buffer[4] == 17) && (buffer[6] == 1))) ) 287 | { 288 | if(!ready && (buffer[6] == 1) && (buffer[2] == 16)) 289 | ready = true; 290 | if(ready) 291 | { 292 | switch(buffer[6]) 293 | { 294 | case 1: //MAP 295 | string.setNum(buffer[7]); 296 | csvFile->write(string+','); 297 | break; 298 | case 2: //TEMP 299 | string.setNum(buffer[7]); 300 | csvFile->write(string+','); 301 | break; 302 | case 3: //RPM 303 | RPM.byte[1] = buffer[7]; 304 | break; 305 | case 4: 306 | RPM.byte[0] = buffer[7]; 307 | string.setNum(RPM.entero); 308 | csvFile->write(string+','); 309 | break; 310 | case 5: //VE 311 | auxTransformer.byte[1] = buffer[7]; 312 | break; 313 | case 6: 314 | auxTransformer.byte[0] = buffer[7]; 315 | string.setNum((float)RPM.entero/10,'f',2); 316 | csvFile->write(string+','); 317 | break; 318 | case 7: //fuel 319 | auxTransformer.byte[1] = buffer[7]; 320 | break; 321 | case 8: 322 | auxTransformer.byte[0] = buffer[7]; 323 | 324 | duty = (float)auxTransformer.entero/625 * (float)RPM.entero/600; 325 | 326 | string.setNum((float)auxTransformer.entero/625,'f',1); 327 | csvFile->write(string+','); 328 | string.setNum(duty,'f',1); 329 | csvFile->write(string+','); 330 | break; 331 | case 9: //fueladv 332 | auxTransformer.byte[1] = buffer[7]; 333 | break; 334 | case 10: 335 | auxTransformer.byte[0] = buffer[7]; 336 | string.setNum((float)(auxTransformer.byte[1]*6 + (float)auxTransformer.byte[0]*6/255),'f',2); 337 | csvFile->write(string+','); 338 | break; 339 | case 11: //Ignition Advance 340 | auxTransformer.byte[1] = buffer[7]; 341 | break; 342 | case 12: 343 | auxTransformer.byte[0] = buffer[7]; 344 | string.setNum((float)(auxTransformer.byte[1]*6 + (float)auxTransformer.byte[0]*6/255),'f',2); 345 | csvFile->write(string+','); 346 | break; 347 | case 13: 348 | string.setNum((float)buffer[7]/10,'f',1); 349 | csvFile->write(string+','); 350 | break; 351 | case 14: 352 | string.setNum(buffer[7]); 353 | csvFile->write(string+','); 354 | break; 355 | case 15: 356 | string.setNum(buffer[7]); 357 | csvFile->write(string+'\n'); 358 | break; 359 | } 360 | } 361 | } 362 | } 363 | csvFile->close(); 364 | return true; 365 | } 366 | 367 | 368 | void QViewer::readSettings() 369 | { 370 | QSettings settings("FreeEMS", "QViewer"); 371 | QPoint pos = settings.value("pos", QPoint(200, 400)).toPoint(); 372 | QSize size = settings.value("size", QSize(400, 400)).toSize(); 373 | fileName = settings.value("defaultFile",QString()).toString(); 374 | 375 | display->setBackColor( settings.value("plotBackground Color. Display 1",Qt::black).value() ); 376 | display->setFontColor( settings.value("plotFont Color. Display 1",Qt::gray).value() ); 377 | display->setChannel1Color( settings.value("plotChannel 1 Color. Display 1",Qt::blue).value() ); 378 | 379 | (display+1)->setBackColor( settings.value("plotBackground Color. Display 2",Qt::black).value() ); 380 | (display+1)->setFontColor( settings.value("plotFont Color. Display 2",Qt::gray).value() ); 381 | (display+1)->setChannel1Color( settings.value("plotChannel 1 Color. Display 2",Qt::red).value() ); 382 | 383 | (display+2)->setBackColor( settings.value("plotBackground Color. Display 3",Qt::black).value() ); 384 | (display+2)->setFontColor( settings.value("plotFont Color. Display 3",Qt::gray).value() ); 385 | (display+2)->setChannel1Color( settings.value("plotChannel 1 Color. Display 3",Qt::green).value() ); 386 | 387 | resize(size); 388 | move(pos); 389 | } 390 | 391 | 392 | void QViewer::writeSettings() 393 | { 394 | QSettings settings("FreeEMS", "QViewer"); 395 | settings.setValue("pos", pos()); 396 | settings.setValue("size", size()); 397 | settings.setValue("defaultFile",fileName); 398 | 399 | settings.setValue("plotBackground Color. Display 1",(display)->getBackgroundColor()); 400 | settings.setValue("plotFont Color. Display 1",(display)->getFontColor()); 401 | settings.setValue("plotChannel 1 Color. Display 1",(display)->getChannelColor(1)); 402 | 403 | settings.setValue("plotBackground Color. Display 2",(display+1)->getBackgroundColor()); 404 | settings.setValue("plotFont Color. Display 2",(display+1)->getFontColor()); 405 | settings.setValue("plotChannel 1 Color. Display 2",(display+1)->getChannelColor(1)); 406 | 407 | settings.setValue("plotBackground Color. Display 3",(display+2)->getBackgroundColor()); 408 | settings.setValue("plotFont Color. Display 3",(display+2)->getFontColor()); 409 | settings.setValue("plotChannel 1 Color. Display 3",(display+2)->getChannelColor(1)); 410 | } 411 | 412 | 413 | void QViewer::desplazar(int selectedChannel, float value) 414 | { 415 | online = true; 416 | (display+selectedChannel)->desplazar(value); 417 | } 418 | 419 | 420 | int QViewer::getChannel(int n) //Retorna el canal que est monitoreando el display n 421 | { 422 | return channel[n]; 423 | } 424 | 425 | 426 | void QViewer::printDialog() 427 | { 428 | QFile file(fileName); 429 | file.open(QIODevice::ReadOnly); 430 | QPrinter *printer = new QPrinter(QPrinter::ScreenResolution); 431 | printer->setOrientation(QPrinter::Landscape); 432 | QPrintDialog printDialog(printer,this); 433 | 434 | if (printDialog.exec() == QDialog::Accepted) 435 | { 436 | QPainter painter; 437 | painter.begin(printer); 438 | painter.scale(0.65,0.70); 439 | for(int i=0; !file.atEnd(); i += 12) 440 | { 441 | // painter.drawText(0,i,QString(file.readLine())); 442 | } 443 | //printer->newPage(); 444 | // print ... 445 | painter.end(); 446 | } 447 | } 448 | 449 | 450 | void QViewer::closeEvent(QCloseEvent *event) 451 | { 452 | writeSettings(); 453 | event->accept(); 454 | } 455 | -------------------------------------------------------------------------------- /src/QViewer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #ifndef QVIEWER_H 22 | #define QVIEWER_H 23 | 24 | #include "QSubViewer.h" 25 | #include "plotter.h" 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | class QViewer : public QMainWindow 40 | { 41 | Q_OBJECT 42 | public: 43 | QViewer(); 44 | QString getVersion(); 45 | void plotChannelData(int channel,int index); 46 | void desplazar(int channel, float value); 47 | int getChannel(int display); 48 | void setChannel(int,int); 49 | QSize minimumSizeHint() const; 50 | QSize sizeHint() const; 51 | 52 | protected: 53 | void closeEvent(QCloseEvent *event); 54 | 55 | private slots: 56 | void openFile(); 57 | void updateChannel0(int updChannel); 58 | void updateChannel1(int updChannel); 59 | void updateChannel2(int updChannel); 60 | bool exportCsv(); 61 | void printDialog(); 62 | 63 | private: 64 | void readSettings(); 65 | void writeSettings(); 66 | bool online; 67 | 68 | char data[10]; 69 | int channel[3]; 70 | QAction * openFileAct; 71 | QAction * exportCsvAct; 72 | QAction * printAct; 73 | QWidget *window; 74 | QMenuBar *menu; 75 | QMenu *fileMenu; 76 | QString versionName; 77 | QString fileName; 78 | QGridLayout *grid; 79 | QComboBox *comboY; 80 | QComboBox *comboX; 81 | QSubViewer *display; 82 | // QSubViewer *display2; 83 | // QSubViewer *display3; 84 | 85 | char *points; 86 | void createDisplay(); 87 | 88 | QFile *file; 89 | 90 | union transformer 91 | { 92 | char byte[2]; 93 | int entero; 94 | }RPM,auxTransformer; 95 | 96 | struct degreeConverter 97 | { 98 | char byte[2]; 99 | float angle; 100 | }auxDegree; 101 | }; 102 | #endif 103 | -------------------------------------------------------------------------------- /src/QuickTune.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #include "QuickTune.h" 22 | 23 | QuickTune::QuickTune(QWidget *parent) : QWidget(parent) 24 | { 25 | versionName = "QuickTune v0.01"; 26 | setWindowTitle(versionName); 27 | setGeometry(300,100,600,600); 28 | 29 | tableMAP = new graph2D; 30 | tableMAP->setColumns(12); 31 | for(int i=0;i<12;++i) 32 | { 33 | tableMAP->setPoint(i*20,0); 34 | tableMAP->setScaleX(i,i*10+20); 35 | if(i<9) 36 | tableMAP->setScaleY(i,i*10); 37 | } 38 | 39 | tableRPM = new graph2D; 40 | tableRPM->setColumns(21); 41 | for(int i=0;i<21;++i) 42 | { 43 | tableRPM->setPoint(i*20,0); 44 | tableRPM->setScaleX(i,i*500); 45 | if(i<9) 46 | tableRPM->setScaleY(i,i*10); 47 | } 48 | 49 | QGridLayout * grid = new QGridLayout; 50 | grid->addWidget(tableMAP,0,0); 51 | grid->addWidget(tableRPM,1,0); 52 | 53 | setLayout(grid); 54 | 55 | connect(tableMAP,SIGNAL(valueChanged(int)),this,SLOT(MAPvalueChanged(int))); 56 | connect(tableRPM,SIGNAL(valueChanged(int)),this,SLOT(RPMvalueChanged(int))); 57 | 58 | show(); 59 | } 60 | 61 | 62 | void QuickTune::MAPvalueChanged(int index) 63 | { 64 | if(index<12) //number of columns limit 65 | //0 66 | emit QTuneChange(MAP,index); 67 | } 68 | 69 | 70 | void QuickTune::RPMvalueChanged(int index) 71 | { 72 | emit QTuneChange(RPM,index); //0 73 | } 74 | 75 | 76 | int QuickTune::getMAP(int index) 77 | { 78 | if(index<12) //number of columns limit 79 | return tableMAP->getPoint(index); 80 | return 0; 81 | } 82 | 83 | 84 | int QuickTune::getRPM(int index) 85 | { 86 | return tableRPM->getPoint(index); 87 | } 88 | -------------------------------------------------------------------------------- /src/QuickTune.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #ifndef QUICKTUNE_H 21 | #define QUICKTUNE_H 22 | 23 | #include 24 | #include 25 | #include "2Dgraph.h" 26 | 27 | class QuickTune: public QWidget 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | QuickTune(QWidget *parent = 0); 33 | int getMAP(int index); 34 | int getRPM(int index); 35 | 36 | enum {MAP,RPM}; 37 | 38 | public slots: 39 | void MAPvalueChanged(int); 40 | void RPMvalueChanged(int); 41 | 42 | signals: 43 | void QTuneChange(int channel, int index); 44 | 45 | private: 46 | QString versionName; 47 | graph2D *tableMAP; 48 | graph2D *tableRPM; 49 | }; 50 | #endif 51 | -------------------------------------------------------------------------------- /src/ReadMe: -------------------------------------------------------------------------------- 1 | READ THIS IN ORDER TO COMPILE THE Qt4 TEMPLATE 2 | ---------------------------------------------- 3 | 4 | Before compiling, check the Qt Options, go to 5 | Project->Project Options->C++ Support and open the Qt Options tab. 6 | 7 | Check that the Qt installation directory is correct for the Qt version you've chosen. 8 | 9 | ------------------ 10 | Andreas Pakulat 11 | July 2006 12 | -------------------------------------------------------------------------------- /src/RenderArea.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2005-2007 Trolltech ASA. All rights reserved. 4 | ** 5 | ** This file is part of the example classes of the Qt Toolkit. 6 | ** 7 | ** This file may be used under the terms of the GNU General Public 8 | ** License version 2.0 as published by the Free Software Foundation 9 | ** and appearing in the file LICENSE.GPL included in the packaging of 10 | ** this file. Please review the following information to ensure GNU 11 | ** General Public Licensing requirements will be met: 12 | ** http://www.trolltech.com/products/qt/opensource.html 13 | ** 14 | ** If you are unsure which license is appropriate for your use, please 15 | ** review the following information: 16 | ** http://www.trolltech.com/products/qt/licensing.html or contact the 17 | ** sales department at sales@trolltech.com. 18 | ** 19 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 | ** 22 | 23 | Modified by Marcos Chaparro jojo 24 | ****************************************************************************/ 25 | 26 | #include 27 | #include 28 | #include "renderarea.h" 29 | #define pi_to_rad 0.017453292 30 | 31 | RenderArea::RenderArea(QWidget *parent,int limit, int redLine, int initialAngle, int finalAngle) 32 | : QWidget(parent) 33 | { 34 | setAutoFillBackground(false); 35 | Limit = limit/1000; 36 | RedLine = redLine/1000; 37 | InitialAngle = initialAngle; 38 | FinalAngle = finalAngle; 39 | 40 | needleColor = QColor(0, 127, 127, 191); 41 | numbersColor = QColor(0, 127, 127, 191); 42 | scale1Color= QColor(127, 0, 127); 43 | scale2Color= QColor(0, 127, 127, 191); 44 | hourColor = QColor(127, 0, 127); 45 | redPen = QColor(255, 40, 40); 46 | 47 | setLimitAct = new QAction(tr("Limit"), this); 48 | connect(setLimitAct, SIGNAL(triggered()), this, SLOT(setLimitSlot())); 49 | 50 | setRedLineAct = new QAction(tr("Red Line"), this); 51 | connect(setRedLineAct, SIGNAL(triggered()), this, SLOT(setRedLineSlot())); 52 | 53 | setInitialAngleAct = new QAction(tr("Initial Angle"), this); 54 | connect(setInitialAngleAct, SIGNAL(triggered()), this, SLOT(setInitialAngleSlot())); 55 | 56 | setFinalAngleAct = new QAction(tr("Final Angle"), this); 57 | connect(setFinalAngleAct, SIGNAL(triggered()), this, SLOT(setFinalAngleSlot())); 58 | 59 | setNeedleColorAct = new QAction(tr("Needle Color"), this); 60 | connect(setNeedleColorAct, SIGNAL(triggered()), this, SLOT(setNeedleColorSlot())); 61 | 62 | setNumbersColorAct = new QAction(tr("Numbers Color"), this); 63 | connect(setNumbersColorAct, SIGNAL(triggered()), this, SLOT(setNumbersColorSlot())); 64 | 65 | setScale1ColorAct = new QAction(tr("Scale 1 Color"), this); 66 | connect(setScale1ColorAct, SIGNAL(triggered()), this, SLOT(setScale1ColorSlot())); 67 | 68 | setScale2ColorAct = new QAction(tr("Scale 2 Color"), this); 69 | connect(setScale2ColorAct, SIGNAL(triggered()), this, SLOT(setScale2ColorSlot())); 70 | 71 | menu = new QMenu; 72 | changeNumbersMenu = menu->addMenu("Settings"); 73 | changeColorsMenu = menu->addMenu("Colors"); 74 | changeNumbersMenu->addAction(setLimitAct); 75 | changeNumbersMenu->addAction(setRedLineAct); 76 | changeNumbersMenu->addAction(setInitialAngleAct); 77 | changeNumbersMenu->addAction(setFinalAngleAct); 78 | 79 | changeColorsMenu->addAction(setNeedleColorAct); 80 | changeColorsMenu->addAction(setNumbersColorAct); 81 | changeColorsMenu->addAction(setScale1ColorAct); 82 | changeColorsMenu->addAction(setScale2ColorAct); 83 | 84 | } 85 | 86 | 87 | QSize RenderArea::minimumSizeHint() const 88 | { 89 | return QSize(100, 100); 90 | } 91 | 92 | 93 | QSize RenderArea::sizeHint() const 94 | { 95 | return QSize(300, 200); 96 | } 97 | 98 | 99 | void RenderArea::setValue(float value) 100 | { 101 | actualPosition = value; 102 | update(); 103 | } 104 | 105 | 106 | void RenderArea::setLimitSlot() 107 | { 108 | bool ok; 109 | int newLimit = QInputDialog::getInteger(this, tr("RPM Limit"), 110 | tr("Enter RPM:"), Limit*1000, 0, 20000, 1000, &ok); 111 | if(ok) 112 | setLimit(newLimit); 113 | } 114 | 115 | 116 | void RenderArea::setLimit(int newLimit) 117 | { 118 | Limit = newLimit/1000; 119 | update(); 120 | } 121 | 122 | 123 | void RenderArea::setRedLineSlot() 124 | { 125 | bool ok; 126 | int newLimit = QInputDialog::getInteger(this, tr("RPM Limit"), 127 | tr("Enter RPM:"), RedLine*1000, 0, 20000, 1000, &ok); 128 | if(ok) 129 | RedLine = newLimit/1000; 130 | update(); 131 | } 132 | 133 | 134 | void RenderArea::setInitialAngleSlot() 135 | { 136 | bool ok; 137 | int newAngle = QInputDialog::getInteger(this, tr("Initial Angle"), 138 | tr("Enter Angle:"), InitialAngle, 0, FinalAngle, 1, &ok); 139 | if(ok) 140 | InitialAngle = newAngle; 141 | update(); 142 | } 143 | 144 | 145 | void RenderArea::setFinalAngleSlot() 146 | { 147 | bool ok; 148 | int newAngle = QInputDialog::getInteger(this, tr("Final Angle"), 149 | tr("Enter Angle:"), FinalAngle, InitialAngle, 360, 1, &ok); 150 | if(ok) 151 | FinalAngle = newAngle; 152 | update(); 153 | } 154 | 155 | 156 | void RenderArea::setNeedleColorSlot() 157 | { 158 | QColor color = QColorDialog::getColor(needleColor,this); 159 | if (color.isValid()) 160 | { 161 | needleColor = color; 162 | } 163 | update(); 164 | } 165 | 166 | 167 | void RenderArea::setNumbersColorSlot() 168 | { 169 | QColor color = QColorDialog::getColor(numbersColor, this); 170 | if (color.isValid()) 171 | { 172 | numbersColor = color; 173 | } 174 | update(); 175 | } 176 | 177 | 178 | void RenderArea::setScale1ColorSlot() 179 | { 180 | QColor color = QColorDialog::getColor(scale1Color, this); 181 | if (color.isValid()) 182 | { 183 | scale1Color = color; 184 | } 185 | update(); 186 | } 187 | 188 | 189 | void RenderArea::setScale2ColorSlot() 190 | { 191 | QColor color = QColorDialog::getColor(scale2Color, this); 192 | if (color.isValid()) 193 | { 194 | scale2Color = color; 195 | } 196 | update(); 197 | } 198 | 199 | 200 | void RenderArea::paintEvent(QPaintEvent * /* event */) 201 | { 202 | static const QPoint Needle[3] = 203 | { 204 | QPoint(7, 8), 205 | QPoint(-7, 8), 206 | QPoint(0, -85) 207 | }; 208 | 209 | QFont newFont = font(); 210 | newFont.setPixelSize(15); 211 | setFont(newFont); 212 | QFontMetrics fontMetrics(newFont); 213 | QRect xBoundingRect = fontMetrics.boundingRect(tr("x")); 214 | 215 | int side = qMin(width(), height()); 216 | // QTime time = QTime::currentTime(); 217 | 218 | QPainter painter(this); 219 | painter.setRenderHint(QPainter::Antialiasing); 220 | painter.translate(width() / 2, height() / 2); 221 | painter.scale(side / 200.0, side / 200.0); 222 | 223 | // painter.setPen(numbersColor); 224 | 225 | double step = (FinalAngle-InitialAngle)/Limit; 226 | 227 | painter.save(); 228 | double angle=InitialAngle+90; 229 | 230 | QString num; 231 | QColor black(56,56,90); 232 | painter.setPen(black); 233 | painter.drawText( 30 + xBoundingRect.width() / 2, 234 | 40 + xBoundingRect.height() / 2, 235 | //poner scalefactor! 236 | num.setNum((int)(actualPosition*1000),10)); 237 | 238 | painter.setPen(numbersColor); 239 | 240 | for (int j = 0 ; j <= (Limit); ++j) 241 | { 242 | painter.drawText( 74*cos(angle*pi_to_rad) - 10 + xBoundingRect.width() / 2, 243 | 74*sin(angle*pi_to_rad) - 4 + xBoundingRect.height() / 2, num.setNum(j,10)); 244 | angle += step; 245 | } 246 | 247 | painter.rotate(InitialAngle); 248 | painter.setPen(scale1Color); 249 | 250 | for (int i = 0; i < Limit+1; ++i) 251 | { 252 | if( i == RedLine) 253 | painter.setPen(redPen); 254 | painter.drawLine(0, 88, 0, 96); 255 | painter.rotate(step); 256 | } 257 | painter.restore(); 258 | 259 | painter.setPen(Qt::NoPen); 260 | painter.setBrush(needleColor); 261 | 262 | painter.save(); 263 | painter.rotate(actualPosition*step+180+InitialAngle); 264 | painter.drawConvexPolygon(Needle, 3); 265 | painter.restore(); 266 | 267 | painter.setPen(scale2Color); 268 | painter.rotate(InitialAngle); 269 | 270 | for (int j = 0; j <= (Limit)*5; ++j) 271 | { 272 | if( j == RedLine*5) 273 | painter.setPen(redPen); 274 | 275 | if ((j % 5) != 0) 276 | painter.drawLine(0, 92, 0, 96); 277 | painter.rotate(step/5); 278 | } 279 | } 280 | 281 | 282 | void RenderArea::mouseReleaseEvent(QMouseEvent *event) 283 | { 284 | if (event->button() == Qt::RightButton) 285 | menu->popup(QPoint(event->globalX(),event->globalY()), setLimitAct); 286 | } 287 | -------------------------------------------------------------------------------- /src/application.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/amarok_album.png 4 | icons/amarok_burn.png 5 | icons/amarok_burn_big.png 6 | icons/amarok_configure.png 7 | icons/amarok_pause.png 8 | icons/amarok_play.png 9 | icons/amarok_visualizations.png 10 | icons/ecumanager-icon.png 11 | icons/editcopy.xpm 12 | icons/editcut.xpm 13 | icons/editpaste.xpm 14 | icons/filenew.xpm 15 | icons/fileopen.xpm 16 | icons/filesave.xpm 17 | icons/network-wired.png 18 | icons/step_response.png 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/commCore_FreeEMS.cpp: -------------------------------------------------------------------------------- 1 | #include "commCore_FreeEMS.h" 2 | 3 | /* This file contains mostly the tools used to decode and process 4 | the packets coming to and from FreeEMS */ 5 | 6 | aPacket::aPacket() 7 | { 8 | payloadLength = 0; 9 | headerFlags = 0; 10 | fullPacket = ""; 11 | } 12 | 13 | 14 | int aPacket::setPacket(QByteArray newPacket) 15 | { 16 | fullPacket = newPacket; 17 | 18 | if(int error = removeEscape()) 19 | return error; 20 | if(int error = check() ) 21 | return error; 22 | 23 | headerFlags = fullPacket[0]; 24 | payloadID = (unsigned char)fullPacket[1]*256 + (unsigned char)fullPacket.at(2); 25 | 26 | unsigned int index = 3; 27 | if( headerFlags & HEADER_HAS_LENGTH ) 28 | { 29 | payloadLength = (unsigned char)fullPacket[index]*256 + (unsigned char)fullPacket[index+1]; 30 | index += 2; 31 | } 32 | payload = fullPacket.mid(index,payloadLength); 33 | if((unsigned int)fullPacket.size() != (index + payloadLength + 1)) 34 | return payload_size_inconsistency_error; 35 | 36 | //success! 37 | return 0; 38 | } 39 | 40 | QByteArray aPacket::getPacket() 41 | { return fullPacket; } 42 | 43 | 44 | void aPacket::setHeaderLengthFlag(bool bit) 45 | { 46 | if(bit) 47 | headerFlags |= HEADER_HAS_LENGTH; 48 | else 49 | headerFlags &= ~HEADER_HAS_LENGTH; 50 | } 51 | 52 | 53 | bool aPacket::hasHeaderLengthFlag() 54 | { return headerFlags &= HEADER_HAS_LENGTH; } 55 | 56 | 57 | unsigned int aPacket::getPayloadID() 58 | { return payloadID; } 59 | 60 | 61 | void aPacket::setPayloadID(unsigned int newID) 62 | { payloadID = newID; } 63 | 64 | 65 | void aPacket::setPayload(QByteArray newPayload) 66 | { payload = newPayload; } 67 | 68 | 69 | QByteArray aPacket::getPayload() 70 | { return payload; } 71 | 72 | 73 | void aPacket::setPayloadLength(int newLength) 74 | { payloadLength = newLength; } 75 | 76 | 77 | unsigned int aPacket::getPayloadLength() 78 | { 79 | if( hasHeaderLengthFlag() ) //flag must be set to extract the length 80 | { 81 | int n = 4; 82 | payloadLength = fullPacket[n]*256 + fullPacket[n+1]; 83 | return payloadLength; 84 | } 85 | else 86 | return 0; 87 | } 88 | 89 | 90 | int aPacket::getCalculatedPayloadLength() 91 | { return payload.size(); } 92 | 93 | 94 | void aPacket::buildPacket() 95 | { 96 | fullPacket[0] = headerFlags; 97 | //high byte 98 | fullPacket.append(payloadID/256); 99 | fullPacket.append(payloadID);//low byte 100 | fullPacket.append(payload); 101 | 102 | unsigned char checksum = 0; 103 | for(int i=0; i < fullPacket.size(); ++i) 104 | checksum ^= fullPacket[i]; 105 | fullPacket.append(checksum); 106 | qDebug(fullPacket.data()); 107 | } 108 | 109 | 110 | void aPacket::addEscape() //to send trough RS232 we need to add start/stop bytes 111 | { 112 | /* add escaping scheme */ 113 | const char escapedStart[2] = {0xBB,0x55}; 114 | const char escapedEscape[2] = {0xBB,0x44}; 115 | const char escapedEnd[2] = {0xBB,0x33}; 116 | const char start = 0xAA; 117 | const char escape = 0xBB; 118 | const char end = 0xCC; 119 | 120 | /*replace start byte with the respective start pair*/ 121 | fullPacket.replace(start, escapedStart); 122 | fullPacket.replace(escape, escapedEscape); 123 | fullPacket.replace(end, escapedEnd); 124 | 125 | /* Add start and end bytes to the stream */ 126 | fullPacket.prepend(0xAA); 127 | fullPacket.append(0xCC); 128 | 129 | /* the packet is now ready to send */ 130 | } 131 | 132 | 133 | int aPacket::removeEscape() 134 | { 135 | const char escapedStart[2] = {0xBB,0x55}; 136 | const char escapedEscape[2] = {0xBB,0x44}; 137 | const char escapedEnd[2] = {0xBB,0x33}; 138 | const char start = 0xAA; 139 | const char escape = 0xBB; 140 | const char end = 0xCC; 141 | 142 | /* Check if it is a valid scaping scheme. It must have both start and end chars */ 143 | if((fullPacket.count(start) ) != 1) 144 | return start_byte_inconsistency_error; 145 | if((fullPacket.count(end) ) != 1) 146 | return stop_byte_inconsistency_error; 147 | /* 0xBB can only be followed by 0x55,0x44 or 0x33, but that error is detected in the checksum too*/ 148 | /*while(index = fullPacket.indexOf(escape) != -1) 149 | { 150 | char byte = fullPacket.at(index); 151 | if( (byte == 0x55) && (byte == 0x44) && (byte == 0x33)) 152 | return; 153 | }*/ 154 | 155 | /* Replace the escaped byte pairs with the original bytes */ 156 | fullPacket.replace(escapedStart, &start); 157 | fullPacket.replace(escapedEscape, &escape); 158 | fullPacket.replace(escapedEnd, &end); 159 | 160 | /* Remove start and end bytes */ 161 | fullPacket= fullPacket.right(fullPacket.size()-1); 162 | fullPacket.chop(1); 163 | 164 | return 0; 165 | } 166 | 167 | 168 | /*unsigned char aPacket::checksum(QByteArray data) 169 | { 170 | unsigned char sum = 0; 171 | for (int i=0; i < data.size(); ++i) 172 | sum ^= data[i]; 173 | return sum; 174 | } 175 | */ 176 | 177 | 178 | /* If the checksum, payload length and escaping characters make sense, the packet is correct and check() returns true 179 | otherwise, the packet is corrupted and check returns false */ 180 | int aPacket::check() 181 | { 182 | /*calculate checksum: it includes the header, adrress/length, payloadID and payload. 183 | i.e., the fullPacket but the last byte */ 184 | unsigned char sum=0; 185 | int i; 186 | for(i=0; i < (fullPacket.size() -1); ++i) 187 | sum += fullPacket.at(i); 188 | 189 | if(sum == (unsigned char)fullPacket.at(i)) 190 | return 0; /*Correct checksum*/ 191 | else 192 | { 193 | // qDebug("bad checksum:\ncalculated: %x\tgot:%x \n Check serial port settings. \n\n",sum,fullPacket.at(i)); 194 | return bad_checksum_error; /*Bad Checksum*/ 195 | } 196 | } 197 | 198 | void aPacket::setChecksum() 199 | { 200 | unsigned char sum = 0; 201 | for( int i=0; iwrite(packet.getPacket(),1); 215 | qDebug(packet.getPacket().data()); 216 | 217 | showPacket(packet.getPacket()); 218 | } 219 | 220 | 221 | void commThread::getInterfaceVersion() 222 | { 223 | aPacket packet; 224 | packet.setHeaderLengthFlag(false); 225 | packet.setPayloadID(requestInterfaceVersion); 226 | packet.buildPacket(); 227 | packet.addEscape(); 228 | // serial->write(packet.getPacket(),1); 229 | emit packetArrived(packet.getPacket()); 230 | } 231 | 232 | 233 | void commThread::getFirmwareVersion() 234 | { 235 | aPacket packet; 236 | packet.setHeaderLengthFlag(false); 237 | packet.setPayloadID(requestFirmwareVersion); 238 | packet.buildPacket(); 239 | packet.addEscape(); 240 | //serial->write(packet.getPacket(),1); 241 | emit packetArrived(packet.getPacket()); 242 | } 243 | 244 | void commThread::adjustMainTable() 245 | { 246 | } 247 | 248 | /* This will be moved inside qt4application, and the packet decoding has to be 249 | done only once, in decodeFreeEMSPacket() */ 250 | void qt4application::showPacket(QByteArray dataArray) 251 | { 252 | aPacket data; 253 | 254 | data.setPacket(dataArray); 255 | qDebug(data.getPacket().data()); 256 | data.removeEscape(); 257 | qDebug(data.getPacket().data()); 258 | 259 | if(debugEnabledFlag) 260 | { 261 | QTime time = QTime::currentTime(); 262 | QTableWidgetItem *newItem = new QTableWidgetItem(time.toString("hh:mm:ss.zzz")); 263 | packetTable->setItem(0,0,newItem ); 264 | 265 | QString headerFlags; 266 | if( data.hasHeaderLengthFlag() ) 267 | headerFlags.append("F"); 268 | else 269 | headerFlags.append("- "); 270 | 271 | QTableWidgetItem *newItem2 = new QTableWidgetItem(headerFlags); 272 | packetTable->setItem(0,1,newItem2 ); 273 | QTableWidgetItem *newItem3 = new QTableWidgetItem(data.getPayloadID()); 274 | packetTable->setItem(0,2,newItem3 ); 275 | QTableWidgetItem *newItem4 = new QTableWidgetItem(data.getPayload().constData()); 276 | packetTable->setItem(0,3,newItem4 ); 277 | } 278 | } 279 | 280 | 281 | void qt4application::debugFreeEMS() 282 | { 283 | if( serialThread ) 284 | { 285 | dialog = new QDialog(this); 286 | dialog->setModal(false); 287 | dialog->setSizeGripEnabled(false); 288 | dialog->resize(728,560); 289 | dialog->setWindowTitle(tr("Debug")); 290 | 291 | debugEnabledFlag = true; 292 | 293 | QGridLayout *grid = new QGridLayout; 294 | QDialogButtonBox *accept = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); 295 | connect(accept, SIGNAL(accepted()), this, SLOT(acceptDialog())); 296 | connect(accept, SIGNAL(rejected()), this, SLOT(rejectDialog())); 297 | 298 | /* table that holds every packet sent/received */ 299 | 300 | packetTable= new QTableWidget(1, 4, this); 301 | 302 | QStringList headerLabels; 303 | headerLabels << "Time" << "Header" << "PayloadID"<<"Payload"; 304 | packetTable->setHorizontalHeaderLabels(headerLabels); 305 | packetTable->setColumnWidth(3,360); 306 | packetTable->setRowHeight(0,20); 307 | 308 | QGridLayout *packetsGrid = new QGridLayout; 309 | packetsGrid->addWidget(packetTable,0,1); 310 | 311 | /* Statistics */ 312 | QGridLayout *statsGrid = new QGridLayout; 313 | statistic_t *communicationStatistics = serialThread->getStatistics(); 314 | 315 | QLabel *goodPacketsLabel = new QLabel("Good packets: " + QString().setNum(communicationStatistics->good)); 316 | QLabel *startByteInconsistencyLabel = new QLabel("Start byte error: " + QString().number(communicationStatistics->start_byte_inconsistency)); 317 | QLabel *stopByteInconsistencyLabel = new QLabel("Stop byte error: " + QString().number(communicationStatistics->stop_byte_inconsistency)); 318 | QLabel *escapeByteInconsistencyLabel = new QLabel("Escape byte error: " + QString().number(communicationStatistics->escape_byte_inconsistency)); 319 | QLabel *badChecksumLabel = new QLabel("Bad checksum: " + QString().number(communicationStatistics->bad_checksum)); 320 | QLabel *payloadSizeInconsistencyLabel = new QLabel( "Payload size error: " + QString().number(communicationStatistics->payload_size_inconsistency)); 321 | 322 | statsGrid->addWidget(goodPacketsLabel, 0, 0); 323 | statsGrid->addWidget(startByteInconsistencyLabel, 1, 0); 324 | statsGrid->addWidget(stopByteInconsistencyLabel,2,0); 325 | statsGrid->addWidget(escapeByteInconsistencyLabel, 3, 0); 326 | statsGrid->addWidget(badChecksumLabel, 4, 0); 327 | statsGrid->addWidget(payloadSizeInconsistencyLabel, 5, 0); 328 | 329 | QTabWidget *tabBar = new QTabWidget(); 330 | QWidget *packetsWidget = new QWidget(); 331 | packetsWidget->setLayout(packetsGrid); 332 | QWidget *statsTab = new QWidget(); 333 | statsTab->setLayout(statsGrid); 334 | 335 | tabBar->addTab(packetsWidget,"Packets"); 336 | tabBar->addTab(statsTab,"Statistics"); 337 | 338 | grid->addWidget(tabBar,1,0,1,2); 339 | grid->addWidget(accept,3,1); 340 | dialog->setLayout(grid); 341 | dialog->show(); 342 | } 343 | } 344 | -------------------------------------------------------------------------------- /src/commCore_FreeEMS.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMCORE_FREEEMS_H 2 | #define COMMCORE_FREEEMS_H 3 | 4 | #include "qt4application.h" 5 | #include "commthread.h" 6 | 7 | 8 | #endif // COMMCORE_FREEEMS_H 9 | -------------------------------------------------------------------------------- /src/commthread.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #ifndef COMM_THREAD_H 21 | #define COMM_THREAD_H 22 | 23 | /** 24 | commthread handles all communication with the plugged device 25 | 26 | @author marcos chaparro 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include "qextserialport.h" 38 | 39 | //#include "commCore_FreeEMS.h" 40 | 41 | #include "FreeEMS.h" 42 | 43 | #define MAPsourced 0 44 | #define TPSsourced 1 45 | 46 | class aPacket 47 | { 48 | public: 49 | aPacket(); 50 | int setPacket(QByteArray); 51 | QByteArray getPacket(); 52 | void setHeaderAckFlag(bool); 53 | bool hasHeaderAckFlag(); 54 | void setHeaderLengthFlag(bool); 55 | bool hasHeaderLengthFlag(); 56 | void setPayloadID(unsigned int); 57 | unsigned int getPayloadID(); 58 | void setPayload(QByteArray payload); 59 | QByteArray getPayload(); 60 | void setPayloadLength(int length); 61 | unsigned int getPayloadLength(); 62 | int getCalculatedPayloadLength(); 63 | // unsigned char checksum(QByteArray data); 64 | int check(); 65 | void setChecksum(); 66 | void buildPacket(); 67 | void addEscape(); //to send through rs232 68 | int removeEscape(); //to be parsed after rs232 69 | 70 | private: 71 | unsigned char headerFlags; 72 | unsigned char checksum; 73 | unsigned int payloadID; 74 | unsigned int payloadAddress; 75 | unsigned int payloadLength; 76 | QByteArray payload; 77 | QByteArray fullPacket; 78 | 79 | }; 80 | 81 | struct serialPorts 82 | { 83 | QString name; 84 | int serialPortBaudRate; 85 | int serialPortParity; 86 | int dataBits; 87 | int stopBits; 88 | }; 89 | 90 | class commThread : public QThread 91 | { 92 | Q_OBJECT 93 | public: 94 | commThread();//QObject* parent = 0); 95 | bool openPort(); 96 | void run(); 97 | //needed before run() 98 | void setPort(serialPorts portAddress); 99 | bool burnFlash(QString fileName); 100 | //needed before run() too 101 | void setTarget(QString target) 102 | { 103 | hardwareTarget = target; 104 | } 105 | //puede acceder a todos los datos recibidos desde aqui 106 | int getChannel(int channel); 107 | statistic_t* getStatistics(){return &communicationStatistics;}; 108 | QextSerialPort * getQextSerialPort(){return serial;}; 109 | bool isOnline(){return online;}; 110 | void replayLog(QString fileName); 111 | void startLogging(); 112 | void saveLog(QString filename); 113 | //bool isSerial(); 114 | double getFChannel(int channel); 115 | 116 | enum channelList{RPM,MAP,VE,FUEL,DUTY,FuelAdvance,IgnAdvance,waterTemp,airTemp,DWELL,THROTTLE,LAMBDA}; 117 | 118 | public slots: 119 | 120 | void readSerialPort(); 121 | void sendFile(); 122 | // bool burnAcachoOfFlash(); 123 | 124 | /*FreeEMS stuff */ 125 | void getInterfaceVersion(); 126 | void getFirmwareVersion(); 127 | void adjustMainTable(); 128 | void decodeFreeEMSPacket(QByteArray buffer); 129 | void sendFreeEMSDatalogRequest(); 130 | 131 | signals: 132 | void packetArrived(QByteArray); 133 | 134 | private: 135 | void read_FreeEMS_data(); 136 | void read_PIC_data(); 137 | void process_line(QByteArray line,int i); 138 | bool online; 139 | 140 | QVariant channel[20]; //as big as you want 141 | QByteArray buffer, auxiliarByteArray; 142 | serialPorts serialPort; 143 | QextSerialPort *serial; 144 | QFile *logFile; 145 | QTimer *readTimer; 146 | QTimer *sendTimer; 147 | QMutex mutex; 148 | QFile *tempLogFile; 149 | QString binaryFileName; 150 | bool isSerial; 151 | bool logging; 152 | QString hardwareTarget; 153 | int byteCounter; 154 | int available; 155 | char logbuffer[4]; 156 | 157 | statistic_t communicationStatistics; 158 | 159 | union transformer 160 | { 161 | unsigned char byte[2]; 162 | int entero; 163 | }bytes_to_int,VEtable[12][21]; 164 | struct degreeConverter 165 | { 166 | unsigned char byte[2]; 167 | float angle; 168 | }bytes_to_degree,IgnTable[12][21],fuelAdv[12]; 169 | 170 | union zocotroco_de_numeros 171 | { 172 | unsigned char partido[12][21][2]; 173 | char plain[504]; 174 | }plaindataVE,plaindataIgn; 175 | 176 | struct estructura 177 | { 178 | unsigned int cylinders; 179 | //cm 180 | unsigned int displacement; 181 | unsigned int fuelCut;//rpm 182 | unsigned int idleRPM; 183 | unsigned int launchRPM; 184 | unsigned int injSize;//cm/min 185 | //us 186 | unsigned int deadTime; 187 | 188 | unsigned char accel_pump_source; 189 | unsigned char accel_pump_threshold; 190 | unsigned char accel_pump_decay; 191 | unsigned char accel_pump_enrich_factor; 192 | 193 | float tempCorr[13]; //enrich % 194 | //float dwell; 195 | 196 | unsigned int nitrousRPM; 197 | unsigned int nitrousMAP; 198 | unsigned int nitrousTPS; 199 | float nitrousStage1Flow; 200 | float nitrousStage2Flow; 201 | float nitrousStage3Flow; 202 | float nitrousStage1Retard; 203 | float nitrousStage2Retard; 204 | float nitrousStage3Retard; 205 | //boost ctrl 206 | }confParameter; 207 | }; 208 | #endif 209 | -------------------------------------------------------------------------------- /src/ecumanager.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=ECUmanager 4 | Comment=Engine Management System GUI 5 | Comment[es]=Interfaz gráfica para el control de sistemas de inyección electrónica 6 | GenericName=Tuning Application 7 | Exec=ecumanager 8 | Terminal=false 9 | Type=Application 10 | Icon=ecumanager-icon.xpm 11 | Categories=Utility;Science;Engineering; 12 | StartupNotify=true 13 | -------------------------------------------------------------------------------- /src/firm_updater.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #include 22 | 23 | upgrade::upgrade (QextSerialPort *serialreferenced,const QString *fileName) 24 | { 25 | serial = serialreferenced; 26 | serial->setRts(1); 27 | fileName = 0; 28 | } 29 | 30 | 31 | void upgrade::loadFlashData(int data) 32 | { 33 | /* Command to send: 34 | 0 1 0 0 0 35 | */ 36 | sendBit(0); 37 | sendBit(1); 38 | sendBit(0); 39 | sendBit(0); 40 | sendBit(0); 41 | 42 | //now, send data 43 | 44 | sendBit(0); //start 45 | for(int i=0;i<14;++i) 46 | sendBit(data & (1<setRts(1); 74 | serial->setDtr(bit); //data 75 | serial->setRts(0); //captures on clock's falling edge 76 | } 77 | -------------------------------------------------------------------------------- /src/firm_updater.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | #ifndef UPDATER_H 21 | #define UPDATER_H 22 | 23 | #include 24 | 25 | #include 26 | //RTS clock 27 | //DTR data 28 | 29 | class upgrade 30 | { 31 | public: 32 | upgrade(QextSerialPort *,const QString *); 33 | void loadFlashData(int data); 34 | void incrAddress(); 35 | void erase_program(); 36 | 37 | private: 38 | //void loadFlash(); 39 | void sendBit(bool bit); 40 | 41 | QTimer *timer; 42 | QextSerialPort *serial; 43 | }; 44 | #endif 45 | -------------------------------------------------------------------------------- /src/gmdb2.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * logo_xpm[] = { 3 | "93 73 16 1", 4 | " c None", 5 | ". c #B2B2B2", 6 | "+ c #C2C2C2", 7 | "@ c #848484", 8 | "# c #929292", 9 | "$ c #FFFC10", 10 | "% c #E2E2E2", 11 | "& c #D2D2D2", 12 | "* c #A2A2A2", 13 | "= c #6D6D6D", 14 | "- c #3A3A3A", 15 | "; c #F3F164", 16 | "> c #FFFFFF", 17 | ", c #F4F4F4", 18 | "' c #ECEB95", 19 | ") c #FAF86B", 20 | " + ", 21 | " .#+#. ", 22 | " +@.$$$.@+ ", 23 | " +**%$$$$$@-#+ ", 24 | " *#&$$$$$+=*.-=. ", 25 | " +#+$$$$$%#@&$$=-@+", 26 | " +#.$$$$$%*=+$$+=#@*+", 27 | " +**%$$$$$.=*$$&#@&#** ", 28 | " **&$$$$$+=*$$$##*==*+* ", 29 | " +=+$$$$$%@=$>).=*#-+,&=+ ", 30 | " +**$$$$$%*=.>>+#@*#-#>.@+ ", 31 | " +#*%$$$$$.=.$$&@#*@*+=>.# ", 32 | " .*&$$$$$&=#;$$*@*#@'$=%&@ ", 33 | " +@+$$$$$%@@;$$.=**@&$$**,#+ ", 34 | " +#.$$$$$$*=.$$+##*@.,&$&=,.. ", 35 | " +#.%$$$$$.=.$$;@#*@.%&@#=-&%@ ", 36 | " .@&$$$$$&=#$$$*=.#@'$@@%%==*=+ ", 37 | " .*.$$$$$&#@&$$.##*@.$$@-*.#+ ++ ", 38 | " ++ +@*$$$$$$#=.$$+=##@*$$$+@,-. ", 39 | " +****#* *#&$$$$$.=*$$;@@*@#'$$+.=,+* ", 40 | " +***#@*%+-. .@+$$$$$&@#$$;*=.*=&$$'@##-*# ", 41 | " +.*#------+.-*+ +=@+ +#.$$$$$%#@+$$.@#.=-@#+*=&,.##+ ", 42 | " .**--*%$$$*-&*=-=.@#.*.#.%$$$$$#=+$$+=**@==+%*---##+ ", 43 | " +@.=-@$$$$$$$@->+.%$..%==%$$$$$+=*$$;#@.@*+-#&#. +## ", 44 | " +**@--&$$$$$$$$&-%$$$$*-@+$$$$$&##&$$*@###&,=%@=+ ", 45 | " **#--.$$$$$$$$$$$-+$$$$%.$$$$$$@=+$$.@*#@+$$**>#+ ", 46 | " .*.=-#$$$$$$$$$$$$$=+$$$$$$$$$$.=.$$'##.@*$$$%=,.. ", 47 | " +#.=-=$$$$$$$$$$$$$$$=+$$$$$$$$+=#$$'#@.@@$$$$$=+,@ ", 48 | " .#@--&$$$$$$$$$$$$$$$$-+$$$$$$&@@&$$*@##@+$$$$&@=#@+ ", 49 | " ##--.$$.-*$$$$$$$$$$$$$-.$$$$$@@$$$.=*#@+$$$$$#@&%-# ", 50 | " *#-@$$&@#+#$$$$$$$$$$$$$=.$$$+=.$$'@#.@*$$$$$$#-.+@+ ", 51 | " *@-*$$#@&$&#$$$$$$$$$$$$$=.$$#@'$&#####%$$$$$$+@,-* ", 52 | " +=-.$*=+$$$+@$$$$$$$$$$$$$=+%=*$'@@.##&$$$$$$$$@%&* ", 53 | " @-@$##$$$$*=@$$$$$$$$$$$$$===+&#=..@.$$$$$$$$$@@,*+ ", 54 | " .=-$*@$$$+=++#$$$$$$$$$$$$+--#@#++@*$$$$$$$$$*@@-=. ", 55 | " +@-&&=$$$+=+ +#$$$$$$$$$$$*-=.+&.@#%$$$$$$$$+=.,+@* ", 56 | " *-=$@;$$&= +#$$$$$$$$$$%=%,*==+%$$$$$$$$$*--*#+ ", 57 | " +@-&$#*;$=+ +#$$$$$$$$$$$==-#+#$$$$$$$$$+=*,-- ", 58 | " +--$$$*#=* +#$$$$$$$$$$$+*-+&#$$$$$$$+@#%+*. ", 59 | " *-#$$$$$*=. +#$$$$$$$$$$$$$-.&#$$$$$%@@&,#*+ ", 60 | " +=-&$$$$$$$*@+ +@$$$$$$$$$$$$$-.&@$$$+*=+%.#+ ", 61 | " *-=$$$$$$$$$%##*#$$$$$$$$$$$$$-*&#$+=--*+#+ ", 62 | " @-.$$$$$$$$$$$+#$$$$$$$$$$$$$$-.&-@#&@'*-+ ", 63 | " .@-$+=.$$$$$$$$$$$$$$$$$$$$$$$$-.$@&$$@$$*+ ", 64 | " *-@$=%#@&$$$$$$$$$$$$$$$$$$$$$$-*$$$$'=+$.+ ", 65 | " +#-'.#$$+-@+$$$$$$$$$$$$$$$$$$$$-*$$$.=*@*#+ ", 66 | " +--$@&$$*++##%$$$$$$$$$$$$$$$$$$-*$$=#%$$.-+ ", 67 | " #-.&@$$%# +=$$$$$$$$$$$$$$$$$$-*$=+$$$+#. ", 68 | " +=-'*.$$.. +@$$$*.$$$$$$$$$$$$$-.#*$$$.# ", 69 | " #-@$@$$$#+ @&$$+=@$$$$$$$$$$$$$-#@$$$.* ", 70 | " +=-&&@$$&@ .*$$$=&#$$$$$$$$$$$$+-=&$$+# ", 71 | " .=-$#+$$*+ @%$$*.%#$$$$$$$$$$$$#-@$$$@+ ", 72 | " .-@$=$$$= .+$$%=$%#$$$$$$$$$$$$--.$$.* ", 73 | " .-.$@$$+* +@$$$#.$%#$$$$$$$$$$$+-=%$$#+ ", 74 | "+*-''@$$*+ @+$$&@$$%@$$$$$$$$$$%-=*$$%# ", 75 | "+@-$$=$$@+ +#$$$@&$$+-$$$$$$$$$$@-=%$$.+ ", 76 | "+#-%$#.$#+ #%$$.#$$$==$$$$$$$$$+-=.$$%# ", 77 | "+*-+$$=%*+.*$$$=$$$.##$$$$$$$$%-=@$$$*+ ", 78 | "+.-=$$+=%==%$$#*$$$@ #%$$$$$$+-==$$$+@ ", 79 | " .+-&$$##-.$$&@$$$*+ #%$$$$$@-==%$$%@ ", 80 | " *+=-$$$@#$$$#+$$&# #$$$$+--@=%$$$#+ ", 81 | " @%-=$$$$$$&=$$$@+ =.$$%=-@@@$$$$#+ ", 82 | " +*&-*$$$$$=%$$+=.@'$$@--*@*$$$&@+ ", 83 | " *+*-%$$$.*$$$-=+$$*--@#*%$$$.#+ ", 84 | " @%=-$$$*@+#=*$$&--#@@%$$$+@. ", 85 | " +#%-=$$$*@*$$'@-=*=.$$$&.#+ ", 86 | " +.&-.$$$$$$@-=#@*$$$$*#+ ", 87 | " *+*-*$$$*--#@#%$$$+@+ ", 88 | " @&*-----##@&$$$&#. ", 89 | " +@+%+*.*@.$$$%.#+ ", 90 | " +*==.*.$$$$.*+ ", 91 | " +@#&$$$.@+ ", 92 | " +####. "}; 93 | -------------------------------------------------------------------------------- /src/icons/amarok_album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_album.png -------------------------------------------------------------------------------- /src/icons/amarok_burn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_burn.png -------------------------------------------------------------------------------- /src/icons/amarok_burn_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_burn_big.png -------------------------------------------------------------------------------- /src/icons/amarok_configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_configure.png -------------------------------------------------------------------------------- /src/icons/amarok_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_pause.png -------------------------------------------------------------------------------- /src/icons/amarok_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_play.png -------------------------------------------------------------------------------- /src/icons/amarok_visualizations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/amarok_visualizations.png -------------------------------------------------------------------------------- /src/icons/ecumanager-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/ecumanager-icon.png -------------------------------------------------------------------------------- /src/icons/editcopy.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *editcopy[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 155 2", 5 | " c black", 6 | ". c #191000", 7 | "X c #221700", 8 | "o c #2E2300", 9 | "O c #452E00", 10 | "+ c #433200", 11 | "@ c #493000", 12 | "# c #553800", 13 | "$ c #5D4600", 14 | "% c #6B5000", 15 | "& c #724B00", 16 | "* c #7D5E00", 17 | "= c #6E694F", 18 | "- c #7E795F", 19 | "; c #865900", 20 | ": c #8A5C00", 21 | "> c #8B6800", 22 | ", c #936200", 23 | "< c #926D00", 24 | "1 c #926B1A", 25 | "2 c #967000", 26 | "3 c #9B721D", 27 | "4 c #9B7625", 28 | "5 c #9E792A", 29 | "6 c #A47C00", 30 | "7 c #AA7D00", 31 | "8 c #A1761A", 32 | "9 c #A57816", 33 | "0 c #A4791D", 34 | "q c #AD8200", 35 | "w c #B28500", 36 | "e c #AE8530", 37 | "r c #B99626", 38 | "t c #97906D", 39 | "y c #B18D48", 40 | "u c #B49049", 41 | "i c #B89542", 42 | "p c #BA9C4D", 43 | "a c #BD9E52", 44 | "s c #BFA053", 45 | "d c #B8AE78", 46 | "f c #BEB47E", 47 | "g c #C49300", 48 | "h c #C89600", 49 | "j c #C19D2C", 50 | "k c #C1A43F", 51 | "l c #C09E4E", 52 | "z c #CFB457", 53 | "x c #C9B159", 54 | "c c #CAB573", 55 | "v c #D4BF7C", 56 | "b c #FFDF62", 57 | "n c #FFE064", 58 | "m c #FFE16D", 59 | "M c #FFE372", 60 | "N c #FFE479", 61 | "B c #A19D8E", 62 | "V c #ABA89A", 63 | "C c #BEB580", 64 | "Z c #BDB488", 65 | "A c #B8B496", 66 | "S c #AEADAA", 67 | "D c #B3AFA1", 68 | "F c #BCBBB6", 69 | "G c #BFBFB9", 70 | "H c #C0B680", 71 | "J c #C4BA85", 72 | "K c #C6BD8B", 73 | "L c #CBB589", 74 | "P c #C8BE88", 75 | "I c #C3BC90", 76 | "U c #CBC18C", 77 | "Y c #CCC493", 78 | "T c #D7CB8C", 79 | "R c #DAC786", 80 | "E c #D8C789", 81 | "W c #DAC98B", 82 | "Q c #D0C690", 83 | "! c #D4CA94", 84 | "~ c #D4CC9B", 85 | "^ c #D8CE98", 86 | "/ c #DCD29C", 87 | "( c #C6C3B7", 88 | ") c #C8C6BE", 89 | "_ c #D5C5A5", 90 | "` c #DBC8A1", 91 | "' c #DBD4A2", 92 | "] c #DED9AE", 93 | "[ c #D9D5B1", 94 | "{ c #E0CC82", 95 | "} c #E8D98B", 96 | "| c #E8D991", 97 | " . c #E1D7A1", 98 | ".. c #E5DBA5", 99 | "X. c #E4DCAB", 100 | "o. c #E8DDAA", 101 | "O. c #E1DCB2", 102 | "+. c #E1DCB8", 103 | "@. c #FFE683", 104 | "#. c #FFE78A", 105 | "$. c #FFE885", 106 | "%. c #FFE88D", 107 | "&. c #FFE992", 108 | "*. c #FFEC9D", 109 | "=. c #FFF09F", 110 | "-. c #ECE2AC", 111 | ";. c #E5E0B6", 112 | ":. c #E5E1B8", 113 | ">. c #EBE4B6", 114 | ",. c #EAE5BC", 115 | "<. c #F0E5A8", 116 | "1. c #FFEDA3", 117 | "2. c #FFEDA9", 118 | "3. c #F1E8B8", 119 | "4. c #FFEFB1", 120 | "5. c #FFF1A5", 121 | "6. c #FFF2AD", 122 | "7. c #FFF2B4", 123 | "8. c #FFF2BC", 124 | "9. c #CAC8C2", 125 | "0. c #D6D4CB", 126 | "q. c #DFDAC5", 127 | "w. c #D4D2D0", 128 | "e. c #E0D7C5", 129 | "r. c #E4DAC3", 130 | "t. c #E8DEC7", 131 | "y. c #E0DFD3", 132 | "u. c #E6E2C2", 133 | "i. c #E8E1C5", 134 | "p. c #EBE3CB", 135 | "a. c #EEE9C2", 136 | "s. c #E8E6DC", 137 | "d. c #F3EDC3", 138 | "f. c #F2EDCB", 139 | "g. c #F7F2CD", 140 | "h. c #FFF3C3", 141 | "j. c #FFF4CA", 142 | "k. c #FFF8C5", 143 | "l. c #FFF8CD", 144 | "z. c #FDF5D2", 145 | "x. c #FFF7D8", 146 | "c. c #FFF9D4", 147 | "v. c #FFF9DC", 148 | "b. c #E9E8E7", 149 | "n. c #F3EFE3", 150 | "m. c #F2F0E3", 151 | "M. c #F4F2EA", 152 | "N. c #FBF7E6", 153 | "B. c #FEF9E3", 154 | "V. c #FFFBEC", 155 | "C. c #F4F4F3", 156 | "Z. c #F8F7F6", 157 | "A. c #FEFCF4", 158 | "S. c #FEFEFC", 159 | "D. c None", 160 | /* pixels */ 161 | "D.D.D.D.D.D.D.D.D.D.D.D.h g g g g g g g g g g w * D.D.D.D.D.", 162 | "D.D.D.D.D.D.D.D.D.D.D.D.g z.z.g.g.g.g.g.g.z.g.R 2 D.D.D.D.D.", 163 | "D.D.D.D.D.D.D.D.D.D.D.D.g z.d.3.3.3.3.3.3.>.f.g.z < D.D.D.D.", 164 | "D.D.D.D.D., : ; , : : : 7 a i a R -.-.-.-.' m.u.g.j > D.D.D.", 165 | "D.D.D.D., u y y L L L L ` t.t.e.e v -.-.-.Y b.S.+.d.q D.D.D.", 166 | "D.D.D.D., S.S.S.S.S.S.S.S.Z.b.S.e.i W o.o.K w.S.A.u.q D.D.D.", 167 | "D.D.D.D., S.S.S.A.S.S.S.S.M.w.S.S._ a E ..K 0.S.S.q.7 D.D.D.", 168 | "D.D.D.D., S.A.V.A.A.A.V.A.n.9.S.S.C._ a ..Y t = - A 6 D.D.D.", 169 | "D.D.D.D., A.A.V.A.V.V.V.A.n.9.S.S.S.Z.3 ' ' K Z A ] 7 D.D.D.", 170 | "D.D.D.D., A.V.B.V.V.B.V.V.n.( F S S G 5 ' | / / X.f.q D.D.D.", 171 | "D.D.D.D., A.V.x.B.x.V.B.N.B.e.D B V ) 3 / / ^ ^ ' a.q D.D.D.", 172 | "D.D.D.D., V.N.N.B.B.B.v.v.N.z.p.i.p.n.8 ^ / ! Q ' a.q D.D.D.", 173 | "D.D.D.D., B.B.x.v.x.z.j.j.x.z.z.c.B.B.0 ! ! ! ^ ' ,.q D.D.D.", 174 | "D.D.D.D., B.h.h.z.z.x.x.z.z.z.h.j.x.v.0 ! Q Y ! ~ ,.q D.D.D.", 175 | "D.D.D.D., v.c.k.x.h.j.j.j.z.8.h.k.j.v.0 U T U U ~ ,.q D.D.D.", 176 | "D.D.D.D., v.k.z.h.h.h.j.8.j.h.h.j.k.v.0 U U U U Y ;.q D.D.D.", 177 | "D.D.D.D., x.h.8.8.h.j.8.8.4.h.4.8.h.x.8 P H P P ~ ;.q D.D.D.", 178 | "D.D.D.D., v.h.4.4.8.8.4.1.z.h.8.4.h.c.8 H J H J Y ;.q D.D.D.", 179 | "D.D.D.D., c.2.z.j.4.*.1.1.8.2.2.*.2.l.8 J J H J U ] q D.D.D.", 180 | "D.D.D.D., l.h.2.4.4.1.%.1.&.2.4.8.7.k.8 f d f H U ] q D.D.D.", 181 | "D.D.D.D., z.8.#.1.4.1.*.1.1.1.*.N 4.l.8 f f C K ~ :.q D.D.D.", 182 | "D.D.D.D., 8.&.4.#.%.4.&.@.#.%.%.&.2.l.8 K K Y ~ ] ,.6 D.D.D.", 183 | "D.D.D.D., h.&.#.*.1.1.%.N N #.&.*.1.l.0 ' ] T x r 6 % D.D.D.", 184 | "D.D.D.D., 4.4.%.*.#.b &.N M b M 2.1.k.9 k 7 > $ o D.D.D.", 185 | "D.D.D.D., 7.&.N 5.&.N @.*.b N M N =.k., + D.D.D.", 186 | "D.D.D.D., 6.N N M M &.#.N 2.$.%.8.6.<.& D.D.D.D.D.", 187 | "D.D.D.D., 5.&.7.n $.m M 1.7.7.o.c 5 & @ D.D.D.D.D.D.D.D.D.", 188 | "D.D.D.D., 7.*.m %.=.&.7.} p 1 % # X D.D.D.D.D.D.D.D.D.D.", 189 | "D.D.D.D., 6.5.5.5.| a 1 & + . D.D.D.D.D.D.D.D.D.D.", 190 | "D.D.D.D., 6.-.a 1 & O . D.D.D.D.D.D.D.D.D.D.D.D.", 191 | "D.D.D.D.; : % O . D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.", 192 | "D.D.D.D. D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D." 193 | }; 194 | -------------------------------------------------------------------------------- /src/icons/editcut.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *editcut[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 214 2", 5 | " c #000000", 6 | ". c #0B0B0B", 7 | "X c #181300", 8 | "o c #1D190B", 9 | "O c #131313", 10 | "+ c #1B1B1B", 11 | "@ c #211E11", 12 | "# c #26231A", 13 | "$ c #2A2513", 14 | "% c #2E2912", 15 | "& c #2E2A19", 16 | "* c #372E0B", 17 | "= c #302A12", 18 | "- c #312C1B", 19 | "; c #3A320F", 20 | ": c #3C3415", 21 | "> c #3C351B", 22 | ", c #232323", 23 | "< c #2B2922", 24 | "1 c #2C2C2C", 25 | "2 c #302E26", 26 | "3 c #353120", 27 | "4 c #3F3B2D", 28 | "5 c #313131", 29 | "6 c #3A3A3A", 30 | "7 c #423814", 31 | "8 c #493E17", 32 | "9 c #413D2F", 33 | "0 c #423F32", 34 | "q c #4F4319", 35 | "w c #5C4A00", 36 | "e c #5F4F0D", 37 | "r c #514410", 38 | "t c #554813", 39 | "y c #4E472C", 40 | "u c #444136", 41 | "i c #4A483F", 42 | "p c #534B2B", 43 | "a c #504B37", 44 | "s c #514C3A", 45 | "d c #654F04", 46 | "f c #604F0B", 47 | "g c #665200", 48 | "h c #675509", 49 | "j c #6B5405", 50 | "k c #6C5807", 51 | "l c #6C590B", 52 | "z c #745B04", 53 | "x c #715D0A", 54 | "c c #7B5B02", 55 | "v c #625B3B", 56 | "b c #7E6815", 57 | "n c #6C643E", 58 | "m c #4D4B42", 59 | "M c #494949", 60 | "N c #504D43", 61 | "B c #54534C", 62 | "V c #515151", 63 | "C c #5D5B54", 64 | "Z c #656048", 65 | "A c #736A44", 66 | "S c #726C54", 67 | "D c #77725B", 68 | "F c #696968", 69 | "G c gray50", 70 | "H c #826203", 71 | "J c #806609", 72 | "K c #836907", 73 | "L c #8D6A03", 74 | "P c #9A6F00", 75 | "I c #9B7005", 76 | "U c #9E730E", 77 | "Y c #9C7511", 78 | "T c #85732C", 79 | "R c #88783B", 80 | "E c #AE7C00", 81 | "W c #A87B13", 82 | "Q c #847B53", 83 | "! c #827D64", 84 | "~ c #9C862E", 85 | "^ c #A98A1F", 86 | "/ c #B28D0A", 87 | "( c #B88D00", 88 | ") c #B2821A", 89 | "_ c #B18E1B", 90 | "` c #B3941C", 91 | "' c #A88E2C", 92 | "] c #A28C36", 93 | "[ c #AE9224", 94 | "{ c #89815E", 95 | "} c #87826D", 96 | "| c #858174", 97 | " . c #888370", 98 | ".. c #8E8A7D", 99 | "X. c #928C71", 100 | "o. c #A28E44", 101 | "O. c #AA9F74", 102 | "+. c #B9A456", 103 | "@. c #BDA85B", 104 | "#. c #B2A068", 105 | "$. c #C28700", 106 | "%. c #CC8E00", 107 | "&. c #C29A00", 108 | "*. c #C4962F", 109 | "=. c #CCA100", 110 | "-. c #D6A800", 111 | ";. c #D1AC1B", 112 | ":. c #DDB31A", 113 | ">. c #D2A922", 114 | ",. c #D4AE2B", 115 | "<. c #DBA12E", 116 | "1. c #DBA433", 117 | "2. c #DDB428", 118 | "3. c #D2B23B", 119 | "4. c #E6A200", 120 | "5. c #E8A509", 121 | "6. c #EAAF00", 122 | "7. c #EFAC1E", 123 | "8. c #F5A100", 124 | "9. c #FFAD02", 125 | "0. c #FCAF0D", 126 | "q. c #FCB005", 127 | "w. c #FFB60C", 128 | "e. c #FFBD00", 129 | "r. c #FFBD16", 130 | "t. c #E3B432", 131 | "y. c #E8BF3C", 132 | "u. c #F6BE2F", 133 | "i. c #C6A949", 134 | "p. c #D9A948", 135 | "a. c #D8AB52", 136 | "s. c #DBBA45", 137 | "d. c #C5B162", 138 | "f. c #ECB74D", 139 | "g. c #EFB841", 140 | "h. c #EFBE4A", 141 | "j. c #EABA55", 142 | "k. c #FDC006", 143 | "l. c #FFC10B", 144 | "z. c #FFC800", 145 | "x. c #FFC90D", 146 | "c. c #FAC113", 147 | "v. c #FBC11C", 148 | "b. c #FDC910", 149 | "n. c #EDC233", 150 | "m. c #F5C32D", 151 | "M. c #FFC728", 152 | "N. c #F4C537", 153 | "B. c #F6C63A", 154 | "V. c #F5CB36", 155 | "C. c #FFD73D", 156 | "Z. c #E9C659", 157 | "A. c #EAC85A", 158 | "S. c #FFDA4B", 159 | "D. c #FFDD5D", 160 | "F. c #E9CD6B", 161 | "G. c #FFD560", 162 | "H. c #FFE06C", 163 | "J. c gray56", 164 | "K. c #959595", 165 | "L. c gray62", 166 | "P. c #A6A18A", 167 | "I. c #A8A69E", 168 | "U. c #AEA895", 169 | "Y. c #B3AC8F", 170 | "T. c #B8AF8B", 171 | "R. c #B4AD96", 172 | "E. c #B8B199", 173 | "W. c #A4A4A4", 174 | "Q. c #AAAAAA", 175 | "!. c #B0ADA3", 176 | "~. c #BBB6A3", 177 | "^. c #B1B1B1", 178 | "/. c #B9B9B6", 179 | "(. c #BBBBBA", 180 | "). c #C5BC9D", 181 | "_. c #C2BCA2", 182 | "`. c #C1BEB5", 183 | "'. c #D2C38E", 184 | "]. c #DCC78C", 185 | "[. c #C7C0A7", 186 | "{. c #C7C2AE", 187 | "}. c #C7C3B2", 188 | "|. c #C5C2B8", 189 | " X c #CAC6B6", 190 | ".X c #CBC9BE", 191 | "XX c #D9D3BB", 192 | "oX c #E6D08A", 193 | "OX c #E7DEBD", 194 | "+X c #ECDEB3", 195 | "@X c #FFF0B9", 196 | "#X c #C5C5C5", 197 | "$X c #CECCC7", 198 | "%X c #D0CEC5", 199 | "&X c #D0CFC8", 200 | "*X c #D2D1CB", 201 | "=X c #DBD6C5", 202 | "-X c #DBD7C9", 203 | ";X c #D3D3D1", 204 | ":X c #DBDBDB", 205 | ">X c #E5E1D6", 206 | ",X c #E5E3DA", 207 | ".9.U r . . , T B.*.x qX + , Q !.Q. . + 1 [ m.p.k . qXqXqXqX , u O.W.;X! + ", 244 | "4 8.j.` p 5 y ;.u.a.d % qXqXqXqXqXqX O , A P._., ", 245 | "1 x <.f.m.x.b.y.a.g ; qXqXqXqXqXqXqXqX + 0 v O ", 246 | " - h c W W W W z : qXqXqXqXqXqXqXqXqXqX . . ", 247 | " * e l l f X qXqXqXqXqXqXqXqXqXqXqXqXqX ", 248 | "qX qXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqX qX", 249 | "qXqXqX qXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqX", 250 | "qXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqX", 251 | "qXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXqX" 252 | }; 253 | -------------------------------------------------------------------------------- /src/icons/editpaste.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *editpaste[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 257 2", 5 | " c black", 6 | ". c #0D0900", 7 | "X c #191000", 8 | "o c #221700", 9 | "O c #2A1B00", 10 | "+ c #332200", 11 | "@ c #3E2900", 12 | "# c #3A2804", 13 | "$ c #4D3300", 14 | "% c #4B3E15", 15 | "& c #44391B", 16 | "* c #543800", 17 | "= c #5A3B00", 18 | "- c #4D4015", 19 | "; c #524E25", 20 | ": c #5A4F2C", 21 | "> c #524E3D", 22 | ", c #58562F", 23 | "< c #53503E", 24 | "1 c #5E623B", 25 | "2 c #634100", 26 | "3 c #684500", 27 | "4 c #6E4900", 28 | "5 c #614F11", 29 | "6 c #685416", 30 | "7 c #734C00", 31 | "8 c #784F00", 32 | "9 c #755B00", 33 | "0 c #7C5200", 34 | "q c #7C5A00", 35 | "w c #7B570F", 36 | "e c #69562F", 37 | "r c #786600", 38 | "t c #7F6A00", 39 | "y c #766300", 40 | "u c #60613F", 41 | "i c #7C6422", 42 | "p c #545143", 43 | "a c #54524B", 44 | "s c gray32", 45 | "d c #5D5D57", 46 | "f c #616641", 47 | "g c #67695D", 48 | "h c #6B734D", 49 | "j c #6C7553", 50 | "k c #616261", 51 | "l c #686A64", 52 | "z c #6B7162", 53 | "x c #727272", 54 | "c c #003DFF", 55 | "v c #0043FF", 56 | "b c #004BFF", 57 | "n c #0053FF", 58 | "m c #015AFF", 59 | "M c #0063FF", 60 | "N c #046DFF", 61 | "B c #0865FF", 62 | "V c #0378FF", 63 | "C c #1663FF", 64 | "Z c #1576FF", 65 | "A c #2678FF", 66 | "S c #6F7B84", 67 | "D c #77856D", 68 | "F c #7B8B75", 69 | "G c #0083FF", 70 | "H c #0197FF", 71 | "J c #0B92FF", 72 | "K c #1385FF", 73 | "L c #01A5FF", 74 | "P c #0DB5FF", 75 | "I c #3096FF", 76 | "U c #2DADFF", 77 | "Y c #2FBCFF", 78 | "T c #22C6FF", 79 | "R c #2AC5FF", 80 | "E c #30D0FF", 81 | "W c #38D5FF", 82 | "Q c #4493F1", 83 | "! c #5F83FF", 84 | "~ c #5F8AFF", 85 | "^ c #5290E4", 86 | "/ c #5F92FF", 87 | "( c #4CAAFE", 88 | ") c #40B8FF", 89 | "_ c #779DCB", 90 | "` c #6693E2", 91 | "' c #6290FF", 92 | "] c #649DFF", 93 | "[ c #71A6E5", 94 | "{ c #79A4FF", 95 | "} c #7FB3FF", 96 | "| c #68B8F3", 97 | " . c #42DCFF", 98 | ".. c #47E0FF", 99 | "X. c #58E9FF", 100 | "o. c #64C0EB", 101 | "O. c #6ADFEF", 102 | "+. c #825600", 103 | "@. c #845A00", 104 | "#. c #8B5C00", 105 | "$. c #905F00", 106 | "%. c #8C6103", 107 | "&. c #876807", 108 | "*. c #8A6111", 109 | "=. c #886E1B", 110 | "-. c #887600", 111 | ";. c #8C7A00", 112 | ":. c #936200", 113 | ">. c #986800", 114 | ",. c #926C22", 115 | "<. c #987A3F", 116 | "1. c #A07200", 117 | "2. c #A27511", 118 | "3. c #A97D15", 119 | "4. c #A77B14", 120 | "5. c #998712", 121 | "6. c #A68000", 122 | "7. c #A78F00", 123 | "8. c #AD8016", 124 | "9. c #AC9600", 125 | "0. c #BB8F00", 126 | "q. c #A99B2A", 127 | "w. c #B9A000", 128 | "e. c #B3A63C", 129 | "r. c #958D43", 130 | "t. c #988F44", 131 | "y. c #9A9346", 132 | "u. c #9F9948", 133 | "i. c #8B897C", 134 | "p. c #958F6F", 135 | "a. c #98937B", 136 | "s. c #A68443", 137 | "d. c #B08C41", 138 | "f. c #AF9462", 139 | "g. c #B39864", 140 | "h. c #B2A850", 141 | "j. c #BDB355", 142 | "k. c #C3972F", 143 | "l. c #C5A400", 144 | "z. c #CCAC00", 145 | "x. c #D7BB00", 146 | "c. c #CCA030", 147 | "v. c #CBB43E", 148 | "b. c #E4AD0C", 149 | "n. c #ECB600", 150 | "m. c #EDB900", 151 | "M. c #F2BB00", 152 | "N. c #C1B84C", 153 | "B. c #C1B757", 154 | "V. c #C5BB58", 155 | "C. c #C9BE5A", 156 | "Z. c #C2A978", 157 | "A. c #DFC000", 158 | "S. c #FDCB00", 159 | "D. c #F6C300", 160 | "F. c #FFD100", 161 | "G. c #FEDB00", 162 | "H. c #FFDF0E", 163 | "J. c #F5D500", 164 | "K. c #FBCD39", 165 | "L. c #FFE832", 166 | "P. c #FFE432", 167 | "I. c #CEC25C", 168 | "U. c #D7C648", 169 | "Y. c #DDC74B", 170 | "T. c #D0C55E", 171 | "R. c #D3C85F", 172 | "E. c #D5C960", 173 | "W. c #DDD264", 174 | "Q. c #E0CA4C", 175 | "!. c #E7D14E", 176 | "~. c #EFDA51", 177 | "^. c #F4D050", 178 | "/. c #F9D452", 179 | "(. c #FEDD53", 180 | "). c #E2D765", 181 | "_. c #E9DD69", 182 | "`. c #E6DD68", 183 | "'. c #FDDB6E", 184 | "]. c #FFEE4F", 185 | "[. c #FEE354", 186 | "{. c #FEEA55", 187 | "}. c #F7E153", 188 | "|. c #FFF056", 189 | " X c #ECE16A", 190 | ".X c #F1E56D", 191 | "XX c #F7EA6F", 192 | "oX c #F7EB70", 193 | "OX c #F9EC70", 194 | "+X c #FEF372", 195 | "@X c #979486", 196 | "#X c gray60", 197 | "$X c #969596", 198 | "%X c #8AA193", 199 | "&X c #82A89B", 200 | "*X c #8CAEA3", 201 | "=X c #86A7A9", 202 | "-X c #8BA2B1", 203 | ";X c #ACA580", 204 | ":X c #A5A291", 205 | ">X c #B3AF98", 206 | ",X c #B8B7AF", 207 | ".k.c.6 FXkXkXkXDXkXkXkXx i b.>.+ YXYXYXYXYXYXYXYXYXYX", 266 | "YXYXYX:.'.K.=.hX1X1X1X1X1X1X1Xd &.0.%.* 7 #.#.:.$.#.2 YXYXYX", 267 | "YXYXYX:./.M.%.$Xk k d s s s e w >.2.d.s.Z.9XrXlXxX0X7 YXYXYX", 268 | "YXYXYX:.^.M.1.: % % - % 5 6 &.GXIXIXPXPXPXPXPXLXIXIXg.3 YXYX", 269 | "YXYX#X:.^.m.v.y.r.r.r.r.h.h.2.IXPXPXKXKXPXKXHXxXUXIXIXf.4 YX", 270 | "YXYX#X:.^.m.Y.I.B.j.j.j.V.I.4.PXKXJXKXJXKXKXmXjXFXIXIXUX+. YX", 271 | "YXYX#X:.^.m.Y.E.I.j.j.j.I.R.8.PXKXSXJXJXJXSXnXeXDXIXIXUX<. YX", 272 | "YXYXYX:./.M.!.W.R.I.T.R.E.W.8.UXJXJXSXSXSXSXnXeX:X@Xi.X@X@X,X4 ", 274 | "YXYXYX:.(.S.}..X X X X X X X8.PXSXAXAXAXAXAXNXzXpXwXwXjX7 ", 275 | "YXYXYX:.(.S.[.OXOXOXoXoXt.; O s a p p p p a.AXMXvXaXzXGX+. ", 276 | "YXYXYX:.(.S.[.+X+X+XOX+X; 7X2X] / / ~ ! 2Xp MXNXNXNXSXKX+. YX", 277 | "YXYXYX:.(.F.|.+X+X+X+X+Xy., _ A m b v c ! p MXMXgXMXAXKX+. YX", 278 | "YXYXYX:.(.F.|.+X+X+X+X+X+Xj.& ^ B n b v ' < gXMXgXgXNXKX+. YX", 279 | "YXYXYX:.(.F.U.W.+X+X+X+X).y.g Q N m n b ~ < gXgXgXgXAXJXq YX", 280 | "YXYXYX:.[.l.j j y.I.j.r.1 =X( K N M m b ~ < gXgXgXgXNXKX+. YX", 281 | "YXYXYX:.[.t 5X4X&XD F =X| U J G V Z A C / < fXgXgXgXMXHX+. YX", 282 | "YXYXYX:.[.l.h 3XX...W T P L H K I [ S ` { < fXfXfXfXMXKX+. YX", 283 | "YXYXYX:.[.G.e.1 *XO...E R Y Y | -Xd Z.k 6X> fXfXfXfXBXJX+. YX", 284 | "YXYXYX:.[.G.{.`.u.1 F &X*X%Xz l a.uXfXp.> p.sXsXsXfXBXJX+. YX", 285 | "YXYXYX:.{.G.|.+X+X XN.q.5.7.q cXvXsXsXsXsXsXsXsXsXsXBXKX+. YX", 286 | "YXYXYX:.|.G.].|.L.H.G.G.G.A.1.JXvXsXsXsXsXsXsXsXfXdXCXPX+. YX", 287 | "YXYXYX:.{.G.G.G.G.G.x.w.;.t :.HXdXsXsXsXsXsXdXvXBXZXLXtX= YX", 288 | "YXYXYX:.{.G.J.x.9.;.r 9 q 0 #.KXvXsXaXsXvXBXCXHXiXg.*.= O YX", 289 | "YXYXYX:.L.9.-.y 9 q 0 = + #.HXbXdXbXVXZXcX8X,.3 $ . YX", 290 | "YXYXYX%.z.9 q 7 * o $.PXZXmXmX0Xs.0 $ X YX", 291 | "YXYXYX8 0 = o :.IXpXg.*.= O YXYXYXYX", 292 | "YXYXYX YXYX@.#.2 @ . YXYXYXYXYXYX", 293 | "YXYXYX YXYXYXYXYX YXYXYXYXYXYXYXYXYX", 294 | "YXYXYXYXYXYXYXYXYXYXYXYXYXYX YXYXYXYXYXYXYXYXYXYXYXYX" 295 | }; 296 | -------------------------------------------------------------------------------- /src/icons/filenew.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *filenew[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 178 2", 5 | " c black", 6 | ". c #191000", 7 | "X c #221700", 8 | "o c #452E00", 9 | "O c #4A3100", 10 | "+ c #4E3400", 11 | "@ c #553800", 12 | "# c #604000", 13 | "$ c #6A4600", 14 | "% c #6D4800", 15 | "& c #704A00", 16 | "* c #724C00", 17 | "= c #744C00", 18 | "- c #764E00", 19 | "; c #785000", 20 | ": c #805500", 21 | "> c #815500", 22 | ", c #835700", 23 | "< c #865900", 24 | "1 c #875A00", 25 | "2 c #8A5B00", 26 | "3 c #8A5C00", 27 | "4 c #8B5C00", 28 | "5 c #8C5D00", 29 | "6 c #8D5D00", 30 | "7 c #8F5E00", 31 | "8 c #805911", 32 | "9 c #905F00", 33 | "0 c #906000", 34 | "q c #926000", 35 | "w c #946200", 36 | "e c #956300", 37 | "r c #966400", 38 | "t c #976400", 39 | "y c #956913", 40 | "u c #926C22", 41 | "i c #9B7732", 42 | "p c #B18D48", 43 | "a c #B28E49", 44 | "s c #B4904A", 45 | "d c #BAA373", 46 | "f c #A1A195", 47 | "g c #ABAB9F", 48 | "h c #ADADAB", 49 | "j c #AFAFAB", 50 | "k c #B3B3A6", 51 | "l c #BCBCB8", 52 | "z c #BFBFBC", 53 | "x c #CBB489", 54 | "c c #CBB58A", 55 | "v c #CDB78B", 56 | "b c #CAB891", 57 | "n c #C9BB9E", 58 | "m c #CEBEA2", 59 | "M c #C6C6BC", 60 | "N c #D9C8A8", 61 | "B c #E8E1BA", 62 | "V c #E8E1BB", 63 | "C c #FEFFA1", 64 | "Z c #FFFFA0", 65 | "A c #FEFFA3", 66 | "S c #FEFFA4", 67 | "D c #FEFFA6", 68 | "F c #FEFFA8", 69 | "G c #FEFFA9", 70 | "H c #FFFFA8", 71 | "J c #FEFFAA", 72 | "K c #FEFFAB", 73 | "L c #FFFFAB", 74 | "P c #FEFFAC", 75 | "I c #FFFFAC", 76 | "U c #FEFFAE", 77 | "Y c #FEFFAF", 78 | "T c #FEFFB0", 79 | "R c #FEFFB1", 80 | "E c #FFFFB0", 81 | "W c #FEFFB4", 82 | "Q c #FEFFB5", 83 | "! c #FFFFB4", 84 | "~ c #FEFFB8", 85 | "^ c #FEFFB9", 86 | "/ c #FFFFB8", 87 | "( c #FFFFB9", 88 | ") c #FEFFBB", 89 | "_ c #FFFFBA", 90 | "` c #FEFFBD", 91 | "' c #FFFFBD", 92 | "] c #FEFFBE", 93 | "[ c #FFFFBE", 94 | "{ c #C8C8C1", 95 | "} c #CACAC4", 96 | "| c #CBCBC6", 97 | " . c #DBD2C1", 98 | ".. c #DEDFCF", 99 | "X. c #D4D4D1", 100 | "o. c #E1D5C1", 101 | "O. c #E3D9C3", 102 | "+. c #E5DCCC", 103 | "@. c #E8E8D3", 104 | "#. c #ECECD7", 105 | "$. c #F0EBDA", 106 | "%. c #FEFFC2", 107 | "&. c #FEFFC3", 108 | "*. c #FFFFC2", 109 | "=. c #FEFFC7", 110 | "-. c #FFFFC7", 111 | ";. c #FEFFCB", 112 | ":. c #FEFFCC", 113 | ">. c #FFFFCC", 114 | ",. c #FEFFCE", 115 | "<. c #FEFFD0", 116 | "1. c #FEFFD1", 117 | "2. c #FFFFD0", 118 | "3. c #FFFFD1", 119 | "4. c #FFFFD3", 120 | "5. c #FEFFD5", 121 | "6. c #FFFFD5", 122 | "7. c #FEFFD6", 123 | "8. c #FEFFD7", 124 | "9. c #FFFFD6", 125 | "0. c #FFFFD8", 126 | "q. c #FEFFDA", 127 | "w. c #FFFFDA", 128 | "e. c #FFFFDB", 129 | "r. c #FFFFDC", 130 | "t. c #FEFFDE", 131 | "y. c #FEFFDF", 132 | "u. c #FFFFDE", 133 | "i. c #FFFFDF", 134 | "p. c #E9E9E7", 135 | "a. c #F3F3E9", 136 | "s. c #F3F3EB", 137 | "d. c #F5F5E8", 138 | "f. c #F8F8E3", 139 | "g. c #FEFFE0", 140 | "h. c LightYellow", 141 | "j. c #FFFFE1", 142 | "k. c #FEFFE3", 143 | "l. c #FFFFE3", 144 | "z. c #FDFEE7", 145 | "x. c #FEFFE4", 146 | "c. c #FEFFE5", 147 | "v. c #FFFFE4", 148 | "b. c #FBFBE9", 149 | "n. c #FEFFE8", 150 | "m. c #FFFFE8", 151 | "M. c #FFFFE9", 152 | "N. c #FFFFEA", 153 | "B. c #FEFFEC", 154 | "V. c #FEFFED", 155 | "C. c #FFFFEC", 156 | "Z. c #FFFFED", 157 | "A. c #FEFFEF", 158 | "S. c #F4F4F0", 159 | "D. c #F4F4F3", 160 | "F. c #F5F5F4", 161 | "G. c #F8F8F6", 162 | "H. c ivory", 163 | "J. c #FFFFF1", 164 | "K. c #FEFFF3", 165 | "L. c #FFFFF3", 166 | "P. c #FEFFF4", 167 | "I. c #FFFFF4", 168 | "U. c #FEFFF7", 169 | "Y. c #FFFFF6", 170 | "T. c #FFFFF7", 171 | "R. c #FBFBFB", 172 | "E. c #FFFFF8", 173 | "W. c #FFFFF9", 174 | "Q. c #FFFFFA", 175 | "!. c #FFFFFB", 176 | "~. c gray99", 177 | "^. c #FEFFFD", 178 | "/. c #FFFFFC", 179 | "(. c #FFFFFD", 180 | "). c #FFFFFE", 181 | "_. c gray100", 182 | "`. c None", 183 | /* pixels */ 184 | "`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.", 185 | "`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.", 186 | "`.`.`.`.`.`.`.`.`.w 2 1 w 4 4 4 6 w 9 6 - `.`.`.`.`.`.`.`.`.", 187 | "`.`.`.`.`.`.`.`.r s p p c c c c N O.+.o.y # `.`.`.`.`.`.`.`.", 188 | "`.`.`.`.`.`.`.`.r ).).).).).).).).F.p.). .& o `.`.`.`.`.`.`.", 189 | "`.`.`.`.`.`.`.`.w ).E.).E.).E.E.E.S.X.).R.n $ + `.`.`.`.`.`.", 190 | "`.`.`.`.`.`.`.`.w E.Y.Y.E.Y.E.E.E.a.| ).).D.m % `.`.`.`.`.`.", 191 | "`.`.`.`.`.`.`.`.w E.Y.Y.J.Y.J.Y.Y.a.| ).).).D.> `.`.`.`.`.`.", 192 | "`.`.`.`.`.`.`.`.w Y.J.J.J.J.J.J.J.a.M l h h { ; `.`.`.`.`.`.", 193 | "`.`.`.`.`.`.`.`.w Y.B.B.B.N.N.B.B.b...k f h } ; `.`.`.`.`.`.", 194 | "`.`.`.`.`.`.`.`.w J.N.N.N.N.N.N.N.l.f.#.@.#.a.> `.`.`.`.`.`.", 195 | "`.`.`.`.`.`.`.`.w J.l.l.l.l.l.l.l.l.l.l.l.l.J.> `.`.`.`.`.`.", 196 | "`.`.`.`.`.`.`.`.w J.r.l.l.r.l.r.l.r.l.r.l.r.J.1 `.`.`.`.`.`.", 197 | "`.`.`.`.`.`.`.`.w B.r.r.q.q.q.q.q.q.r.q.q.r.B.> `.`.`.`.`.`.", 198 | "`.`.`.`.`.`.`.`.w N.5.5.5.5.q.5.5.5.5.5.5.5.B., `.`.`.`.`.`.", 199 | "`.`.`.`.`.`.`.`.w N.<.<.<.<.<.<.<.5.<.<.<.<.N., `.`.`.`.`.`.", 200 | "`.`.`.`.`.`.`.`.w l.,.;.;.;.,.;.,.;.,.;.;.;.l., `.`.`.`.`.`.", 201 | "`.`.`.`.`.`.`.`.w l.-.-.-.-.-.-.;.-.-.-.-.;.l.> `.`.`.`.`.`.", 202 | "`.`.`.`.`.`.`.`.w l.-.%.%.%.%.%.%.%.%.%.%.%.l., `.`.`.`.`.`.", 203 | "`.`.`.`.`.`.`.`.w r.' ' ' ' ' ) ' ' ' ' ' ' r., `.`.`.`.`.`.", 204 | "`.`.`.`.`.`.`.`.w r.) ) W ) ) ) ) ) ) W ) ) q., `.`.`.`.`.`.", 205 | "`.`.`.`.`.`.`.`.w q.W W W W W W W W W W W W q., `.`.`.`.`.`.", 206 | "`.`.`.`.`.`.`.`.w 5.Y Y W Y Y Y Y Y Y Y Y Y 5., `.`.`.`.`.`.", 207 | "`.`.`.`.`.`.`.`.w 5.J J J Y J Y Y J Y J J Y q., `.`.`.`.`.`.", 208 | "`.`.`.`.`.`.`.`.w 5.J J D J J D J D J W ) ,.$.- `.`.`.`.`.`.", 209 | "`.`.`.`.`.`.`.`.w <.Z D D Z D J Y ' ,.B b i - O `.`.`.`.`.`.", 210 | "`.`.`.`.`.`.`.`.w <.Z Z Z Y ) <.B d u & @ X `.`.`.`.`.`.", 211 | "`.`.`.`.`.`.`.`.w ,.J ) ,.B d y & o . `.`.`.`.`.`.", 212 | "`.`.`.`.`.`.`.`.w Y.V d u & o . `.`.`.`.`.`.`.`.", 213 | "`.`.`.`.`.`.`.`.1 4 & o . `.`.`.`.`.`.`.`.`.`.`.", 214 | "`.`.`.`.`.`.`.`. `.`.`.`.`.`.`.`.`.`.`.`.`.`.", 215 | "`.`.`.`.`.`.`.`. `.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`." 216 | }; 217 | -------------------------------------------------------------------------------- /src/icons/fileopen.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *fileopen[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 257 2", 5 | " c black", 6 | ". c #0B0900", 7 | "X c #130E00", 8 | "o c #161100", 9 | "O c #231A00", 10 | "+ c #352600", 11 | "@ c #3B311C", 12 | "# c #433100", 13 | "$ c #4F3B00", 14 | "% c #4A3E16", 15 | "& c #4A3D22", 16 | "* c #4D421A", 17 | "= c #54420D", 18 | "- c #4E4529", 19 | "; c #484338", 20 | ": c #484233", 21 | "> c #5B4B24", 22 | ", c #624500", 23 | "< c #674D00", 24 | "1 c #6D4D00", 25 | "2 c #6E4F17", 26 | "3 c #6D5200", 27 | "4 c #775500", 28 | "5 c #745B0F", 29 | "6 c #795200", 30 | "7 c #7A5A00", 31 | "8 c #715C18", 32 | "9 c #764B0A", 33 | "0 c #6C5423", 34 | "q c #6D592E", 35 | "w c #785E27", 36 | "e c #735626", 37 | "r c #665736", 38 | "t c #7A631D", 39 | "y c #7A672E", 40 | "u c #776535", 41 | "i c #5C5956", 42 | "p c #78704F", 43 | "a c #75726E", 44 | "s c #8D4F00", 45 | "d c #815700", 46 | "f c #835A00", 47 | "g c #8A5C00", 48 | "h c #866400", 49 | "j c #966100", 50 | "k c #956F00", 51 | "l c #9C6100", 52 | "z c #9D7500", 53 | "x c #856B2A", 54 | "c c #8C752A", 55 | "v c #8C723B", 56 | "b c #977939", 57 | "n c #A45D00", 58 | "m c #A26100", 59 | "M c #AA680D", 60 | "N c #AB6700", 61 | "B c #A07700", 62 | "V c #A57B00", 63 | "C c #AB7A00", 64 | "Z c #AA7300", 65 | "A c #AF721A", 66 | "S c #B87E00", 67 | "D c #B57B00", 68 | "F c #B0731A", 69 | "G c #B47C26", 70 | "H c #B77E28", 71 | "J c #897F59", 72 | "K c #977C40", 73 | "L c #927F58", 74 | "P c #807A6C", 75 | "I c #9C821D", 76 | "U c #9F8A35", 77 | "Y c #AC8000", 78 | "T c #B28500", 79 | "R c #B68800", 80 | "E c #BB8B00", 81 | "W c #A78337", 82 | "Q c #A28B31", 83 | "! c #AF9535", 84 | "~ c #B58E3A", 85 | "^ c #B88633", 86 | "/ c #B49936", 87 | "( c #BCA039", 88 | ") c #998445", 89 | "_ c #978657", 90 | "` c #8B8264", 91 | "' c #8E8572", 92 | "] c #978864", 93 | "[ c #978C75", 94 | "{ c #9F9072", 95 | "} c #A38845", 96 | "| c #A48952", 97 | " . c #AA965C", 98 | ".. c #A89156", 99 | "X. c #B5934D", 100 | "o. c #B39D45", 101 | "O. c #B49755", 102 | "+. c #AB984A", 103 | "@. c #AD9A65", 104 | "#. c #A79778", 105 | "$. c #A59874", 106 | "%. c #A29B7A", 107 | "&. c #A79775", 108 | "*. c #BDA959", 109 | "=. c #B3A46C", 110 | "-. c #B1A07F", 111 | ";. c #B5A97A", 112 | ":. c #BEB37B", 113 | ">. c #C49200", 114 | ",. c #C89500", 115 | "<. c #CC9800", 116 | "1. c #C69812", 117 | "2. c #D2A31C", 118 | "3. c #C2A63E", 119 | "4. c #D7AE37", 120 | "5. c #C29840", 121 | "6. c #C29B4E", 122 | "7. c #C2A641", 123 | "8. c #C6AA43", 124 | "9. c #C8AC45", 125 | "0. c #CBAF49", 126 | "q. c #CAA746", 127 | "w. c #C4A158", 128 | "e. c #CAA65D", 129 | "r. c #CEA857", 130 | "t. c #CFA95A", 131 | "y. c #C5AC50", 132 | "u. c #CDB14B", 133 | "i. c #CBB358", 134 | "p. c #CAB152", 135 | "a. c #D2AB59", 136 | "s. c #D1B54D", 137 | "d. c #D4B951", 138 | "f. c #D6BC5B", 139 | "g. c #DDB45E", 140 | "h. c #D9BD56", 141 | "j. c #D2B753", 142 | "k. c #DAAB48", 143 | "l. c #CEAE69", 144 | "z. c #CCAD67", 145 | "x. c #CCB662", 146 | "c. c #CAB26B", 147 | "v. c #C8B66B", 148 | "b. c #CEB775", 149 | "n. c #CEBE7F", 150 | "m. c #D3AD66", 151 | "M. c #D5BE64", 152 | "N. c #D4BF6D", 153 | "B. c #E4B34B", 154 | "V. c #E0B75F", 155 | "C. c #E1B85F", 156 | "Z. c #E4BA61", 157 | "A. c #E9BE63", 158 | "S. c #DDC159", 159 | "D. c #DAC269", 160 | "F. c #D4C176", 161 | "G. c #D8C67F", 162 | "H. c #E1C55D", 163 | "J. c #EFC05D", 164 | "K. c #F1C15E", 165 | "L. c #E0C264", 166 | "P. c #E5C961", 167 | "I. c #EDC164", 168 | "U. c #E9CD65", 169 | "Y. c #EFD36B", 170 | "T. c #F2C564", 171 | "R. c #F6C868", 172 | "E. c #F8C760", 173 | "W. c #FBCC6A", 174 | "Q. c #FDCB63", 175 | "!. c #F1D56D", 176 | "~. c #FFD06C", 177 | "^. c #F5D972", 178 | "/. c #FED175", 179 | "(. c #FADE77", 180 | "). c #E4C87A", 181 | "_. c #FEE27C", 182 | "`. c #8F9192", 183 | "'. c #9A9A96", 184 | "]. c #A79F83", 185 | "[. c #ADA583", 186 | "{. c #A7A399", 187 | "}. c #BBAC86", 188 | "|. c #BDB088", 189 | " X c #BBB298", 190 | ".X c #A7A8A6", 191 | "XX c #ADAEB0", 192 | "oX c #B5B6B4", 193 | "OX c #BABCBC", 194 | "+X c #C6B38E", 195 | "@X c #D3BE80", 196 | "#X c #D0BC95", 197 | "$X c #C6BFA6", 198 | "%X c #C5C29D", 199 | "&X c #D2C283", 200 | "*X c #DAC789", 201 | "=X c #DBCA8B", 202 | "-X c #D5C489", 203 | ";X c #DBCD94", 204 | ":X c #D6C699", 205 | ">X c #CFC8B1", 206 | ",X c #C8C6B7", 207 | ".L.ZXyXT.K.E.wX ..XKXKXR YXYX", 267 | "YXYXYXYXYXYXYXYXYXYXYXYX V E 4.ZXsXW.K.I.Z.O.{.KXUXUXMXk YXYX", 268 | "YXYXYXYXYXYX R E 7 YX< E 2.aXsX6XC.T.Z.w.[ xXUXUXUXUX2X3 YXYX", 269 | "YXYXYXYX R >.).5X,.T ,.5XCX8XK.T.A.a.] OXUXUXUXUXUXUX2.O YXYX", 270 | "YXYX Y E Z.ZXsX7XsX0XCXyXR.K.I.V._ .XUXUXUXUXUXLXKXJXV D N S 7 ", 271 | " z E 4.fXsX/.K.~./.6X~.I.I.C...'.KXUXPXPXPXLXKXGXbXl.N m.SXm.D ", 272 | " E 0XgX7XE.W.W.~.~.R.I.Z.w.' bXUXUXUXPXPXLXmXbX$X) ~ aXSXpXBXn ", 273 | " <.CXT.Q.~.W.W.R.I.A.t._ hXUXUXUXUXPXLXGXnX,X .t XAXSXeX4Xl.Z ", 274 | " <.sXB.W.W.W.T.A.g._ oXUXUXUXUXUXLXLXmXcX=.5 $.BXgXeX!.D.3Xm + ", 275 | " <.sXB.R.R.A.V.| {.KXUXUXUXUXLXKXGXvX|.c u qXdXgX^.U.f.3XH f ", 276 | " <.sXB.T.Z.m.[ nXUXUXUXUXPXKXHXbX,X) e X) y >XAXAX_.S.h.h.u.s.d.F.6.g YX", 280 | " >.9X~ } u '.LXKXmXxX .5 [.IXAX_.!.S.h.h.d.8.s.D.n.j YXYX", 281 | " >.:XW v & kXmXvX;.t ] BXAXrX!.U.u.S.9.u.3.7.i.;XM 1 YXYXYX", 282 | " E #Xb u : nXcX_ u 1XSXgX^.U.H.S.d.8.s.d.u.b.-XG g YXYXYXYX", 283 | " R +Xc r a zX[.= -XdX_.U.d.P.h.d.u.3.8.N.=Xw.l 1 YXYXYXYX", 284 | " T }.x > `.oX> %.*.S.S.h.S.7.d.h.0.p.n.c.M d . YXYXYXYXYX", 285 | " C ].w @ XXu p *.( h.S.s.u.u.u.p.N.*X^ g + YXYXYXYXYXYX", 286 | " Z &.e ; ` * :.o.S.S.S.u.( 9.x.&XX.j , YXYXYXYXYXYX", 287 | " B { 0 i % [.o.u.S.d.h.9.M.&Xz.M 6 YXYXYXYXYXYXYXYX", 288 | " z { 0 - J *./ S.9.d.i.G.&XF g O YXYXYXYXYXYXYXYXYXYX", 289 | " z $.2 w =.! s.d.p.N.;X^ l , YXYXYXYXYXYXYXYXYXYXYX", 290 | " B &.9 ;.Q / j.x.@Xl.m 6 YXYXYXYXYXYXYXYXYXYXYXYXYX", 291 | " h W @.+.I y.&Xb.F 7 O YXYXYXYXYXYXYXYXYXYXYXYXYXYXYX", 292 | " $ s %XU F.=X^ j # YXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYX", 293 | " g O. c #23224B", 22 | ", c #262353", 23 | "< c #292655", 24 | "1 c #2B2C54", 25 | "2 c #2C2C5B", 26 | "3 c #293746", 27 | "4 c #2D304F", 28 | "5 c #243243", 29 | "6 c #2E315D", 30 | "7 c #363647", 31 | "8 c #303E4A", 32 | "9 c #30325E", 33 | "0 c #3C3C53", 34 | "q c #2E2E60", 35 | "w c #2F3160", 36 | "e c #302E63", 37 | "r c #313164", 38 | "t c #363861", 39 | "y c #353868", 40 | "u c #384650", 41 | "i c #284F6B", 42 | "p c #2D547B", 43 | "a c #3B486A", 44 | "s c #36597D", 45 | "d c #3D5D7C", 46 | "f c #4C4C4C", 47 | "g c #40405A", 48 | "h c #414E56", 49 | "j c #4B585E", 50 | "k c #49545E", 51 | "l c #555555", 52 | "z c #4D4D6B", 53 | "x c #434675", 54 | "c c #4B5660", 55 | "v c #4F5962", 56 | "b c #41517E", 57 | "n c #4B507D", 58 | "m c #515C67", 59 | "M c #505D6E", 60 | "N c #5C5D7D", 61 | "B c #546066", 62 | "V c #54626D", 63 | "C c #5B646D", 64 | "Z c #55677A", 65 | "A c #556B78", 66 | "S c #5D6772", 67 | "D c #6B6B6B", 68 | "F c #646464", 69 | "G c #616C73", 70 | "H c #63707D", 71 | "J c #6B7679", 72 | "K c gray45", 73 | "L c #00418E", 74 | "P c #004494", 75 | "I c #004894", 76 | "U c #044F98", 77 | "Y c #03509B", 78 | "T c #0A5198", 79 | "R c #13579C", 80 | "E c #185DA1", 81 | "W c #285888", 82 | "Q c #2B6094", 83 | "! c #396D9A", 84 | "~ c #336A96", 85 | "^ c #3D719B", 86 | "/ c #226EB8", 87 | "( c #326EA8", 88 | ") c #326BA3", 89 | "_ c #3673AE", 90 | "` c #3A76B4", 91 | "' c #0B6FD1", 92 | "] c #0F75D8", 93 | "[ c #1479DA", 94 | "{ c #1B7CDC", 95 | "} c #466481", 96 | "| c #42749C", 97 | " . c #4A799E", 98 | ".. c #506A84", 99 | "X. c #5F678D", 100 | "o. c #576391", 101 | "O. c #5A6592", 102 | "+. c #5F6893", 103 | "@. c #5B738B", 104 | "#. c #507DA1", 105 | "$. c #626283", 106 | "%. c #636A94", 107 | "&. c #656F98", 108 | "*. c #657A8F", 109 | "=. c #6B7299", 110 | "-. c #717191", 111 | ";. c #797998", 112 | ":. c #687BA6", 113 | ">. c #2281DC", 114 | ",. c #3F81C0", 115 | "<. c #3988D7", 116 | "1. c #2785E1", 117 | "2. c #2E8AE3", 118 | "3. c #368FE5", 119 | "4. c #3690E6", 120 | "5. c #3D93E7", 121 | "6. c #3D94E9", 122 | "7. c #57839E", 123 | "8. c #4787BC", 124 | "9. c #5480A1", 125 | "0. c #5B84A3", 126 | "q. c #6E8496", 127 | "w. c #6E8B9A", 128 | "e. c #7D848E", 129 | "r. c #728597", 130 | "t. c #738598", 131 | "y. c #768899", 132 | "u. c #7B8B9B", 133 | "i. c #6489A5", 134 | "p. c #698EA7", 135 | "a. c #6D8FA9", 136 | "s. c #6E81AB", 137 | "d. c #7683A6", 138 | "f. c #768CB7", 139 | "g. c #7395AD", 140 | "h. c #7C96B0", 141 | "j. c #4086CA", 142 | "k. c #4986C3", 143 | "l. c #4284C3", 144 | "z. c #498ED2", 145 | "x. c #4D95DB", 146 | "c. c #548DC5", 147 | "v. c #5D92C8", 148 | "b. c #5593C9", 149 | "n. c #5097DE", 150 | "m. c #5198DE", 151 | "M. c #4296E7", 152 | "N. c #4895E2", 153 | "B. c #4B99E5", 154 | "V. c #4A9CEB", 155 | "C. c #4599EB", 156 | "Z. c #529DE6", 157 | "A. c #589EE2", 158 | "S. c #54A1EB", 159 | "D. c #5AA1E6", 160 | "F. c #5AA5EB", 161 | "G. c #5EA8EF", 162 | "H. c #53A3F1", 163 | "J. c #5EAAF2", 164 | "K. c #6699CB", 165 | "L. c #799BC8", 166 | "P. c #7EA6C9", 167 | "I. c #60A2E5", 168 | "U. c #65A7E8", 169 | "Y. c #6BABE9", 170 | "T. c #68ADF2", 171 | "R. c #67B0F5", 172 | "E. c #6DB3F6", 173 | "W. c #70ADEA", 174 | "Q. c #75B0E9", 175 | "!. c #7CB5EB", 176 | "~. c #73B9F8", 177 | "^. c #7BBDFB", 178 | "/. c #7CBAF6", 179 | "(. c gray55", 180 | "). c #828899", 181 | "_. c #84949E", 182 | "`. c #918E8A", 183 | "'. c #949494", 184 | "]. c #8F8FA9", 185 | "[. c #8997A5", 186 | "{. c #8A9AA9", 187 | "}. c #9A9BAF", 188 | "|. c #9399A9", 189 | " X c #9FAAB5", 190 | ".X c #A29E9B", 191 | "XX c #A7A7A7", 192 | "oX c #ABABAB", 193 | "OX c #A3A3B4", 194 | "+X c #A8A8B7", 195 | "@X c #A3ABB3", 196 | "#X c #B4B5B5", 197 | "$X c #B0B0BC", 198 | "%X c #B7B9BC", 199 | "&X c #BBB7B3", 200 | "*X c #BBBBBB", 201 | "=X c #82B1DB", 202 | "-X c #81B7EC", 203 | ";X c #88BBED", 204 | ":X c #86BAED", 205 | ">X c #AEBBC8", 206 | ",X c #A6BDCD", 207 | ".U i 9 YXYX", 267 | "YXYXYXo.2X] L C UXDXcXzXkXkXkXjXjXdXdX%X%X&X%X*XN.' ~ 6 YXYX", 268 | "YXYXYXo.1X] P k hXoXXXXXoXoX#X#X*X%X&X%X%XdXkXxXx.[ ~ 6 YXYX", 269 | "YXYXYXO.3X[ I m FXkXjXjXkXkXkXkXkXkXzXzXzXcXZXSXx.{ ! 6 YXYX", 270 | "YXYXYXo.3X{ I S UXvXxXzXkXkXkXkXkXjXdX*X%X#X&X%XZ.1.^ 9 YXYX", 271 | "YXYXYXO.4X>.U j jX#X#X#X%XdXdXkXzXkXzXzXcXvXDXJXA.1.| 6 YXYX", 272 | "YXYXYXO.6X>.T V PXZXZXZXAXSXDXDXFXHXDXHXHXHXHXSXI.2.| 9 YXYX", 273 | "YXYXYXO.6X2.T G UXLXDXDXAXZXZXAXZXvXcXzXkXkXkXgXY.3. .6 YXYX", 274 | "YXYXYXO.9X4.R m zXdXdXkXzXvXAXDXHXLXPXPXIXUXUXUXQ.6. .9 YXYX", 275 | "YXYXYXO.9X5.R H UXIXUXUXUXUXUXUXUXUXUXUXIXKXJXBX-XC.#.9 YXYX", 276 | "YXYXYXO.eXM./ h.UXUXIXKXBXNXnXuXyXwX5X:X!.Y.Y.Y.D.H.9.6 YXYX", 277 | "YXYXYX+.rXB.<.x.Q.;X-XQ.Y.U.U.D.Z.Z.B.B.C.V.V.B.B.T.0.9 YXYX", 278 | "YXYXYX+.tXB.N.B.B.B.B.C.V.V.H.H.H.D.N.z.8._ ( <.D.R.0.9 YXYX", 279 | "YXYXYX+.tXS.Z.F.D.m.z.l.` ) Q W p s } @.r.[. X>XG.E.0.9 YXYX", 280 | "YXYXYX+.pXU.m.) p d ..*.u.|.+X @ o YXYXYXYXYXYXYXYXYXYXYXYX", 293 | "YXYXYX YXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYX", 294 | "YXYXYX YXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYX" 295 | }; 296 | -------------------------------------------------------------------------------- /src/icons/network-wired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/network-wired.png -------------------------------------------------------------------------------- /src/icons/step_response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitrousnrg/ECUmanager/81f6927d27df7b834f4aab892cc27a16d9122e0b/src/icons/step_response.png -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #include 22 | #include "qt4application.h" 23 | int main(int argc, char *argv[]) 24 | { 25 | Q_INIT_RESOURCE(application); 26 | QApplication app(argc, argv); 27 | QPalette appPalette = app.palette(); 28 | //QTranslator translator; 29 | //translator.load("/home/marcos/.config/MyEnterprise/ECUmanager_spanish"); 30 | //app.installTranslator(&translator); 31 | 32 | qt4application * mw = new qt4application(appPalette); 33 | mw->show(); 34 | return app.exec(); 35 | } 36 | -------------------------------------------------------------------------------- /src/plotter.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | #ifndef PLOTAREA_H 22 | #define PLOTAREA_H 23 | 24 | #include 25 | 26 | class QBrush; 27 | class QPen; 28 | class QWidget; 29 | class QMenu; 30 | class QCheckBox; 31 | 32 | enum dataStyle {HistogramStyle,PlotStyle}; 33 | 34 | class PlotArea : public QWidget 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | PlotArea(QWidget *parent = 0); 40 | 41 | QSize minimumSizeHint() const; 42 | QSize sizeHint() const; 43 | void clear(); 44 | void desplazar(float newValue); 45 | int getChannel(); 46 | QColor getChannelColor(int channel); 47 | QColor getBackgroundColor(); 48 | QColor getFontColor(); 49 | void setBackColor(QColor); 50 | void setFontColor(QColor); 51 | void setChannel1Color(QColor); 52 | void setPoints(float newValue,int size); 53 | void setStyle(int); 54 | void setRows(int); 55 | void setColumns(int); 56 | void setScaleFactorX(float,bool reversed); 57 | void setScaleFactorY(float); 58 | void setSize(int,int); 59 | void readSettings(); 60 | void writeSettings(); 61 | enum channels {lambda,RPM,VE,MAP,airTemp,waterTemp,ignAdv,injAdv,duty,injTime,throttle}; 62 | 63 | protected: 64 | void paintEvent(QPaintEvent *event); 65 | void mouseReleaseEvent(QMouseEvent*); 66 | 67 | private slots: 68 | void chooseDialog(); 69 | void setBackColorSlot(); 70 | void setFontColorSlot(); 71 | void setChannel1ColorSlot(); 72 | void acceptDialog(); 73 | void rejectDialog(); 74 | 75 | private: 76 | bool reversed; 77 | int channel; 78 | int columns; 79 | int rows; 80 | int xSize; 81 | int ySize; 82 | int myWidth; 83 | int style; 84 | int pointsReceived; 85 | float scaleFactorX; 86 | float scaleFactorY; 87 | float scaleY[20]; 88 | QPoint *points; 89 | QPen pen; 90 | QBrush brush; 91 | QString num; 92 | QCheckBox *LambdaBox; 93 | QCheckBox *RPMBox; 94 | QCheckBox *VEBox; 95 | QCheckBox *MAPBox; 96 | QCheckBox *airTempBox; 97 | QCheckBox *waterTempBox; 98 | QCheckBox *ignAdvanceBox; 99 | QCheckBox *fuelAdvBox; 100 | QCheckBox *dutyBox; 101 | QCheckBox *injTimeBox; 102 | QCheckBox *throttleBox; 103 | QMenu *menu; 104 | QMenu *colors; 105 | QPalette palette; 106 | QAction *chooseAct; 107 | QAction *selectChannelAct; 108 | QAction *backColorAct; 109 | QAction *fontColorAct; 110 | QAction *chan1ColorAct; 111 | QAction *chan2ColorAct; 112 | QAction *chan3ColorAct; 113 | QDialog *dialog; 114 | 115 | QColor BackColor; 116 | QColor penColor; 117 | QColor channel1Color; 118 | QBrush backBrush; 119 | //static const QPoint; 120 | }; 121 | #endif 122 | -------------------------------------------------------------------------------- /src/posixpatch: -------------------------------------------------------------------------------- 1 | LIBS += -lqextserialport 2 | 3 | -D_TTY_POSIX_ 4 | -------------------------------------------------------------------------------- /src/qt4application.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007 by marcos chaparro * 3 | * nitrousnrg@gmail.com * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU General Public License as published by * 7 | * the Free Software Foundation; either version 2 of the License, or * 8 | * (at your option) any later version. * 9 | * * 10 | * This program is distributed in the hope that it will be useful, * 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 | * GNU General Public License for more details. * 14 | * * 15 | * You should have received a copy of the GNU General Public License * 16 | * along with this program; if not, write to the * 17 | * Free Software Foundation, Inc., * 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 | ***************************************************************************/ 20 | 21 | /* The icon set is from Amarok, not mine! (Nice job guys)*/ 22 | 23 | #ifndef QT4APPLICATION_H 24 | #define QT4APPLICATION_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include "FreeEMS.h" 31 | #include 32 | //#include "commCore_FreeEMS.h" 33 | #include 34 | #include <2Dgraph.h> 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include "QMap3D.h" 46 | 47 | #include 48 | 49 | class QAction; 50 | class QMenu; 51 | class QTextEdit; 52 | class PlotArea; 53 | class RenderArea; 54 | class Graph2D; 55 | 56 | #define MAPsourced 0 57 | #define TPSsourced 1 58 | 59 | typedef unsigned char BYTE; 60 | 61 | class qt4application:public QMainWindow 62 | { 63 | Q_OBJECT 64 | 65 | public: 66 | qt4application(QPalette appPalette); 67 | ~qt4application(); 68 | 69 | protected: 70 | void closeEvent(QCloseEvent *event); 71 | 72 | private slots: 73 | void connectECU(); 74 | void disconnectECU(); 75 | void openECU(); 76 | void openECUslot(); 77 | void sendFilesInit(); 78 | void upgradeFirmware(); 79 | void configureECUmanager(); 80 | void refresh(); 81 | void showIgnition(); 82 | void showFuel(); 83 | void showFuelTiming(); 84 | void tempDialog(); 85 | void accelDialog(); 86 | void putTempCalibration(); 87 | void boostDialog(); 88 | void nitrousDialog(); 89 | void parametersDialog(); 90 | void setMainTableSize(); 91 | void alarmsDialog(); 92 | void printDialog(); 93 | void acceptDialog(); 94 | void rejectDialog(); 95 | void startLog(); 96 | void saveLog(); 97 | void replay(); 98 | void viewData(); 99 | void quickTune(); 100 | void injectorTestDialog(); 101 | void newFile(); 102 | void open(); 103 | void checkChange(QTableWidgetItem *); 104 | void QuickTuneChange(int channel, int index); 105 | void save(); //bool 106 | void saveAs(); //bool 107 | void about(); 108 | void documentWasModified(); 109 | 110 | //FreeEMS slots 111 | void debugFreeEMS(); 112 | void showPacket(QByteArray); 113 | void sendReset(); 114 | 115 | private: 116 | void createVEtable(); 117 | void createLinearTable(); 118 | void createBars(); 119 | void createLabels(); 120 | void createActions(); 121 | void createMenus(); 122 | void createToolBars(); 123 | void createStatusBar(); 124 | void createLayout(); 125 | void readSettings(); 126 | void writeSettings(); 127 | bool maybeSave(); 128 | void loadFile(const QString &fileName); 129 | void process_line(QByteArray line,int i); 130 | bool saveFile(const QString &fileName); 131 | void setCurrentFile(const QString &fileName); 132 | 133 | bool connectedECU; 134 | bool fileopened; 135 | bool parametersDialogOpen; 136 | bool setMainTableSizeDialogOpen; 137 | bool tempDialogOpen; 138 | bool accelEnrichDialogOpen; 139 | bool alarmDialogOpen; 140 | bool configDialogOpen; 141 | int nitrousDialogOpen; //WTF?!?! 142 | bool logEnabled; 143 | int injectorTestDialogOpen; 144 | bool VE_table_ON; 145 | bool fuel_adv_ON; 146 | bool Ign_table_ON; 147 | bool QuickTune_ON; 148 | bool debugEnabledFlag; 149 | QString strippedName(const QString &fullFileName); 150 | 151 | QWidget *window; 152 | QWidget *QmainLayout; 153 | QextSerialPort *serial; 154 | commThread *serialThread; 155 | serialPorts serialPort; 156 | QString hardwareTarget,hardwareTargetTemp; 157 | 158 | QMap3D *map3D; 159 | QViewer *plot1; 160 | QuickTune *QTune; 161 | upgrade *newFirmware; 162 | PlotArea *plot; 163 | graph2D *tempCorrGraph; 164 | graph2D *tempSensorGraph; 165 | RenderArea *renderArea; //bad name for the tacho 166 | QPlayer *playMenu; 167 | QInjTester *tester; 168 | QTimer *sendTimer; 169 | QTimer *refreshTimer; 170 | QTimer *openECUtimer; 171 | char logbuffer[4]; 172 | QByteArray auxiliarByteArray; 173 | 174 | QTableWidget *VE_table; 175 | QTableWidget *Ign_table; 176 | QTableWidget *fuelAdvTable; 177 | QTableWidget *packetTable; 178 | 179 | QTableWidgetItem VEtableItem[25][25]; 180 | QTableWidgetItem ignTableItem[25][25]; 181 | QTableWidgetItem fuelAdvTableItem[25]; 182 | QTableWidget *headerTableRPM; 183 | QTableWidget *headerTableMAP; 184 | QTableWidgetItem *packetTableItem; 185 | QTableWidgetItem *headerContentsRPM; 186 | QTableWidgetItem *headerContentsMAP; 187 | QHBoxLayout *horizontaLayout; 188 | QDialog *dialog; 189 | QMenu *fileMenu; 190 | QMenu *adjustMenu; 191 | QMenu *adjustFuelMenu; 192 | 193 | QMenu *adjustIgnMenu; 194 | QMenu *adjustOptions; 195 | QMenu *viewMenu; 196 | QMenu *logMenu; 197 | QMenu *helpMenu; 198 | QMenu *toolsMenu; 199 | QToolBar *fileToolBar; 200 | QToolBar *commToolBar; 201 | QLabel *heavyDataLabel; 202 | QLabel *VElabel; 203 | QLabel *MAPlabel; 204 | QLabel *AirTemplabel; 205 | QLabel *TEMPlabel; 206 | QLabel *throttleLabel; 207 | QLabel *AirFuellabel; 208 | QLabel *InjTimelabel; 209 | QLabel *Dutylabel; 210 | QLabel *goodPacketsLabel; 211 | 212 | QLineEdit * serialPortNameEdit; 213 | QComboBox * serialPortBaudRateEdit; 214 | QComboBox * serialPortParityEdit; 215 | QComboBox * serialPortDataBitsEdit; 216 | QComboBox * serialPortEndBitsEdit; 217 | //accel pump 218 | QLineEdit *enrichFactorEdit; 219 | QLineEdit *decayEdit; //accel pump 220 | //accel pump 221 | QLineEdit *accelThresholdEdit; 222 | QLineEdit *editDisplacement; 223 | QLineEdit *editCyl; 224 | QLineEdit *editIdle; 225 | QLineEdit *editFuelCut; 226 | QLineEdit *editLaunchRPM; 227 | QLineEdit *editSize; 228 | QLineEdit *editDeadTime; 229 | QComboBox *hardwareTargetBox; 230 | 231 | QCheckBox *calibration; 232 | QProgressBar *VEbar; 233 | QProgressBar *MAPbar; 234 | QProgressBar *TEMPbar; 235 | QProgressBar *AirFuelbar; 236 | QProgressBar *InjTimebar; 237 | QProgressBar *Dutybar; 238 | QProgressBar *throttleBar; 239 | QProgressBar *AirTempbar; 240 | QProgressBar *sendingBar; 241 | QString string1; 242 | 243 | QAction *connectAct; 244 | QAction *disconnectAct; 245 | QAction *fetchAct; 246 | QAction *sendfileAct; 247 | QAction *upgradeFirmwareAct; 248 | QAction *view1Act; 249 | QAction *adjustParametersAct; 250 | QAction *adjustIgnitionAct; 251 | QAction *adjustFuelAct; 252 | QAction *adjustFuelTimingAct; 253 | QAction *adjustTempCorrectionAct; 254 | QAction *adjustAccelEnrichmentAct; 255 | QAction *adjustIgnTempCorrectionAct; 256 | QAction *adjustAlarmsAct; 257 | QAction *adjustBoostCtrlAct; 258 | QAction *adjustNitrousAct; 259 | QAction *adjustPWM1; 260 | QAction *adjustPWM2; 261 | QAction *configureECUManagerAct; 262 | QAction *startLogAct; 263 | QAction *saveLogAct; 264 | QAction *replayAct; 265 | QAction *viewAct; 266 | QAction *quickTuneAct; 267 | QAction *injectorTestAct; 268 | QAction *newAct; 269 | QAction *openAct; 270 | QAction *saveAct; 271 | QAction *saveAsAct; 272 | QAction *exitAct; 273 | QAction *printAct; 274 | QAction *cutAct; 275 | QAction *copyAct; 276 | QAction *pasteAct; 277 | QAction *connectorPinoutAct; 278 | QAction *aboutAct; 279 | QAction *aboutQtAct; 280 | 281 | /* FreeEMS stuff */ 282 | QAction *sendResetAct; 283 | QAction *getInterfaceVersionAct; 284 | QAction *getFirmwareVersionAct; 285 | QAction *sendDatalogRequestAct; 286 | QAction *openDebugWindowAct; 287 | 288 | unsigned char MAP,throttle; 289 | char TEMP,waterTEMP; 290 | float duty,Dwell; 291 | int byteCounter; //para la programacion 292 | 293 | char *oxygenSensor; //wb, nb, none 294 | 295 | struct estructura 296 | { 297 | //defines table size 298 | unsigned int headerRPM[21]; 299 | unsigned int headerMAP[21]; 300 | unsigned int cylinders; 301 | //cm 302 | unsigned int displacement; 303 | unsigned int fuelCut;//rpm 304 | unsigned int idleRPM; 305 | unsigned int launchRPM; 306 | unsigned int injSize;//cm/min 307 | //us 308 | unsigned int deadTime; 309 | 310 | unsigned char accel_pump_source; 311 | unsigned char accel_pump_threshold; 312 | unsigned char accel_pump_decay; 313 | unsigned char accel_pump_enrich_factor; 314 | 315 | float tempCorr[13]; //enrich % 316 | //float dwell; 317 | 318 | unsigned int nitrousRPM; 319 | unsigned int nitrousMAP; 320 | unsigned int nitrousTPS; 321 | float nitrousStage1Flow; 322 | float nitrousStage2Flow; 323 | float nitrousStage3Flow; 324 | float nitrousStage1Retard; 325 | float nitrousStage2Retard; 326 | float nitrousStage3Retard; 327 | //boost ctrl 328 | }confParameter; 329 | 330 | union transformer 331 | { 332 | BYTE byte[2]; 333 | int entero; 334 | }RPM,VE,VEtable[12][21],fuel,auxTransformer; 335 | 336 | int parcialVE_MAP[12]; 337 | int parcialVE_RPM[21]; 338 | struct degreeConverter 339 | { 340 | BYTE byte[2]; 341 | float angle; 342 | }IgnTable[12][21],fuelAdv[12],fuelAdvActual,IgnAdvActual; 343 | 344 | union zocotroco_de_numeros 345 | { 346 | BYTE partido[12][21][2]; 347 | char plain[504]; 348 | }plaindataVE,plaindataIgn; 349 | 350 | FILE *f; 351 | QString confFile; 352 | QString openedFile; 353 | QString logFileName; 354 | QFile *tempLogFile; 355 | QFile *openedLogFile; 356 | //QString &logFileName; 357 | 358 | /* nitrous dialog */ 359 | QLineEdit *editNitrousRPM; 360 | QLineEdit *editNitrousMAP; 361 | QLineEdit *editNitrousTPS; 362 | QLineEdit *editNitrousFlow1; 363 | QLineEdit *editNitrousFlow2; 364 | QLineEdit *editNitrousFlow3; 365 | QLineEdit *editNitrousRetard1; 366 | QLineEdit *editNitrousRetard2; 367 | QLineEdit *editNitrousRetard3; 368 | }; 369 | #endif 370 | -------------------------------------------------------------------------------- /src/renderarea.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2005-2007 Trolltech ASA. All rights reserved. 4 | ** 5 | ** This file is part of the example classes of the Qt Toolkit. 6 | ** 7 | ** This file may be used under the terms of the GNU General Public 8 | ** License version 2.0 as published by the Free Software Foundation 9 | ** and appearing in the file LICENSE.GPL included in the packaging of 10 | ** this file. Please review the following information to ensure GNU 11 | ** General Public Licensing requirements will be met: 12 | ** http://www.trolltech.com/products/qt/opensource.html 13 | ** 14 | ** If you are unsure which license is appropriate for your use, please 15 | ** review the following information: 16 | ** http://www.trolltech.com/products/qt/licensing.html or contact the 17 | ** sales department at sales@trolltech.com. 18 | ** 19 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 | ** 22 | ****************************************************************************/ 23 | 24 | #ifndef RENDERAREA_H 25 | #define RENDERAREA_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | class RenderArea : public QWidget 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | RenderArea(QWidget *parent = 0,int limit=10000, int redLine=11000, int initialAngle=20, int finalAngle=230); 40 | 41 | QSize minimumSizeHint() const; 42 | QSize sizeHint() const; 43 | void setValue(float value); 44 | void setLimit(int); 45 | void setRedLine(int); 46 | void setInitialAngle(int); 47 | void setFinalAngle(int); 48 | 49 | protected: 50 | void paintEvent(QPaintEvent *event); 51 | void mouseReleaseEvent(QMouseEvent*); 52 | 53 | private slots: 54 | void setLimitSlot(); 55 | void setRedLineSlot(); 56 | void setInitialAngleSlot(); 57 | void setFinalAngleSlot(); 58 | void setNeedleColorSlot(); 59 | void setNumbersColorSlot(); 60 | void setScale1ColorSlot(); 61 | void setScale2ColorSlot(); 62 | 63 | private: 64 | QPen pen; 65 | QBrush brush; 66 | int InitialAngle; 67 | int FinalAngle; 68 | int Limit; 69 | int RedLine; 70 | float actualPosition; 71 | QColor needleColor; 72 | QColor numbersColor; 73 | QColor scale1Color; 74 | QColor scale2Color; 75 | QColor hourColor; 76 | QColor redPen; 77 | 78 | QMenu *menu; 79 | QMenu *changeNumbersMenu; 80 | QMenu *changeColorsMenu; 81 | QAction* setLimitAct; 82 | QAction* setRedLineAct; 83 | QAction* setNeedleColorAct; 84 | QAction* setNumbersColorAct; 85 | QAction* setScale1ColorAct; 86 | QAction* setScale2ColorAct; 87 | QAction* setInitialAngleAct; 88 | QAction* setFinalAngleAct; 89 | QInputDialog *setLimitDialog; 90 | QInputDialog *setRedLineDialog; 91 | QInputDialog *setInitialAngleDialog; 92 | QInputDialog *setFinalAngleDialog; 93 | 94 | }; 95 | #endif 96 | -------------------------------------------------------------------------------- /src/src.pro: -------------------------------------------------------------------------------- 1 | # File generated by kdevelop's qmake manager. 2 | # ------------------------------------------- 3 | # Subdir relative project main directory: ./src 4 | # Target is an application: ../bin/ecumanager 5 | PROJECT = ecumanager 6 | TEMPLATE = app 7 | DEPENDPATH += . 8 | OBJECTS_DIR = tmp 9 | MOC_DIR = tmp 10 | HEADERS += qt4application.h \ 11 | renderarea.h \ 12 | plotter.h \ 13 | 2Dgraph.h \ 14 | firm_updater.h \ 15 | QViewer.h \ 16 | QSubViewer.h \ 17 | QMap3D.h \ 18 | QuickTune.h \ 19 | QPlayer.h \ 20 | QInjectorTest.h \ 21 | commthread.h \ 22 | commCore_FreeEMS.h \ 23 | FreeEMS.h 24 | SOURCES += qt4application.cpp \ 25 | main.cpp \ 26 | RenderArea.cpp \ 27 | plotter.cpp \ 28 | 2Dgraph.cpp \ 29 | firm_updater.cpp \ 30 | QViewer.cpp \ 31 | QSubViewer.cpp \ 32 | qt4applicationEXTRAS.cpp \ 33 | QMap3D.cpp \ 34 | QuickTune.cpp \ 35 | QPlayer.cpp \ 36 | QInjectorTest.cpp \ 37 | qt4applicationCREATETHINGS.cpp \ 38 | commthread.cpp \ 39 | commCore_FreeEMS.cpp 40 | 41 | QMAKE_LIBDIR += /usr/lib/ 42 | RESOURCES = application.qrc 43 | TARGET = ecumanager 44 | DESTDIR = ../bin/ 45 | CONFIG += warn_on \ 46 | qt 47 | unix { 48 | CONFIG += debug 49 | 50 | INCLUDEPATH += /usr/include/qwtplot3d-qt4 \ 51 | /usr/include/qextserialport 52 | 53 | # Prefix: base instalation directory 54 | isEmpty( PREFIX ):PREFIX = /usr/ 55 | DEB_BUILD = $$system(echo \$DEB_BUILD_OPTIONS) 56 | contains(DEB_BUILD, nostrip):QMAKE_STRIP = : 57 | DEFINES += PREFIX=\\\"$${PREFIX}\\\" 58 | target.path = $${PREFIX}/bin 59 | INSTALLS = target 60 | 61 | # Shared library installation 62 | SHLIBS_PATH = $${PREFIX}/lib 63 | shlibs_path.path = $${SHLIBS_PATH} 64 | shlibs_path.files = libqextserialport.so \ 65 | libqextserialport.so.1 \ 66 | libqextserialport.so.1.2 \ 67 | libqextserialport.so.1.2.0 68 | 69 | # Menu entry 70 | MENU_ENTRY_PATH = $${PREFIX}/share/applications 71 | menu_entry.path = $${MENU_ENTRY_PATH} 72 | menu_entry.files = ecumanager.desktop 73 | INSTALLS += menu_entry 74 | 75 | # ECUmanager Icon 76 | ICON_PATH = $${PREFIX}/share/pixmaps 77 | ecum_icon.path = $${ICON_PATH} 78 | ecum_icon.files = icons/ecumanager-icon.png 79 | INSTALLS += ecum_icon 80 | } 81 | LIBS += -lqextserialport \ 82 | -lqwtplot3d-qt4 83 | --------------------------------------------------------------------------------