Mercurial > public > ostc4
comparison Discovery/Src/data_exchange_main.c @ 778:74253a41cf80
Zusammenf?hren
author | heinrichsweikamp |
---|---|
date | Mon, 22 May 2023 09:15:09 +0200 |
parents | 45b8f3c2acce |
children | e40790a67165 |
comparison
equal
deleted
inserted
replaced
777:6a8cf91e5b22 | 778:74253a41cf80 |
---|---|
1094 pStateReal->lifeData.dive_time_seconds_without_surface_time = (int32_t)dataIn.data[dataIn.boolTimeData].dive_time_seconds_without_surface_time; | 1094 pStateReal->lifeData.dive_time_seconds_without_surface_time = (int32_t)dataIn.data[dataIn.boolTimeData].dive_time_seconds_without_surface_time; |
1095 pStateReal->lifeData.counterSecondsShallowDepth = dataIn.data[dataIn.boolTimeData].counterSecondsShallowDepth; | 1095 pStateReal->lifeData.counterSecondsShallowDepth = dataIn.data[dataIn.boolTimeData].counterSecondsShallowDepth; |
1096 pStateReal->lifeData.surface_time_seconds = (int32_t)dataIn.data[dataIn.boolTimeData].surfacetime_seconds; | 1096 pStateReal->lifeData.surface_time_seconds = (int32_t)dataIn.data[dataIn.boolTimeData].surfacetime_seconds; |
1097 | 1097 |
1098 pStateReal->lifeData.compass_heading = dataIn.data[dataIn.boolCompassData].compass_heading; | 1098 pStateReal->lifeData.compass_heading = dataIn.data[dataIn.boolCompassData].compass_heading; |
1099 if(settingsGetPointer()->FlipDisplay) /* consider that diver is targeting into the opposite direction */ | 1099 if (pStateReal->lifeData.compass_heading != -1) { |
1100 { | 1100 if (pSettings->FlipDisplay) { /* consider that diver is targeting into the opposite direction */ |
1101 pStateReal->lifeData.compass_heading -= 180.0; | 1101 pStateReal->lifeData.compass_heading -= 180.0; |
1102 if (pStateReal->lifeData.compass_heading < 0) pStateReal->lifeData.compass_heading +=360.0; | 1102 } |
1103 } | 1103 |
1104 if (pSettings->compassDeclinationDeg != 0) { | |
1105 pStateReal->lifeData.compass_heading = pStateReal->lifeData.compass_heading + pSettings->compassDeclinationDeg - 360.0; | |
1106 } | |
1107 | |
1108 while (pStateReal->lifeData.compass_heading < 0) { | |
1109 pStateReal->lifeData.compass_heading += 360.0; | |
1110 } | |
1111 } | |
1104 | 1112 |
1105 pStateReal->lifeData.compass_roll = dataIn.data[dataIn.boolCompassData].compass_roll; | 1113 pStateReal->lifeData.compass_roll = dataIn.data[dataIn.boolCompassData].compass_roll; |
1106 pStateReal->lifeData.compass_pitch = dataIn.data[dataIn.boolCompassData].compass_pitch; | 1114 pStateReal->lifeData.compass_pitch = dataIn.data[dataIn.boolCompassData].compass_pitch; |
1107 | 1115 |
1108 pStateReal->lifeData.compass_DX_f = dataIn.data[dataIn.boolCompassData].compass_DX_f; | 1116 pStateReal->lifeData.compass_DX_f = dataIn.data[dataIn.boolCompassData].compass_DX_f; |