2015-07-10 06:01:56 -07:00
|
|
|
/*
|
2020-05-25 10:02:05 -07:00
|
|
|
* @file tunerstudio_outputs.h
|
2015-07-10 06:01:56 -07:00
|
|
|
* @brief Tuner Studio connectivity configuration
|
|
|
|
*
|
|
|
|
* In this file the configuration of TunerStudio is defined
|
|
|
|
*
|
|
|
|
* @date Oct 22, 2013
|
2020-01-13 18:57:43 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2020-02-24 13:47:10 -08:00
|
|
|
#pragma once
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#include "rusefi_types.h"
|
2020-02-24 13:47:10 -08:00
|
|
|
#include "scaled_channel.h"
|
2019-12-22 05:12:45 -08:00
|
|
|
#include "tunerstudio_debug_struct.h"
|
2021-11-17 21:19:11 -08:00
|
|
|
#include "ts_outputs_generated.h"
|
2019-12-22 05:12:45 -08:00
|
|
|
|
2020-04-26 11:06:09 -07:00
|
|
|
enum class TsCalMode : uint8_t {
|
|
|
|
None = 0,
|
|
|
|
Tps1Max = 1,
|
|
|
|
Tps1Min = 2,
|
|
|
|
EtbKp = 3,
|
|
|
|
EtbKi = 4,
|
|
|
|
EtbKd = 5,
|
2020-05-18 11:32:00 -07:00
|
|
|
Tps1SecondaryMax = 6,
|
|
|
|
Tps1SecondaryMin = 7,
|
2020-08-23 20:41:35 -07:00
|
|
|
Tps2Max = 8,
|
|
|
|
Tps2Min = 9,
|
|
|
|
Tps2SecondaryMax = 10,
|
|
|
|
Tps2SecondaryMin = 11,
|
2020-04-26 11:06:09 -07:00
|
|
|
};
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
/**
|
2021-11-17 20:22:08 -08:00
|
|
|
* todo https://github.com/rusefi/rusefi/issues/197
|
|
|
|
* At the moment rusEFI does NOT have any code generation around TS output channels, three locations have to be changed manually
|
2019-12-19 19:40:27 -08:00
|
|
|
* 1) this TunerStudioOutputChannels firmware version of the structure
|
|
|
|
* 2) '[OutputChannels]' block in rusefi.input
|
2021-11-17 20:22:08 -08:00
|
|
|
* 3) com.rusefi.core.Sensor enum in rusEFI console source code
|
2019-12-19 19:40:27 -08:00
|
|
|
*
|
2021-11-17 21:19:11 -08:00
|
|
|
* status update: there is progress, a portion of this struct is now generated! we inherit from generated
|
|
|
|
* ts_outputs_s and eventually the whole thing would be generated
|
|
|
|
*
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
2021-11-17 21:19:11 -08:00
|
|
|
struct TunerStudioOutputChannels : ts_outputs_s {
|
2018-01-06 07:53:15 -08:00
|
|
|
/* see also [OutputChannels] in rusefi.input */
|
2021-11-18 18:12:54 -08:00
|
|
|
|
2021-11-17 20:16:15 -08:00
|
|
|
scaled_percent accelerationYaw; // 312
|
2021-11-02 12:03:57 -07:00
|
|
|
|
|
|
|
scaled_channel<int8_t> vvtTargets[4]; // 314
|
2021-11-04 16:43:22 -07:00
|
|
|
scaled_channel<uint16_t> turboSpeed; // 318
|
2021-11-02 12:03:57 -07:00
|
|
|
|
2021-11-04 16:43:22 -07:00
|
|
|
uint8_t unusedAtTheEnd[18]; // we have some unused bytes to allow compatible TS changes
|
2019-12-22 05:12:45 -08:00
|
|
|
|
|
|
|
// Temporary - will remove soon
|
|
|
|
TsDebugChannels* getDebugChannels() {
|
|
|
|
return reinterpret_cast<TsDebugChannels*>(&debugFloatField1);
|
|
|
|
}
|
|
|
|
|
2018-01-06 07:53:15 -08:00
|
|
|
/* see also [OutputChannels] in rusefi.input */
|
2020-07-31 17:08:26 -07:00
|
|
|
/* see also TS_OUTPUT_SIZE in rusefi_config.txt */
|
2021-06-25 17:58:38 -07:00
|
|
|
};
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-10-08 18:02:51 -07:00
|
|
|
extern TunerStudioOutputChannels tsOutputChannels;
|