diff Small_CPU/Src/externalInterface.c @ 581:011d8f9f5ddb

Added ex Interface measurement restart in case of i2c disturbance: Just to make sure that, in case of a i2c problem, the measurement is restarted.
author Ideenmodellierer
date Sat, 12 Dec 2020 19:18:57 +0100
parents 84a4e1200726
children 1b995079c045
line wrap: on
line diff
--- a/Small_CPU/Src/externalInterface.c	Sat Dec 12 19:16:37 2020 +0100
+++ b/Small_CPU/Src/externalInterface.c	Sat Dec 12 19:18:57 2020 +0100
@@ -111,6 +111,14 @@
 				}
 			}
 		}
+		else		/* take also i2c bus disturb into account */
+		{
+			if(timeoutCnt++ >= ADC_TIMEOUT)
+			{
+				externalInterface_StartConversion(activeChannel);
+				timeoutCnt = 0;
+			}
+		}
 	}
 	return retval;
 }