Initial commit of 0.0.18 just as it was released!
[freeems-vanilla.git] / src / staticInit.c
blobd3bfe852d4943054e62e7da7b8e5a241ba6b1bfe
1 /* staticInit.c
3 Copyright 2008 Fred Cooke
5 This file is part of the FreeEMS project.
7 FreeEMS software is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 FreeEMS software is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with any FreeEMS software. If not, see <http://www.gnu.org/licenses/>.
20 We ask that if you make any changes to this file you send them upstream to us at admin@diyefi.org
22 Thank you for choosing FreeEMS to run your engine! */
25 #include "inc/freeEMS.h"
27 //unsigned char asyncDatalogType = asyncDatalogBasic;
28 unsigned char asyncDatalogType = asyncDatalogBasic;
30 unsigned short tachoPeriod = 65535; /* Lowest RPM at start up time. */
32 // Values for testing
33 unsigned short masterPulseWidth = 10;
34 unsigned short totalAngleAfterReferenceIgnition = 540;
35 unsigned short totalAngleAfterReferenceInjection = 180;
37 /* Setup the pointers to the registers for fueling use, this does NOT work if done in global.c, I still don't know why. */
38 // injectorMainTimeRegisters[0] = TC2_ADDR;
39 // injectorMainTimeRegisters[1] = TC3_ADDR;
40 // injectorMainTimeRegisters[2] = TC4_ADDR;
41 // injectorMainTimeRegisters[3] = TC5_ADDR;
42 // injectorMainTimeRegisters[4] = TC6_ADDR;
43 // injectorMainTimeRegisters[5] = TC7_ADDR;
44 // injectorMainControlRegisters[0] = TCTL2_ADDR;
45 // injectorMainControlRegisters[1] = TCTL2_ADDR;
46 // injectorMainControlRegisters[2] = TCTL1_ADDR;
47 // injectorMainControlRegisters[3] = TCTL1_ADDR;
48 // injectorMainControlRegisters[4] = TCTL1_ADDR;
49 // injectorMainControlRegisters[5] = TCTL1_ADDR;
51 // TODO perhaps read from the ds1302 once at start up and init the values or different ones with the actual time and date then update them in RTI
53 /* Setup so that the tacho reads low when the engine isn't running */
54 unsigned long engineCyclePeriod = ticksPerCycleAtOneRPM;