getDigital only works for 4 specific pins. Can it be made to work with generic digital pins? #4861

This commit is contained in:
rusefillc 2023-01-04 21:12:14 -05:00
parent 837e83ac0c
commit 7826816ecc
2 changed files with 18 additions and 2 deletions

View File

@ -1560,7 +1560,9 @@ uint8_t alsEtbPosition;;"", 1, 0, 0, 20000, 0
uint8_t ALSMaxDriverThrottleIntent;;"%", 1, 0, 0, 10, 0
pin_input_mode_e ALSActivatePinMode;
uint8_t[105] mainUnusedEnd;;"units", 1, 0, 0, 1, 0
uint8_t[2] unusedHereForYou
pin_input_mode_e[LUA_DIGITAL_INPUT_COUNT iterate] luaDigitalInputPinModes;
uint8_t[96] mainUnusedEnd;;"units", 1, 0, 0, 1, 0
! end of engine_configuration_s
end_struct

View File

@ -3771,7 +3771,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
dialog = scriptSettingDialog, "Script Settings", border
panel = scriptSetting, East
dialog = luaDigitalInputsDialog, "Lua Digital Inputs"
dialog = luaDigitalInputsLeftDialog
field = "Digital #1", luaDigitalInputPins1
field = "Digital #2", luaDigitalInputPins2
field = "Digital #3", luaDigitalInputPins3
@ -3781,6 +3781,20 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
field = "Digital #7", luaDigitalInputPins7
field = "Digital #8", luaDigitalInputPins8
dialog = luaDigitalInputsRightDialog
field = "Mode #1", luaDigitalInputPinModes1
field = "Mode #2", luaDigitalInputPinModes2
field = "Mode #3", luaDigitalInputPinModes3
field = "Mode #4", luaDigitalInputPinModes4
field = "Mode #5", luaDigitalInputPinModes5
field = "Mode #6", luaDigitalInputPinModes6
field = "Mode #7", luaDigitalInputPinModes7
field = "Mode #8", luaDigitalInputPinModes8
dialog = luaDigitalInputsDialog, "Lua Digital Inputs", border
panel = luaDigitalInputsLeftDialog, West
panel = luaDigitalInputsRightDialog, East
dialog = auxInputsDialog, "Lua Analog Inputs"
field = "ADC #1", auxAnalogInputs1
field = "ADC #2", auxAnalogInputs2