rusefi-1/firmware/console/binary/tunerstudio_configuration.h

157 lines
4.6 KiB
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/*
* @file tunerstudio_configuration.h
* @brief Tuner Studio connectivity configuration
*
* In this file the configuration of TunerStudio is defined
*
* @date Oct 22, 2013
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2015-07-10 06:01:56 -07:00
*/
#ifndef TUNERSTUDIO_CONFIGURATION_H_
#define TUNERSTUDIO_CONFIGURATION_H_
#include "rusefi_types.h"
#define PAGE_COUNT 1
typedef struct {
uint16_t values[EGT_CHANNEL_COUNT];
} egt_values_s;
/**
* please be aware that 'float' (F32) type requires TunerStudio version 2.6 and later
*/
typedef struct {
// primary instrument cluster gauges
int rpm; // size 4, offset 0
2017-01-19 12:03:17 -08:00
/**
* This value is in Celcius - UI would convert into F if needed
*/
2016-01-20 14:01:53 -08:00
float coolantTemperature; // size 4, offset 4
2015-07-10 06:01:56 -07:00
float intakeAirTemperature; // size 4, offset 8
float throttlePositon; // size 4, offset 12
float massAirFlowVoltage; // size 4, offset 16
float airFuelRatio; // size 4, offset 20
float engineLoad; // size 4, offset 24
float vBatt; // size 4, offset 28
short int tpsADC; // size 2, offset 32
short int alignment; // size 2, offset 34
float baroPressure; // size 4, offset 36
2016-01-20 14:01:53 -08:00
float manifoldAirPressure; // size 4, offset 40
2016-10-12 22:02:02 -07:00
float crankingFuelMs; // offset 44
2015-07-10 06:01:56 -07:00
/**
* This is the raw value we take from the fuel map or base fuel algorithm, before the corrections
*/
2017-01-19 12:03:17 -08:00
float fuelBase; // 48
2015-07-10 06:01:56 -07:00
float tCharge; // 52
float ignitionAdvance; // 56
float sparkDwell; // 60
/**
* this one contains total resulting fuel squirt time, per event
2016-10-12 22:02:02 -07:00
* With all corrections and injector lag. See also baseFuel
2015-07-10 06:01:56 -07:00
*/
2016-05-23 18:01:32 -07:00
float actualLastInjection; // 64
2016-01-24 13:01:28 -08:00
float debugFloatField1; // 68
2015-07-10 06:01:56 -07:00
/**
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
* water 4 bytes per traffic - I want gauges to work as fast as possible
*/
2016-06-20 17:02:47 -07:00
unsigned int hasSdCard : 1; // bit 0, 72
2015-07-10 06:01:56 -07:00
unsigned int isIgnitionEnabled : 1; // bit 1
2016-01-20 14:01:53 -08:00
unsigned int isInjectionEnabled : 1; // bit 2
unsigned int isCylinderCleanupEnabled : 1; // bit 3
unsigned int isCylinderCleanupActivated : 1; // bit 4
2015-07-10 06:01:56 -07:00
unsigned int isFuelPumpOn : 1; // bit 5
unsigned int isFanOn : 1; // bit 6
unsigned int isO2HeaterOn : 1; // bit 7
unsigned int checkEngine : 1; // bit 8
unsigned int needBurn : 1; // bit 9
unsigned int secondTriggerChannelEnabled : 1; // bit 10
unsigned int clutchUpState : 1; // bit 11
unsigned int clutchDownState : 1; // bit 12
unsigned int knockEverIndicator : 1; // bit 13
unsigned int knockNowIndicator : 1; // bit 14
2016-06-20 17:02:47 -07:00
float vehicleSpeedKph; // 76
2015-07-10 06:01:56 -07:00
unsigned int isTpsError : 1; // bit 0
unsigned int isCltError : 1; // bit 1
unsigned int isMapError : 1; // bit 2
unsigned int isIatError : 1; // bit 3
unsigned int isAcSwitchEngaged : 1; // bit 4
unsigned int isTriggerError : 1; // bit 5
unsigned int hasFatalError : 1; // bit 6
2016-07-14 20:02:55 -07:00
unsigned int isWarnNow : 1; // bit 7
2015-07-10 06:01:56 -07:00
int tsConfigVersion;
egt_values_s egtValues;
float rpmAcceleration;
2016-01-20 14:01:53 -08:00
float massAirFlow;
2017-01-19 12:03:17 -08:00
/**
* Current volumetric efficiency
*/
float veValue; // offset 112
2016-01-02 22:01:37 -08:00
/**
* TPS value delta within specified number of cycles
* See tpsAccelFuel
*/
float deltaTps; // offset 116
int triggerErrorsCounter; // offset 120
2016-01-30 19:03:36 -08:00
/**
* Engine load delta
*/
2016-03-12 17:03:40 -08:00
float engineLoadAccelExtra; // offset 124
2015-12-26 09:03:13 -08:00
float tpsAccelFuel; // offset 128
2015-07-10 06:01:56 -07:00
float baroCorrection;
float pedalPosition;
float injectorDutyCycle;
2016-01-10 10:03:32 -08:00
int knockCount; // 144
float fuelTankGauge; // 148
float knockLevel; // 152
int totalTriggerErrorCounter; // 156
2015-12-26 09:03:13 -08:00
float wallFuelAmount; // 160
2017-01-19 12:03:17 -08:00
/**
* multiplier, 1 means no correction, 1.20 means 20% extra
*/
2015-12-26 09:03:13 -08:00
float iatCorrection; // 164
floatms_t wallFuelCorrection; // 168
2016-01-22 10:02:51 -08:00
float idlePosition; // 172
float currentTargetAfr; // 176
float chargeAirMass; // 180
2017-01-19 12:03:17 -08:00
/**
* multiplier, 1 means no correction, 1.20 means 20% extra
*/
2016-01-22 10:02:51 -08:00
float cltCorrection; // 184
2016-09-09 21:02:11 -07:00
/**
2017-01-19 12:03:17 -08:00
* Total fuel with CLT, IAT and TPS acceleration without injector lag corrections per cycle,
* as squirt duration.
*
2016-09-09 21:02:11 -07:00
* @see actualLastInjection
*/
2017-01-19 12:03:17 -08:00
float fuelRunning; // 188
2016-01-24 13:01:28 -08:00
int debugIntField1; // 192
2016-01-22 16:01:28 -08:00
float injectorLagMs; // 196
2016-01-30 19:03:36 -08:00
float debugFloatField2; // 200
float debugFloatField3; // 204
float debugFloatField4; // 208
float debugFloatField5; // 212
int debugIntField2; // 216
int debugIntField3; // 220
2016-02-12 19:01:25 -08:00
int timeSeconds; // 224
2016-03-12 17:03:40 -08:00
float engineLoadDelta; // 228
2016-06-19 20:02:56 -07:00
float speedToRpmRatio; // 232
2016-07-13 16:03:06 -07:00
int warningCounter; // 236
2016-07-13 19:02:35 -07:00
int lastErrorCode; // 240
2017-01-19 12:03:17 -08:00
/**
* Microcontroller own internal temperature, C
*/
2016-07-19 20:03:32 -07:00
float internalMcuTemperature; // 244
2016-08-20 20:02:09 -07:00
float vvtPosition; // 248
2016-09-11 20:03:00 -07:00
int engineMode; // 252
2016-09-20 18:02:46 -07:00
float debugFloatField6; // 256
float debugFloatField7; // 260
2016-12-25 10:02:34 -08:00
int firmwareVersion; // 264
2017-01-22 14:03:31 -08:00
float fuelPidCorrection; // 268
int unused3[21];
2015-07-10 06:01:56 -07:00
} TunerStudioOutputChannels;
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */