Mercurial > public > ostc4
comparison Discovery/Src/data_exchange_main.c @ 109:65a6e352ce08 FlipDisplay
Consider computer heading in case of a flipped display
author | Ideenmodellierer |
---|---|
date | Tue, 01 Jan 2019 21:00:55 +0100 |
parents | 8f8ea3a32e82 |
children | 3834b6272ee5 |
comparison
equal
deleted
inserted
replaced
108:f561c79b0546 | 109:65a6e352ce08 |
---|---|
911 pStateReal->lifeData.dive_time_seconds = (int32_t)dataIn.data[dataIn.boolTimeData].divetime_seconds; | 911 pStateReal->lifeData.dive_time_seconds = (int32_t)dataIn.data[dataIn.boolTimeData].divetime_seconds; |
912 pStateReal->lifeData.dive_time_seconds_without_surface_time = (int32_t)dataIn.data[dataIn.boolTimeData].dive_time_seconds_without_surface_time; | 912 pStateReal->lifeData.dive_time_seconds_without_surface_time = (int32_t)dataIn.data[dataIn.boolTimeData].dive_time_seconds_without_surface_time; |
913 pStateReal->lifeData.counterSecondsShallowDepth = dataIn.data[dataIn.boolTimeData].counterSecondsShallowDepth; | 913 pStateReal->lifeData.counterSecondsShallowDepth = dataIn.data[dataIn.boolTimeData].counterSecondsShallowDepth; |
914 pStateReal->lifeData.surface_time_seconds = (int32_t)dataIn.data[dataIn.boolTimeData].surfacetime_seconds; | 914 pStateReal->lifeData.surface_time_seconds = (int32_t)dataIn.data[dataIn.boolTimeData].surfacetime_seconds; |
915 | 915 |
916 | |
916 pStateReal->lifeData.compass_heading = dataIn.data[dataIn.boolCompassData].compass_heading; | 917 pStateReal->lifeData.compass_heading = dataIn.data[dataIn.boolCompassData].compass_heading; |
918 if(settingsGetPointer()->FlipDisplay) /* consider that diver is targeting into the opposite direction */ | |
919 { | |
920 pStateReal->lifeData.compass_heading -= 180.0; | |
921 if (pStateReal->lifeData.compass_heading < 0) pStateReal->lifeData.compass_heading +=360.0; | |
922 } | |
923 | |
924 | |
917 pStateReal->lifeData.compass_roll = dataIn.data[dataIn.boolCompassData].compass_roll; | 925 pStateReal->lifeData.compass_roll = dataIn.data[dataIn.boolCompassData].compass_roll; |
918 pStateReal->lifeData.compass_pitch = dataIn.data[dataIn.boolCompassData].compass_pitch; | 926 pStateReal->lifeData.compass_pitch = dataIn.data[dataIn.boolCompassData].compass_pitch; |
919 | 927 |
920 pStateReal->lifeData.compass_DX_f = dataIn.data[dataIn.boolCompassData].compass_DX_f; | 928 pStateReal->lifeData.compass_DX_f = dataIn.data[dataIn.boolCompassData].compass_DX_f; |
921 pStateReal->lifeData.compass_DY_f = dataIn.data[dataIn.boolCompassData].compass_DY_f; | 929 pStateReal->lifeData.compass_DY_f = dataIn.data[dataIn.boolCompassData].compass_DY_f; |