changeset 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 08af5d707c5a
children 64bf41faab83
files Small_CPU/Src/externalInterface.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
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;
 }