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 00038 #define COREVARSGENERATOR_C 00039 #include "inc/freeEMS.h" 00040 #include "inc/commsCore.h" 00041 #include "inc/coreVarsGenerator.h" 00042 00043 00054 void generateCoreVars(){ 00055 00056 /* 00057 * Fastest rate of change for RPM at the top, lowest rate of change for 00058 * battery voltage at the bottom. Each time a variable reaches its maximum 00059 * it rolls over back to zero. Because the numbers are prime they will not 00060 * remain synchronised and should give a nice mix of output value sets. 00061 */ 00062 CoreVars->RPM += 11; 00063 CoreVars->MAP += 7; 00064 CoreVars->IAT += 5; 00065 CoreVars->CHT += 3; 00066 CoreVars->BRV += 1; 00067 00068 /* Not currently used... */ 00069 CoreVars->DDRPM = 0; 00070 CoreVars->DRPM = 0; 00071 CoreVars->AAP = 0; 00072 CoreVars->TPS = 0; 00073 CoreVars->EGO = 0; 00074 CoreVars->EGO2 = 0; 00075 CoreVars->MAT = 0; 00076 CoreVars->IAP = 0; 00077 CoreVars->MAF = 0; 00078 }