diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 25c82bc..4bdcada 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: '' assignees: '' - --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,8 +24,9 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Game [e.g. Forza Motorsport 7] + +- OS: [e.g. iOS] +- Game [e.g. Forza Motorsport 7] **Additional context** Add any other context about the problem here. diff --git a/.gitignore b/.gitignore index 61b89d0..e354c34 100644 --- a/.gitignore +++ b/.gitignore @@ -356,3 +356,5 @@ MigrationBackup/ .history/ dist/ + +release-builds/ \ No newline at end of file diff --git a/ForzaCore/PacketParse.cs b/ForzaCore/PacketParse.cs index 41ef180..9ecad7a 100644 --- a/ForzaCore/PacketParse.cs +++ b/ForzaCore/PacketParse.cs @@ -6,7 +6,8 @@ public static class PacketParse { private const int SLED_PACKET_LENGTH = 232; // FM7 private const int DASH_PACKET_LENGTH = 311; // FM7 - private const int FH7_PACKET_LENGTH = 324; // FH4 + private const int FH4_PACKET_LENGTH = 324; // FH4 + private const int FM8_PACKET_LENGTH = 331; // FM8 public static bool IsSledFormat(byte[] packet) { @@ -18,11 +19,17 @@ public static bool IsDashFormat(byte[] packet) return packet.Length == DASH_PACKET_LENGTH; } - public static bool IsFH7Format(byte[] packet) + public static bool IsFH4Format(byte[] packet) { - return packet.Length == FH7_PACKET_LENGTH; + return packet.Length == FH4_PACKET_LENGTH; } + public static bool IsFM8Format(byte[] packet) + { + return packet.Length == FM8_PACKET_LENGTH; + } + + internal static float GetSingle(byte[] bytes, int index) { ByteCheck(bytes, index, 4); diff --git a/ForzaCore/Program.cs b/ForzaCore/Program.cs index 87256b6..746d343 100644 --- a/ForzaCore/Program.cs +++ b/ForzaCore/Program.cs @@ -206,13 +206,10 @@ static bool AdjustToBufferType(int bufferLength) case 311: // FM7 dash FMData.BufferOffset = 0; return true; - case 331: // FM8 dash - FMData.BufferOffset = 0; - return true; case 324: // FH4 FMData.BufferOffset = 12; return true; - case 331: // FM 2023 + case 331: // FM8 dash FMData.BufferOffset = 0; return true; default: diff --git a/README.md b/README.md index cfd76d2..b6845f7 100644 --- a/README.md +++ b/README.md @@ -81,13 +81,13 @@ OR - This app allows users to save all telemetry to a CSV file for later analysis - All incoming telemetry data is saved (along with the timestamp) - -This gif was created by using the Recording feature and Forza Map Visualization to make a 3D trace of the player's XYZ coordinates during a race + + This gif was created by using the Recording feature and Forza Map Visualization to make a 3D trace of the player's XYZ coordinates during a race ### Map Trail - Your car's path will be drawn in real-time as you drive around in either Motorsport or Horizon - + ### Fuel Management diff --git a/package.json b/package.json index 533d8f0..964a00d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "forza-telemetry", - "version": "1.1.0", - "description": "", + "version": "1.2.0", + "description": "Telemetry app for Forza", "main": "dist/main.js", "scripts": { "build:react": "webpack --mode development --config webpack.react.config.js", @@ -13,7 +13,8 @@ "check-format": "prettier --check .", "check-lint": "eslint . --ext ts --ext tsx --ext js", "format": "prettier --write .", - "test-all": "npm run check-format && npm run check-lint && npm run check-types && npm run build" + "test-all": "npm run check-format && npm run check-lint && npm run check-types && npm run build", + "debug": "node --nolazy --inspect-brk=5858 ./dist/main.js" }, "repository": { "type": "git",