diagnostic: TS indicator for failed analog inputs

This commit is contained in:
Andrey Gusakov 2024-12-12 00:47:37 +03:00 committed by rusefillc
parent 55fed44508
commit c3355296e0
6 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#define ts_show_tps_sent true
#define ts_show_gdi true
#define ts_show_gdi_low_level false
#define ts_show_analog_diag true
! f4 and debug would not be happy #define LUA_SCRIPT_SIZE 26000

View File

@ -22,6 +22,9 @@
#define ts_show_tcu true
#define ts_show_gdi true
#define ts_show_analog_diag true
#define FRONTEND_TITLE_BAR_NAME "uaEFI"
#define TIMING_ADJUSTMENT_SIZE 4

View File

@ -41,6 +41,8 @@ bit sd_active_rd;SD card reading
bit isMapValid;MAP from sensor seems valid
bit triggerPageRefreshFlag
bit hasFaultReportFile
bit isAnalogFailure;Analog sensors supply failure
! 1 unused bit left here
uint16_t RPMValue;@@GAUGE_NAME_RPM@@;"RPM",1, 0, 0, 8000, 0

View File

@ -254,6 +254,9 @@ void SensorChecker::onSlowCallback() {
if (analogGetDiagnostic() < 0) {
/* TODO: map to more OBD codes? */
warning(ObdCode::OBD_Sensor_Refence_Voltate_A_Open, "Analog subsystem fault");
state->isAnalogFailure = true;
} else {
state->isAnalogFailure = false;
}
#endif // EFI_PROD_CODE

View File

@ -2459,6 +2459,7 @@ end_struct
#define ts_show_tps_sent false
#define ts_show_fan2_settings true
#define ts_show_inj_diag false
#define ts_show_analog_diag false
#define ts_show_vr_threshold_all false
#define ts_show_vr_threshold_2 false
#define ts_show_experimental true

View File

@ -1911,6 +1911,7 @@ gaugeCategory = GPPWM Outputs
indicator = { wbo0_hasFault }, { WBO0: bitStringValue(wboFaultCodeList, wb1faultCode)}, { WBO0: bitStringValue(wboFaultCodeList, wb1faultCode)}, white, black, red, black
indicator = {injectorHwIssue}, "inj", "INJ", white, black, red, black@@if_ts_show_inj_diag
indicator = { isAnalogFailure }, "Analog Ok", "Analog error", white, black, red, black@@if_ts_show_analog_diag
; indicator = { isInjectionEnabled && fuelCutReason == 0 }, { Inj: bitStringValue(injModeList, currentInjectionMode) }, { Inj: bitStringValue(injModeList, currentInjectionMode) }, white, black, white, black
; indicator = { isIgnitionEnabled && sparkCutReason == 0 }, { Ign: bitStringValue(ignModeList, currentIgnitionMode) }, { Ign: bitStringValue(ignModeList, currentIgnitionMode) }, white, black, white, black