add python dumpLog.py utility to view log files created using 'startStateLogging'

don't enable <CTRL> for hotkeys yet
add some more profile markers
log objectId and linkIndex as signed int ('i') and not unsigned int 'I'
fix issue in startStateLogging: number of parameters was wrong
This commit is contained in:
Erwin Coumans
2017-04-12 15:02:47 -07:00
parent f73b54e4ab
commit 5158c1ae98
12 changed files with 158 additions and 25 deletions

View File

@@ -84,6 +84,27 @@ int readMinitaurLogFile(const char* fileName, btAlignedObjectArray<std::string>&
switch (structTypes[i])
{
case 'I':
{
size_t s = fread(blaat,sizeof(int),1,f);
if (s != 1)
{
eof = true;
retVal = eCorruptValue;
break;
}
int v = (int) *(unsigned int*)blaat;
if (s==1)
{
if (verbose)
{
printf("%s = %d\n",structNames[i].c_str(),v);
}
record.m_values.push_back(v);
}
break;
}
case 'i':
{
size_t s = fread(blaat,sizeof(int),1,f);
if (s != 1)
@@ -219,6 +240,7 @@ void appendMinitaurLogData(FILE* f, std::string& structTypes, const MinitaurLogR
{
switch(structTypes[i])
{
case 'i':
case 'I':
{
fwrite(&logData.m_values[i].m_intVal,sizeof(int),1,f);