diff --git a/firmware/controllers/core/fsio_core.cpp b/firmware/controllers/core/fsio_core.cpp index 92e353f89b..cb41c17132 100644 --- a/firmware/controllers/core/fsio_core.cpp +++ b/firmware/controllers/core/fsio_core.cpp @@ -19,6 +19,7 @@ #include "fsio_core.h" #include "fsio_impl.h" +#include "adc_inputs.h" extern fsio8_Map3D_f32t fsioTable1; extern fsio8_Map3D_u8t fsioTable2; @@ -283,6 +284,9 @@ bool LECalculator::processElement(Engine *engine, LEElement *element) { } } break; + case LE_METHOD_FSIO_ANALOG_INPUT: + push(element->action, getVoltage("fsio", engine->engineConfiguration->fsioAdc[0])); + break; case LE_METHOD_KNOCK: push(element->action, engine->knockCount); break; diff --git a/firmware/controllers/core/fsio_core.h b/firmware/controllers/core/fsio_core.h index 4ef7e52146..3cb1ec02b8 100644 --- a/firmware/controllers/core/fsio_core.h +++ b/firmware/controllers/core/fsio_core.h @@ -49,6 +49,7 @@ typedef enum { LE_METHOD_FSIO_TABLE = 113, LE_METHOD_SELF = 114, LE_METHOD_MAP = 115, + LE_METHOD_FSIO_ANALOG_INPUT = 116, Force_4b_le_action = ENUM_32_BITS, diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index b0cbe82bc1..d93f9c1f3d 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -39,6 +39,7 @@ static LENameOrdinalPair leFanOffSetting(LE_METHOD_FAN_OFF_SETTING, "fan_off_set static LENameOrdinalPair leTimeSinceBoot(LE_METHOD_TIME_SINCE_BOOT, "time_since_boot"); static LENameOrdinalPair leFsioSetting(LE_METHOD_FSIO_SETTING, "fsio_setting"); static LENameOrdinalPair leFsioTable(LE_METHOD_FSIO_TABLE, "fsio_table"); +static LENameOrdinalPair leFsioAnalogInput(LE_METHOD_FSIO_ANALOG_INPUT, "fsio_input"); static LENameOrdinalPair leKnock(LE_METHOD_KNOCK, "knock"); #define LE_EVAL_POOL_SIZE 32