Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
87503d25
Commit
87503d25
authored
6 years ago
by
Theodoros Katzalis
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes
parent
f8f60426
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/Helpers/TimeAndDate.hpp
+1
-1
1 addition, 1 deletion
inc/Helpers/TimeAndDate.hpp
inc/Helpers/TimeHelper.hpp
+1
-1
1 addition, 1 deletion
inc/Helpers/TimeHelper.hpp
src/Helpers/TimeAndDate.cpp
+0
-17
0 additions, 17 deletions
src/Helpers/TimeAndDate.cpp
with
2 additions
and
19 deletions
inc/Helpers/TimeAndDate.hpp
+
1
−
1
View file @
87503d25
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
/**
/**
* A class that represents the time and date.
* A class that represents the time and date.
*
*
* @note
s
* @note
* This struct is similar to the `struct tm` of <ctime> library but it is more embedded-friendly
* This struct is similar to the `struct tm` of <ctime> library but it is more embedded-friendly
*/
*/
class
TimeAndDate
{
class
TimeAndDate
{
...
...
This diff is collapsed.
Click to expand it.
inc/Helpers/TimeHelper.hpp
+
1
−
1
View file @
87503d25
...
@@ -60,7 +60,7 @@ private:
...
@@ -60,7 +60,7 @@ private:
* @todo check if we need to change the epoch to ,the recommended from the standard, 1 January
* @todo check if we need to change the epoch to ,the recommended from the standard, 1 January
* 1958
* 1958
*/
*/
TimeAndDate
utcTime
(
uint32_t
seconds
);
TimeAndDate
utcTime
(
uint32_t
seconds
);
public
:
public
:
...
...
This diff is collapsed.
Click to expand it.
src/Helpers/TimeAndDate.cpp
+
0
−
17
View file @
87503d25
#include
"Helpers/TimeHelper.hpp"
#include
"Helpers/TimeHelper.hpp"
bool
TimeAndDate
::
operator
<
(
const
TimeAndDate
&
Date
)
{
bool
TimeAndDate
::
operator
<
(
const
TimeAndDate
&
Date
)
{
//@note clang tidy complaints when using else after return so that's why there are these
// numerous if checks. Sorry for the ugly code...
// compare years
// compare years
if
(
this
->
year
<
Date
.
year
)
{
if
(
this
->
year
<
Date
.
year
)
{
return
true
;
return
true
;
...
@@ -50,13 +47,9 @@ bool TimeAndDate::operator<(const TimeAndDate &Date) {
...
@@ -50,13 +47,9 @@ bool TimeAndDate::operator<(const TimeAndDate &Date) {
}
}
return
false
;
return
false
;
}
}
bool
TimeAndDate
::
operator
>
(
const
TimeAndDate
&
Date
)
{
bool
TimeAndDate
::
operator
>
(
const
TimeAndDate
&
Date
)
{
//@note clang tidy complaints when using else after return so that's why there are these
// numerous if checks. Sorry for the ugly code...
// compare years
// compare years
if
(
this
->
year
>
Date
.
year
)
{
if
(
this
->
year
>
Date
.
year
)
{
return
true
;
return
true
;
...
@@ -103,13 +96,9 @@ bool TimeAndDate::operator>(const TimeAndDate &Date) {
...
@@ -103,13 +96,9 @@ bool TimeAndDate::operator>(const TimeAndDate &Date) {
}
}
return
false
;
return
false
;
}
}
bool
TimeAndDate
::
operator
<=
(
const
TimeAndDate
&
Date
)
{
bool
TimeAndDate
::
operator
<=
(
const
TimeAndDate
&
Date
)
{
//@note clang tidy complaints when using else after return so that's why there are these
// numerous if checks. Sorry for the ugly code...
// compare years
// compare years
if
(
this
->
year
<
Date
.
year
)
{
if
(
this
->
year
<
Date
.
year
)
{
return
true
;
return
true
;
...
@@ -159,13 +148,9 @@ bool TimeAndDate::operator<=(const TimeAndDate &Date) {
...
@@ -159,13 +148,9 @@ bool TimeAndDate::operator<=(const TimeAndDate &Date) {
}
}
return
true
;
return
true
;
}
}
bool
TimeAndDate
::
operator
>=
(
const
TimeAndDate
&
Date
)
{
bool
TimeAndDate
::
operator
>=
(
const
TimeAndDate
&
Date
)
{
//@note clang tidy complaints when using else after return so that's why there are these
// numerous if checks. Sorry for the ugly code...
// compare years
// compare years
if
(
this
->
year
>
Date
.
year
)
{
if
(
this
->
year
>
Date
.
year
)
{
return
true
;
return
true
;
...
@@ -215,7 +200,6 @@ bool TimeAndDate::operator>=(const TimeAndDate &Date) {
...
@@ -215,7 +200,6 @@ bool TimeAndDate::operator>=(const TimeAndDate &Date) {
}
}
return
true
;
return
true
;
}
}
bool
TimeAndDate
::
operator
==
(
const
TimeAndDate
&
Date
)
{
bool
TimeAndDate
::
operator
==
(
const
TimeAndDate
&
Date
)
{
...
@@ -250,5 +234,4 @@ bool TimeAndDate::operator==(const TimeAndDate &Date) {
...
@@ -250,5 +234,4 @@ bool TimeAndDate::operator==(const TimeAndDate &Date) {
}
}
return
true
;
return
true
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment