From 1f851864f92b956d0c6b06e49bb597c11aa4414a Mon Sep 17 00:00:00 2001
From: thodkatz <thodkatz@gmail.com>
Date: Mon, 4 Mar 2019 20:47:44 +0200
Subject: [PATCH] Trying to fix Vera

---
 inc/Services/TimeManagementService.hpp |  7 +++----
 src/Helpers/TimeHelper.cpp             | 12 ++++++------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/inc/Services/TimeManagementService.hpp b/inc/Services/TimeManagementService.hpp
index bcbb6add..ede1b64b 100644
--- a/inc/Services/TimeManagementService.hpp
+++ b/inc/Services/TimeManagementService.hpp
@@ -50,7 +50,7 @@ public:
 
 	void cdsTimeReport(struct TimeAndDate &TimeInfo);
 
-    /**
+	/**
 	 * TC[9,128] CDS time request
 	 *
 	 * This function is a custom subservice(mission specific) with message type 128(as defined
@@ -58,12 +58,11 @@ public:
 	 * time-management telecommand packet. This data is formatted according to the CDS time code
 	 * format(check class `TimeHelper` for the format)
 	 *
-     * @param timeData the data of the parsed space packet for the ST[09] time management
-     * @param length the size of the time data
+	 * @param timeData the data of the parsed space packet for the ST[09] time management
+	 * @param length the size of the time data
 	 */
 	struct TimeAndDate cdsTimeRequest(Message &message);
 };
 
 
 #endif //ECSS_SERVICES_TIMEMANAGEMENTSERVICE_HPP
-
diff --git a/src/Helpers/TimeHelper.cpp b/src/Helpers/TimeHelper.cpp
index efda93d5..130f9213 100644
--- a/src/Helpers/TimeHelper.cpp
+++ b/src/Helpers/TimeHelper.cpp
@@ -36,7 +36,7 @@ struct TimeAndDate TimeHelper::utcTime(uint32_t seconds) {
 	TimeInfo.second = 0;
 
 	// calculate years
-	while (seconds  >= (IsLeapYear(TimeInfo.year) ? 366 : 365) * SecondsPerDay ) {
+	while (seconds >= (IsLeapYear(TimeInfo.year) ? 366 : 365) * SecondsPerDay) {
 		TimeInfo.year++;
 		seconds -= (IsLeapYear(TimeInfo.year) ? 366 : 365) * SecondsPerDay;
 	}
@@ -45,9 +45,9 @@ struct TimeAndDate TimeHelper::utcTime(uint32_t seconds) {
 	uint8_t i = 0;
 	while (seconds >= (DaysOfMonth[i] * SecondsPerDay)) {
 		TimeInfo.month++;
-		seconds -=  (DaysOfMonth[i] * SecondsPerDay);
+		seconds -= (DaysOfMonth[i] * SecondsPerDay);
 		i++;
-		if (i == 1 && (seconds  >= (IsLeapYear(TimeInfo.year) ? 29 : 28) * SecondsPerDay)) {
+		if (i == 1 && (seconds >= (IsLeapYear(TimeInfo.year) ? 29 : 28) * SecondsPerDay)) {
 			TimeInfo.month++;
 			seconds -= (IsLeapYear(TimeInfo.year) ? 29 : 28) * SecondsPerDay;
 			i++;
@@ -55,19 +55,19 @@ struct TimeAndDate TimeHelper::utcTime(uint32_t seconds) {
 	}
 
 	// calculate days
-	while(seconds >= SecondsPerDay){
+	while (seconds >= SecondsPerDay) {
 		TimeInfo.day++;
 		seconds -= SecondsPerDay;
 	}
 
 	// calculate hours
-	while(seconds >= SecondsPerHour){
+	while (seconds >= SecondsPerHour) {
 		TimeInfo.hour++;
 		seconds -= SecondsPerHour;
 	}
 
 	// calculate minutes
-	while(seconds >= SecondsPerMinute){
+	while (seconds >= SecondsPerMinute) {
 		TimeInfo.minute++;
 		seconds -= SecondsPerMinute;
 	}
-- 
GitLab