Mercurial > public > ostc4
comparison Discovery/Src/tInfoPreDive.c @ 994:bad5561c0c59 GasConsumption
Fix a compilation error occurring on non-Windows platforms, caused by incorrect case in '#include' file names.
Also fix some compiler warnings from non-safe use of 'memcpy'. (mikeller)
| author | heinrichsweikamp |
|---|---|
| date | Sun, 27 Apr 2025 09:56:22 +0200 |
| parents | fce639612464 |
| children |
comparison
equal
deleted
inserted
replaced
| 993:df052f0347fb | 994:bad5561c0c59 |
|---|---|
| 68 pressureHistoryIndex++; | 68 pressureHistoryIndex++; |
| 69 pressureHistory[pressureHistoryIndex] = newValue; | 69 pressureHistory[pressureHistoryIndex] = newValue; |
| 70 } | 70 } |
| 71 else | 71 else |
| 72 { | 72 { |
| 73 memcpy (&pressureHistory[0],&pressureHistory[2],sizeof(pressureHistory) - 2); | 73 memmove(&pressureHistory[0], &pressureHistory[2], sizeof(pressureHistory) - 2); |
| 74 pressureHistory[pressureHistoryIndex] = newValue; | 74 pressureHistory[pressureHistoryIndex] = newValue; |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 static void storeTemperatureValue(uint16_t temperature) | 78 static void storeTemperatureValue(uint16_t temperature) |
| 85 temperatureHistoryIndex++; | 85 temperatureHistoryIndex++; |
| 86 temperatureHistory[temperatureHistoryIndex] = newValue; | 86 temperatureHistory[temperatureHistoryIndex] = newValue; |
| 87 } | 87 } |
| 88 else | 88 else |
| 89 { | 89 { |
| 90 memcpy (&temperatureHistory[0],&temperatureHistory[2],sizeof(temperatureHistory) - 2); | 90 memmove(&temperatureHistory[0], &temperatureHistory[2], sizeof(temperatureHistory) - 2); |
| 91 temperatureHistory[temperatureHistoryIndex] = newValue; | 91 temperatureHistory[temperatureHistoryIndex] = newValue; |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 void openInfo_PreDive() | 95 void openInfo_PreDive() |
