aboutsummaryrefslogtreecommitdiffstats
path: root/source/communication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/communication.cpp')
-rw-r--r--source/communication.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/communication.cpp b/source/communication.cpp
index 3a264fb..ec02a42 100644
--- a/source/communication.cpp
+++ b/source/communication.cpp
@@ -142,8 +142,8 @@ void loadAlgorithm(unsigned char *cmd)
unsigned int size = cmd[1] | (cmd[2] << 8);
if (EM.assert(size < MAX_ELF_FILE_SIZE, Error::BadUserCodeSize)) {
USBSerial::read(ELFManager::fileBuffer(), size);
- auto entry = ELFManager::loadFromInternalBuffer();
- EM.assert(entry != nullptr, Error::BadUserCodeLoad);
+ auto success = ELFManager::loadFromInternalBuffer();
+ EM.assert(success, Error::BadUserCodeLoad);
}
}
}
@@ -214,6 +214,8 @@ void readIdentifier(unsigned char *)
void readExecTime(unsigned char *)
{
+ // Stores the measured execution time.
+ extern time_measurement_t conversion_time_measurement;
USBSerial::write(reinterpret_cast<uint8_t *>(&conversion_time_measurement.last),
sizeof(rtcnt_t));
}