Skip to content

Commit

Permalink
fix badly formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Dec 30, 2024
1 parent f89d0f6 commit 0c8761e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lemlog/logger/sinks/sd-card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#include <fstream>

namespace logger {
SDCard::SDCard(std::string filename, bool logTimestamp) : filename("/usd/" + filename), logTimestamp(logTimestamp) {}
SDCard::SDCard(std::string filename, bool logTimestamp)
: filename("/usd/" + filename),
logTimestamp(logTimestamp) {}

std::string SDCard::formatTimestamp(long long ms) {
// use the % operator to get the remainder of the division
Expand All @@ -25,7 +27,8 @@ void SDCard::send(Level level, std::string topic, std::string message) {
// output: <time> [LEVEL] (topic) message
std::string output = "";

if (this->logTimestamp) output += this->formatTimestamp((long long) pros::millis());
if (this->logTimestamp)
output += this->formatTimestamp((long long)pros::millis());

switch (level) {
case (Level::DEBUG): {
Expand All @@ -52,4 +55,4 @@ void SDCard::send(Level level, std::string topic, std::string message) {
file << output;
file.close();
}
}
} // namespace logger

0 comments on commit 0c8761e

Please sign in to comment.