Skip to content
Permalink
Browse files

Added post-read verification, removed old Android stuff.

  • Loading branch information...
LegacyNsfw committed Nov 26, 2019
1 parent 2dd540e commit 190552f9c7e018dafb0c6d38e646b9fb94311af9
Binary file not shown.

This file was deleted.

@@ -123,6 +123,48 @@ public async Task<Response<Stream>> ReadContents(PcmInfo info, CancellationToken
startAddress += blockSize;
}

logger.AddUserMessage("Read complete. Starting verification...");
Query<UInt32> chipIdQuery = this.vehicle.CreateQuery<UInt32>(
this.protocol.CreateFlashMemoryTypeQuery,
this.protocol.ParseFlashMemoryType,
cancellationToken);

Response<UInt32> chipIdResponse = await chipIdQuery.Execute();

if (chipIdResponse.Status == ResponseStatus.Success)
{
IList<MemoryRange> ranges = FlashChips.GetMemoryRanges(chipIdResponse.Value, this.logger);
if (ranges != null)
{
CKernelVerifier verifier = new CKernelVerifier(
image,
ranges,
this.vehicle,
this.protocol,
this.logger);

if (await verifier.CompareRanges(
ranges,
image,
BlockType.All,
cancellationToken))
{
logger.AddUserMessage("The PCM was read without errors.");
}
else
{
logger.AddUserMessage("##############################################################################");
logger.AddUserMessage("There are errors in the data that was read from the PCM. Do not use this file.");
logger.AddUserMessage("##############################################################################");
}
}
}
else
{
logger.AddUserMessage("Unable to determine which flash chip is in this PCM.");
logger.AddUserMessage("That prevents us from validating the results of this operation.");
}

await this.vehicle.Cleanup(); // Not sure why this does not get called in the finally block on successfull read?

MemoryStream stream = new MemoryStream(image);
@@ -4,8 +4,6 @@ This particular OS offers support for regular gas OR E85. This OS is easy to fin

With this OS any combination of engine, trans, dbw, dbc, flex fuel are available with ONE operating system.

1,2,3 bar custom OS's can also be found for the 12587603 OS.

12587603 OS was updated by GM to 12606960 in � ton truck applications, SPS has never had an update for the 2500/3500 Truck/Van.

Example Vin for flashing with SPS: 1GCEK19T94Z133425

0 comments on commit 190552f

Please sign in to comment.
You can’t perform that action at this time.