docs:coding_by_convention

This commit is contained in:
rusefillc 2024-12-03 09:45:21 -05:00
parent cc7cce8a07
commit e0b06acefd
2 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,7 @@ void RegisteredOutputPin::unregister() {
#define CONFIG_PIN_OFFSETS2(x, y) CONFIG_OFFSET2(x, y##Pin), CONFIG_OFFSET2(x, y##PinMode)
EnginePins::EnginePins() :
// [tag:coding_by_convention] 'mainRelay' member here uses 'mainRelayPin' and 'mainRelayPinMode' configuration fields
mainRelay("Main Relay", CONFIG_PIN_OFFSETS(mainRelay)),
hpfpValve("HPFP Valve", CONFIG_PIN_OFFSETS(hpfpValve)),
starterControl("Starter Relay", CONFIG_PIN_OFFSETS(starterControl)),

View File

@ -350,6 +350,7 @@ custom brain_input_pin_e 2 bits, U16, @OFFSET@, [0:8], $brain_input_pin_e_list
! 'brain_input_pin_e' is XXX
! 'switch_input_pin_e' is a slow digital input suitable for clutch or brake pedal switch but not suitable for VSS or Flex sensor input
!
! by the way [tag:coding_by_convention]
! this value is used unless it's overloaded (preloaded?) in prepend file! todo document this a bit more!
#define sent_input_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PF0", "PF1", "PF2", "PF3", "PF4", "PF5", "PF6", "PF7", "PF8", "PF9", "PF10", "PF11", "PF12", "PF13", "PF14", "PF15", "PG0", "PG1", "PG2", "PG3", "PG4", "PG5", "PG6", "PG7", "PG8", "PG9", "PG10", "PG11", "PG12", "PG13", "PG14", "PG15", "PH0", "PH1", "PH2", "PH3", "PH4", "PH5", "PH6", "PH7", "PH8", "PH9", "PH10", "PH11", "PH12", "PH13", "PH14", "PH15", "PI0", "PI1", "PI2", "PI3", "PI4", "PI5", "PI6", "PI7", "PI8", "PI9", "PI10", "PI11", "PI12", "PI13", "PI14", "PI15"
@ -462,6 +463,7 @@ uint16_t engineSnifferRpmThreshold;Engine sniffer would be disabled above this r
uint16_t idlePositionMin;Voltage when the idle valve is closed.\nYou probably don't have one of these!;"mv", 1, 0, 0, 5000, 0
uint16_t idlePositionMax;Voltage when the idle valve is open.\nYou probably don't have one of these!\n1 volt = 1000 units;"mv", 1, 0, 0, 5000, 0
! [tag:coding_by_convention]
output_pin_e mainRelayPin;
Gpio sdCardCsPin;
Gpio canTxPin