Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
d0aa3bde
Commit
d0aa3bde
authored
Sep 18, 2018
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time, possible to set NotATime and NotADeltaTime for test purposes
parent
7cbe4284
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
src/lib/co/src/co_time.c
src/lib/co/src/co_time.c
+8
-0
src/wbl/pwrb/src/pwrb_c_atsub.wb_load
src/wbl/pwrb/src/pwrb_c_atsub.wb_load
+1
-1
wb/lib/wb/src/wb_wnav.cpp
wb/lib/wb/src/wb_wnav.cpp
+3
-2
No files found.
src/lib/co/src/co_time.c
View file @
d0aa3bde
...
...
@@ -866,6 +866,10 @@ pwr_tStatus time_AsciiToD(const char* tstr, pwr_tDeltaTime* ts)
int
day
,
hour
=
0
,
min
,
sec
,
hun
=
0
;
int
useday
=
1
;
if
(
streq
(
tstr
,
"NotADeltaTime"
))
{
*
ts
=
pwr_cNotADeltaTime
;
return
TIME__SUCCESS
;
}
strncpy
(
buf
,
tstr
,
sizeof
(
buf
)
-
1
);
buf
[
sizeof
(
buf
)
-
1
]
=
'\0'
;
sp
=
buf
;
...
...
@@ -924,6 +928,10 @@ pwr_tStatus time_AsciiToA(const char* tstr, pwr_tTime* ts)
char
buf
[
64
];
pwr_tStatus
sts
;
if
(
streq
(
tstr
,
"NotATime"
))
{
*
ts
=
pwr_cNotATime
;
return
TIME__SUCCESS
;
}
strncpy
(
buf
,
tstr
,
sizeof
(
buf
)
-
1
);
buf
[
sizeof
(
buf
)
-
1
]
=
'\0'
;
...
...
src/wbl/pwrb/src/pwrb_c_atsub.wb_load
View file @
d0aa3bde
...
...
@@ -44,7 +44,7 @@ SObject pwrb:Class
! Subtract two absolute times.
! @image orm_atsub_fo.gif
!
! At
Add
subtracts the second absolute time input from the first absolute time
! At
Sub
subtracts the second absolute time input from the first absolute time
! input.
!
! The inputs has to be connected to absolute times.
...
...
wb/lib/wb/src/wb_wnav.cpp
View file @
d0aa3bde
...
...
@@ -41,6 +41,7 @@
#include "co_msg.h"
#include "co_string.h"
#include "co_time.h"
#include "co_time_msg.h"
#include "cow_login.h"
...
...
@@ -494,7 +495,7 @@ void wnav_attrvalue_to_string(
else
{
sts
=
time_AtoAscii
(
(
pwr_tTime
*
)
value_ptr
,
time_eFormat_DateAndTime
,
str
,
sizeof
(
str
));
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
)
&&
sts
!=
TIME__NAT
)
strcpy
(
str
,
"-"
);
}
*
len
=
strlen
(
str
);
...
...
@@ -508,7 +509,7 @@ void wnav_attrvalue_to_string(
strcpy
(
str
,
"DtMax"
);
else
{
sts
=
time_DtoAscii
((
pwr_tDeltaTime
*
)
value_ptr
,
1
,
str
,
sizeof
(
str
));
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
)
&&
sts
!=
TIME__NADT
)
strcpy
(
str
,
"Undefined time"
);
}
*
len
=
strlen
(
str
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment