Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
eedc745d
Commit
eedc745d
authored
Oct 14, 2013
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readout from w1 thermometer has to be non-blocking
parent
8d35d305
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
monitor.c
monitor/monitor.c
+5
-1
monitor_ppsi.c
monitor/monitor_ppsi.c
+5
-1
No files found.
monitor/monitor.c
View file @
eedc745d
...
...
@@ -245,7 +245,11 @@ int wrc_log_stats(uint8_t onetime)
{
int32_t
temp
;
temp
=
w1_read_temp_bus
(
&
wrpc_w1_bus
,
0
);
//first read the value from previous measurement,
//first one will be random, I know
temp
=
w1_read_temp_bus
(
&
wrpc_w1_bus
,
W1_FLAG_COLLECT
);
//then initiate new conversion for next loop cycle
w1_read_temp_bus
(
&
wrpc_w1_bus
,
W1_FLAG_NOWAIT
);
mprintf
(
"temp: %d.%04d C"
,
temp
>>
16
,
(
int
)((
temp
&
0xffff
)
*
10
*
1000
>>
16
));
}
...
...
monitor/monitor_ppsi.c
View file @
eedc745d
...
...
@@ -310,7 +310,11 @@ int wrc_log_stats(uint8_t onetime)
{
int32_t
temp
;
temp
=
w1_read_temp_bus
(
&
wrpc_w1_bus
,
0
);
//first read the value from previous measurement,
//first one will be random, I know
temp
=
w1_read_temp_bus
(
&
wrpc_w1_bus
,
W1_FLAG_COLLECT
);
//then initiate new conversion for next loop cycle
w1_read_temp_bus
(
&
wrpc_w1_bus
,
W1_FLAG_NOWAIT
);
pp_printf
(
"temp: %d.%04d C"
,
temp
>>
16
,
(
int
)((
temp
&
0xffff
)
*
10
*
1000
>>
16
));
}
...
...
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