Mercurial > public > ostc4
comparison Discovery/Src/simulation.c @ 548:e7e44986684a
Update roll and pitch value in simulation mode:
Roll and pitch values had not been provided to the simulated dive => added copy functions
author | Ideenmodellierer |
---|---|
date | Sun, 08 Nov 2020 16:38:43 +0100 |
parents | b2f8a39c11ea |
children | 55a9aa740f13 |
comparison
equal
deleted
inserted
replaced
547:12f8745c8a94 | 548:e7e44986684a |
---|---|
126 static float lastPressure_bar = 0; | 126 static float lastPressure_bar = 0; |
127 | 127 |
128 if(checkOncePerSecond) | 128 if(checkOncePerSecond) |
129 { | 129 { |
130 pDiveState->lifeData.temperature_celsius = stateRealGetPointer()->lifeData.temperature_celsius; | 130 pDiveState->lifeData.temperature_celsius = stateRealGetPointer()->lifeData.temperature_celsius; |
131 pDiveState->lifeData.battery_charge = stateRealGetPointer()->lifeData.battery_charge; | |
131 pDiveState->lifeData.compass_heading = stateRealGetPointer()->lifeData.compass_heading; | 132 pDiveState->lifeData.compass_heading = stateRealGetPointer()->lifeData.compass_heading; |
132 pDiveState->lifeData.battery_charge = stateRealGetPointer()->lifeData.battery_charge; | 133 pDiveState->lifeData.compass_roll = stateRealGetPointer()->lifeData.compass_roll; |
134 pDiveState->lifeData.compass_pitch = stateRealGetPointer()->lifeData.compass_pitch; | |
135 | |
133 #ifdef ENABLE_BOTTLE_SENSOR | 136 #ifdef ENABLE_BOTTLE_SENSOR |
134 pDiveState->lifeData.bottle_bar[pDiveState->lifeData.actualGas.GasIdInSettings] = stateRealGetPointer()->lifeData.bottle_bar[stateRealGetPointer()->lifeData.actualGas.GasIdInSettings]; | 137 pDiveState->lifeData.bottle_bar[pDiveState->lifeData.actualGas.GasIdInSettings] = stateRealGetPointer()->lifeData.bottle_bar[stateRealGetPointer()->lifeData.actualGas.GasIdInSettings]; |
135 pDiveState->lifeData.bottle_bar_age_MilliSeconds[pDiveState->lifeData.actualGas.GasIdInSettings] = stateRealGetPointer()->lifeData.bottle_bar_age_MilliSeconds[stateRealGetPointer()->lifeData.actualGas.GasIdInSettings]; | 138 pDiveState->lifeData.bottle_bar_age_MilliSeconds[pDiveState->lifeData.actualGas.GasIdInSettings] = stateRealGetPointer()->lifeData.bottle_bar_age_MilliSeconds[stateRealGetPointer()->lifeData.actualGas.GasIdInSettings]; |
136 #endif | 139 #endif |
137 int now = current_second(); | 140 int now = current_second(); |