From 3cd327b0d076e2fc38145d4044ec6eab91eb8e4c Mon Sep 17 00:00:00 2001 From: yessine kammoun Date: Fri, 29 Jan 2021 15:42:40 +0100 Subject: [PATCH] add GPS description and SD script --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index 16b2b1c..dd34211 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,28 @@ To know the cause of [wake of ESP32](https://docs.espressif.com/projects/esp-idf |`int FilterGpsData(char* isoTime, double* res)`|It avoids incoherent points especially when the GPS speed is more than 350 km/h this value could be changed. It calulates also the slope. It returns 1 if a slope can be calculated (It requires two successive points), 0 if it is not possible and -1 if the point is incoherent| |`int AddGPSData(char* isoTime,char* p, int* nbr)`|It writes the GPS data collected previously in string pointed by `p`. It returns 1 if a data was written otherwise 0| +### customized_MEMS.h/cpp + +|Method|Description| +|:----:|:---------:| +|`void init_MEMS_dev(void)`|It initializes the IMU device| +|`void calibrateMEMS(void)`|It calibrates the IMU device| +|`int isDataMEMSReady(MEMS_dev* md)`|It checks if an IMU data is ready. It returns 1 if it is the case otherwise 0| +|`int AddMEMSData(char* isoTime,char* p,int* nbr,int GPS_Stat)`|It writes the IMU data in the string pointed by `p`. It returns 1 if a data is received otherwise 0| + +### customized_OBD.h/cpp + +|Method|Description| +|:----:|:---------:| +|`void init_OBD_dev(void)`|It initializes the OBD device and ensure the connection to the vehicle| +|`int GetOBDInfo(uint8_t pid, int* val)`|It asks the MPU of the vehicle about the value of a certain data based on OBD pid. If a data is available it returns 1 otherwise 0| +|`void ErrorOBDCheck(void)`|It checks for OBD errors. For example if the engine is off| +|`int set_obd(void)`|It is called by `void init_OBD_dev(void)` to ensure connection. It returns 1 if the it done otherwise 0| +|`int OBD_looping(ObdInfoPid* PIDs, int nbr_elem,int fr_max)`|It is called by the OBD tasks to ask the MPU about certain OBD pids and send data to the SD card| +|`void CheckObdSpeed(char* label,char* isoTime,int val, int* res)`|Check wether OBD speed leveled off and make ESP32 entreing in deep sleep if the vehicle has stopped| + + + -- libgit2 0.21.4