Mercurial > public > ostc4
diff Discovery/Src/data_exchange_main.c @ 51:8f8ea3a32e82
Resolved warnings pointing to possible invalid memory access
author | Ideenmodellierer |
---|---|
date | Tue, 31 Jul 2018 22:28:21 +0200 |
parents | 5f11787b4f42 |
children | a6f0881074a4 65a6e352ce08 |
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c Mon Jul 30 11:37:39 2018 +0200 +++ b/Discovery/Src/data_exchange_main.c Tue Jul 31 22:28:21 2018 +0200 @@ -738,7 +738,7 @@ // wireless - �ltere daten aufr�umen - for(int i=0;i<=(2*NUM_GASES+1);i++) + for(int i=0;i<(2*NUM_GASES+1);i++) { if(pStateReal->lifeData.bottle_bar[i]) { @@ -815,7 +815,9 @@ /* uint8_t IAmStolenPleaseKillMe; */ - if(settingsGetPointer()->IAmStolenPleaseKillMe > 3) + pSettings = settingsGetPointer(); + + if(pSettings->IAmStolenPleaseKillMe > 3) { pSettings->salinity = 0; dataIn.data[dataIn.boolPressureData].surface_mbar = 999; @@ -823,7 +825,7 @@ dataIn.mode = MODE_DIVE; } - pSettings = settingsGetPointer(); + ambient = dataIn.data[dataIn.boolPressureData].pressure_mbar / 1000.0f; surface = dataIn.data[dataIn.boolPressureData].surface_mbar / 1000.0f;