00001 /* FreeEMS - the open source engine management system 00002 * 00003 * Copyright 2009 Fred Cooke 00004 * 00005 * This file is part of the FreeEMS project. 00006 * 00007 * FreeEMS software is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * FreeEMS software is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with any FreeEMS software. If not, see http://www.gnu.org/licenses/ 00019 * 00020 * We ask that if you make any changes to this file you email them upstream to 00021 * us at admin(at)diyefi(dot)org or, even better, fork the code on github.com! 00022 * 00023 * Thank you for choosing FreeEMS to run your engine! 00024 */ 00025 00026 00039 #define COREVARSGENERATOR_C 00040 #include "inc/freeEMS.h" 00041 #include "inc/commsCore.h" 00042 #include "inc/coreVarsGenerator.h" 00043 00044 00055 void generateCoreVars(){ 00056 00057 /* 00058 * Fastest rate of change for RPM at the top, lowest rate of change for 00059 * battery voltage at the bottom. Each time a variable reaches its maximum 00060 * it rolls over back to zero. Because the numbers are prime they will not 00061 * remain synchronised and should give a nice mix of output value sets. 00062 */ 00063 CoreVars->RPM += 11; 00064 CoreVars->MAP += 7; 00065 CoreVars->IAT += 5; 00066 CoreVars->CHT += 3; 00067 CoreVars->BRV += 1; 00068 00069 /* Not currently used... */ 00070 CoreVars->DDRPM = 0; 00071 CoreVars->DRPM = 0; 00072 CoreVars->AAP = 0; 00073 CoreVars->TPS = 0; 00074 CoreVars->EGO = 0; 00075 CoreVars->EGO2 = 0; 00076 CoreVars->MAT = 0; 00077 CoreVars->IAP = 0; 00078 CoreVars->MAF = 0; 00079 }