This commit is contained in:
parent
870c4e9d15
commit
7796c4e72c
|
@ -557,9 +557,7 @@ typedef enum {
|
|||
* Frankenso analog #12 PC4 ADC14
|
||||
*/
|
||||
|
||||
typedef enum
|
||||
//__attribute__ ((__packed__))
|
||||
{
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
EFI_ADC_0 = 0, // PA0
|
||||
EFI_ADC_1 = 1, // PA1
|
||||
EFI_ADC_2 = 2, // PA2
|
||||
|
@ -580,6 +578,11 @@ typedef enum
|
|||
// todo: bad choice of value since now we have ADC_CHANNEL_SENSOR and could end up with 17 and 18 also
|
||||
EFI_ADC_NONE = 16,
|
||||
EFI_ADC_ERROR = 17,
|
||||
#if EFI_UNIT_TEST
|
||||
TEST_MAF_CHANNEL = 113,
|
||||
TEST_CLT_CHANNEL = 114,
|
||||
TEST_IAT_CHANNEL = 115,
|
||||
#endif
|
||||
} adc_channel_e;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -11,7 +11,7 @@ float testMafValue = 0;
|
|||
float testCltValue = 0;
|
||||
float testIatValue = 0;
|
||||
|
||||
float getVoltageDivided(const char *msg, int channel) {
|
||||
float getVoltageDivided(const char *msg, adc_channel_e channel) {
|
||||
switch(channel) {
|
||||
case TEST_MAF_CHANNEL:
|
||||
return testMafValue;
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
#ifndef BOARDS_H_
|
||||
#define BOARDS_H_
|
||||
|
||||
#include "rusefi_enums.h"
|
||||
|
||||
#define ADC_CHANNEL_VREF 0
|
||||
|
||||
#define TEST_MAF_CHANNEL 10000013
|
||||
#define TEST_CLT_CHANNEL 10000014
|
||||
#define TEST_IAT_CHANNEL 10000015
|
||||
|
||||
float getVoltageDivided(const char *msg, int);
|
||||
float getVoltageDivided(const char *msg, adc_channel_e);
|
||||
float getVoltage(const char *msg, int channel);
|
||||
int getAdcValue(const char *msg, int channel);
|
||||
|
||||
|
|
|
@ -62,9 +62,9 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persiste
|
|||
|
||||
resetConfigurationExt(NULL, engineType PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
prepareShapes(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
engine->engineConfigurationPtr->mafAdcChannel = (adc_channel_e)TEST_MAF_CHANNEL;
|
||||
engine->engineConfigurationPtr->clt.adcChannel = (adc_channel_e)TEST_CLT_CHANNEL;
|
||||
engine->engineConfigurationPtr->iat.adcChannel = (adc_channel_e)TEST_IAT_CHANNEL;
|
||||
engine->engineConfigurationPtr->mafAdcChannel = TEST_MAF_CHANNEL;
|
||||
engine->engineConfigurationPtr->clt.adcChannel = TEST_CLT_CHANNEL;
|
||||
engine->engineConfigurationPtr->iat.adcChannel = TEST_IAT_CHANNEL;
|
||||
testCltValue = 1.492964;
|
||||
testIatValue = 4.03646;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "advance_map.h"
|
||||
|
||||
TEST(misc, structSize) {
|
||||
// ASSERT_EQ(1, sizeof(adc_channel_e)) << "small enum size";
|
||||
ASSERT_EQ(1, sizeof(adc_channel_e)) << "small enum size";
|
||||
ASSERT_EQ(1, sizeof(pin_input_mode_e)) << "small enum size";
|
||||
ASSERT_EQ(1, sizeof(pin_output_mode_e)) << "small enum size";
|
||||
// ASSERT_EQ(1, sizeof(brain_pin_e)) << "small enum size";
|
||||
|
|
Loading…
Reference in New Issue