Mercurial > public > ostc4
diff Small_CPU/Src/pressure.c @ 244:c20c73b0d034
Merged in janlmulder/ostc4/div-fixes-5 (pull request #15)
Improvement SPI stability/recoverability and cleanup, and trivial bugfixes
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Tue, 09 Apr 2019 08:52:44 +0000 |
parents | 2b9775f71e30 |
children | 8e9c502c0b06 |
line wrap: on
line diff
--- a/Small_CPU/Src/pressure.c Sat Apr 06 09:41:14 2019 +0200 +++ b/Small_CPU/Src/pressure.c Tue Apr 09 08:52:44 2019 +0000 @@ -29,7 +29,7 @@ at the beginning of a dive the oldest value will be used */ - +#include "scheduler.h" #include "pressure.h" #include "i2c.h" #include "rtc.h" @@ -261,7 +261,7 @@ C2_x_2p16 = C[2] * 65536; C1_x_2p15 = C[1] * 32768; - if(I2C1_Status() == HAL_OK) + if(global.I2C_SystemStatus == HAL_OK) { pressureSensorInitSuccess = 1; } @@ -360,7 +360,7 @@ void pressure_calculation(void) { - if(I2C1_Status() != HAL_OK) + if(global.I2C_SystemStatus != HAL_OK) return; pressure_calculation_AN520_004_mod_MS5803_30BA__09_2015();