Skip to content

Commit dd9b0ed

Browse files
committed
feat: expose status LED pin as user-configurable in TunerStudio
1 parent f804390 commit dd9b0ed

18 files changed

Lines changed: 28 additions & 11 deletions

board_config.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Gpio communityCommsLedPin

board_configuration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "board_overrides.h"
33

44
Gpio getCommsLedPin() {
5-
return Gpio::Unassigned;
5+
return config->communityCommsLedPin;
66
}
77

88
Gpio getRunningLedPin() {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Gpio communityCommsLedPin

boards/mazduino-compact/board_configuration.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
#include "pch.h"
88
#include "board_overrides.h"
99

10-
Gpio getCommsLedPin() { return Gpio::B7; }
10+
Gpio getCommsLedPin() { return config->communityCommsLedPin; }
1111
Gpio getRunningLedPin() { return Gpio::Unassigned; }
1212
Gpio getWarningLedPin() { return Gpio::Unassigned; }
1313

1414
static void customBoardDefaultConfiguration() {
15+
config->communityCommsLedPin = Gpio::B7;
16+
1517
// Trigger inputs
1618
engineConfiguration->triggerInputPins[0] = Gpio::D3; // CKP
17-
engineConfiguration->triggerInputPins[1] = Gpio::D4; // CMP
1819

1920
// Analog sensors - ADC1
2021
// PA3 (EFI_ADC_3) is reserved for knock via ADC3 - do not assign here

boards/mazduino-compact/prepend.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
#define ts_show_hip9011 true
1111
#define show_tcu_gauges true
1212
#define MAX_TPS_PPS_DISCREPANCY 10
13+
#define ts_show_communityCommsLedPin true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Gpio communityCommsLedPin

boards/mazduino-lite/board_configuration.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
#include "pch.h"
88
#include "board_overrides.h"
99

10-
Gpio getCommsLedPin() { return Gpio::B7; }
10+
Gpio getCommsLedPin() { return config->communityCommsLedPin; }
1111
Gpio getRunningLedPin() { return Gpio::Unassigned; }
1212
Gpio getWarningLedPin() { return Gpio::Unassigned; }
1313

1414
static void customBoardDefaultConfiguration() {
15+
config->communityCommsLedPin = Gpio::B7;
16+
1517
// Trigger inputs - digital output from VR conditioner
1618
engineConfiguration->triggerInputPins[0] = Gpio::C6; // CKP
17-
engineConfiguration->triggerInputPins[1] = Gpio::E11; // CMP
1819
// VR1=PD3, VR2=PD4 are raw analog inputs to VR conditioner on board
1920

2021
// Analog sensors - ADC1

boards/mazduino-lite/prepend.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
#define ts_show_hip9011 true
1111
#define show_tcu_gauges true
1212
#define MAX_TPS_PPS_DISCREPANCY 10
13+
#define ts_show_communityCommsLedPin true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Gpio communityCommsLedPin

boards/mazduino-mega100-512/board_configuration.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
#include "pch.h"
1313
#include "board_overrides.h"
1414

15-
Gpio getCommsLedPin() { return Gpio::B7; }
15+
Gpio getCommsLedPin() { return config->communityCommsLedPin; }
1616
Gpio getRunningLedPin() { return Gpio::Unassigned; }
1717
Gpio getWarningLedPin() { return Gpio::Unassigned; }
1818

1919
static void customBoardDefaultConfiguration() {
20+
config->communityCommsLedPin = Gpio::B7;
21+
2022
// Trigger inputs
2123
engineConfiguration->triggerInputPins[0] = Gpio::D3; // CKP
22-
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
2324

2425
// Analog sensors - ADC1
2526
// PA3 (EFI_ADC_3) reserved for knock via ADC3

0 commit comments

Comments
 (0)