diff --git a/cube/User/Src/frontend.c b/cube/User/Src/frontend.c index 187fe59..cac960d 100644 --- a/cube/User/Src/frontend.c +++ b/cube/User/Src/frontend.c @@ -28,12 +28,10 @@ void frontendSetThreshold(int32_t threshold) { void frontendEnable() { frontendEnabled = true; - show(DEBUG_1, ON); } void frontendDisable() { frontendEnabled = false; - show(DEBUG_1, OFF); } void frontendAdcCallback(ADC_HandleTypeDef* hadc) { @@ -52,8 +50,10 @@ void frontendAdcCallback(ADC_HandleTypeDef* hadc) { HAL_GPIO_WritePin(Frontend_Out_GPIO_Port, Frontend_Out_Pin, GPIO_PIN_SET); } } else { - holdValue = 0; - HAL_GPIO_WritePin(Frontend_Out_GPIO_Port, Frontend_Out_Pin, GPIO_PIN_SET); + if (holdValue != 0) { + holdValue = 0; + HAL_GPIO_WritePin(Frontend_Out_GPIO_Port, Frontend_Out_Pin, GPIO_PIN_SET); + } } } diff --git a/cube/User/Src/mbusComm.c b/cube/User/Src/mbusComm.c index 009f44c..76bad27 100644 --- a/cube/User/Src/mbusComm.c +++ b/cube/User/Src/mbusComm.c @@ -275,7 +275,6 @@ void mbusCommISR() { // They will be cleared by reading SR (already done above) followed by reading DR (below). bool errorFound = false; if ((isrflags & USART_SR_ORE) != RESET) { - show(DEBUG_2, TOGGLE); mbusCommStats.uartOverrunCnt += 1; errorFound = true; }