Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hddtempserial
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleg Nikulin
hddtempserial
Commits
469d3331
Commit
469d3331
authored
Jun 23, 2023
by
Oleg Nikulin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Небольшие доработки скрипта
parent
930784b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
hddtempserial.py
hddtempserial.py
+4
-3
No files found.
hddtempserial.py
View file @
469d3331
...
...
@@ -16,7 +16,7 @@ temperatures = [30, 45, 50]
def
temp_input
():
global
temperatures
while
True
:
temps
=
[
0
,
0
,
0
]
temps
=
temperatures
temp_input
=
input
(
'
\033
[75G'
+
'Enter up to 3 temperature values (CSV): '
)
error
=
False
...
...
@@ -177,7 +177,7 @@ if __name__ == "__main__":
#b'|/dev/sda2|ST340014A|41|C|'
if
output
==
"b''"
:
print
(
'Hddtemp output is empty, make sure it is running. If not, launch it with #hddtemp -d'
)
exit
()
#
exit()
#вычленяем значение температуры:
temp_pos_end
=
output
.
find
(
'|C|'
)
...
...
@@ -195,7 +195,8 @@ if __name__ == "__main__":
regularPollInterval
=
True
except
(
OSError
,
termios
.
error
):
print
(
'Serial port error. Trying to open serial port again...'
)
if
serial_port
is
not
None
:
print
(
'Serial port error. Trying to open serial port again...'
)
serial_port
=
open_serial
(
port
,
baudrate
)
if
serial_port
is
not
None
:
print
(
'Success'
)
...
...
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