Fixed graph definition saving and loading

This commit is contained in:
Collin Kidder
2017-04-21 10:35:44 -04:00
parent e2811af479
commit b016ddf909
3 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef CONFIG #ifndef CONFIG
#define CONFIG #define CONFIG
#define VERSION 164 #define VERSION 165
//try to keep this in sync. //try to keep this in sync.
//SavvyCAN will complain if you connect a GVRET board with a revision //SavvyCAN will complain if you connect a GVRET board with a revision
+4 -4
View File
@@ -47,17 +47,17 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'SavvyCAN' project = u'SavvyCAN'
copyright = u'2015, EVTV' copyright = u'2017, EVTV'
author = u'EVTV' author = u'Collin Kidder'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '137' version = '165'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '137' release = '165'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
+4 -1
View File
@@ -706,7 +706,8 @@ void GraphingWindow::saveDefinitions()
outFile->putChar(','); outFile->putChar(',');
outFile->write(QString::number(iter->mask, 16).toUtf8()); outFile->write(QString::number(iter->mask, 16).toUtf8());
outFile->putChar(','); outFile->putChar(',');
outFile->write(QString::number(iter->startBit).toUtf8()); if (iter->intelFormat) outFile->write(QString::number(iter->startBit).toUtf8());
else outFile->write(QString::number(iter->startBit * -1).toUtf8());
outFile->putChar(','); outFile->putChar(',');
outFile->write(QString::number(iter->numBits).toUtf8()); outFile->write(QString::number(iter->numBits).toUtf8());
outFile->putChar(','); outFile->putChar(',');
@@ -769,6 +770,8 @@ void GraphingWindow::loadDefinitions()
gp.ID = tokens[1].toInt(NULL, 16); gp.ID = tokens[1].toInt(NULL, 16);
gp.mask = tokens[2].toULongLong(NULL, 16); gp.mask = tokens[2].toULongLong(NULL, 16);
gp.startBit = tokens[3].toInt(); gp.startBit = tokens[3].toInt();
if (gp.startBit < 0) gp.intelFormat = false;
else gp.intelFormat = true;
gp.numBits = tokens[4].toInt(); gp.numBits = tokens[4].toInt();
if (tokens[5] == "Y") gp.isSigned = true; if (tokens[5] == "Y") gp.isSigned = true;
else gp.isSigned = false; else gp.isSigned = false;