mirror of https://github.com/FOME-Tech/fome-fw.git
getHip_state_e(hip_state_e value) method for usability
This commit is contained in:
parent
cedc0b251a
commit
3202e6e772
|
@ -130,7 +130,26 @@ case ZIL_130:
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
const char *getTrigger_type_e(trigger_type_e value){
|
|
||||||
|
const char *getHip_state_e(hip_state_e value) {
|
||||||
|
switch (value) {
|
||||||
|
case NOT_READY:
|
||||||
|
return "NOT_READY";
|
||||||
|
case READY_TO_INTEGRATE:
|
||||||
|
return "READY_TO_INTEGRATE";
|
||||||
|
case IS_INTEGRATING:
|
||||||
|
return "IS_INTEGRATING";
|
||||||
|
case WAITING_FOR_ADC_TO_SKIP:
|
||||||
|
return "WAITING_FOR_ADC_TO_SKIP";
|
||||||
|
case WAITING_FOR_RESULT_ADC:
|
||||||
|
return "WAITING_FOR_RESULT_ADC";
|
||||||
|
case IS_SENDING_SPI_COMMAND:
|
||||||
|
return "IS_SENDING_SPI_COMMAND";
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *getTrigger_type_e(trigger_type_e value) {
|
||||||
switch(value) {
|
switch(value) {
|
||||||
case Force_4b_trigger_type:
|
case Force_4b_trigger_type:
|
||||||
return "Force_4b_trigger_type";
|
return "Force_4b_trigger_type";
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "rusefi_enums.h"
|
#include "rusefi_enums.h"
|
||||||
const char *getEngine_type_e(engine_type_e value);
|
const char *getEngine_type_e(engine_type_e value);
|
||||||
|
const char *getHip_state_e(hip_state_e value);
|
||||||
const char *getTrigger_type_e(trigger_type_e value);
|
const char *getTrigger_type_e(trigger_type_e value);
|
||||||
const char *getAdc_channel_mode_e(adc_channel_mode_e value);
|
const char *getAdc_channel_mode_e(adc_channel_mode_e value);
|
||||||
const char *getTrigger_value_e(trigger_value_e value);
|
const char *getTrigger_value_e(trigger_value_e value);
|
||||||
|
|
|
@ -889,4 +889,29 @@ typedef enum {
|
||||||
Internal_ForceMyEnumIntSize_can_nbc = ENUM_32_BITS,
|
Internal_ForceMyEnumIntSize_can_nbc = ENUM_32_BITS,
|
||||||
} can_nbc_e;
|
} can_nbc_e;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
NOT_READY,
|
||||||
|
/**
|
||||||
|
* the step after this one is always IS_INTEGRATING
|
||||||
|
* We only integrate if we have RPM
|
||||||
|
*/
|
||||||
|
READY_TO_INTEGRATE,
|
||||||
|
/**
|
||||||
|
* the step after this one is always WAITING_FOR_ADC_TO_SKIP
|
||||||
|
*/
|
||||||
|
IS_INTEGRATING,
|
||||||
|
/**
|
||||||
|
* the step after this one is always WAITING_FOR_RESULT_ADC
|
||||||
|
*/
|
||||||
|
WAITING_FOR_ADC_TO_SKIP,
|
||||||
|
/**
|
||||||
|
* the step after this one is always IS_SENDING_SPI_COMMAND or READY_TO_INTEGRATE
|
||||||
|
*/
|
||||||
|
WAITING_FOR_RESULT_ADC,
|
||||||
|
/**
|
||||||
|
* the step after this one is always READY_TO_INTEGRATE
|
||||||
|
*/
|
||||||
|
IS_SENDING_SPI_COMMAND,
|
||||||
|
} hip_state_e;
|
||||||
|
|
||||||
#endif /* RUSEFI_ENUMS_H_ */
|
#endif /* RUSEFI_ENUMS_H_ */
|
||||||
|
|
|
@ -9,29 +9,6 @@
|
||||||
#ifndef HIP9011_H_
|
#ifndef HIP9011_H_
|
||||||
#define HIP9011_H_
|
#define HIP9011_H_
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
NOT_READY,
|
|
||||||
/**
|
|
||||||
* the step after this one is always IS_INTEGRATING
|
|
||||||
*/
|
|
||||||
READY_TO_INTEGRATE,
|
|
||||||
/**
|
|
||||||
* the step after this one is always WAITING_FOR_ADC_TO_SKIP
|
|
||||||
*/
|
|
||||||
IS_INTEGRATING,
|
|
||||||
/**
|
|
||||||
* the step after this one is always WAITING_FOR_RESULT_ADC
|
|
||||||
*/
|
|
||||||
WAITING_FOR_ADC_TO_SKIP,
|
|
||||||
/**
|
|
||||||
* the step after this one is always IS_SENDING_SPI_COMMAND or READY_TO_INTEGRATE
|
|
||||||
*/
|
|
||||||
WAITING_FOR_RESULT_ADC,
|
|
||||||
/**
|
|
||||||
* the step after this one is always READY_TO_INTEGRATE
|
|
||||||
*/
|
|
||||||
IS_SENDING_SPI_COMMAND,
|
|
||||||
} hip_state_e;
|
|
||||||
|
|
||||||
// 0b01000000
|
// 0b01000000
|
||||||
#define SET_PRESCALER_CMD 0x40
|
#define SET_PRESCALER_CMD 0x40
|
||||||
|
|
Loading…
Reference in New Issue