Remove scheduler debug pins (#1359)

* trigger gen refactoring

* missed one

* remove microsecond timer debug pins

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2020-04-24 20:13:05 -07:00 committed by GitHub
parent f704bf22cb
commit a8db44d48a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 15 deletions

View File

@ -571,8 +571,6 @@ static void initStatusLeds(void) {
enginePins.runningLedPin.initPin("led: running status", engineConfiguration->runningLedPin);
enginePins.debugTriggerSync.initPin("debug: sync", CONFIG(debugTriggerSync));
enginePins.debugTimerCallback.initPin("debug: timer callback", CONFIG(debugTimerCallback));
enginePins.debugSetTimer.initPin("debug: set timer", CONFIG(debugSetTimer));
}
#define BLINKING_PERIOD_MS 33

View File

@ -145,8 +145,6 @@ public:
OutputPin runningLedPin; // green LED on brain board by default
OutputPin debugTriggerSync;
OutputPin debugTimerCallback;
OutputPin debugSetTimer;
OutputPin boostPin;
OutputPin idleSolenoidPin;
OutputPin secondIdleSolenoidPin;

View File

@ -64,7 +64,6 @@ static volatile bool hwStarted = false;
* This function should be invoked under kernel lock which would disable interrupts.
*/
void setHardwareUsTimer(int32_t deltaTimeUs) {
enginePins.debugSetTimer.setValue(1);
efiAssertVoid(OBD_PCM_Processor_Fault, hwStarted, "HW.started");
setHwTimerCounter++;
/**
@ -81,7 +80,6 @@ void setHardwareUsTimer(int32_t deltaTimeUs) {
if (deltaTimeUs >= TOO_FAR_INTO_FUTURE_US) {
// we are trying to set callback for too far into the future. This does not look right at all
firmwareError(CUSTOM_ERR_TIMER_OVERFLOW, "setHardwareUsTimer() too far: %d", deltaTimeUs);
// let's make this look special and NOT toggle enginePins.debugSetTimer
return;
}
@ -90,11 +88,9 @@ void setHardwareUsTimer(int32_t deltaTimeUs) {
}
if (GPTDEVICE.state != GPT_READY) {
firmwareError(CUSTOM_HW_TIMER, "HW timer state %d/%d", GPTDEVICE.state, setHwTimerCounter);
// let's make this look special and NOT toggle enginePins.debugSetTimer
return;
}
if (hasFirmwareError()) {
// let's make this look special and NOT toggle enginePins.debugSetTimer
return;
}
gptStartOneShotI(&GPTDEVICE, deltaTimeUs);
@ -103,14 +99,12 @@ void setHardwareUsTimer(int32_t deltaTimeUs) {
lastSetTimerValue = deltaTimeUs;
isTimerPending = true;
timerRestartCounter++;
enginePins.debugSetTimer.setValue(0);
}
void globalTimerCallback();
static void hwTimerCallback(GPTDriver *gptp) {
(void)gptp;
enginePins.debugTimerCallback.setValue(1);
timerCallbackCounter++;
isTimerPending = false;
@ -120,7 +114,6 @@ static void hwTimerCallback(GPTDriver *gptp) {
if (precisionCallbackDuration > maxPrecisionCallbackDuration) {
maxPrecisionCallbackDuration = precisionCallbackDuration;
}
enginePins.debugTimerCallback.setValue(0);
}
class MicrosecondTimerWatchdogController : public PeriodicTimerController {

View File

@ -643,7 +643,7 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:7], "Off", "Slow", "Fas
brain_pin_e canRxPin;set_can_rx_pin X
pin_input_mode_e throttlePedalUpPinMode;
brain_pin_e debugTimerCallback
uint8_t unused711;
int idleThreadPeriodMs;
int consoleLoopPeriodMs;
@ -717,7 +717,7 @@ pin_output_mode_e hip9011IntHoldPinMode;
custom uart_device_e 1 bits,U32, @OFFSET@, [0:7], "Off", "UART1", "UART2", "UART3"
int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0
brain_pin_e debugSetTimer
uint8_t unused806
brain_pin_e debugMapAveraging;
output_pin_e starterRelayDisablePin;
pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running

View File

@ -1918,8 +1918,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "LCD D6 pin", HD44780_db6
field = "LCD D7 pin", HD44780_db7
field = "Debug Trigger Sync", debugTriggerSync
field = "Debug Timer Callback", debugTimerCallback
field = "Debug Set Timer", debugSetTimer
field = "Aux Fast Analog", auxFastSensor1_adcChannel
dialog = allPins1_3