comparison Discovery/Src/t7.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 d9290c76b840
children 8507a87f6401
comparison
equal deleted inserted replaced
993:df052f0347fb 994:bad5561c0c59
4646 { 4646 {
4647 ChargerLog[curIndex++] = level; 4647 ChargerLog[curIndex++] = level;
4648 } 4648 }
4649 else 4649 else
4650 { 4650 {
4651 memcpy (&ChargerLog[0],&ChargerLog[1],sizeof(ChargerLog) - 1); 4651 memmove(&ChargerLog[0], &ChargerLog[1], sizeof(ChargerLog) - 1);
4652 ChargerLog[curIndex] = level; 4652 ChargerLog[curIndex] = level;
4653 } 4653 }
4654 if(curIndex > 1) /* estimate time til charging is complete */ 4654 if(curIndex > 1) /* estimate time til charging is complete */
4655 { 4655 {
4656 averageSpeed = ((averageSpeed * (curIndex-1)) + charge) / curIndex; 4656 averageSpeed = ((averageSpeed * (curIndex-1)) + charge) / curIndex;