Changeset 28 for trunk/firmware_v2/SES/src/mode_secondaryprotection.c
- Timestamp:
- Oct 26, 2025, 5:43:37 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/firmware_v2/SES/src/mode_secondaryprotection.c
r24 r28 119 119 120 120 if (HAL_GPIO_ReadPin(GPIO_INPUT_FAULT_GPIO_Port, GPIO_INPUT_FAULT_Pin) == GPIO_PIN_RESET) 121 { 122 faultInput = 1; 121 { 122 HAL_Delay(1); // Verzögerung 1ms damit eventuell noch zuerst durch smartPro der Strom gestoppt werden kann 123 if (HAL_GPIO_ReadPin(GPIO_INPUT_FAULT_GPIO_Port, GPIO_INPUT_FAULT_Pin) == GPIO_PIN_RESET) 124 { 125 faultInput = 1; 126 } 127 123 128 } 124 129 else … … 216 221 static void SECONDARYPROTECTION_SM_ManualOn(void) 217 222 { 223 224 int faultInput = 0; 225 226 227 if (HAL_GPIO_ReadPin(GPIO_INPUT_FAULT_GPIO_Port, GPIO_INPUT_FAULT_Pin) == GPIO_PIN_RESET) 228 { 229 HAL_Delay(500); // Verzögerung 500ms damit eventuell noch zuerst durch smartPro der Strom gestoppt werden kann 230 if (HAL_GPIO_ReadPin(GPIO_INPUT_FAULT_GPIO_Port, GPIO_INPUT_FAULT_Pin) == GPIO_PIN_RESET) 231 { 232 faultInput = 1; 233 } 234 235 } 236 else 237 { 238 faultInput = 0; 239 } 240 241 if (faultInput == 1) 242 { 243 RELAIS_ResetPuls(); 244 BUZZER_Beep(BUZZER_ON_TIME_REJECT); //Warnung 245 LEDS_GN_Off(); 246 LEDS_RT_BlinkCode_Start(BLINK_CODE_ERROR_FAULT_INPUT, LED_RT_ON_TIME_WARN_FAULT_INPUT, LED_RT_OFF_TIME, LED_RT_OFF_TIME *5); //Fehler Anzeigen 247 BUTTON_SetModeOff(); //Damit nicht von alleine wieder eingeschaltet wird 248 printf("FAULT INPUT EVENT DETECTED!\n"); 249 printf("NEW_STATE: SECONDARYPROTECTION_ERROR\n"); 250 smState = SECONDARYPROTECTION_ERROR; 251 } 252 253 218 254 // Prüfe Wechsel in off mode 219 255 if (BUTTON_GetMode() == BUTTON_OFF)
Note: See TracChangeset
for help on using the changeset viewer.
