Showing preview only (1,496K chars total). Download the full file or copy to clipboard to get everything.
Repository: akej74/grid-control
Branch: master
Commit: f14268d583c2
Files: 16
Total size: 1.4 MB
Directory structure:
gitextract_1foj5539/
├── LICENSE
├── README.md
├── grid-control/
│ ├── __init__.py
│ ├── grid.py
│ ├── gridcontrol.py
│ ├── helper.py
│ ├── kraken.py
│ ├── openhwmon.py
│ ├── polling.py
│ ├── settings.py
│ └── ui/
│ ├── __init__.py
│ ├── mainwindow.py
│ ├── mainwindow.ui
│ ├── resources.qrc
│ └── resources_rc.py
└── requirements.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
# Grid Control
Grid Control is a free and open source alternative to the CAM application from NZXT.
<img src="https://github.com/akej74/grid-control/blob/master/screenshots/screenshot_1.png" width="600">
<img src="https://github.com/akej74/grid-control/blob/master/screenshots/screenshot_2.png" width="200">
<img src="https://github.com/akej74/grid-control/blob/master/screenshots/screenshot_3.png" width="200">
<img src="https://github.com/akej74/grid-control/blob/master/screenshots/screenshot_4.png" width="200">
### Highlights
- Simple to use and resource efficient
- Uses OpenHardwareMonitor to read sensor values
- Individual fan control (manual or automatic with control points)
- Support the Grid+ V2 device
- Developed in Python 3 using QT5 for the user interface
### Disclaimer
NZXT is not involved in this project, please do not contact them regarding this application. If you have a question, please open an Issue or send me a message on Reddit. Also, while it seems very unlikely that your hardware could be damaged by this application, I do **NOT** take any responsibility for any damage done to your HW using this software (e.g. overheat due to low fan settings).
### Note about supporting other hardware devices besides the Grid V2
Grid Control only supports the Grid V2 device, no other hardware from NZXT like the different Kraken watercoolers or HUE lightning devices. There are other applications available on GitHub for these devices, please check the NZXT Reddit community for details.
### Stand-alone installation (built with PyInstaller)
Grid Control is available as a stand-alone application (Python does not need to be installed):
- Download the latest release from [Releases](https://github.com/akej74/grid-control/releases)
- Unzip file
- Run "gridcontrol.exe"
- NOTE! At first startup, you will get the message "No data from OpenHardwareMonitor found", even if OHM is running. Just configure the sensor data on the "Sensors" tab, after this the warning will not be displayed.
### Note on saving and loading settings
Grid Control automatically saves all settings when the application is closed ("x" in the top right corner). The settings are stored in the registry at HKEY_CURRENT_USER\Software\GridControl\App\ or HKEY_LOCAL_MACHINE\Software\GridControl\App\
All settings are automatically loaded when Grid Control starts (with default values if no saved settings are found).
### OpenHardwareMonitor / LibreHardwareMonitor
Grid Control uses [OpenHardwareMonitor](https://github.com/openhardwaremonitor/openhardwaremonitor) to get temperature information from the available sensors in the system.
- Download latest release of OpenHardwareMonitor [here](http://openhardwaremonitor.org/files/openhardwaremonitor-v0.8.0.3-alpha.zip)
- *UPDATE* - There is a fork of OpenHardwareMonitor called **LibreHardwareMonitor**, available [here](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor) that is in active development
- Note that an update to Windows 10 caused problems with OHM and the WMI communication. This can be fixed by a PowerShell command, see [this forum thread](https://forum.rainmeter.net/viewtopic.php?t=19546)
### Driver for the Grid device (not needed for Windows 10)
The Grid uses a MCP2200 USB-to-UART serial converter from [Microchip](http://www.microchip.com/wwwproducts/en/en546923).
Driver installation:
- Windows 10
- No driver is needed, Windows 10 will detect the Grid device automatically and add a "USB Serial Device" in Device Manager
- Windows 7
- A driver is needed, see "MCP2200/MCP2221 Windows Driver & Installer" on the [product page](http://www.microchip.com/wwwproducts/en/en546923)
### Python environment and running the application
Assuming you have latest version of Python 3 installed, the following additional modules are required, install with pip:
- `pip install pyserial`
- `pip install wmi`
- `pip install pypiwin32`
- `pip install pyqt5`
Run `python gridcontrol.py` to start the Grid Control application.
### PyInstaller
For packaging, use PyInstaller:
- `pip install pyinstaller`
- PyInstaller is used to package the software into EXE format so that you can run the application without having Python installed
### Python IDE
I recommend the free version of PyCharm IDE for Python development.
### Note about "QT Designer"
- For editing the User Interface (`mainwindow.ui`), install QT Designer as follows:
- Install latest QT5 open source suite from [QT main site](https://www.qt.io/)
- In the install wizard, make sure you include the "Qt 5.3 MinGW" component
- QT Designer will be installed in `C:\Qt\5.x\mingw53_32\bin\designer.exe`
- Note that the executable is named "designer.exe"
- To convert the `mainwindow.ui` to `mainwindow.py`run the following command:
- `<python installation directory>\Scripts\pyuic5.exe mainwindow.ui -o mainwindow.py`
### Grid simulator
For troubleshooting, or if you would like to run Grid Control without a Grid device, please have a look at my "Grid Simulator" available [here](https://github.com/akej74/grid-simulator).
### Inspiration from other projects
I would like to thank the authors of the following projects that have been helpful in understanding the communication protocol the Grid uses.
- [gridfan](https://github.com/CapitalF/gridfan) by CapitalF
- [CamSucks](https://github.com/RoelGo/CamSucks) by RoelGo
- [leviathan](https://github.com/jaksi/leviathan) by jaksi
================================================
FILE: grid-control/__init__.py
================================================
================================================
FILE: grid-control/grid.py
================================================
"""
grid.py
-------
Implements serial communication with the Grid+ V2 unit,
e.g. "initalization", "set fan voltage", "read fan voltage", "read fan rpm".
"""
import sys
import time
import serial
from serial.tools import list_ports
import helper
# Time (s) to wait until reading data from Grid after a request (s)
WAIT_GRID = 0.04
def get_serial_ports():
"""Returns a list of all serial ports found, e.g. 'COM1' in Windows"""
return sorted([port.device for port in list_ports.comports()])
def setup_serial(ser, port, lock):
"""Setup all parameters for the serial communication"""
try:
with lock:
ser.baudrate = 4800
ser.port = port
ser.bytesize = serial.EIGHTBITS
ser.stopbits = serial.STOPBITS_ONE
ser.parity = serial.PARITY_NONE
ser.timeout = 0.1 # Read timeout in seconds
ser.write_timeout = 0.1 # Write timeout in seconds
except Exception as e:
helper.show_error("Problem initializing serial port " + port + ".\n\n"
"Exception:\n" + str(e) + "\n\n"
"The application will now exit.")
sys.exit(0)
def open_serial(ser, lock):
"""Open the serial port"""
try:
with lock:
ser.open()
except Exception as e:
helper.show_error("Could not open serial port " + ser.port + ".\n\n"
"Is another instance of Grid Control running?\n\n"
"Exception:\n" + str(e) + "\n\n"
"The application will now exit.")
sys.exit(0)
def initialize_grid(ser, lock):
"""Initialize the Grid by sending "0xC0", expected response is "0x21"
Returns:
- True for successful initialization
- False otherwise
"""
try:
with lock:
# Flush input and output buffers
ser.reset_input_buffer()
ser.reset_output_buffer()
# Write data to serial port to initialize the Grid
bytes_written = ser.write(serial.to_bytes([0xC0]))
# Wait before checking response
time.sleep(WAIT_GRID)
# Read response, one byte = 0x21 is expected for a successful initialization
response = ser.read(size=1)
# Check if the Grid responded with any data
if response:
# Check for correct response (should be 0x21)
if response[0] == int("0x21", 16):
print("Grid initialized")
return True
# Incorrect response received from the grid
else:
helper.show_error("Problem initializing the Grid unit.\n\n"
"Response 0x21 expected, got " + hex(ord(response)) + ".\n\n"
"Please check serial port " + ser.port +".\n")
return False
# In case no response (0 bytes) from the Grid
else:
helper.show_error("Problem initializing the Grid unit.\n\n"
"Response 0x21 expected, no response received.\n\n"
"Please check serial port " + ser.port +".\n")
return False
except Exception as e:
helper.show_error("Problem initializing the Grid unit.\n\n"
"Exception:\n" + str(e) + "\n\n"
"The application will now exit.")
sys.exit(0)
def set_fan(ser, fan, voltage, lock):
"""Sets voltage of a specific fan.
Note:
The Grid only supports voltages between 4.0V and 12.0V in 0.5V steps (e.g. 4.0, 7.5. 12.0)
Configuring "0V" stops a fan.
"""
# Valid voltages and corresponding data (two bytes)
speed_data = {0: [0x00, 0x00], # 0% (Values below 4V is not supported by the Grid, fans will be stopped)
4.0: [0x04, 0x00], # 33.3% (4.0V)
4.5: [0x04, 0x50], # 37.5% (4.5V)
5.0: [0x05, 0x00], # 41.7% (5V)
5.5: [0x05, 0x50], # 45.8% (5.5V)
6.0: [0x06, 0x00], # 50.0% (6V)
6.5: [0x06, 0x50], # 54.2% (6.5V)
7.0: [0x07, 0x00], # 58.3% (7V)
7.5: [0x07, 0x50], # 62.5% (7.5V)
8.0: [0x08, 0x00], # 66.7% (8V)
8.5: [0x08, 0x50], # 70.1% (8.5V)
9.0: [0x09, 0x00], # 75.0% (9.0V)
9.5: [0x09, 0x50], # 79.2% (9.5V)
10.0: [0x0A, 0x00], # 83.3% (10.0V)
10.5: [0x0A, 0x50], # 87.5% (10.5V)
11.0: [0x0B, 0x00], # 91.7% (11.0V)
11.5: [0x0B, 0x50], # 95.8% (11.5V)
12.0: [0x0C, 0x00]} # 100.0% (12.0V)
fan_data = {1: 0x01, # Fan 1
2: 0x02, # Fan 2
3: 0x03, # Fan 3
4: 0x04, # Fan 4
5: 0x05, # Fan 5
6: 0x06} # Fan 6
# Define bytes to be sent to the Grid for configuring a specific fan's voltage
# Format is seven bytes:
# 44 <fan id> C0 00 00 <voltage integer> <voltage decimal>
#
# Example configuring "7.5V" for fan "1":
# 44 01 C0 00 00 07 50
serial_data = [0x44, fan_data[fan], 0xC0, 0x00, 0x00, speed_data[voltage][0], speed_data[voltage][1]]
try:
with lock:
bytes_written = ser.write(serial.to_bytes(serial_data))
time.sleep(WAIT_GRID)
# TODO: Check reponse
# Expected response is one byte
response = ser.read(size=1)
print("Fan " + str(fan) + " updated")
except Exception as e:
helper.show_error("Could not set speed for fan " + str(fan) + ".\n\n"
"Please check settings for serial port " + str(ser.port) + ".\n\n"
"Exception:\n" + str(e) + "\n\n"
"The application will now exit.")
sys.exit(0)
def read_fan_rpm(ser, lock):
"""Reads the current rpm of each fan.
Returns:
- If success: A list with rpm data for each fan
- If failure to read data: An empty list
"""
# List to hold fan rpm data to be returned
fans = []
with lock:
for fan in [0x01, 0x02, 0x03, 0x04, 0x05, 0x06]:
try:
# Define bytes to be sent to the Grid for reading rpm for a specific fan
# Format is two bytes:
# 8A <fan id>
serial_data = [0x8A, fan]
ser.reset_output_buffer()
# TODO: Check bytes written
bytes_written = ser.write(serial.to_bytes(serial_data))
# Wait before checking response
time.sleep(WAIT_GRID)
# Expected response is 5 bytes
# Example response: C0 00 00 03 00 = 0x0300 = 768 rpm (two bytes unsigned)
response = ser.read(size=5)
# Check if the Grid responded with any data
if response:
# Check for correct response, first three bytes should be C0 00 00
if response[0] == int("0xC0", 16) and response[1] == response[2] == int("0x00", 16):
# Convert rpm from 2-bytes unsigned value to decimal
rpm = response[3] * 256 + response[4]
fans.append(rpm)
# An incorrect response was received, return an empty list
else:
return []
# In case no response (0 bytes) received, return an empty list
else:
return []
except Exception as e:
helper.show_error("Could not read rpm for fan " + str(fan) + ".\n\n"
"Please check serial port settings.\n\n"
"Exception:\n" + str(e) + "\n\n"
"The application will now exit.")
print(str(e))
sys.exit(0)
# Fan
return fans
def read_fan_voltage(ser, lock):
"""Reads the current voltage of each fan.
Returns:
- If success: a list with voltage data for each fan
- If failure to read data: An empty list
"""
# List to hold fan voltage data to be returned
fans = []
with lock:
for fan in [0x01, 0x02, 0x03, 0x04, 0x05, 0x06]:
try:
# Define bytes to be sent to the Grid for reading voltage for a specific fan
# Format is two bytes, e.g. [0x84, <fan id>]
serial_data = [0x84, fan]
ser.reset_output_buffer()
bytes_written = ser.write(serial.to_bytes(serial_data))
# Wait before checking response
time.sleep(WAIT_GRID)
# Expected response is 5 bytes
# Example response: 00 00 00 0B 01 = 0x0B 0x01 = 11.01 volt
response = ser.read(size=5)
# Check if the Grid responded with any data
if response:
# Check for correct response (first three bytes should be 0x00)
if response[0] == int("0xC0", 16) and response[1] == response[2] == int("0x00", 16):
# Convert last two bytes to a decimal float value
voltage = float(str(response[3]) + "." + str(response[4]))
# Add the voltage for the current fan to the list
fans.append(voltage)
# An incorrect response was received
else:
print("Error reading fan voltage, incorrect response")
return []
# In case no response (0 bytes) is returned from the Grid
else:
print("Error reading fan voltage, no data returned")
return []
except Exception as e:
helper.show_error("Could not read fan voltage.\n\n"
"Please check serial port " + ser.port + ".\n\n"
"Exception:\n" + str(e) + "\n\n"
"The application will now exit.")
print(str(e))
sys.exit(0)
return fans
def calculate_voltage(percent):
"""Convert fan speed in percent (0-100) to nearest valid voltage (4.0V to 12.0V in steps of 0.5V).
Values below 33% will be defined as "0V" (fan will be stopped).
"""
if percent < 33:
return 0.0
elif percent >= 33 and percent < 36:
return 4.0
elif percent >= 36 and percent < 40:
return 4.5
elif percent >= 40 and percent < 44:
return 5.0
elif percent >= 44 and percent < 48:
return 5.5
elif percent >= 48 and percent < 52:
return 6.0
elif percent >= 52 and percent < 56:
return 6.5
elif percent >= 56 and percent < 60:
return 7.0
elif percent >= 60 and percent < 64:
return 7.5
elif percent >= 64 and percent < 68:
return 8.0
elif percent >= 68 and percent < 72:
return 8.5
elif percent >= 72 and percent < 76:
return 9.0
elif percent >= 76 and percent < 80:
return 9.5
elif percent >= 80 and percent < 84:
return 10.0
elif percent >= 84 and percent < 88:
return 10.5
elif percent >= 88 and percent < 93:
return 11.0
elif percent >= 93 and percent < 98:
return 11.5
else:
return 12.0
================================================
FILE: grid-control/gridcontrol.py
================================================
"""
gridcontrol.py
--------------
This is the main module of Grid Control. Implements the UI and business logic.
"""
import sys
import threading
import grid
import helper
import openhwmon
import polling
import serial
import settings
from PyQt5 import QtCore, QtWidgets, QtGui
from ui.mainwindow import Ui_MainWindow
# Define status icons (available in the resource file built with "pyrcc5"
ICON_RED_LED = ":/icons/led-red-on.png"
ICON_GREEN_LED = ":/icons/green-led-on.png"
class GridControl(QtWidgets.QMainWindow):
"""Create the UI, based on PyQt5.
The UI elements are defined in "mainwindow.py" and resource file "resources_rc.py", created in QT Designer.
To update "mainwindow.py":
Run "pyuic5.exe --from-imports mainwindow.ui -o mainwindow.py"
To update "resources_rc.py":
Run "pyrcc5.exe resources.qrc -o resource_rc.py"
Note: Never modify "mainwindow.py" or "resource_rc.py" manually.
"""
def __init__(self):
super().__init__()
# Create the main window
self.ui = Ui_MainWindow()
# Set upp the UI
self.ui.setupUi(self)
# Object for locking the serial port while sending/receiving data
self.lock = threading.Lock()
# Serial communication object
self.ser = serial.Serial()
# Initialize WMI communication with OpenHardwareMonitor
# "initialize_hwmon()" returns a WMI object
self.hwmon = openhwmon.initialize_hwmon()
# QSettings object for storing the UI configuration in the OS native repository (Registry for Windows, ini-file for Linux)
# In Windows, parameters will be stored at HKEY_CURRENT_USER/SOFTWARE/GridControl/App
self.config = QtCore.QSettings('GridControl', 'App')
# Get a list of available serial ports (e.g. "COM1" in Windows)
self.serial_ports = grid.get_serial_ports()
# Populate the "COM port" combo box with available serial ports
self.ui.comboBoxComPorts.addItems(self.serial_ports)
# Read saved UI configuration
settings.read_settings(self.config, self.ui, self.hwmon)
# Populates the tree widget on tab "Sensor Config" with values from OpenHardwareMonitor
openhwmon.populate_tree(self.hwmon, self.ui.treeWidgetHWMonData, self.ui.checkBoxStartSilently.isChecked())
# System tray icon
self.trayIcon = SystemTrayIcon(QtGui.QIcon(QtGui.QPixmap(":/icons/grid.png")), self)
self.trayIcon.show()
# Create a QThread object that will poll the Grid for fan rpm and voltage and HWMon for temperatures
# The lock is needed in all operations with the serial port
self.thread = polling.PollingThread(polling_interval=int(self.ui.comboBoxPolling.currentText()),
ser=self.ser,
lock=self.lock,
cpu_sensor_ids=self.get_cpu_sensor_ids(),
gpu_sensor_ids=self.get_gpu_sensor_ids(),
cpu_calc="Max" if self.ui.radioButtonCPUMax.isChecked() else "Avg",
gpu_calc="Max" if self.ui.radioButtonGPUMax.isChecked() else "Avg")
# Connect signals and slots
self.setup_ui_logic()
# Setup UI parameters that cannot be defined in QT Designer
self.setup_ui_design()
# Store current horizontal slider values
# Used for restoring values after automatic mode has been used
self.manual_value_fan1 = self.ui.horizontalSliderFan1.value()
self.manual_value_fan2 = self.ui.horizontalSliderFan2.value()
self.manual_value_fan3 = self.ui.horizontalSliderFan3.value()
self.manual_value_fan4 = self.ui.horizontalSliderFan4.value()
self.manual_value_fan5 = self.ui.horizontalSliderFan5.value()
self.manual_value_fan6 = self.ui.horizontalSliderFan6.value()
# Minimize to tray if enabled
if self.ui.checkBoxStartMinimized.isChecked():
self.setWindowState(QtCore.Qt.WindowMinimized)
else:
self.show()
# Initialize communication
self.init_communication()
def setup_ui_logic(self):
"""Define QT signal and slot connections and initializes UI values."""
# Update "Fan percentage" LCD values from horizontal sliders initial value
self.ui.lcdNumberFan1.display(self.ui.horizontalSliderFan1.value())
self.ui.lcdNumberFan2.display(self.ui.horizontalSliderFan2.value())
self.ui.lcdNumberFan3.display(self.ui.horizontalSliderFan3.value())
self.ui.lcdNumberFan4.display(self.ui.horizontalSliderFan4.value())
self.ui.lcdNumberFan5.display(self.ui.horizontalSliderFan5.value())
self.ui.lcdNumberFan6.display(self.ui.horizontalSliderFan6.value())
# Update "fan labels" from "Fan Config" tab
self.ui.groupBoxFan1.setTitle(self.ui.lineEditFan1.text())
self.ui.groupBoxFan2.setTitle(self.ui.lineEditFan2.text())
self.ui.groupBoxFan3.setTitle(self.ui.lineEditFan3.text())
self.ui.groupBoxFan4.setTitle(self.ui.lineEditFan4.text())
self.ui.groupBoxFan5.setTitle(self.ui.lineEditFan5.text())
self.ui.groupBoxFan6.setTitle(self.ui.lineEditFan6.text())
self.ui.groupBoxCurrentFan1.setTitle(self.ui.lineEditFan1.text())
self.ui.groupBoxCurrentFan2.setTitle(self.ui.lineEditFan2.text())
self.ui.groupBoxCurrentFan3.setTitle(self.ui.lineEditFan3.text())
self.ui.groupBoxCurrentFan4.setTitle(self.ui.lineEditFan4.text())
self.ui.groupBoxCurrentFan5.setTitle(self.ui.lineEditFan5.text())
self.ui.groupBoxCurrentFan6.setTitle(self.ui.lineEditFan6.text())
self.ui.groupBoxConfigFan1.setTitle(self.ui.lineEditFan1.text())
self.ui.groupBoxConfigFan2.setTitle(self.ui.lineEditFan2.text())
self.ui.groupBoxConfigFan3.setTitle(self.ui.lineEditFan3.text())
self.ui.groupBoxConfigFan4.setTitle(self.ui.lineEditFan4.text())
self.ui.groupBoxConfigFan5.setTitle(self.ui.lineEditFan5.text())
self.ui.groupBoxConfigFan6.setTitle(self.ui.lineEditFan6.text())
# Connect events from sliders to update "Fan percentage" LCD value
self.ui.horizontalSliderFan1.valueChanged.connect(self.ui.lcdNumberFan1.display)
self.ui.horizontalSliderFan2.valueChanged.connect(self.ui.lcdNumberFan2.display)
self.ui.horizontalSliderFan3.valueChanged.connect(self.ui.lcdNumberFan3.display)
self.ui.horizontalSliderFan4.valueChanged.connect(self.ui.lcdNumberFan4.display)
self.ui.horizontalSliderFan5.valueChanged.connect(self.ui.lcdNumberFan5.display)
self.ui.horizontalSliderFan6.valueChanged.connect(self.ui.lcdNumberFan6.display)
# Connect "Manual/Automatic" fan control radio button
self.ui.radioButtonManual.toggled.connect(self.disable_enable_sliders)
# Connect "Simulated temperatures" checkbox
self.ui.checkBoxSimulateTemp.stateChanged.connect(self.simulate_temperatures)
# Connect "Restart Communication" button
self.ui.pushButtonRestart.clicked.connect(self.restart)
# Connect "Add CPU sensors" button
self.ui.pushButtonAddCPUSensor.clicked.connect(self.add_cpu_sensors)
# Connect "Add GPU sensors" button
self.ui.pushButtonAddGPUSensor.clicked.connect(self.add_gpu_sensors)
# Connect "Remove CPU sensors" button
self.ui.pushButtonRemoveCPUSensor.clicked.connect(self.remove_cpu_sensors)
# Connect "Remove GPU sensors" button
self.ui.pushButtonRemoveGPUSensor.clicked.connect(self.remove_gpu_sensors)
# Connect event from changed serial port combo box
self.ui.comboBoxComPorts.currentIndexChanged.connect(self.init_communication)
# Connect event from changed polling interval combo box
self.ui.comboBoxPolling.currentIndexChanged.connect(self.init_communication)
# Update fan voltage (speed) based on changes to the horizontal sliders
#
# "grid.calculate_voltage" converts the percent value to valid voltages supported by the Grid
# "lambda" is needed to send four arguments (serial object, fan id, fan voltage and lock object)
self.ui.horizontalSliderFan1.valueChanged.connect(
lambda: grid.set_fan(ser=self.ser, fan=1, voltage=grid.calculate_voltage(self.ui.lcdNumberFan1.value()) ,lock=self.lock))
self.ui.horizontalSliderFan2.valueChanged.connect(
lambda: grid.set_fan(ser=self.ser, fan=2, voltage=grid.calculate_voltage(self.ui.lcdNumberFan2.value()), lock=self.lock))
self.ui.horizontalSliderFan3.valueChanged.connect(
lambda: grid.set_fan(ser=self.ser, fan=3, voltage=grid.calculate_voltage(self.ui.lcdNumberFan3.value()), lock=self.lock))
self.ui.horizontalSliderFan4.valueChanged.connect(
lambda: grid.set_fan(ser=self.ser, fan=4, voltage=grid.calculate_voltage(self.ui.lcdNumberFan4.value()), lock=self.lock))
self.ui.horizontalSliderFan5.valueChanged.connect(
lambda: grid.set_fan(ser=self.ser, fan=5, voltage=grid.calculate_voltage(self.ui.lcdNumberFan5.value()), lock=self.lock))
self.ui.horizontalSliderFan6.valueChanged.connect(
lambda: grid.set_fan(ser=self.ser, fan=6, voltage=grid.calculate_voltage(self.ui.lcdNumberFan6.value()), lock=self.lock))
# Connect "Change value" events from "Fan config" tab (all "spin boxes") to verify that the values are valid
for fan in range(1, 7):
getattr(self.ui, "spinBoxMinSpeedFan" + str(fan)).valueChanged.connect(self.validate_fan_config)
getattr(self.ui, "spinBoxStartIncreaseSpeedFan" + str(fan)).valueChanged.connect(self.validate_fan_config)
getattr(self.ui, "spinBoxIntermediateSpeedFan" + str(fan)).valueChanged.connect(self.validate_fan_config)
getattr(self.ui, "spinBoxMaxSpeedFan" + str(fan)).valueChanged.connect(self.validate_fan_config)
getattr(self.ui, "spinBoxIntermediateTempFan" + str(fan)).valueChanged.connect(self.validate_fan_config)
getattr(self.ui, "spinBoxMaxTempFan" + str(fan)).valueChanged.connect(self.validate_fan_config)
# Connect fan rpm signal (from polling thread) to fan rpm label
self.thread.rpm_signal_fan1.connect(self.ui.labelRPMFan1.setText)
self.thread.rpm_signal_fan2.connect(self.ui.labelRPMFan2.setText)
self.thread.rpm_signal_fan3.connect(self.ui.labelRPMFan3.setText)
self.thread.rpm_signal_fan4.connect(self.ui.labelRPMFan4.setText)
self.thread.rpm_signal_fan5.connect(self.ui.labelRPMFan5.setText)
self.thread.rpm_signal_fan6.connect(self.ui.labelRPMFan6.setText)
# Connect fan voltage signal (from polling thread) to fan voltage value
self.thread.voltage_signal_fan1.connect(self.ui.labelVFan1.setText)
self.thread.voltage_signal_fan2.connect(self.ui.labelVFan2.setText)
self.thread.voltage_signal_fan3.connect(self.ui.labelVFan3.setText)
self.thread.voltage_signal_fan4.connect(self.ui.labelVFan4.setText)
self.thread.voltage_signal_fan5.connect(self.ui.labelVFan5.setText)
self.thread.voltage_signal_fan6.connect(self.ui.labelVFan6.setText)
# Connect pixmap signal (from polling thread) for updating the fan status icon
# "lambda" is needed to transmit two arguments, "icon resource name" from the signal (x) and fan id
self.thread.pixmap_signal_fan1.connect(lambda x: self.change_fan_icon(x, 1))
self.thread.pixmap_signal_fan2.connect(lambda x: self.change_fan_icon(x, 2))
self.thread.pixmap_signal_fan3.connect(lambda x: self.change_fan_icon(x, 3))
self.thread.pixmap_signal_fan4.connect(lambda x: self.change_fan_icon(x, 4))
self.thread.pixmap_signal_fan5.connect(lambda x: self.change_fan_icon(x, 5))
self.thread.pixmap_signal_fan6.connect(lambda x: self.change_fan_icon(x, 6))
# Connect CPU and GPU temperature signals (from polling thread) to GPU and CPU LCD values
self.thread.cpu_temp_signal.connect(self.ui.lcdNumberCurrentCPU.display)
self.thread.gpu_temp_signal.connect(self.ui.lcdNumberCurrentGPU.display)
# Connect update signal to fan update function
self.thread.update_signal.connect(self.update_fan_speed)
# Connect CPU and GPU temperature signals (from polling thread) to function for updating HWMon status
self.thread.hwmon_status_signal.connect(self.ui.labelHWMonStatus.setText)
# Connect exception signal to show exception message from running thread
# This is needed as it's not possible to show a message box widget from the QThread directly
self.thread.exception_signal.connect(self.thread_exception_handling)
def validate_fan_config(self):
"""Validate fan configuration values, prevent incorrect/invalid values."""
# Name of widget (spin box) calling function
sender = self.sender().objectName()
# Fan id is the last character in the name
fan = sender[-1:]
# Get current values from spin boxes
min_speed_fan = getattr(self.ui, "spinBoxMinSpeedFan" + str(fan)).value()
start_increase_speed_fan = getattr(self.ui, "spinBoxStartIncreaseSpeedFan" + str(fan)).value()
intermediate_speed_fan = getattr(self.ui, "spinBoxIntermediateSpeedFan" + str(fan)).value()
max_speed_fan = getattr(self.ui, "spinBoxMaxSpeedFan" + str(fan)).value()
intermediate_temp_fan = getattr(self.ui, "spinBoxIntermediateTempFan" + str(fan)).value()
max_temp_fan = getattr(self.ui, "spinBoxMaxTempFan" + str(fan)).value()
# Logic for preventing incorrect/invalid values
if sender.startswith("spinBoxMinSpeedFan"):
if min_speed_fan >= intermediate_speed_fan:
getattr(self.ui, sender).setValue(intermediate_speed_fan - 1)
elif sender.startswith("spinBoxStartIncreaseSpeedFan"):
if start_increase_speed_fan >= intermediate_temp_fan:
getattr(self.ui, sender).setValue(intermediate_temp_fan - 1)
elif sender.startswith("spinBoxIntermediateSpeedFan"):
if intermediate_speed_fan >= max_speed_fan:
getattr(self.ui, sender).setValue(max_speed_fan - 1)
if intermediate_speed_fan <= min_speed_fan:
getattr(self.ui, sender).setValue(min_speed_fan + 1)
elif sender.startswith("spinBoxMaxSpeedFan"):
if max_speed_fan <= intermediate_speed_fan:
getattr(self.ui, sender).setValue(intermediate_speed_fan + 1)
elif sender.startswith("spinBoxIntermediateTempFan"):
if intermediate_temp_fan >= max_temp_fan:
getattr(self.ui, sender).setValue(max_temp_fan - 1)
if intermediate_temp_fan <= start_increase_speed_fan:
getattr(self.ui, sender).setValue(start_increase_speed_fan + 1)
elif sender.startswith("spinBoxMaxTempFan"):
if max_temp_fan <= intermediate_temp_fan:
getattr(self.ui, sender).setValue(intermediate_temp_fan + 1)
def setup_ui_design(self):
"""Define UI parameters that cannot be configured in QT Creator directly."""
# "OpenHardwareMonitor tree widget" configuration
self.ui.treeWidgetHWMonData.setHeaderLabels(["Node", "ID", "Temp (at init)"])
self.ui.treeWidgetHWMonData.expandAll()
self.ui.treeWidgetHWMonData.setSortingEnabled(False)
self.ui.treeWidgetHWMonData.sortByColumn(0, 0)
self.ui.treeWidgetHWMonData.setColumnWidth(0, 200)
self.ui.treeWidgetHWMonData.setColumnWidth(1, 100)
self.ui.treeWidgetHWMonData.setColumnWidth(2, 50)
# treeWidget.setColumnHidden(1, True)
self.ui.treeWidgetHWMonData.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
# "Selected CPU sensors" tree widget configuration
self.ui.treeWidgetSelectedCPUSensors.setHeaderLabels(["Node", "ID"])
self.ui.treeWidgetSelectedCPUSensors.setColumnWidth(0, 150)
self.ui.treeWidgetSelectedCPUSensors.setColumnWidth(1, 50)
self.ui.treeWidgetSelectedCPUSensors.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
# "Selected GPU sensors" tree widget configuration
self.ui.treeWidgetSelectedGPUSensors.setHeaderLabels(["Node", "ID"])
self.ui.treeWidgetSelectedGPUSensors.setColumnWidth(0, 150)
self.ui.treeWidgetSelectedGPUSensors.setColumnWidth(1, 50)
self.ui.treeWidgetSelectedGPUSensors.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
# "Simulate temperatures" group box settings
self.ui.checkBoxSimulateTemp.setChecked(False)
self.ui.horizontalSliderCPUTemp.setEnabled(False)
self.ui.horizontalSliderGPUTemp.setEnabled(False)
# If manual mode is enabled, disable "Simulate temperatures"
if self.ui.radioButtonManual.isChecked():
self.ui.groupBoxSimulateTemperatures.setEnabled(False)
# If automatic mode is enabled, disable the horizontal sliders
if self.ui.radioButtonAutomatic.isChecked():
self.ui.horizontalSliderFan1.setEnabled(False)
self.ui.horizontalSliderFan2.setEnabled(False)
self.ui.horizontalSliderFan3.setEnabled(False)
self.ui.horizontalSliderFan4.setEnabled(False)
self.ui.horizontalSliderFan5.setEnabled(False)
self.ui.horizontalSliderFan6.setEnabled(False)
def init_communication(self):
"""Configure the serial device, serial port and polling interval before starting the polling thread.
Called at:
- Start of application
- When the "Serial port" or "Polling interval" combo box is changed
- When "Restart Communication" button is clicked
"""
# If the polling thread is running, stop it to be able to update port/polling interval and reset fans
if self.thread.isRunning():
self.thread.stop()
# Reset fan and temperature data (set rpm and voltage to "---" and temp to "0")
self.reset_data()
# If the serial port is open, close it
with self.lock:
if self.ser.isOpen():
self.ser.close()
# Check if a serial port is selected
if self.ui.comboBoxComPorts.currentText() != "<Select port>":
# Setup serial device using selected serial port
grid.setup_serial(self.ser, self.ui.comboBoxComPorts.currentText(), self.lock)
# Open serial device
grid.open_serial(self.ser, self.lock)
# If manual mode is selected, enable horizontal sliders (they are disabled if no serial port is selected)
if self.ui.radioButtonManual.isChecked():
self.ui.horizontalSliderFan1.setEnabled(True)
self.ui.horizontalSliderFan2.setEnabled(True)
self.ui.horizontalSliderFan3.setEnabled(True)
self.ui.horizontalSliderFan4.setEnabled(True)
self.ui.horizontalSliderFan5.setEnabled(True)
self.ui.horizontalSliderFan6.setEnabled(True)
# Enable other UI elements
self.ui.radioButtonManual.setEnabled(True)
self.ui.radioButtonAutomatic.setEnabled(True)
self.ui.checkBoxSimulateTemp.setEnabled(True)
if self.ui.checkBoxSimulateTemp.isChecked():
self.ui.horizontalSliderCPUTemp.setEnabled(True)
self.ui.horizontalSliderGPUTemp.setEnabled(True)
# Initialize the Grid+ V2 device
if grid.initialize_grid(self.ser, self.lock):
# Set the initial fan speeds based on UI values
self.initialize_fans()
# Update the polling interval (ms) based on UI value
self.thread.update_polling_interval(new_polling_interval=int(self.ui.comboBoxPolling.currentText()))
# Update temperature calculation (Maximum or Average) based on UI settings on "Sensor Config" tab
self.thread.set_temp_calc(cpu_calc="Max" if self.ui.radioButtonCPUMax.isChecked() else "Avg",
gpu_calc="Max" if self.ui.radioButtonGPUMax.isChecked() else "Avg")
# Start the polling thread
self.thread.start()
# Update status in UI
self.ui.labelPollingStatus.setText('<b><font color="green">Running</font></b>')
# Handle unsuccessful initialization
else:
# As there is a communication problem, reset the "serial port" combo box
index = self.ui.comboBoxComPorts.findText("<Select port>")
self.ui.comboBoxComPorts.setCurrentIndex(index)
# Update status in UI
self.ui.labelPollingStatus.setText('<b><font color="red">Stopped</font></b>')
# If no serial port is selected, disable UI elements
else:
self.ui.horizontalSliderFan1.setEnabled(False)
self.ui.horizontalSliderFan2.setEnabled(False)
self.ui.horizontalSliderFan3.setEnabled(False)
self.ui.horizontalSliderFan4.setEnabled(False)
self.ui.horizontalSliderFan5.setEnabled(False)
self.ui.horizontalSliderFan6.setEnabled(False)
self.ui.radioButtonManual.setEnabled(False)
self.ui.radioButtonAutomatic.setEnabled(False)
self.ui.checkBoxSimulateTemp.setEnabled(False)
self.ui.horizontalSliderCPUTemp.setEnabled(False)
self.ui.horizontalSliderGPUTemp.setEnabled(False)
self.ui.horizontalSliderCPUTemp.setValue(0)
self.ui.horizontalSliderGPUTemp.setValue(0)
def reset_data(self):
"""Reset fan rpm and voltage to "---" and activate the red status icon.
Reset CPU and GPU temperature to "0"."""
# Reset fan rpm
self.ui.labelRPMFan1.setText('<b><font color="red">---</font></b>')
self.ui.labelRPMFan2.setText('<b><font color="red">---</font></b>')
self.ui.labelRPMFan3.setText('<b><font color="red">---</font></b>')
self.ui.labelRPMFan4.setText('<b><font color="red">---</font></b>')
self.ui.labelRPMFan5.setText('<b><font color="red">---</font></b>')
self.ui.labelRPMFan6.setText('<b><font color="red">---</font></b>')
# Reset fan voltage
self.ui.labelVFan1.setText('<b><font color="red">---</font></b>')
self.ui.labelVFan2.setText('<b><font color="red">---</font></b>')
self.ui.labelVFan3.setText('<b><font color="red">---</font></b>')
self.ui.labelVFan4.setText('<b><font color="red">---</font></b>')
self.ui.labelVFan5.setText('<b><font color="red">---</font></b>')
self.ui.labelVFan6.setText('<b><font color="red">---</font></b>')
# Activate the red led icon
self.ui.labelStatusFan1.setPixmap(QtGui.QPixmap(ICON_RED_LED))
self.ui.labelStatusFan2.setPixmap(QtGui.QPixmap(ICON_RED_LED))
self.ui.labelStatusFan3.setPixmap(QtGui.QPixmap(ICON_RED_LED))
self.ui.labelStatusFan4.setPixmap(QtGui.QPixmap(ICON_RED_LED))
self.ui.labelStatusFan5.setPixmap(QtGui.QPixmap(ICON_RED_LED))
self.ui.labelStatusFan6.setPixmap(QtGui.QPixmap(ICON_RED_LED))
# Reset temperatures
self.ui.lcdNumberCurrentCPU.display(0)
self.ui.lcdNumberCurrentGPU.display(0)
# Update status in UI
self.ui.labelPollingStatus.setText('<b><font color="red">Stopped</font></b>')
self.ui.labelHWMonStatus.setText('<b><font color="red">---</font></b>')
def initialize_fans(self):
"""Initialize fans to the initial slider values."""
grid.set_fan(ser=self.ser, fan=1, voltage=grid.calculate_voltage(self.ui.lcdNumberFan1.value()), lock=self.lock)
grid.set_fan(ser=self.ser, fan=2, voltage=grid.calculate_voltage(self.ui.lcdNumberFan2.value()), lock=self.lock)
grid.set_fan(ser=self.ser, fan=3, voltage=grid.calculate_voltage(self.ui.lcdNumberFan3.value()), lock=self.lock)
grid.set_fan(ser=self.ser, fan=4, voltage=grid.calculate_voltage(self.ui.lcdNumberFan4.value()), lock=self.lock)
grid.set_fan(ser=self.ser, fan=5, voltage=grid.calculate_voltage(self.ui.lcdNumberFan5.value()), lock=self.lock)
grid.set_fan(ser=self.ser, fan=6, voltage=grid.calculate_voltage(self.ui.lcdNumberFan6.value()), lock=self.lock)
def disable_enable_sliders(self):
"""Disables the horizontal sliders if "Automatic" mode is selected.
When changing from automatic to manual mode, restore manual values."""
# If "Automatic" radio button was clicked (i.e. it's "Checked")
if self.ui.radioButtonAutomatic.isChecked():
# Save current manual values
self.manual_value_fan1 = self.ui.horizontalSliderFan1.value()
self.manual_value_fan2 = self.ui.horizontalSliderFan2.value()
self.manual_value_fan3 = self.ui.horizontalSliderFan3.value()
self.manual_value_fan4 = self.ui.horizontalSliderFan4.value()
self.manual_value_fan5 = self.ui.horizontalSliderFan5.value()
self.manual_value_fan6 = self.ui.horizontalSliderFan6.value()
# Disable sliders
self.ui.horizontalSliderFan1.setEnabled(False)
self.ui.horizontalSliderFan2.setEnabled(False)
self.ui.horizontalSliderFan3.setEnabled(False)
self.ui.horizontalSliderFan4.setEnabled(False)
self.ui.horizontalSliderFan5.setEnabled(False)
self.ui.horizontalSliderFan6.setEnabled(False)
# Enable simulate temperatures
self.ui.groupBoxSimulateTemperatures.setEnabled(True)
# If "Manual" radio button was clicked
else:
# Restore saved manual values
self.ui.horizontalSliderFan1.setValue(self.manual_value_fan1)
self.ui.horizontalSliderFan2.setValue(self.manual_value_fan2)
self.ui.horizontalSliderFan3.setValue(self.manual_value_fan3)
self.ui.horizontalSliderFan4.setValue(self.manual_value_fan4)
self.ui.horizontalSliderFan5.setValue(self.manual_value_fan5)
self.ui.horizontalSliderFan6.setValue(self.manual_value_fan6)
# Enable sliders
self.ui.horizontalSliderFan1.setEnabled(True)
self.ui.horizontalSliderFan2.setEnabled(True)
self.ui.horizontalSliderFan3.setEnabled(True)
self.ui.horizontalSliderFan4.setEnabled(True)
self.ui.horizontalSliderFan5.setEnabled(True)
self.ui.horizontalSliderFan6.setEnabled(True)
# Disable simulate temperatures
self.ui.groupBoxSimulateTemperatures.setEnabled(False)
self.ui.checkBoxSimulateTemp.setChecked(False)
def update_fan_speed(self):
"""Update fan speed based on CPU and GPU temperatures."""
# If automatic mode is selected
if self.ui.radioButtonAutomatic.isChecked():
# For each fan (1 ... 6)
for fan in range(1, 7):
# Linear equation calculation
# y = k*x + m
# k = (y2 - y1) / (x2 - x1)
# First equation (a):
# From "Start increase speed at" to "Intermediate fan speed at" (temperature on x-axis)
# Temperatures (x-axis)
x1_a = int(getattr(self.ui, "spinBoxStartIncreaseSpeedFan" + str(fan)).value())
x2_a = int(getattr(self.ui, "spinBoxIntermediateTempFan" + str(fan)).value())
# Speed in percent (y-axis)
y1_a = int(getattr(self.ui, "spinBoxMinSpeedFan" + str(fan)).value())
y2_a = int(getattr(self.ui, "spinBoxIntermediateSpeedFan" + str(fan)).value())
# Calculate "k" and "m"
k_a = (y2_a - y1_a) / (x2_a - x1_a)
m_a = y1_a - k_a * x1_a
# Second equation (b)
# From "Intermediate fan speed at" to "Maximum fan speed at" (temperature on x-axis)
# Temperatures (x-axis)
x1_b = int(getattr(self.ui, "spinBoxIntermediateTempFan" + str(fan)).value())
x2_b = int(getattr(self.ui, "spinBoxMaxTempFan" + str(fan)).value())
# Speed in percent (y-axis)
y1_b = int(getattr(self.ui, "spinBoxIntermediateSpeedFan" + str(fan)).value())
y2_b = int(getattr(self.ui, "spinBoxMaxSpeedFan" + str(fan)).value())
# Calculate "k" and "m"
k_b = (y2_b - y1_b) / (x2_b - x1_b)
m_b = y1_b - k_b * x1_b
min_temperature = int(getattr(self.ui, "spinBoxStartIncreaseSpeedFan" + str(fan)).value())
intermediate_temperature = int(getattr(self.ui, "spinBoxIntermediateTempFan" + str(fan)).value())
max_temperature = int(getattr(self.ui, "spinBoxMaxTempFan" + str(fan)).value())
# If "Use CPU temperature" is selected, use current CPU temperature (from LCD widget in UI)
if getattr(self.ui, "radioButtonCPUFan" + str(fan)).isChecked():
current_temperature = self.ui.lcdNumberCurrentCPU.value()
# Else, use current GPU temperature (from LCD widget i UI)
else:
current_temperature = self.ui.lcdNumberCurrentGPU.value()
if current_temperature <= min_temperature:
# Set fan to minimum fan speed (constant value)
fan_speed = int(getattr(self.ui, "spinBoxMinSpeedFan" + str(fan)).value())
elif current_temperature <= intermediate_temperature:
# Calculate temperature according to first linear equation
fan_speed = k_a * current_temperature + m_a
elif current_temperature <= max_temperature:
# Calculate temperature according to second linear equation
fan_speed = k_b * current_temperature + m_b
else:
# Set fan to maximum fan speed (constant value)
fan_speed = int(getattr(self.ui, "spinBoxMaxSpeedFan" + str(fan)).value())
# Update horizontal slider value
getattr(self.ui, "horizontalSliderFan" + str(fan)).setValue(round(fan_speed))
def simulate_temperatures(self):
"""Simulate CPU and GPU temperatures, used for verifying the functionality of the fan control system."""
# If "Simulate temperatures" checkbox is enabled
if self.ui.checkBoxSimulateTemp.isChecked():
# Enable sliders
self.ui.horizontalSliderCPUTemp.setEnabled(True)
self.ui.horizontalSliderGPUTemp.setEnabled(True)
# Update CPU and GPU values from current horizontal slider values
self.ui.lcdNumberCurrentCPU.display(self.ui.horizontalSliderCPUTemp.value())
self.ui.lcdNumberCurrentGPU.display(self.ui.horizontalSliderGPUTemp.value())
# Disconnect temperature signals from polling thread
self.thread.cpu_temp_signal.disconnect(self.ui.lcdNumberCurrentCPU.display)
self.thread.gpu_temp_signal.disconnect(self.ui.lcdNumberCurrentGPU.display)
# Connect the horizontal sliders to the "CPU" and "GPU" LCD widget
self.ui.horizontalSliderCPUTemp.valueChanged.connect(self.ui.lcdNumberCurrentCPU.display)
self.ui.horizontalSliderGPUTemp.valueChanged.connect(self.ui.lcdNumberCurrentGPU.display)
# Update group box headers to indicate simulation mode
self.ui.groupBoxCurrentCPUTemp.setTitle("Sim. CPU temp")
self.ui.groupBoxCurrentGPUTemp.setTitle("Sim. GPU temp")
# If "Simulate temperatures" checkbox is disabled, reset settings
else:
# Disable horizontal sliders
self.ui.horizontalSliderCPUTemp.setEnabled(False)
self.ui.horizontalSliderGPUTemp.setEnabled(False)
# Reconnect signals from polling thread
self.thread.cpu_temp_signal.connect(self.ui.lcdNumberCurrentCPU.display)
self.thread.gpu_temp_signal.connect(self.ui.lcdNumberCurrentGPU.display)
# Reset headers in UI
self.ui.groupBoxCurrentCPUTemp.setTitle("Current CPU temp")
self.ui.groupBoxCurrentGPUTemp.setTitle("Current GPU temp")
def restart(self):
"""Update 'Selected CPU and GPU sensors' and restart application"""
# TODO: Add apply button
self.thread.update_sensors(self.get_cpu_sensor_ids(), self.get_gpu_sensor_ids())
self.init_communication()
def thread_exception_handling(self, msg):
"""Display an error message with details about the exception and reset the "serial port value" to <Select port>.
Called when an exception occurs in the polling thread."""
# Show error message
helper.show_error(msg)
# Reset the "serial port" combo box
index = self.ui.comboBoxComPorts.findText("<Select port>")
self.ui.comboBoxComPorts.setCurrentIndex(index)
def add_cpu_sensors(self):
"""Add selected temperature sensor(s) to the "Selected CPU sensor(s)" three widget."""
items = [item for item in self.ui.treeWidgetHWMonData.selectedItems()]
# The new items should have the tree widget itself as parent
parent = self.ui.treeWidgetSelectedCPUSensors
for item in items:
sensor_item = QtWidgets.QTreeWidgetItem(parent)
sensor_item.setText(0, item.text(0))
sensor_item.setText(1, item.text(1))
sensor_item.setForeground(0, QtGui.QBrush(QtCore.Qt.blue)) # Text color blue
# Deselect all items in the HWMon tree widget after they have been added
self.ui.treeWidgetHWMonData.clearSelection()
def add_gpu_sensors(self):
"""Add selected temperature sensor(s) to the "Selected GPU sensor(s)" three widget."""
items = [item for item in self.ui.treeWidgetHWMonData.selectedItems()]
# The new items should have the tree widget itself as parent
parent = self.ui.treeWidgetSelectedGPUSensors
for item in items:
sensor_item = QtWidgets.QTreeWidgetItem(parent)
sensor_item.setText(0, item.text(0))
sensor_item.setText(1, item.text(1))
sensor_item.setForeground(0, QtGui.QBrush(QtCore.Qt.blue)) # Text color blue
# Deselect all items in the HWMon tree widget after they have been added
self.ui.treeWidgetHWMonData.clearSelection()
def remove_cpu_sensors(self):
"""Remove selected CPU sensors."""
root = self.ui.treeWidgetSelectedCPUSensors.invisibleRootItem()
for item in self.ui.treeWidgetSelectedCPUSensors.selectedItems():
root.removeChild(item)
def remove_gpu_sensors(self):
"""Remove selected GPU sensors."""
root = self.ui.treeWidgetSelectedGPUSensors.invisibleRootItem()
for item in self.ui.treeWidgetSelectedGPUSensors.selectedItems():
root.removeChild(item)
def get_cpu_sensor_ids(self):
"""Get id's for each sensor in the "Selected CPU sensors" tree."""
root = self.ui.treeWidgetSelectedCPUSensors.invisibleRootItem()
child_count = root.childCount()
cpu_sensor_ids = []
for i in range(child_count):
item = root.child(i)
cpu_sensor_ids.append(item.text(1)) # Second column is the id
return cpu_sensor_ids
def get_gpu_sensor_ids(self):
"""Get id's for each sensor in the "Selected GPU sensors" tree."""
root = self.ui.treeWidgetSelectedGPUSensors.invisibleRootItem()
child_count = root.childCount()
gpu_sensor_ids = []
for i in range(child_count):
item = root.child(i)
gpu_sensor_ids.append(item.text(1)) # Second column is the id
return gpu_sensor_ids
def change_fan_icon(self, icon, fan):
"""Update the fan status icon."""
if fan == 1:
self.ui.labelStatusFan1.setPixmap(QtGui.QPixmap(icon))
if fan == 2:
self.ui.labelStatusFan2.setPixmap(QtGui.QPixmap(icon))
if fan == 3:
self.ui.labelStatusFan3.setPixmap(QtGui.QPixmap(icon))
if fan == 4:
self.ui.labelStatusFan4.setPixmap(QtGui.QPixmap(icon))
if fan == 5:
self.ui.labelStatusFan5.setPixmap(QtGui.QPixmap(icon))
if fan == 6:
self.ui.labelStatusFan6.setPixmap(QtGui.QPixmap(icon))
def closeEvent(self, event):
"""Save UI settings and stops the running thread gracefully, then exit the application.
Called when closing the application window.
"""
# Stop the running thread
if self.thread.isRunning():
self.thread.stop()
print("Thread stopped")
# Save UI settings
settings.save_settings(self.config, self.ui)
print("Settings saved")
# Hide tray icon
self.trayIcon.hide()
# Accept the closing event and close application
event.accept()
def changeEvent(self, event):
if event.type() == QtCore.QEvent.WindowStateChange:
if self.windowState() & QtCore.Qt.WindowMinimized:
if self.ui.checkBoxMinimizeToTray.isChecked():
event.ignore()
self.minimize_to_tray()
else:
self.show()
event.accept()
def toggle_visibility(self):
if self.isVisible():
self.minimize_to_tray()
else:
self.restore_from_tray()
def minimize_to_tray(self):
self.hide()
# self.trayIcon.show()
def restore_from_tray(self):
self.setWindowState(self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
self.activateWindow()
self.show()
# self.trayIcon.hide()
class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
def __init__(self, icon, parent=None):
super(SystemTrayIcon, self).__init__(icon, parent)
self.parent = parent
self.setToolTip("Grid Control")
self.activated.connect(self.on_systemTrayIcon_activated)
menu = QtWidgets.QMenu()
showAction = menu.addAction("Hide/Show")
showAction.triggered.connect(parent.toggle_visibility)
menu.addSeparator()
exitAction = menu.addAction("Exit")
exitAction.triggered.connect(parent.close)
self.setContextMenu(menu)
def on_systemTrayIcon_activated(self, reason):
if reason == QtWidgets.QSystemTrayIcon.DoubleClick:
self.parent.toggle_visibility()
if __name__ == "__main__":
# Use a rewritten excepthook for displaying unhandled exceptions as a QMessageBox
sys.excepthook = helper.excepthook
# Create the QT application
app = QtWidgets.QApplication(sys.argv)
# Create the main window
win = GridControl()
# Set program version
win.setWindowTitle("Grid Control 1.0.9")
# Show window
#win.show()
# Disable window resizing
win.setFixedSize(win.size())
# Start QT application
sys.exit(app.exec_())
================================================
FILE: grid-control/helper.py
================================================
"""
helper.py
---------
Implements various helper functions, e.g. to display messages using a QT Message box.
"""
import io
import sys
import traceback
from PyQt5 import QtCore, QtWidgets, QtGui
def excepthook(excType, excValue, tracebackobj):
"""Rewritten "excepthook" function, to display a message box with details about the exception.
@param excType exception type
@param excValue exception value
@param tracebackobj traceback object
"""
separator = '-' * 40
notice = "An unhandled exception has occurred\n"
tbinfofile = io.StringIO()
traceback.print_tb(tracebackobj, None, tbinfofile)
tbinfofile.seek(0)
tbinfo = tbinfofile.read()
errmsg = '%s: \n%s' % (str(excType), str(excValue))
sections = [separator, errmsg, separator, tbinfo]
msg = '\n'.join(sections)
# Create a QMessagebox
error_box = QtWidgets.QMessageBox()
error_box.setText(str(notice)+str(msg))
error_box.setWindowTitle("Grid Control - unhandled exception")
error_box.setIcon(QtWidgets.QMessageBox.Critical)
error_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
error_box.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
# Show the window
error_box.exec_()
sys.exit(1)
def exception_message_qthread(excType, excValue, tracebackobj):
"""Display an error message box with the exception details."""
separator = '-' * 40
notice = "An exception occurred in the polling thread!\n"
tbinfofile = io.StringIO()
traceback.print_tb(tracebackobj, None, tbinfofile)
tbinfofile.seek(0)
tbinfo = tbinfofile.read()
errmsg = '%s: \n%s' % (str(excType), str(excValue))
sections = [notice, separator, errmsg, separator, tbinfo]
msg = '\n'.join(sections)
return msg
def show_error(message):
"""Display "message" in a "Critical error" message box with 'OK' button."""
# Create a QMessagebox
message_box = QtWidgets.QMessageBox()
message_box.setText(message)
message_box.setWindowTitle("Error")
message_box.setWindowIcon(QtGui.QIcon(QtGui.QPixmap(":/icons/grid.png")))
message_box.setIcon(QtWidgets.QMessageBox.Critical)
message_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
message_box.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
#Show the window
message_box.exec_()
def show_notification(message):
"""Display "message" in a "Information" message box with 'OK' button."""
# Create a QMessagebox
message_box = QtWidgets.QMessageBox()
message_box.setText(message)
message_box.setWindowTitle("Note")
message_box.setWindowIcon(QtGui.QIcon(QtGui.QPixmap(":/icons/grid.png")))
message_box.setIcon(QtWidgets.QMessageBox.Information)
message_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
message_box.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
#Show the window
message_box.exec_()
class CustomDialog(QtWidgets.QDialog):
def __init__(self, parent=None):
super().__init__(parent)
def closeEvent(self, event):
event.accept()
sys.exit(1)
================================================
FILE: grid-control/kraken.py
================================================
"""
The below code comes from the "leviathan" project by jaksi
https://github.com/jaksi/leviathan
"""
import usb.core
import helper
class Cooler:
COLOR_MODE_NORMAL = 1
COLOR_MODE_ALTERNATING = 2
COLOR_MODE_BLINKING = 3
COLOR_MODE_OFF = 4
COLOR_MODES = [COLOR_MODE_NORMAL, COLOR_MODE_ALTERNATING,
COLOR_MODE_BLINKING, COLOR_MODE_OFF]
@classmethod
def _check_color(cls, color):
if len(color) != 3 or not all(
[isinstance(c, int) and c >= 0 and c <= 255 for c in color]
):
raise ValueError("colors must be tuples of 3 ints "
"between 0 and 255")
def _validate(self):
if self.speed < 30 or self.speed > 100 or self.speed % 5 != 0:
raise ValueError("speed must be between 30 and 100 "
"and divisible by 5")
self._check_color(self.color)
self._check_color(self.alternate_color)
if self.interval < 1 or self.interval > 255:
raise ValueError("interval must be between 1 and 255")
if self.color_mode not in self.COLOR_MODES:
raise ValueError("color_mode must be one of {}".format(
self.COLOR_MODES
))
def __init__(self, vid, pid, **kwargs):
devices = list(usb.core.find(idVendor=vid, idProduct=pid, find_all=True))
# TODO: Better error handling...
if not devices:
helper.show_notification("No Kraken X61 found...")
#assert devices, "No matching USB devices found"
if len(devices) > 1:
print("Warning: more than one matching device found, using the first one")
# TODO: Better error handling...
if devices:
self.device = devices[0]
self.device.ctrl_transfer(0x40, 2, 0x0002)
self.speed = kwargs.pop('speed', 30)
self.color = kwargs.pop('color', (255, 0, 0))
self.alternate_color = kwargs.pop('alternate_color', (0, 0, 255))
self.interval = kwargs.pop('interval', 1)
self.color_mode = kwargs.pop('color_mode', self.COLOR_MODE_NORMAL)
def _start_transaction(self):
self.device.ctrl_transfer(0x40, 2, 0x0001)
def _send_pump_speed(self, speed):
self.device.write(2, [0x13, speed])
def _send_fan_speed(self, speed):
self.device.write(2, [0x12, speed])
def _send_color(self, color, alternate_color, interval, mode):
self.device.write(2, [
0x10,
color[0], color[1], color[2],
alternate_color[0], alternate_color[1], alternate_color[2],
0xff, 0x00, 0x00, 0x3c,
interval, interval,
0x01 if mode != self.COLOR_MODE_OFF else 0x00,
0x01 if mode == self.COLOR_MODE_ALTERNATING else 0x00,
0x01 if mode == self.COLOR_MODE_BLINKING else 0x00,
0x01, 0x00, 0x01
])
def _receive_status(self):
status = self.device.read(0x82, 64)
fan_speed = 256 * status[0] + status[1]
pump_speed = 256 * status[8] + status[9]
liquid_temperature = status[10]
return {'fan_speed': fan_speed,
'pump_speed': pump_speed,
'liquid_temperature': liquid_temperature}
def update(self):
self._validate()
self._start_transaction()
self._send_pump_speed(self.speed)
self._send_color(self.color, self.alternate_color,
self.interval, self.color_mode)
self._receive_status()
self._start_transaction()
self._send_fan_speed(self.speed)
return self._receive_status()
================================================
FILE: grid-control/openhwmon.py
================================================
"""
openhwmon.py
------------
Implements communication with OpenHardwareMonitor using WMI.
The module also provides functions for populating the QT Tree Widget with hardware nodes and temperature sensors.
"""
import sys
import wmi
from PyQt5 import QtCore, QtWidgets, QtGui
import helper
import time
def initialize_hwmon():
"""Create a WMI object and verify that OpenHardwareMonitor is installed."""
# Access the OpenHWMon WMI interface
try:
hwmon = wmi.WMI(namespace="root\OpenHardwareMonitor")
return hwmon
# WMI exception (e.g. no namespace "root\OpenHardwareMonitor" indicates OpenHWMon is not installed
except:
helper.show_error("OpenHardwareMonitor WMI data not found.\n\n"
"Please make sure that OpenHardwareMonitor is installed.\n\n"
"Latest version is available at:\n\n"
"http://openhardwaremonitor.org\n\n"
"The application will now exit.")
sys.exit(0)
def populate_tree(hwmon, treeWidget, start_silently):
"""Read sensor data from OpenHardwareMonitor using the available WMI interface,
and populated the tree widget with the hardware nodes and sensors.
Hardware nodes contains the following data, note that Parent = "" indicates a top node in the tree:
Example:
instance of Hardware
{
HardwareType = "Mainboard";
Identifier = "/mainboard";
InstanceId = "3839";
Name = "ASUS MAXIMUS V GENE";
Parent = "";
ProcessId = "21816a7d-632f-4b9a-808f-0675d8eeca33";
};
Example:
instance of Hardware
{
HardwareType = "SuperIO";
Identifier = "/lpc/nct6779d";
InstanceId = "3845";
Name = "Nuvoton NCT6779D";
Parent = "/mainboard";
ProcessId = "21816a7d-632f-4b9a-808f-0675d8eeca33";
};
Sensors nodes contains the following data (including a parent hardware node), example:
instance of Sensor
{
Identifier = "/lpc/nct6779d/temperature/0";
Index = 0;
InstanceId = "3898";
Max = 40.5;
Min = 20;
Name = "CPU Core";
Parent = "/lpc/nct6779d";
ProcessId = "21816a7d-632f-4b9a-808f-0675d8eeca33";
SensorType = "Temperature";
Value = 30.5;
};
"""
# Get a list of temperature sensor nodes (filtered to optimize WMI performance)
sensors = hwmon.Sensor(["Name", "Parent", "Value", "Identifier"], SensorType="Temperature")
# No sensor data (empty list) indicates OpenHWMon is not running
if not sensors:
print("OHM not running!")
dialog = helper.CustomDialog()
dialog.setWindowTitle("Grid Control")
dialog.setWindowIcon(QtGui.QIcon(QtGui.QPixmap(":/icons/grid.png")))
dialog.resize(400,100)
dialog.layout = QtWidgets.QGridLayout(dialog)
label = QtWidgets.QLabel()
label.setText("Waiting for OpenHardwareMonitor to start.\n\n" + "Retries: 30")
label.setStyleSheet("font: 12pt;")
dialog.layout.addWidget(label)
if not start_silently:
dialog.show()
retries = 29
while retries > 0:
print("Sleeping...")
QtCore.QCoreApplication.processEvents()
time.sleep(1)
label.setText("Waiting for OpenHardwareMonitor to start.\n\n" + "Retries: " + str(retries))
print("Retrying...", retries)
sensors = hwmon.Sensor(["Name", "Parent", "Value", "Identifier"], SensorType="Temperature")
if sensors:
break
else:
retries -= 1
#helper.show_notification("No data from OpenHardwareMonitor found.\n\n"
# "Please make sure OpenHardwareMonitor is running.\n\n")
# Get a list of hardware nodes
hardwares = hwmon.Hardware()
# The "hardware_nodes" dictionary will hold all hardware nodes and children
# key = top node identifier
# value = list of all node identifiers (including the top node)
hardware_nodes = {}
# Add the top hardware nodes to the dictionary
for hardware in hardwares:
# No parent indicates it's a top node
if hardware.Parent == "":
hardware_nodes[hardware.Identifier] = [hardware.Identifier]
# Add remaining hardware nodes to the dictionary, under the corresponding top node (dictionary key)
for hardware in hardwares:
# If the node has a parent, it's a child node
if hardware.Parent != "":
hardware_nodes[hardware.Parent].append(hardware.Identifier)
# Add hardware nodes and temperature sensors to the three widget
for key, nodelist in hardware_nodes.items():
item_list = []
for index, node in enumerate(nodelist):
# First item in the list is the top node, parent should be the "treeWidget" itself
if index == 0:
parent = treeWidget
item = QtWidgets.QTreeWidgetItem(parent)
item.setText(0, get_hardware_name(nodelist[index], hardwares)) # First column, name of the node
item.setText(1, nodelist[index]) # Second column, node id
item.setFlags(QtCore.Qt.ItemIsEnabled) # Make hardware nodes "not selectable" in the UI
# Add the item to a list used when adding child nodes
item_list.append(item)
# Following items in the list are children, parent is the previous item in "item_list"
else:
parent = item_list[index-1]
item = QtWidgets.QTreeWidgetItem(parent)
item.setText(0, get_hardware_name(nodelist[index], hardwares)) # First column, name of the node
item.setText(1, nodelist[index]) # Second column, node id
item.setFlags(QtCore.Qt.ItemIsEnabled) # Make hardware nodes "not selectable" in the UI
item_list.append(item)
for sensor in sensors:
# If the sensor belongs to the current hardware node, add it as a child node
if sensor.Parent == nodelist[index]:
sensor_parent = item_list[-1] # Last item (QTreeWidgetItem) in the list is the parent
item = QtWidgets.QTreeWidgetItem(sensor_parent)
item.setText(0, sensor.Name) # First column, name
item.setText(1, sensor.Identifier) # Second column, id
item.setText(2, str(sensor.Value)) # Third column, temperature value
# Set node name and temperature value to blue
item.setForeground(0, QtGui.QBrush(QtCore.Qt.blue))
item.setForeground(2, QtGui.QBrush(QtCore.Qt.blue))
def get_temperature_sensors(hwmon):
"""Return all temperature sensors"""
# Get a list of temperature sensor nodes (filtered to optimize WMI performance)
sensors = hwmon.Sensor(["Name", "Parent", "Value", "Identifier"], SensorType="Temperature")
return sensors
def get_temp(hwmon, id):
"""Return the temperature value for the sensor id."""
# Get a list of temperature sensor nodes (filtered to optimize WMI performance)
sensors = hwmon.Sensor(["Name", "Parent", "Value", "Identifier"], SensorType="Temperature")
for sensor in sensors:
if sensor.Identifier == id:
return sensor.Value
def get_sensor_name(hwmon, id):
"""Return the name for a specific sensor id."""
# Get a list of temperature sensor nodes (filtered to optimize WMI performance)
sensors = hwmon.Sensor(["Name", "Parent", "Value", "Identifier"], SensorType="Temperature")
for sensor in sensors:
if sensor.Identifier == id:
return sensor.Name
def get_hardware_name(id, hardwares):
"""Return the name for a specific node id in the list of hardware nodes."""
for hardware in hardwares:
if hardware.Identifier == id:
return hardware.Name
================================================
FILE: grid-control/polling.py
================================================
"""
polling.py
----------
Implements a QThread for polling the Grid unit for fan rpm and voltage data,
as well as CPU and GPU temperatures from OpenHardwareMonitor.
"""
import sys
import time
import pythoncom
import wmi
from PyQt5 import QtCore
import grid
import helper
import openhwmon
# Define status icons (available in the resource file built with "pyrcc5"
ICON_RED_LED = ":/icons/led-red-on.png"
ICON_GREEN_LED = ":/icons/green-led-on.png"
class PollingThread(QtCore.QThread):
"""QThread, performs the following:
- Get fan rpm from Grid
- Get fan voltage from Grid
- Get CPU and GPU temperatures from OpenHardwareMonitor"""
# Signals handling the fan rpm
rpm_signal_fan1 = QtCore.pyqtSignal(str)
rpm_signal_fan2 = QtCore.pyqtSignal(str)
rpm_signal_fan3 = QtCore.pyqtSignal(str)
rpm_signal_fan4 = QtCore.pyqtSignal(str)
rpm_signal_fan5 = QtCore.pyqtSignal(str)
rpm_signal_fan6 = QtCore.pyqtSignal(str)
# Signals handling the fan voltage
voltage_signal_fan1 = QtCore.pyqtSignal(str)
voltage_signal_fan2 = QtCore.pyqtSignal(str)
voltage_signal_fan3 = QtCore.pyqtSignal(str)
voltage_signal_fan4 = QtCore.pyqtSignal(str)
voltage_signal_fan5 = QtCore.pyqtSignal(str)
voltage_signal_fan6 = QtCore.pyqtSignal(str)
# Signals handling the pixmap icon (red or green led) indicating the fan status
pixmap_signal_fan1 = QtCore.pyqtSignal(str)
pixmap_signal_fan2 = QtCore.pyqtSignal(str)
pixmap_signal_fan3 = QtCore.pyqtSignal(str)
pixmap_signal_fan4 = QtCore.pyqtSignal(str)
pixmap_signal_fan5 = QtCore.pyqtSignal(str)
pixmap_signal_fan6 = QtCore.pyqtSignal(str)
# Signals handling CPU and GPU temperatures
cpu_temp_signal = QtCore.pyqtSignal(int)
gpu_temp_signal = QtCore.pyqtSignal(int)
hwmon_status_signal = QtCore.pyqtSignal(str)
# Signal to indicate fan speed should be updated
update_signal = QtCore.pyqtSignal()
# Signal handling exceptions that may occur in the running thread
exception_signal = QtCore.pyqtSignal(str)
def __init__(self, polling_interval, ser, lock, cpu_sensor_ids, gpu_sensor_ids, cpu_calc, gpu_calc):
""" Constructor for the polling thread."""
super().__init__()
# "keep_running" controls the while loop in the running thread
# Initial value is False as the thread is not started yet
self.keep_running = False
# Polling interval (ms)
self.polling_interval = polling_interval
# Serial device
self.ser = ser
# Lock
self.lock = lock
# List of CPU and GPU temperature sensors to use
self.cpu_sensor_ids = cpu_sensor_ids
self.gpu_sensor_ids = gpu_sensor_ids
# Defines if CPU and GPU temperatures should be "Maximum" or "Average" from selected sensors
self.cpu_calc = cpu_calc
self.gpu_calc = gpu_calc
def __del__(self):
self.wait()
def stop(self):
"""Stop the running thread gracefully."""
print("Stopping thread...")
self.keep_running = False
# Wait for the thread to stop
self.wait()
print("Thread stopped")
# Uninitialize at thread stop (used for WMI in thread)
pythoncom.CoUninitialize()
def set_temp_calc(self, cpu_calc, gpu_calc):
"""Setter for cpu and gpu calc parameter."""
self.cpu_calc = cpu_calc
self.gpu_calc = gpu_calc
def update_polling_interval(self, new_polling_interval):
"""Setter for polling interval value."""
self.polling_interval = new_polling_interval
def update_sensors(self, cpu_sensor_ids, gpu_sensor_ids):
"""Setter for CPU and GPU sensor id's."""
self.cpu_sensor_ids = cpu_sensor_ids
self.gpu_sensor_ids = gpu_sensor_ids
def calculate_temp(self, temperature_sensors, type):
"""Calculate CPU/GPU temperatures (maximum or average value)"""
if type == "cpu":
cpu_temps = []
# Check if any sensors are configured
if self.cpu_sensor_ids:
for id in self.cpu_sensor_ids:
for sensor in temperature_sensors:
if id == sensor.Identifier:
cpu_temps.append(sensor.Value)
# Convert to float
cpu_temps_float = [float(i) for i in cpu_temps]
else:
cpu_temps_float = [0]
# Check if temperature values are available
if cpu_temps_float:
# Use maximum value
if self.cpu_calc == "Max":
return max(cpu_temps_float)
# Use average value
elif self.cpu_calc == "Avg":
return (sum(cpu_temps_float) / len(cpu_temps_float))
# If no temperature values are available, return 0
else:
return 0
elif type == "gpu":
gpu_temps = []
# Check if any sensors are configured
if self.gpu_sensor_ids:
for id in self.gpu_sensor_ids:
for sensor in temperature_sensors:
if id == sensor.Identifier:
gpu_temps.append(sensor.Value)
# Convert to float
gpu_temps_float = [float(i) for i in gpu_temps]
else:
gpu_temps_float = [0]
# Check if temperature values are available
if gpu_temps_float:
# Use maximum value
if self.gpu_calc == "Max":
return max(gpu_temps_float)
# Use average value
elif self.gpu_calc == "Avg":
return (sum(gpu_temps_float) / len(gpu_temps_float))
# If no temperature values are available, return 0
else:
return 0
def run(self):
"""Main thread processing loop:
- Poll the Grid for fan rpm and voltage.
- Poll OpenHardwareMonitor for CPU and GPU temperatures
- Emit signals:
- Fan rpm's
- Fan voltages
- CPU temperature
- GPU temperature
- Update fans
"""
try:
print("Starting thread...")
# CoInitialise() is needed when accessing WMI in a thread
# CoUninitialize() is called in the stop method
pythoncom.CoInitialize()
# A new WMI object is needed in the thread
hwmon_thread_wmi = wmi.WMI(namespace="root\OpenHardwareMonitor")
# "keep_running" should be True before starting the while loop
self.keep_running = True
# Start the main polling loop
while self.keep_running:
# Get current temperature sensors from OpenHardwareMonitor
temperature_sensors = openhwmon.get_temperature_sensors(hwmon_thread_wmi)
# Calculate CPU and GPU temperatures
current_cpu_temp = self.calculate_temp(temperature_sensors, "cpu")
current_gpu_temp = self.calculate_temp(temperature_sensors, "gpu")
# Emit temperature signals
self.cpu_temp_signal.emit(current_cpu_temp)
self.gpu_temp_signal.emit(current_gpu_temp)
# If both CPU and GPU temp are 0, set OpenHardwareMonitor status to "Disconnected"
if current_cpu_temp == current_gpu_temp == 0:
self.hwmon_status_signal.emit('<b><font color="red">---</font></b>')
else:
self.hwmon_status_signal.emit('<b><font color="green">Connected</font></b>')
# Read rpm for all fans
fans_rpm = grid.read_fan_rpm(self.ser, self.lock)
# Check if there is fan rpm data available
if fans_rpm:
# Emit rpm signals with current rpm values
self.rpm_signal_fan1.emit(str(fans_rpm[0]))
self.rpm_signal_fan2.emit(str(fans_rpm[1]))
self.rpm_signal_fan3.emit(str(fans_rpm[2]))
self.rpm_signal_fan4.emit(str(fans_rpm[3]))
self.rpm_signal_fan5.emit(str(fans_rpm[4]))
self.rpm_signal_fan6.emit(str(fans_rpm[5]))
# If no rpm data is available, emit "---" as value
else:
self.rpm_signal_fan1.emit('<b><font color="red">---</font></b>')
self.rpm_signal_fan2.emit('<b><font color="red">---</font></b>')
self.rpm_signal_fan3.emit('<b><font color="red">---</font></b>')
self.rpm_signal_fan4.emit('<b><font color="red">---</font></b>')
self.rpm_signal_fan5.emit('<b><font color="red">---</font></b>')
self.rpm_signal_fan6.emit('<b><font color="red">---</font></b>')
# Read voltage for all fans
fans_voltage = grid.read_fan_voltage(self.ser, self.lock)
# Check if there is fan voltages data available
if fans_voltage:
# Emit voltage signals with current voltages
self.voltage_signal_fan1.emit(str(fans_voltage[0]))
self.voltage_signal_fan2.emit(str(fans_voltage[1]))
self.voltage_signal_fan3.emit(str(fans_voltage[2]))
self.voltage_signal_fan4.emit(str(fans_voltage[3]))
self.voltage_signal_fan5.emit(str(fans_voltage[4]))
self.voltage_signal_fan6.emit(str(fans_voltage[5]))
# If no voltage data is available, emit "---" as value
else:
self.voltage_signal_fan1.emit('<b><font color="red">---</font></b>')
self.voltage_signal_fan2.emit('<b><font color="red">---</font></b>')
self.voltage_signal_fan3.emit('<b><font color="red">---</font></b>')
self.voltage_signal_fan4.emit('<b><font color="red">---</font></b>')
self.voltage_signal_fan5.emit('<b><font color="red">---</font></b>')
self.voltage_signal_fan6.emit('<b><font color="red">---</font></b>')
# Update status icons
# Check if rpm and voltage data is available
if fans_rpm and fans_voltage:
# Emit pixmap icon signal (red icon if fan rpm or voltage is 0, otherwise green icon)
self.pixmap_signal_fan1.emit(ICON_RED_LED if fans_rpm[0] == 0 or fans_voltage[0] == 0 else ICON_GREEN_LED)
self.pixmap_signal_fan2.emit(ICON_RED_LED if fans_rpm[1] == 0 or fans_voltage[1] == 0 else ICON_GREEN_LED)
self.pixmap_signal_fan3.emit(ICON_RED_LED if fans_rpm[2] == 0 or fans_voltage[2] == 0 else ICON_GREEN_LED)
self.pixmap_signal_fan4.emit(ICON_RED_LED if fans_rpm[3] == 0 or fans_voltage[3] == 0 else ICON_GREEN_LED)
self.pixmap_signal_fan5.emit(ICON_RED_LED if fans_rpm[4] == 0 or fans_voltage[4] == 0 else ICON_GREEN_LED)
self.pixmap_signal_fan6.emit(ICON_RED_LED if fans_rpm[5] == 0 or fans_voltage[5] == 0 else ICON_GREEN_LED)
# If no fan rpm or voltage data is available, show the red status icon
else:
self.pixmap_signal_fan1.emit(ICON_RED_LED)
self.pixmap_signal_fan2.emit(ICON_RED_LED)
self.pixmap_signal_fan3.emit(ICON_RED_LED)
self.pixmap_signal_fan4.emit(ICON_RED_LED)
self.pixmap_signal_fan5.emit(ICON_RED_LED)
self.pixmap_signal_fan6.emit(ICON_RED_LED)
# Emit update signal
self.update_signal.emit()
#print("End of polling loop, sleeping for " + str(self.polling_interval) + " ms")
# Sleep for the set polling interval (ms)
time.sleep(self.polling_interval/1000)
# Emits a signal if an exception occurs in the running thread
# The main application will then show an error message about the problem
# This is needed because a new message box widget cannot be created/displayed in the thread
except Exception as e:
# Stop the thread
self.stop()
print("Thread stopped at exception")
# Get info about the exception
(type, value, traceback) = sys.exc_info()
# Generate a detailed error message
msg = helper.exception_message_qthread(type, value, traceback)
# Emit a signal with the error message to be displayed in a message box in the main UI
self.exception_signal.emit(msg)
================================================
FILE: grid-control/settings.py
================================================
"""
settings.py
-----------
Implements functions for reading and writing UI configuration using a QSettings object.
"""
from PyQt5 import QtCore, QtWidgets, QtGui
import openhwmon
def read_settings(config, ui, hwmon):
"""Read configuration from the OS repository (Registry in Windows, ini-file in Linux).
Uses default values if no settings are found.
"type=<type>" defines the data type.
"""
#
# "General" tab
# ------------------------
# Horizontal slider values (fan percent), default value "35"
ui.horizontalSliderFan1.setValue(config.value("fan1_percent", 35, type=int))
ui.horizontalSliderFan2.setValue(config.value("fan2_percent", 35, type=int))
ui.horizontalSliderFan3.setValue(config.value("fan3_percent", 35, type=int))
ui.horizontalSliderFan4.setValue(config.value("fan4_percent", 35, type=int))
ui.horizontalSliderFan5.setValue(config.value("fan5_percent", 35, type=int))
ui.horizontalSliderFan6.setValue(config.value("fan6_percent", 35, type=int))
# Radio buttons
ui.radioButtonManual.setChecked(config.value("manual_control", True, type=bool))
ui.radioButtonAutomatic.setChecked(config.value("automatic_control", False, type=bool))
# Configuration checkboxes
ui.checkBoxStartMinimized.setChecked(config.value("start_minimized", False, type=bool))
ui.checkBoxStartSilently.setChecked(config.value("start_silently", False, type=bool))
ui.checkBoxMinimizeToTray.setChecked(config.value("minimize_to_tray", False, type=bool))
# Serial port combo box value, default "<Select port>"
# TODO: Remove unknown/not existing serial ports from stored values
index = ui.comboBoxComPorts.findText(config.value("port", "<Select port>", type=str))
ui.comboBoxComPorts.setCurrentIndex(index)
if index == -1:
ui.comboBoxComPorts.setCurrentIndex(0)
# Polling interval combo box value, default "500" (ms)
index = ui.comboBoxPolling.findText(config.value("polling", "500", type=str))
ui.comboBoxPolling.setCurrentIndex(index)
if index == -1:
ui.comboBoxComPorts.setCurrentIndex(0)
#
# "Sensor Config" tab
# ------------------------
# Get all available temperature sensors
sensors = openhwmon.get_temperature_sensors(hwmon)
# Selected CPU sensors
parent = ui.treeWidgetSelectedCPUSensors
for id in config.value("cpu_sensor_ids", type=str):
item = QtWidgets.QTreeWidgetItem(parent)
for sensor in sensors:
if sensor.Identifier == id:
item.setText(0, sensor.Name)
item.setText(1, id)
item.setForeground(0, QtGui.QBrush(QtCore.Qt.blue)) # Text color blue
# Selected GPU sensors
parent = ui.treeWidgetSelectedGPUSensors
for id in config.value("gpu_sensor_ids", type=str):
item = QtWidgets.QTreeWidgetItem(parent)
for sensor in sensors:
if sensor.Identifier == id:
item.setText(0, sensor.Name)
item.setText(1, id)
item.setForeground(0, QtGui.QBrush(QtCore.Qt.blue)) # Text color blue
# Radio buttons
ui.radioButtonCPUMax.setChecked(config.value("cpu_use_max", True, type=bool))
ui.radioButtonCPUAverage.setChecked(config.value("cpu_use_avg", False, type=bool))
ui.radioButtonGPUMax.setChecked(config.value("gpu_use_max", True, type=bool))
ui.radioButtonGPUAverage.setChecked(config.value("gpu_use_avg", False, type=bool))
#
# "Fan Config" tab
# ------------------------
# Radio buttons
ui.radioButtonCPUFan1.setChecked(config.value("cpu_fan_1", True, type=bool))
ui.radioButtonCPUFan2.setChecked(config.value("cpu_fan_2", True, type=bool))
ui.radioButtonCPUFan3.setChecked(config.value("cpu_fan_3", True, type=bool))
ui.radioButtonCPUFan4.setChecked(config.value("cpu_fan_4", True, type=bool))
ui.radioButtonCPUFan5.setChecked(config.value("cpu_fan_5", True, type=bool))
ui.radioButtonCPUFan6.setChecked(config.value("cpu_fan_6", True, type=bool))
ui.radioButtonGPUFan1.setChecked(config.value("gpu_fan_1", False, type=bool))
ui.radioButtonGPUFan2.setChecked(config.value("gpu_fan_2", False, type=bool))
ui.radioButtonGPUFan3.setChecked(config.value("gpu_fan_3", False, type=bool))
ui.radioButtonGPUFan4.setChecked(config.value("gpu_fan_4", False, type=bool))
ui.radioButtonGPUFan5.setChecked(config.value("gpu_fan_5", False, type=bool))
ui.radioButtonGPUFan6.setChecked(config.value("gpu_fan_6", False, type=bool))
# Fan speed and temperature data spinbox values
ui.spinBoxMinSpeedFan1.setValue(config.value("min_speed_fan_1", 35, type=int))
ui.spinBoxMinSpeedFan2.setValue(config.value("min_speed_fan_2", 35, type=int))
ui.spinBoxMinSpeedFan3.setValue(config.value("min_speed_fan_3", 35, type=int))
ui.spinBoxMinSpeedFan4.setValue(config.value("min_speed_fan_4", 35, type=int))
ui.spinBoxMinSpeedFan5.setValue(config.value("min_speed_fan_5", 35, type=int))
ui.spinBoxMinSpeedFan6.setValue(config.value("min_speed_fan_6", 35, type=int))
ui.spinBoxStartIncreaseSpeedFan1.setValue(config.value("start_increase_speed_fan_1", 40, type=int))
ui.spinBoxStartIncreaseSpeedFan2.setValue(config.value("start_increase_speed_fan_2", 40, type=int))
ui.spinBoxStartIncreaseSpeedFan3.setValue(config.value("start_increase_speed_fan_3", 40, type=int))
ui.spinBoxStartIncreaseSpeedFan4.setValue(config.value("start_increase_speed_fan_4", 40, type=int))
ui.spinBoxStartIncreaseSpeedFan5.setValue(config.value("start_increase_speed_fan_5", 40, type=int))
ui.spinBoxStartIncreaseSpeedFan6.setValue(config.value("start_increase_speed_fan_6", 40, type=int))
ui.spinBoxIntermediateSpeedFan1.setValue(config.value("intermediate_speed_fan_1", 60, type=int))
ui.spinBoxIntermediateSpeedFan2.setValue(config.value("intermediate_speed_fan_2", 60, type=int))
ui.spinBoxIntermediateSpeedFan3.setValue(config.value("intermediate_speed_fan_3", 60, type=int))
ui.spinBoxIntermediateSpeedFan4.setValue(config.value("intermediate_speed_fan_4", 60, type=int))
ui.spinBoxIntermediateSpeedFan5.setValue(config.value("intermediate_speed_fan_5", 60, type=int))
ui.spinBoxIntermediateSpeedFan6.setValue(config.value("intermediate_speed_fan_6", 60, type=int))
ui.spinBoxIntermediateTempFan1.setValue(config.value("intermediate_temp_fan_1", 60, type=int))
ui.spinBoxIntermediateTempFan2.setValue(config.value("intermediate_temp_fan_2", 60, type=int))
ui.spinBoxIntermediateTempFan3.setValue(config.value("intermediate_temp_fan_3", 60, type=int))
ui.spinBoxIntermediateTempFan4.setValue(config.value("intermediate_temp_fan_4", 60, type=int))
ui.spinBoxIntermediateTempFan5.setValue(config.value("intermediate_temp_fan_5", 60, type=int))
ui.spinBoxIntermediateTempFan6.setValue(config.value("intermediate_temp_fan_6", 60, type=int))
ui.spinBoxMaxSpeedFan1.setValue(config.value("max_speed_fan_1", 100, type=int))
ui.spinBoxMaxSpeedFan2.setValue(config.value("max_speed_fan_2", 100, type=int))
ui.spinBoxMaxSpeedFan3.setValue(config.value("max_speed_fan_3", 100, type=int))
ui.spinBoxMaxSpeedFan4.setValue(config.value("max_speed_fan_4", 100, type=int))
ui.spinBoxMaxSpeedFan5.setValue(config.value("max_speed_fan_5", 100, type=int))
ui.spinBoxMaxSpeedFan6.setValue(config.value("max_speed_fan_6", 100, type=int))
ui.spinBoxMaxTempFan1.setValue(config.value("max_temp_fan_1", 75, type=int))
ui.spinBoxMaxTempFan2.setValue(config.value("max_temp_fan_2", 75, type=int))
ui.spinBoxMaxTempFan3.setValue(config.value("max_temp_fan_3", 75, type=int))
ui.spinBoxMaxTempFan4.setValue(config.value("max_temp_fan_4", 75, type=int))
ui.spinBoxMaxTempFan5.setValue(config.value("max_temp_fan_5", 75, type=int))
ui.spinBoxMaxTempFan6.setValue(config.value("max_temp_fan_6", 75, type=int))
#
# "Rename Fans" tab
# ------------------------
# Fan labels, default "Fan 1" ... "Fan 6"
ui.lineEditFan1.setText(config.value("fan1_name", "Fan 1", type=str))
ui.lineEditFan2.setText(config.value("fan2_name", "Fan 2", type=str))
ui.lineEditFan3.setText(config.value("fan3_name", "Fan 3", type=str))
ui.lineEditFan4.setText(config.value("fan4_name", "Fan 4", type=str))
ui.lineEditFan5.setText(config.value("fan5_name", "Fan 5", type=str))
ui.lineEditFan6.setText(config.value("fan6_name", "Fan 6", type=str))
def save_settings(config, ui):
"""Save current UI configuration to the OS repository, called when exiting the main application"""
#
# "General" tab
# ------------------------
# Fan slider values
config.setValue("fan1_percent", ui.horizontalSliderFan1.value())
config.setValue("fan2_percent", ui.horizontalSliderFan2.value())
config.setValue("fan3_percent", ui.horizontalSliderFan3.value())
config.setValue("fan4_percent", ui.horizontalSliderFan4.value())
config.setValue("fan5_percent", ui.horizontalSliderFan5.value())
config.setValue("fan6_percent", ui.horizontalSliderFan6.value())
# Serial port
config.setValue("port", ui.comboBoxComPorts.currentText())
# Polling interval
config.setValue("polling", ui.comboBoxPolling.currentText())
# Radio buttons
config.setValue("automatic_control", ui.radioButtonAutomatic.isChecked())
config.setValue("manual_control", ui.radioButtonManual.isChecked())
# Configuration checkboxes
config.setValue("start_minimized", ui.checkBoxStartMinimized.isChecked())
config.setValue("start_silently", ui.checkBoxStartSilently.isChecked())
config.setValue("minimize_to_tray", ui.checkBoxMinimizeToTray.isChecked())
#
# "Sensor Config" tab
# ------------------------
# Selected CPU sensors
root = ui.treeWidgetSelectedCPUSensors.invisibleRootItem()
child_count = root.childCount()
cpu_sensor_ids = []
for i in range(child_count):
item = root.child(i)
cpu_sensor_ids.append(item.text(1))
config.setValue("cpu_sensor_ids", cpu_sensor_ids)
# Selected GPU sensors
root = ui.treeWidgetSelectedGPUSensors.invisibleRootItem()
child_count = root.childCount()
gpu_sensor_ids = []
for i in range(child_count):
item = root.child(i)
gpu_sensor_ids.append(item.text(1))
config.setValue("gpu_sensor_ids", gpu_sensor_ids)
# Radio buttons
config.setValue("cpu_use_max", ui.radioButtonCPUMax.isChecked())
config.setValue("cpu_use_avg", ui.radioButtonCPUAverage.isChecked())
config.setValue("gpu_use_max", ui.radioButtonGPUMax.isChecked())
config.setValue("gpu_use_avg", ui.radioButtonGPUAverage.isChecked())
#
# "Fan Config" tab
# ------------------------
# Radio buttons
config.setValue("cpu_fan_1", ui.radioButtonCPUFan1.isChecked())
config.setValue("cpu_fan_2", ui.radioButtonCPUFan2.isChecked())
config.setValue("cpu_fan_3", ui.radioButtonCPUFan3.isChecked())
config.setValue("cpu_fan_4", ui.radioButtonCPUFan4.isChecked())
config.setValue("cpu_fan_5", ui.radioButtonCPUFan5.isChecked())
config.setValue("cpu_fan_6", ui.radioButtonCPUFan6.isChecked())
config.setValue("gpu_fan_1", ui.radioButtonGPUFan1.isChecked())
config.setValue("gpu_fan_2", ui.radioButtonGPUFan2.isChecked())
config.setValue("gpu_fan_3", ui.radioButtonGPUFan3.isChecked())
config.setValue("gpu_fan_4", ui.radioButtonGPUFan4.isChecked())
config.setValue("gpu_fan_5", ui.radioButtonGPUFan5.isChecked())
config.setValue("gpu_fan_6", ui.radioButtonGPUFan6.isChecked())
# Fan and temp data spinbox values
config.setValue("min_speed_fan_1", ui.spinBoxMinSpeedFan1.value())
config.setValue("min_speed_fan_2", ui.spinBoxMinSpeedFan2.value())
config.setValue("min_speed_fan_3", ui.spinBoxMinSpeedFan3.value())
config.setValue("min_speed_fan_4", ui.spinBoxMinSpeedFan4.value())
config.setValue("min_speed_fan_5", ui.spinBoxMinSpeedFan5.value())
config.setValue("min_speed_fan_6", ui.spinBoxMinSpeedFan6.value())
config.setValue("start_increase_speed_fan_1", ui.spinBoxStartIncreaseSpeedFan1.value())
config.setValue("start_increase_speed_fan_2", ui.spinBoxStartIncreaseSpeedFan2.value())
config.setValue("start_increase_speed_fan_3", ui.spinBoxStartIncreaseSpeedFan3.value())
config.setValue("start_increase_speed_fan_4", ui.spinBoxStartIncreaseSpeedFan4.value())
config.setValue("start_increase_speed_fan_5", ui.spinBoxStartIncreaseSpeedFan5.value())
config.setValue("start_increase_speed_fan_6", ui.spinBoxStartIncreaseSpeedFan6.value())
config.setValue("intermediate_speed_fan_1", ui.spinBoxIntermediateSpeedFan1.value())
config.setValue("intermediate_speed_fan_2", ui.spinBoxIntermediateSpeedFan2.value())
config.setValue("intermediate_speed_fan_3", ui.spinBoxIntermediateSpeedFan3.value())
config.setValue("intermediate_speed_fan_4", ui.spinBoxIntermediateSpeedFan4.value())
config.setValue("intermediate_speed_fan_5", ui.spinBoxIntermediateSpeedFan5.value())
config.setValue("intermediate_speed_fan_6", ui.spinBoxIntermediateSpeedFan6.value())
config.setValue("intermediate_temp_fan_1", ui.spinBoxIntermediateTempFan1.value())
config.setValue("intermediate_temp_fan_2", ui.spinBoxIntermediateTempFan2.value())
config.setValue("intermediate_temp_fan_3", ui.spinBoxIntermediateTempFan3.value())
config.setValue("intermediate_temp_fan_4", ui.spinBoxIntermediateTempFan4.value())
config.setValue("intermediate_temp_fan_5", ui.spinBoxIntermediateTempFan5.value())
config.setValue("intermediate_temp_fan_6", ui.spinBoxIntermediateTempFan6.value())
config.setValue("max_speed_fan_1", ui.spinBoxMaxSpeedFan1.value())
config.setValue("max_speed_fan_2", ui.spinBoxMaxSpeedFan2.value())
config.setValue("max_speed_fan_3", ui.spinBoxMaxSpeedFan3.value())
config.setValue("max_speed_fan_4", ui.spinBoxMaxSpeedFan4.value())
config.setValue("max_speed_fan_5", ui.spinBoxMaxSpeedFan5.value())
config.setValue("max_speed_fan_6", ui.spinBoxMaxSpeedFan6.value())
config.setValue("max_temp_fan_1", ui.spinBoxMaxTempFan1.value())
config.setValue("max_temp_fan_2", ui.spinBoxMaxTempFan2.value())
config.setValue("max_temp_fan_3", ui.spinBoxMaxTempFan3.value())
config.setValue("max_temp_fan_4", ui.spinBoxMaxTempFan4.value())
config.setValue("max_temp_fan_5", ui.spinBoxMaxTempFan5.value())
config.setValue("max_temp_fan_6", ui.spinBoxMaxTempFan6.value())
#
# "Rename Fans" tab
# ------------------------
# Fan labels
config.setValue("fan1_name", ui.lineEditFan1.text())
config.setValue("fan2_name", ui.lineEditFan2.text())
config.setValue("fan3_name", ui.lineEditFan3.text())
config.setValue("fan4_name", ui.lineEditFan4.text())
config.setValue("fan5_name", ui.lineEditFan5.text())
config.setValue("fan6_name", ui.lineEditFan6.text())
================================================
FILE: grid-control/ui/__init__.py
================================================
================================================
FILE: grid-control/ui/mainwindow.py
================================================
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1033, 721)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/grid.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setStyleSheet("QGroupBox {\n"
" background-color:qlineargradient(spread:pad, x1:1, y1:1, x2:1, y2:0, stop:0 rgba(235, 235, 235, 255), stop:1 rgba(255, 255, 255, 255));\n"
" border: 1px solid gray;\n"
" border-radius: 6px;\n"
" border-width: 1px;\n"
" margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
" subcontrol-origin: margin;\n"
" left: 10px;\n"
" padding: 0 3px 0 3px;\n"
"}\n"
"\n"
"QTreeWidget {\n"
" border: 1px white;\n"
" border-radius: 6px;\n"
" border-width: 1px;\n"
" margin-top: 0.5em;\n"
"}")
self.centralwidget = QtWidgets.QWidget(MainWindow)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.centralwidget.setObjectName("centralwidget")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setEnabled(True)
self.tabWidget.setGeometry(QtCore.QRect(11, 10, 1011, 681))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.tabWidget.setFont(font)
self.tabWidget.setStyleSheet("")
self.tabWidget.setTabShape(QtWidgets.QTabWidget.Triangular)
self.tabWidget.setIconSize(QtCore.QSize(16, 16))
self.tabWidget.setObjectName("tabWidget")
self.tabGeneral = QtWidgets.QWidget()
self.tabGeneral.setObjectName("tabGeneral")
self.frame = QtWidgets.QFrame(self.tabGeneral)
self.frame.setGeometry(QtCore.QRect(10, 10, 1001, 641))
self.frame.setFrameShape(QtWidgets.QFrame.NoFrame)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.groupBoxCurrentCPUTemp = QtWidgets.QGroupBox(self.frame)
self.groupBoxCurrentCPUTemp.setGeometry(QtCore.QRect(610, 10, 181, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxCurrentCPUTemp.setFont(font)
self.groupBoxCurrentCPUTemp.setAutoFillBackground(False)
self.groupBoxCurrentCPUTemp.setStyleSheet("")
self.groupBoxCurrentCPUTemp.setObjectName("groupBoxCurrentCPUTemp")
self.label_192 = QtWidgets.QLabel(self.groupBoxCurrentCPUTemp)
self.label_192.setGeometry(QtCore.QRect(90, 30, 81, 41))
font = QtGui.QFont()
font.setPointSize(15)
font.setBold(False)
font.setWeight(50)
self.label_192.setFont(font)
self.label_192.setObjectName("label_192")
self.lcdNumberCurrentCPU = QtWidgets.QLCDNumber(self.groupBoxCurrentCPUTemp)
self.lcdNumberCurrentCPU.setGeometry(QtCore.QRect(10, 30, 71, 41))
font = QtGui.QFont()
font.setPointSize(15)
font.setBold(True)
font.setWeight(75)
self.lcdNumberCurrentCPU.setFont(font)
self.lcdNumberCurrentCPU.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberCurrentCPU.setDigitCount(3)
self.lcdNumberCurrentCPU.setObjectName("lcdNumberCurrentCPU")
self.groupBoxFanControl = QtWidgets.QGroupBox(self.frame)
self.groupBoxFanControl.setGeometry(QtCore.QRect(10, 220, 671, 401))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxFanControl.setFont(font)
self.groupBoxFanControl.setObjectName("groupBoxFanControl")
self.radioButtonManual = QtWidgets.QRadioButton(self.groupBoxFanControl)
self.radioButtonManual.setGeometry(QtCore.QRect(20, 30, 131, 20))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.radioButtonManual.setFont(font)
self.radioButtonManual.setChecked(True)
self.radioButtonManual.setObjectName("radioButtonManual")
self.radioButtonAutomatic = QtWidgets.QRadioButton(self.groupBoxFanControl)
self.radioButtonAutomatic.setEnabled(True)
self.radioButtonAutomatic.setGeometry(QtCore.QRect(20, 50, 141, 41))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.radioButtonAutomatic.setFont(font)
self.radioButtonAutomatic.setObjectName("radioButtonAutomatic")
self.groupBoxFan1 = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxFan1.setGeometry(QtCore.QRect(20, 110, 301, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxFan1.setFont(font)
self.groupBoxFan1.setObjectName("groupBoxFan1")
self.label_152 = QtWidgets.QLabel(self.groupBoxFan1)
self.label_152.setGeometry(QtCore.QRect(260, 30, 21, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.label_152.setFont(font)
self.label_152.setObjectName("label_152")
self.horizontalSliderFan1 = QtWidgets.QSlider(self.groupBoxFan1)
self.horizontalSliderFan1.setGeometry(QtCore.QRect(10, 30, 191, 31))
self.horizontalSliderFan1.setMaximum(100)
self.horizontalSliderFan1.setSingleStep(1)
self.horizontalSliderFan1.setPageStep(5)
self.horizontalSliderFan1.setProperty("value", 0)
self.horizontalSliderFan1.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderFan1.setTickPosition(QtWidgets.QSlider.NoTicks)
self.horizontalSliderFan1.setTickInterval(0)
self.horizontalSliderFan1.setObjectName("horizontalSliderFan1")
self.lcdNumberFan1 = QtWidgets.QLCDNumber(self.groupBoxFan1)
self.lcdNumberFan1.setGeometry(QtCore.QRect(210, 30, 51, 31))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.lcdNumberFan1.setFont(font)
self.lcdNumberFan1.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberFan1.setDigitCount(3)
self.lcdNumberFan1.setProperty("value", 0.0)
self.lcdNumberFan1.setProperty("intValue", 0)
self.lcdNumberFan1.setObjectName("lcdNumberFan1")
self.groupBoxFan2 = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxFan2.setGeometry(QtCore.QRect(20, 200, 301, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxFan2.setFont(font)
self.groupBoxFan2.setObjectName("groupBoxFan2")
self.label_153 = QtWidgets.QLabel(self.groupBoxFan2)
self.label_153.setGeometry(QtCore.QRect(260, 30, 21, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.label_153.setFont(font)
self.label_153.setObjectName("label_153")
self.horizontalSliderFan2 = QtWidgets.QSlider(self.groupBoxFan2)
self.horizontalSliderFan2.setGeometry(QtCore.QRect(10, 30, 191, 31))
self.horizontalSliderFan2.setMaximum(100)
self.horizontalSliderFan2.setSingleStep(1)
self.horizontalSliderFan2.setPageStep(5)
self.horizontalSliderFan2.setProperty("value", 0)
self.horizontalSliderFan2.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderFan2.setObjectName("horizontalSliderFan2")
self.lcdNumberFan2 = QtWidgets.QLCDNumber(self.groupBoxFan2)
self.lcdNumberFan2.setGeometry(QtCore.QRect(210, 30, 51, 31))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.lcdNumberFan2.setFont(font)
self.lcdNumberFan2.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberFan2.setDigitCount(3)
self.lcdNumberFan2.setProperty("value", 0.0)
self.lcdNumberFan2.setProperty("intValue", 0)
self.lcdNumberFan2.setObjectName("lcdNumberFan2")
self.groupBoxFan3 = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxFan3.setGeometry(QtCore.QRect(20, 290, 301, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxFan3.setFont(font)
self.groupBoxFan3.setObjectName("groupBoxFan3")
self.label_154 = QtWidgets.QLabel(self.groupBoxFan3)
self.label_154.setGeometry(QtCore.QRect(260, 30, 55, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.label_154.setFont(font)
self.label_154.setObjectName("label_154")
self.horizontalSliderFan3 = QtWidgets.QSlider(self.groupBoxFan3)
self.horizontalSliderFan3.setGeometry(QtCore.QRect(10, 30, 191, 31))
self.horizontalSliderFan3.setMaximum(100)
self.horizontalSliderFan3.setSingleStep(1)
self.horizontalSliderFan3.setPageStep(5)
self.horizontalSliderFan3.setProperty("value", 0)
self.horizontalSliderFan3.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderFan3.setObjectName("horizontalSliderFan3")
self.lcdNumberFan3 = QtWidgets.QLCDNumber(self.groupBoxFan3)
self.lcdNumberFan3.setGeometry(QtCore.QRect(210, 30, 51, 31))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.lcdNumberFan3.setFont(font)
self.lcdNumberFan3.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberFan3.setDigitCount(3)
self.lcdNumberFan3.setProperty("value", 0.0)
self.lcdNumberFan3.setProperty("intValue", 0)
self.lcdNumberFan3.setObjectName("lcdNumberFan3")
self.groupBoxFan4 = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxFan4.setGeometry(QtCore.QRect(350, 110, 301, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxFan4.setFont(font)
self.groupBoxFan4.setObjectName("groupBoxFan4")
self.label_158 = QtWidgets.QLabel(self.groupBoxFan4)
self.label_158.setGeometry(QtCore.QRect(250, 30, 55, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.label_158.setFont(font)
self.label_158.setObjectName("label_158")
self.horizontalSliderFan4 = QtWidgets.QSlider(self.groupBoxFan4)
self.horizontalSliderFan4.setGeometry(QtCore.QRect(10, 30, 181, 31))
self.horizontalSliderFan4.setMaximum(100)
self.horizontalSliderFan4.setSingleStep(1)
self.horizontalSliderFan4.setPageStep(5)
self.horizontalSliderFan4.setProperty("value", 0)
self.horizontalSliderFan4.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderFan4.setObjectName("horizontalSliderFan4")
self.lcdNumberFan4 = QtWidgets.QLCDNumber(self.groupBoxFan4)
self.lcdNumberFan4.setGeometry(QtCore.QRect(200, 30, 51, 31))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.lcdNumberFan4.setFont(font)
self.lcdNumberFan4.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberFan4.setDigitCount(3)
self.lcdNumberFan4.setProperty("value", 0.0)
self.lcdNumberFan4.setProperty("intValue", 0)
self.lcdNumberFan4.setObjectName("lcdNumberFan4")
self.groupBoxFan6 = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxFan6.setGeometry(QtCore.QRect(350, 290, 301, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxFan6.setFont(font)
self.groupBoxFan6.setObjectName("groupBoxFan6")
self.label_159 = QtWidgets.QLabel(self.groupBoxFan6)
self.label_159.setGeometry(QtCore.QRect(250, 30, 55, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.label_159.setFont(font)
self.label_159.setObjectName("label_159")
self.horizontalSliderFan6 = QtWidgets.QSlider(self.groupBoxFan6)
self.horizontalSliderFan6.setGeometry(QtCore.QRect(10, 30, 181, 31))
self.horizontalSliderFan6.setMaximum(100)
self.horizontalSliderFan6.setSingleStep(1)
self.horizontalSliderFan6.setPageStep(5)
self.horizontalSliderFan6.setProperty("value", 0)
self.horizontalSliderFan6.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderFan6.setObjectName("horizontalSliderFan6")
self.lcdNumberFan6 = QtWidgets.QLCDNumber(self.groupBoxFan6)
self.lcdNumberFan6.setGeometry(QtCore.QRect(200, 30, 51, 31))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.lcdNumberFan6.setFont(font)
self.lcdNumberFan6.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberFan6.setDigitCount(3)
self.lcdNumberFan6.setProperty("value", 0.0)
self.lcdNumberFan6.setProperty("intValue", 0)
self.lcdNumberFan6.setObjectName("lcdNumberFan6")
self.groupBoxFan5 = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxFan5.setGeometry(QtCore.QRect(350, 200, 301, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxFan5.setFont(font)
self.groupBoxFan5.setObjectName("groupBoxFan5")
self.label_160 = QtWidgets.QLabel(self.groupBoxFan5)
self.label_160.setGeometry(QtCore.QRect(250, 30, 55, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.label_160.setFont(font)
self.label_160.setObjectName("label_160")
self.horizontalSliderFan5 = QtWidgets.QSlider(self.groupBoxFan5)
self.horizontalSliderFan5.setGeometry(QtCore.QRect(10, 30, 181, 31))
self.horizontalSliderFan5.setMaximum(100)
self.horizontalSliderFan5.setSingleStep(1)
self.horizontalSliderFan5.setPageStep(5)
self.horizontalSliderFan5.setProperty("value", 0)
self.horizontalSliderFan5.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderFan5.setObjectName("horizontalSliderFan5")
self.lcdNumberFan5 = QtWidgets.QLCDNumber(self.groupBoxFan5)
self.lcdNumberFan5.setGeometry(QtCore.QRect(200, 30, 51, 31))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.lcdNumberFan5.setFont(font)
self.lcdNumberFan5.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberFan5.setDigitCount(3)
self.lcdNumberFan5.setProperty("value", 0.0)
self.lcdNumberFan5.setProperty("intValue", 0)
self.lcdNumberFan5.setObjectName("lcdNumberFan5")
self.groupBoxSimulateTemperatures = QtWidgets.QGroupBox(self.groupBoxFanControl)
self.groupBoxSimulateTemperatures.setEnabled(True)
self.groupBoxSimulateTemperatures.setGeometry(QtCore.QRect(350, 20, 301, 80))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxSimulateTemperatures.setFont(font)
self.groupBoxSimulateTemperatures.setObjectName("groupBoxSimulateTemperatures")
self.checkBoxSimulateTemp = QtWidgets.QCheckBox(self.groupBoxSimulateTemperatures)
self.checkBoxSimulateTemp.setGeometry(QtCore.QRect(10, 50, 81, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.checkBoxSimulateTemp.setFont(font)
self.checkBoxSimulateTemp.setObjectName("checkBoxSimulateTemp")
self.horizontalSliderCPUTemp = QtWidgets.QSlider(self.groupBoxSimulateTemperatures)
self.horizontalSliderCPUTemp.setGeometry(QtCore.QRect(160, 20, 131, 22))
self.horizontalSliderCPUTemp.setMaximum(100)
self.horizontalSliderCPUTemp.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderCPUTemp.setObjectName("horizontalSliderCPUTemp")
self.horizontalSliderGPUTemp = QtWidgets.QSlider(self.groupBoxSimulateTemperatures)
self.horizontalSliderGPUTemp.setGeometry(QtCore.QRect(160, 50, 131, 22))
self.horizontalSliderGPUTemp.setMaximum(100)
self.horizontalSliderGPUTemp.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderGPUTemp.setObjectName("horizontalSliderGPUTemp")
self.labelCPU = QtWidgets.QLabel(self.groupBoxSimulateTemperatures)
self.labelCPU.setGeometry(QtCore.QRect(90, 20, 61, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.labelCPU.setFont(font)
self.labelCPU.setObjectName("labelCPU")
self.labelGPU = QtWidgets.QLabel(self.groupBoxSimulateTemperatures)
self.labelGPU.setGeometry(QtCore.QRect(90, 50, 61, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.labelGPU.setFont(font)
self.labelGPU.setObjectName("labelGPU")
self.groupBoxCurrentFanStatus = QtWidgets.QGroupBox(self.frame)
self.groupBoxCurrentFanStatus.setGeometry(QtCore.QRect(700, 220, 281, 401))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxCurrentFanStatus.setFont(font)
self.groupBoxCurrentFanStatus.setObjectName("groupBoxCurrentFanStatus")
self.groupBoxCurrentFan1 = QtWidgets.QGroupBox(self.groupBoxCurrentFanStatus)
self.groupBoxCurrentFan1.setGeometry(QtCore.QRect(10, 30, 261, 51))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxCurrentFan1.setFont(font)
self.groupBoxCurrentFan1.setObjectName("groupBoxCurrentFan1")
self.labelStatusFan1 = QtWidgets.QLabel(self.groupBoxCurrentFan1)
self.labelStatusFan1.setGeometry(QtCore.QRect(10, 20, 21, 21))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelStatusFan1.setFont(font)
self.labelStatusFan1.setFrameShape(QtWidgets.QFrame.NoFrame)
self.labelStatusFan1.setText("")
self.labelStatusFan1.setPixmap(QtGui.QPixmap(":/icons/led-red-on.png"))
self.labelStatusFan1.setScaledContents(True)
self.labelStatusFan1.setObjectName("labelStatusFan1")
self.label_164 = QtWidgets.QLabel(self.groupBoxCurrentFan1)
self.label_164.setGeometry(QtCore.QRect(180, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_164.setFont(font)
self.label_164.setObjectName("label_164")
self.labelRPMFan1 = QtWidgets.QLabel(self.groupBoxCurrentFan1)
self.labelRPMFan1.setGeometry(QtCore.QRect(140, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelRPMFan1.setFont(font)
self.labelRPMFan1.setObjectName("labelRPMFan1")
self.label_165 = QtWidgets.QLabel(self.groupBoxCurrentFan1)
self.label_165.setGeometry(QtCore.QRect(100, 20, 16, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_165.setFont(font)
self.label_165.setObjectName("label_165")
self.labelVFan1 = QtWidgets.QLabel(self.groupBoxCurrentFan1)
self.labelVFan1.setGeometry(QtCore.QRect(60, 20, 31, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelVFan1.setFont(font)
self.labelVFan1.setObjectName("labelVFan1")
self.groupBoxCurrentFan2 = QtWidgets.QGroupBox(self.groupBoxCurrentFanStatus)
self.groupBoxCurrentFan2.setGeometry(QtCore.QRect(10, 90, 261, 51))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxCurrentFan2.setFont(font)
self.groupBoxCurrentFan2.setObjectName("groupBoxCurrentFan2")
self.label_170 = QtWidgets.QLabel(self.groupBoxCurrentFan2)
self.label_170.setGeometry(QtCore.QRect(180, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_170.setFont(font)
self.label_170.setObjectName("label_170")
self.labelRPMFan2 = QtWidgets.QLabel(self.groupBoxCurrentFan2)
self.labelRPMFan2.setGeometry(QtCore.QRect(140, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelRPMFan2.setFont(font)
self.labelRPMFan2.setObjectName("labelRPMFan2")
self.labelStatusFan2 = QtWidgets.QLabel(self.groupBoxCurrentFan2)
self.labelStatusFan2.setGeometry(QtCore.QRect(10, 20, 21, 21))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelStatusFan2.setFont(font)
self.labelStatusFan2.setFrameShape(QtWidgets.QFrame.NoFrame)
self.labelStatusFan2.setText("")
self.labelStatusFan2.setPixmap(QtGui.QPixmap(":/icons/led-red-on.png"))
self.labelStatusFan2.setScaledContents(True)
self.labelStatusFan2.setObjectName("labelStatusFan2")
self.labelVFan2 = QtWidgets.QLabel(self.groupBoxCurrentFan2)
self.labelVFan2.setGeometry(QtCore.QRect(60, 20, 31, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelVFan2.setFont(font)
self.labelVFan2.setObjectName("labelVFan2")
self.label_166 = QtWidgets.QLabel(self.groupBoxCurrentFan2)
self.label_166.setGeometry(QtCore.QRect(100, 20, 16, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_166.setFont(font)
self.label_166.setObjectName("label_166")
self.groupBoxCurrentFan3 = QtWidgets.QGroupBox(self.groupBoxCurrentFanStatus)
self.groupBoxCurrentFan3.setGeometry(QtCore.QRect(10, 150, 261, 51))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxCurrentFan3.setFont(font)
self.groupBoxCurrentFan3.setObjectName("groupBoxCurrentFan3")
self.label_174 = QtWidgets.QLabel(self.groupBoxCurrentFan3)
self.label_174.setGeometry(QtCore.QRect(180, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_174.setFont(font)
self.label_174.setObjectName("label_174")
self.labelRPMFan3 = QtWidgets.QLabel(self.groupBoxCurrentFan3)
self.labelRPMFan3.setGeometry(QtCore.QRect(140, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelRPMFan3.setFont(font)
self.labelRPMFan3.setObjectName("labelRPMFan3")
self.labelStatusFan3 = QtWidgets.QLabel(self.groupBoxCurrentFan3)
self.labelStatusFan3.setGeometry(QtCore.QRect(10, 20, 21, 21))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelStatusFan3.setFont(font)
self.labelStatusFan3.setFrameShape(QtWidgets.QFrame.NoFrame)
self.labelStatusFan3.setText("")
self.labelStatusFan3.setPixmap(QtGui.QPixmap(":/icons/led-red-on.png"))
self.labelStatusFan3.setScaledContents(True)
self.labelStatusFan3.setObjectName("labelStatusFan3")
self.labelVFan3 = QtWidgets.QLabel(self.groupBoxCurrentFan3)
self.labelVFan3.setGeometry(QtCore.QRect(60, 20, 31, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelVFan3.setFont(font)
self.labelVFan3.setObjectName("labelVFan3")
self.label_167 = QtWidgets.QLabel(self.groupBoxCurrentFan3)
self.label_167.setGeometry(QtCore.QRect(100, 20, 16, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_167.setFont(font)
self.label_167.setObjectName("label_167")
self.groupBoxCurrentFan4 = QtWidgets.QGroupBox(self.groupBoxCurrentFanStatus)
self.groupBoxCurrentFan4.setGeometry(QtCore.QRect(10, 210, 261, 51))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxCurrentFan4.setFont(font)
self.groupBoxCurrentFan4.setObjectName("groupBoxCurrentFan4")
self.label_182 = QtWidgets.QLabel(self.groupBoxCurrentFan4)
self.label_182.setGeometry(QtCore.QRect(180, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_182.setFont(font)
self.label_182.setObjectName("label_182")
self.labelRPMFan4 = QtWidgets.QLabel(self.groupBoxCurrentFan4)
self.labelRPMFan4.setGeometry(QtCore.QRect(140, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelRPMFan4.setFont(font)
self.labelRPMFan4.setObjectName("labelRPMFan4")
self.labelStatusFan4 = QtWidgets.QLabel(self.groupBoxCurrentFan4)
self.labelStatusFan4.setGeometry(QtCore.QRect(10, 20, 21, 21))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelStatusFan4.setFont(font)
self.labelStatusFan4.setFrameShape(QtWidgets.QFrame.NoFrame)
self.labelStatusFan4.setText("")
self.labelStatusFan4.setPixmap(QtGui.QPixmap(":/icons/led-red-on.png"))
self.labelStatusFan4.setScaledContents(True)
self.labelStatusFan4.setObjectName("labelStatusFan4")
self.labelVFan4 = QtWidgets.QLabel(self.groupBoxCurrentFan4)
self.labelVFan4.setGeometry(QtCore.QRect(60, 20, 31, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelVFan4.setFont(font)
self.labelVFan4.setObjectName("labelVFan4")
self.label_168 = QtWidgets.QLabel(self.groupBoxCurrentFan4)
self.label_168.setGeometry(QtCore.QRect(100, 20, 16, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_168.setFont(font)
self.label_168.setObjectName("label_168")
self.groupBoxCurrentFan5 = QtWidgets.QGroupBox(self.groupBoxCurrentFanStatus)
self.groupBoxCurrentFan5.setGeometry(QtCore.QRect(10, 270, 261, 51))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxCurrentFan5.setFont(font)
self.groupBoxCurrentFan5.setObjectName("groupBoxCurrentFan5")
self.label_186 = QtWidgets.QLabel(self.groupBoxCurrentFan5)
self.label_186.setGeometry(QtCore.QRect(180, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_186.setFont(font)
self.label_186.setObjectName("label_186")
self.labelRPMFan5 = QtWidgets.QLabel(self.groupBoxCurrentFan5)
self.labelRPMFan5.setGeometry(QtCore.QRect(140, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelRPMFan5.setFont(font)
self.labelRPMFan5.setObjectName("labelRPMFan5")
self.labelStatusFan5 = QtWidgets.QLabel(self.groupBoxCurrentFan5)
self.labelStatusFan5.setGeometry(QtCore.QRect(10, 20, 21, 21))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelStatusFan5.setFont(font)
self.labelStatusFan5.setFrameShape(QtWidgets.QFrame.NoFrame)
self.labelStatusFan5.setText("")
self.labelStatusFan5.setPixmap(QtGui.QPixmap(":/icons/led-red-on.png"))
self.labelStatusFan5.setScaledContents(True)
self.labelStatusFan5.setObjectName("labelStatusFan5")
self.labelVFan5 = QtWidgets.QLabel(self.groupBoxCurrentFan5)
self.labelVFan5.setGeometry(QtCore.QRect(60, 20, 31, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelVFan5.setFont(font)
self.labelVFan5.setObjectName("labelVFan5")
self.label_171 = QtWidgets.QLabel(self.groupBoxCurrentFan5)
self.label_171.setGeometry(QtCore.QRect(100, 20, 16, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_171.setFont(font)
self.label_171.setObjectName("label_171")
self.groupBoxCurrentFan6 = QtWidgets.QGroupBox(self.groupBoxCurrentFanStatus)
self.groupBoxCurrentFan6.setGeometry(QtCore.QRect(10, 330, 261, 51))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.groupBoxCurrentFan6.setFont(font)
self.groupBoxCurrentFan6.setObjectName("groupBoxCurrentFan6")
self.label_191 = QtWidgets.QLabel(self.groupBoxCurrentFan6)
self.label_191.setGeometry(QtCore.QRect(180, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_191.setFont(font)
self.label_191.setObjectName("label_191")
self.labelRPMFan6 = QtWidgets.QLabel(self.groupBoxCurrentFan6)
self.labelRPMFan6.setGeometry(QtCore.QRect(140, 20, 41, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelRPMFan6.setFont(font)
self.labelRPMFan6.setObjectName("labelRPMFan6")
self.labelStatusFan6 = QtWidgets.QLabel(self.groupBoxCurrentFan6)
self.labelStatusFan6.setGeometry(QtCore.QRect(10, 20, 21, 21))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelStatusFan6.setFont(font)
self.labelStatusFan6.setFrameShape(QtWidgets.QFrame.NoFrame)
self.labelStatusFan6.setText("")
self.labelStatusFan6.setPixmap(QtGui.QPixmap(":/icons/led-red-on.png"))
self.labelStatusFan6.setScaledContents(True)
self.labelStatusFan6.setObjectName("labelStatusFan6")
self.labelVFan6 = QtWidgets.QLabel(self.groupBoxCurrentFan6)
self.labelVFan6.setGeometry(QtCore.QRect(60, 20, 31, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.labelVFan6.setFont(font)
self.labelVFan6.setObjectName("labelVFan6")
self.label_172 = QtWidgets.QLabel(self.groupBoxCurrentFan6)
self.label_172.setGeometry(QtCore.QRect(100, 20, 16, 16))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(False)
font.setWeight(50)
self.label_172.setFont(font)
self.label_172.setObjectName("label_172")
self.groupBoxHWMon = QtWidgets.QGroupBox(self.frame)
self.groupBoxHWMon.setGeometry(QtCore.QRect(330, 10, 251, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxHWMon.setFont(font)
self.groupBoxHWMon.setObjectName("groupBoxHWMon")
self.label_151 = QtWidgets.QLabel(self.groupBoxHWMon)
self.label_151.setGeometry(QtCore.QRect(20, 30, 61, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_151.setFont(font)
self.label_151.setObjectName("label_151")
self.labelHWMonStatus = QtWidgets.QLabel(self.groupBoxHWMon)
self.labelHWMonStatus.setGeometry(QtCore.QRect(90, 30, 141, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelHWMonStatus.setFont(font)
self.labelHWMonStatus.setObjectName("labelHWMonStatus")
self.groupBoxGridSetup = QtWidgets.QGroupBox(self.frame)
self.groupBoxGridSetup.setGeometry(QtCore.QRect(10, 10, 291, 201))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxGridSetup.setFont(font)
self.groupBoxGridSetup.setObjectName("groupBoxGridSetup")
self.label_2 = QtWidgets.QLabel(self.groupBoxGridSetup)
self.label_2.setGeometry(QtCore.QRect(20, 30, 120, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.comboBoxComPorts = QtWidgets.QComboBox(self.groupBoxGridSetup)
self.comboBoxComPorts.setGeometry(QtCore.QRect(140, 30, 131, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.comboBoxComPorts.setFont(font)
self.comboBoxComPorts.setObjectName("comboBoxComPorts")
self.comboBoxComPorts.addItem("")
self.pushButtonRestart = QtWidgets.QPushButton(self.groupBoxGridSetup)
self.pushButtonRestart.setGeometry(QtCore.QRect(20, 130, 251, 31))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButtonRestart.setFont(font)
self.pushButtonRestart.setObjectName("pushButtonRestart")
self.label_204 = QtWidgets.QLabel(self.groupBoxGridSetup)
self.label_204.setGeometry(QtCore.QRect(20, 80, 121, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_204.setFont(font)
self.label_204.setObjectName("label_204")
self.comboBoxPolling = QtWidgets.QComboBox(self.groupBoxGridSetup)
self.comboBoxPolling.setGeometry(QtCore.QRect(140, 80, 71, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.comboBoxPolling.setFont(font)
self.comboBoxPolling.setObjectName("comboBoxPolling")
self.comboBoxPolling.addItem("")
self.comboBoxPolling.addItem("")
self.comboBoxPolling.addItem("")
self.comboBoxPolling.addItem("")
self.comboBoxPolling.addItem("")
self.label_205 = QtWidgets.QLabel(self.groupBoxGridSetup)
self.label_205.setGeometry(QtCore.QRect(220, 80, 41, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_205.setFont(font)
self.label_205.setObjectName("label_205")
self.groupBoxCurrentGPUTemp = QtWidgets.QGroupBox(self.frame)
self.groupBoxCurrentGPUTemp.setGeometry(QtCore.QRect(610, 110, 181, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxCurrentGPUTemp.setFont(font)
self.groupBoxCurrentGPUTemp.setObjectName("groupBoxCurrentGPUTemp")
self.label_203 = QtWidgets.QLabel(self.groupBoxCurrentGPUTemp)
self.label_203.setGeometry(QtCore.QRect(90, 30, 81, 41))
font = QtGui.QFont()
font.setPointSize(15)
font.setBold(False)
font.setWeight(50)
self.label_203.setFont(font)
self.label_203.setObjectName("label_203")
self.lcdNumberCurrentGPU = QtWidgets.QLCDNumber(self.groupBoxCurrentGPUTemp)
self.lcdNumberCurrentGPU.setGeometry(QtCore.QRect(10, 30, 71, 41))
font = QtGui.QFont()
font.setPointSize(15)
font.setBold(True)
font.setWeight(75)
self.lcdNumberCurrentGPU.setFont(font)
self.lcdNumberCurrentGPU.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lcdNumberCurrentGPU.setDigitCount(3)
self.lcdNumberCurrentGPU.setObjectName("lcdNumberCurrentGPU")
self.labelGridImage = QtWidgets.QLabel(self.frame)
self.labelGridImage.setGeometry(QtCore.QRect(830, 0, 131, 121))
self.labelGridImage.setText("")
self.labelGridImage.setPixmap(QtGui.QPixmap(":/icons/grid.png"))
self.labelGridImage.setScaledContents(True)
self.labelGridImage.setObjectName("labelGridImage")
self.groupBoxGridSetup_2 = QtWidgets.QGroupBox(self.frame)
self.groupBoxGridSetup_2.setGeometry(QtCore.QRect(330, 110, 251, 81))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.groupBoxGridSetup_2.setFont(font)
self.groupBoxGridSetup_2.setObjectName("groupBoxGridSetup_2")
self.label_155 = QtWidgets.QLabel(self.groupBoxGridSetup_2)
self.label_155.setGeometry(QtCore.QRect(20, 30, 101, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_155.setFont(font)
self.label_155.setObjectName("label_155")
self.labelPollingStatus = QtWidgets.QLabel(self.groupBoxGridSetup_2)
self.labelPollingStatus.setGeometry(QtCore.QRect(90, 30, 121, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.labelPollingStatus.setFont(font)
self.labelPollingStatus.setObjectName("labelPollingStatus")
self.checkBoxStartMinimized = QtWidgets.QCheckBox(self.frame)
self.checkBoxStartMinimized.setGeometry(QtCore.QRect(820, 160, 151, 20))
font = QtGui.QFont()
font.setPointSize(10)
self.checkBoxStartMinimized.setFont(font)
self.checkBoxStartMinimized.setObjectName("checkBoxStartMinimized")
self.checkBoxMinimizeToTray = QtWidgets.QCheckBox(self.frame)
self.checkBoxMinimizeToTray.setGeometry(QtCore.QRect(820, 190, 151, 20))
font = QtGui.QFont()
font.setPointSize(10)
self.checkBoxMinimizeToTray.setFont(font)
self.checkBoxMinimizeToTray.setObjectName("checkBoxMinimizeToTray")
self.checkBoxStartSilently = QtWidgets.QCheckBox(self.frame)
self.checkBoxStartSilently.setGeometry(QtCore.QRect(820, 130, 151, 20))
font = QtGui.QFont()
font.setPointSize(10)
self.checkBoxStartSilently.setFont(font)
self.checkBoxStartSilently.setObjectName("checkBoxStartSilently")
self.tabWidget.addTab(self.tabGeneral, "")
self.tabSensorConfig = QtWidgets.QWidget()
self.tabSensorConfig.setObjectName("tabSensorConfig")
self.frame_6 = QtWidgets.QFrame(self.tabSensorConfig)
self.frame_6.setGeometry(QtCore.QRect(11, 11, 993, 641))
self.frame_6.setFrameShape(QtWidgets.QFrame.NoFrame)
self.frame_6.setFrameShadow(QtWidgets.QFrame.Sunken)
self.frame_6.setLineWidth(2)
self.frame_6.setObjectName("frame_6")
self.pushButtonRemoveGPUSensor = QtWidgets.QPushButton(self.frame_6)
self.pushButtonRemoveGPUSensor.setGeometry(QtCore.QRect(480, 440, 111, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButtonRemoveGPUSensor.setFont(font)
self.pushButtonRemoveGPUSensor.setObjectName("pushButtonRemoveGPUSensor")
self.groupBoxCPUSensors = QtWidgets.QGroupBox(self.frame_6)
self.groupBoxCPUSensors.setGeometry(QtCore.QRect(620, 210, 351, 91))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBoxCPUSensors.setFont(font)
self.groupBoxCPUSensors.setObjectName("groupBoxCPUSensors")
self.radioButtonCPUMax = QtWidgets.QRadioButton(self.groupBoxCPUSensors)
self.radioButtonCPUMax.setGeometry(QtCore.QRect(11, 30, 124, 22))
font = QtGui.QFont()
font.setPointSize(9)
self.radioButtonCPUMax.setFont(font)
self.radioButtonCPUMax.setChecked(True)
self.radioButtonCPUMax.setObjectName("radioButtonCPUMax")
self.radioButtonCPUAverage = QtWidgets.QRadioButton(self.groupBoxCPUSensors)
self.radioButtonCPUAverage.setGeometry(QtCore.QRect(11, 52, 150, 22))
font = QtGui.QFont()
font.setPointSize(9)
self.radioButtonCPUAverage.setFont(font)
self.radioButtonCPUAverage.setObjectName("radioButtonCPUAverage")
self.pushButtonAddCPUSensor = QtWidgets.QPushButton(self.frame_6)
self.pushButtonAddCPUSensor.setGeometry(QtCore.QRect(480, 110, 111, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButtonAddCPUSensor.setFont(font)
self.pushButtonAddCPUSensor.setObjectName("pushButtonAddCPUSensor")
self.pushButtonAddGPUSensor = QtWidgets.QPushButton(self.frame_6)
self.pushButtonAddGPUSensor.setGeometry(QtCore.QRect(480, 400, 111, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButtonAddGPUSensor.setFont(font)
self.pushButtonAddGPUSensor.setObjectName("pushButtonAddGPUSensor")
self.groupBoxGPUSensors = QtWidgets.QGroupBox(self.frame_6)
self.groupBoxGPUSensors.setGeometry(QtCore.QRect(620, 500, 351, 81))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBoxGPUSensors.setFont(font)
self.groupBoxGPUSensors.setObjectName("groupBoxGPUSensors")
self.radioButtonGPUMax = QtWidgets.QRadioButton(self.groupBoxGPUSensors)
self.radioButtonGPUMax.setGeometry(QtCore.QRect(11, 20, 124, 31))
font = QtGui.QFont()
font.setPointSize(9)
self.radioButtonGPUMax.setFont(font)
self.radioButtonGPUMax.setChecked(True)
self.radioButtonGPUMax.setObjectName("radioButtonGPUMax")
self.radioButtonGPUAverage = QtWidgets.QRadioButton(self.groupBoxGPUSensors)
self.radioButtonGPUAverage.setGeometry(QtCore.QRect(11, 50, 150, 21))
font = QtGui.QFont()
font.setPointSize(9)
self.radioButtonGPUAverage.setFont(font)
self.radioButtonGPUAverage.setObjectName("radioButtonGPUAverage")
self.pushButtonRemoveCPUSensor = QtWidgets.QPushButton(self.frame_6)
self.pushButtonRemoveCPUSensor.setGeometry(QtCore.QRect(480, 150, 111, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButtonRemoveCPUSensor.setFont(font)
self.pushButtonRemoveCPUSensor.setObjectName("pushButtonRemoveCPUSensor")
self.groupBoxAvailableSensors = QtWidgets.QGroupBox(self.frame_6)
self.groupBoxAvailableSensors.setGeometry(QtCore.QRect(10, 10, 441, 611))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxAvailableSensors.setFont(font)
self.groupBoxAvailableSensors.setObjectName("groupBoxAvailableSensors")
self.treeWidgetHWMonData = QtWidgets.QTreeWidget(self.groupBoxAvailableSensors)
self.treeWidgetHWMonData.setGeometry(QtCore.QRect(20, 20, 401, 571))
font = QtGui.QFont()
font.setPointSize(8)
self.treeWidgetHWMonData.setFont(font)
self.treeWidgetHWMonData.setFrameShape(QtWidgets.QFrame.NoFrame)
self.treeWidgetHWMonData.setColumnCount(3)
self.treeWidgetHWMonData.setObjectName("treeWidgetHWMonData")
self.treeWidgetHWMonData.headerItem().setText(0, "1")
self.treeWidgetHWMonData.headerItem().setText(1, "2")
self.treeWidgetHWMonData.headerItem().setText(2, "3")
self.treeWidgetHWMonData.header().setMinimumSectionSize(70)
self.groupBoxSelectedCPUSensors = QtWidgets.QGroupBox(self.frame_6)
self.groupBoxSelectedCPUSensors.setGeometry(QtCore.QRect(620, 10, 351, 191))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBoxSelectedCPUSensors.setFont(font)
self.groupBoxSelectedCPUSensors.setObjectName("groupBoxSelectedCPUSensors")
self.treeWidgetSelectedCPUSensors = QtWidgets.QTreeWidget(self.groupBoxSelectedCPUSensors)
self.treeWidgetSelectedCPUSensors.setGeometry(QtCore.QRect(20, 20, 311, 151))
font = QtGui.QFont()
font.setPointSize(8)
self.treeWidgetSelectedCPUSensors.setFont(font)
self.treeWidgetSelectedCPUSensors.setColumnCount(2)
self.treeWidgetSelectedCPUSensors.setObjectName("treeWidgetSelectedCPUSensors")
self.treeWidgetSelectedCPUSensors.headerItem().setText(0, "1")
self.treeWidgetSelectedCPUSensors.headerItem().setText(1, "2")
self.groupBoxSelectedGPUSensors = QtWidgets.QGroupBox(self.frame_6)
self.groupBoxSelectedGPUSensors.setGeometry(QtCore.QRect(620, 330, 351, 161))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBoxSelectedGPUSensors.setFont(font)
self.groupBoxSelectedGPUSensors.setObjectName("groupBoxSelectedGPUSensors")
self.treeWidgetSelectedGPUSensors = QtWidgets.QTreeWidget(self.groupBoxSelectedGPUSensors)
self.treeWidgetSelectedGPUSensors.setGeometry(QtCore.QRect(20, 20, 311, 121))
font = QtGui.QFont()
font.setPointSize(8)
self.treeWidgetSelectedGPUSensors.setFont(font)
self.treeWidgetSelectedGPUSensors.setColumnCount(2)
self.treeWidgetSelectedGPUSensors.setObjectName("treeWidgetSelectedGPUSensors")
self.treeWidgetSelectedGPUSensors.headerItem().setText(0, "1")
self.treeWidgetSelectedGPUSensors.headerItem().setText(1, "2")
self.label_5 = QtWidgets.QLabel(self.frame_6)
self.label_5.setGeometry(QtCore.QRect(530, 600, 451, 31))
font = QtGui.QFont()
font.setPointSize(9)
font.setItalic(True)
self.label_5.setFont(font)
self.label_5.setObjectName("label_5")
self.tabWidget.addTab(self.tabSensorConfig, "")
self.tabFanConfig = QtWidgets.QWidget()
self.tabFanConfig.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.tabFanConfig.setObjectName("tabFanConfig")
self.groupBoxConfigFan1 = QtWidgets.QGroupBox(self.tabFanConfig)
self.groupBoxConfigFan1.setGeometry(QtCore.QRect(20, 20, 471, 171))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxConfigFan1.setFont(font)
self.groupBoxConfigFan1.setFlat(False)
self.groupBoxConfigFan1.setCheckable(False)
self.groupBoxConfigFan1.setObjectName("groupBoxConfigFan1")
self.label_7 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_7.setGeometry(QtCore.QRect(20, 30, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_7.setFont(font)
self.label_7.setObjectName("label_7")
self.spinBoxMinSpeedFan1 = QtWidgets.QSpinBox(self.groupBoxConfigFan1)
self.spinBoxMinSpeedFan1.setGeometry(QtCore.QRect(190, 30, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMinSpeedFan1.setFont(font)
self.spinBoxMinSpeedFan1.setMaximum(100)
self.spinBoxMinSpeedFan1.setSingleStep(1)
self.spinBoxMinSpeedFan1.setProperty("value", 35)
self.spinBoxMinSpeedFan1.setObjectName("spinBoxMinSpeedFan1")
self.label_8 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_8.setGeometry(QtCore.QRect(20, 60, 241, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_8.setFont(font)
self.label_8.setObjectName("label_8")
self.spinBoxStartIncreaseSpeedFan1 = QtWidgets.QSpinBox(self.groupBoxConfigFan1)
self.spinBoxStartIncreaseSpeedFan1.setGeometry(QtCore.QRect(190, 60, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxStartIncreaseSpeedFan1.setFont(font)
self.spinBoxStartIncreaseSpeedFan1.setMaximum(100)
self.spinBoxStartIncreaseSpeedFan1.setSingleStep(1)
self.spinBoxStartIncreaseSpeedFan1.setProperty("value", 40)
self.spinBoxStartIncreaseSpeedFan1.setObjectName("spinBoxStartIncreaseSpeedFan1")
self.label_9 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_9.setGeometry(QtCore.QRect(240, 90, 101, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_9.setFont(font)
self.label_9.setObjectName("label_9")
self.spinBoxIntermediateTempFan1 = QtWidgets.QSpinBox(self.groupBoxConfigFan1)
self.spinBoxIntermediateTempFan1.setGeometry(QtCore.QRect(280, 90, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxIntermediateTempFan1.setFont(font)
self.spinBoxIntermediateTempFan1.setMaximum(100)
self.spinBoxIntermediateTempFan1.setSingleStep(1)
self.spinBoxIntermediateTempFan1.setProperty("value", 60)
self.spinBoxIntermediateTempFan1.setObjectName("spinBoxIntermediateTempFan1")
self.spinBoxIntermediateSpeedFan1 = QtWidgets.QSpinBox(self.groupBoxConfigFan1)
self.spinBoxIntermediateSpeedFan1.setGeometry(QtCore.QRect(190, 90, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxIntermediateSpeedFan1.setFont(font)
self.spinBoxIntermediateSpeedFan1.setMaximum(100)
self.spinBoxIntermediateSpeedFan1.setSingleStep(1)
self.spinBoxIntermediateSpeedFan1.setProperty("value", 60)
self.spinBoxIntermediateSpeedFan1.setObjectName("spinBoxIntermediateSpeedFan1")
self.label_11 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_11.setGeometry(QtCore.QRect(20, 90, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_11.setFont(font)
self.label_11.setObjectName("label_11")
self.label_10 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_10.setGeometry(QtCore.QRect(330, 90, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_10.setFont(font)
self.label_10.setObjectName("label_10")
self.label_12 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_12.setGeometry(QtCore.QRect(240, 60, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_12.setFont(font)
self.label_12.setObjectName("label_12")
self.label_13 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_13.setGeometry(QtCore.QRect(240, 30, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_13.setFont(font)
self.label_13.setObjectName("label_13")
self.label_15 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_15.setGeometry(QtCore.QRect(20, 120, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_15.setFont(font)
self.label_15.setObjectName("label_15")
self.spinBoxMaxSpeedFan1 = QtWidgets.QSpinBox(self.groupBoxConfigFan1)
self.spinBoxMaxSpeedFan1.setGeometry(QtCore.QRect(190, 120, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMaxSpeedFan1.setFont(font)
self.spinBoxMaxSpeedFan1.setMaximum(100)
self.spinBoxMaxSpeedFan1.setSingleStep(1)
self.spinBoxMaxSpeedFan1.setProperty("value", 100)
self.spinBoxMaxSpeedFan1.setObjectName("spinBoxMaxSpeedFan1")
self.label_16 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_16.setGeometry(QtCore.QRect(240, 120, 101, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_16.setFont(font)
self.label_16.setObjectName("label_16")
self.label_17 = QtWidgets.QLabel(self.groupBoxConfigFan1)
self.label_17.setGeometry(QtCore.QRect(330, 120, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_17.setFont(font)
self.label_17.setObjectName("label_17")
self.spinBoxMaxTempFan1 = QtWidgets.QSpinBox(self.groupBoxConfigFan1)
self.spinBoxMaxTempFan1.setGeometry(QtCore.QRect(280, 120, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMaxTempFan1.setFont(font)
self.spinBoxMaxTempFan1.setMaximum(100)
self.spinBoxMaxTempFan1.setSingleStep(1)
self.spinBoxMaxTempFan1.setProperty("value", 75)
self.spinBoxMaxTempFan1.setObjectName("spinBoxMaxTempFan1")
self.radioButtonCPUFan1 = QtWidgets.QRadioButton(self.groupBoxConfigFan1)
self.radioButtonCPUFan1.setGeometry(QtCore.QRect(370, 20, 95, 20))
font = QtGui.QFont()
font.setPointSize(8)
self.radioButtonCPUFan1.setFont(font)
self.radioButtonCPUFan1.setChecked(True)
self.radioButtonCPUFan1.setObjectName("radioButtonCPUFan1")
self.radioButtonGPUFan1 = QtWidgets.QRadioButton(self.groupBoxConfigFan1)
self.radioButtonGPUFan1.setGeometry(QtCore.QRect(370, 40, 95, 20))
font = QtGui.QFont()
font.setPointSize(8)
self.radioButtonGPUFan1.setFont(font)
self.radioButtonGPUFan1.setObjectName("radioButtonGPUFan1")
self.groupBoxConfigFan2 = QtWidgets.QGroupBox(self.tabFanConfig)
self.groupBoxConfigFan2.setGeometry(QtCore.QRect(20, 210, 471, 171))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxConfigFan2.setFont(font)
self.groupBoxConfigFan2.setFlat(False)
self.groupBoxConfigFan2.setCheckable(False)
self.groupBoxConfigFan2.setObjectName("groupBoxConfigFan2")
self.label_27 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_27.setGeometry(QtCore.QRect(20, 30, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_27.setFont(font)
self.label_27.setObjectName("label_27")
self.spinBoxMinSpeedFan2 = QtWidgets.QSpinBox(self.groupBoxConfigFan2)
self.spinBoxMinSpeedFan2.setGeometry(QtCore.QRect(190, 30, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMinSpeedFan2.setFont(font)
self.spinBoxMinSpeedFan2.setMaximum(100)
self.spinBoxMinSpeedFan2.setSingleStep(1)
self.spinBoxMinSpeedFan2.setProperty("value", 35)
self.spinBoxMinSpeedFan2.setObjectName("spinBoxMinSpeedFan2")
self.label_28 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_28.setGeometry(QtCore.QRect(20, 60, 241, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_28.setFont(font)
self.label_28.setObjectName("label_28")
self.spinBoxStartIncreaseSpeedFan2 = QtWidgets.QSpinBox(self.groupBoxConfigFan2)
self.spinBoxStartIncreaseSpeedFan2.setGeometry(QtCore.QRect(190, 60, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxStartIncreaseSpeedFan2.setFont(font)
self.spinBoxStartIncreaseSpeedFan2.setMaximum(100)
self.spinBoxStartIncreaseSpeedFan2.setSingleStep(1)
self.spinBoxStartIncreaseSpeedFan2.setProperty("value", 40)
self.spinBoxStartIncreaseSpeedFan2.setObjectName("spinBoxStartIncreaseSpeedFan2")
self.label_29 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_29.setGeometry(QtCore.QRect(240, 90, 101, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_29.setFont(font)
self.label_29.setObjectName("label_29")
self.spinBoxIntermediateTempFan2 = QtWidgets.QSpinBox(self.groupBoxConfigFan2)
self.spinBoxIntermediateTempFan2.setGeometry(QtCore.QRect(280, 90, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxIntermediateTempFan2.setFont(font)
self.spinBoxIntermediateTempFan2.setMaximum(100)
self.spinBoxIntermediateTempFan2.setSingleStep(1)
self.spinBoxIntermediateTempFan2.setProperty("value", 60)
self.spinBoxIntermediateTempFan2.setObjectName("spinBoxIntermediateTempFan2")
self.spinBoxIntermediateSpeedFan2 = QtWidgets.QSpinBox(self.groupBoxConfigFan2)
self.spinBoxIntermediateSpeedFan2.setGeometry(QtCore.QRect(190, 90, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxIntermediateSpeedFan2.setFont(font)
self.spinBoxIntermediateSpeedFan2.setMaximum(100)
self.spinBoxIntermediateSpeedFan2.setSingleStep(1)
self.spinBoxIntermediateSpeedFan2.setProperty("value", 60)
self.spinBoxIntermediateSpeedFan2.setObjectName("spinBoxIntermediateSpeedFan2")
self.label_30 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_30.setGeometry(QtCore.QRect(20, 90, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_30.setFont(font)
self.label_30.setObjectName("label_30")
self.label_31 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_31.setGeometry(QtCore.QRect(330, 90, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_31.setFont(font)
self.label_31.setObjectName("label_31")
self.label_32 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_32.setGeometry(QtCore.QRect(240, 60, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_32.setFont(font)
self.label_32.setObjectName("label_32")
self.label_33 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_33.setGeometry(QtCore.QRect(240, 30, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_33.setFont(font)
self.label_33.setObjectName("label_33")
self.label_34 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_34.setGeometry(QtCore.QRect(20, 120, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_34.setFont(font)
self.label_34.setObjectName("label_34")
self.spinBoxMaxSpeedFan2 = QtWidgets.QSpinBox(self.groupBoxConfigFan2)
self.spinBoxMaxSpeedFan2.setGeometry(QtCore.QRect(190, 120, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMaxSpeedFan2.setFont(font)
self.spinBoxMaxSpeedFan2.setMaximum(100)
self.spinBoxMaxSpeedFan2.setSingleStep(1)
self.spinBoxMaxSpeedFan2.setProperty("value", 100)
self.spinBoxMaxSpeedFan2.setObjectName("spinBoxMaxSpeedFan2")
self.label_35 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_35.setGeometry(QtCore.QRect(240, 120, 101, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_35.setFont(font)
self.label_35.setObjectName("label_35")
self.label_36 = QtWidgets.QLabel(self.groupBoxConfigFan2)
self.label_36.setGeometry(QtCore.QRect(330, 120, 111, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_36.setFont(font)
self.label_36.setObjectName("label_36")
self.spinBoxMaxTempFan2 = QtWidgets.QSpinBox(self.groupBoxConfigFan2)
self.spinBoxMaxTempFan2.setGeometry(QtCore.QRect(280, 120, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMaxTempFan2.setFont(font)
self.spinBoxMaxTempFan2.setMaximum(100)
self.spinBoxMaxTempFan2.setSingleStep(1)
self.spinBoxMaxTempFan2.setProperty("value", 75)
self.spinBoxMaxTempFan2.setObjectName("spinBoxMaxTempFan2")
self.radioButtonCPUFan2 = QtWidgets.QRadioButton(self.groupBoxConfigFan2)
self.radioButtonCPUFan2.setGeometry(QtCore.QRect(370, 20, 95, 20))
font = QtGui.QFont()
font.setPointSize(8)
self.radioButtonCPUFan2.setFont(font)
self.radioButtonCPUFan2.setChecked(True)
self.radioButtonCPUFan2.setObjectName("radioButtonCPUFan2")
self.radioButtonGPUFan2 = QtWidgets.QRadioButton(self.groupBoxConfigFan2)
self.radioButtonGPUFan2.setGeometry(QtCore.QRect(370, 40, 95, 20))
font = QtGui.QFont()
font.setPointSize(8)
self.radioButtonGPUFan2.setFont(font)
self.radioButtonGPUFan2.setObjectName("radioButtonGPUFan2")
self.groupBoxConfigFan3 = QtWidgets.QGroupBox(self.tabFanConfig)
self.groupBoxConfigFan3.setGeometry(QtCore.QRect(20, 400, 471, 171))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.groupBoxConfigFan3.setFont(font)
self.groupBoxConfigFan3.setFlat(False)
self.groupBoxConfigFan3.setCheckable(False)
self.groupBoxConfigFan3.setObjectName("groupBoxConfigFan3")
self.label_37 = QtWidgets.QLabel(self.groupBoxConfigFan3)
self.label_37.setGeometry(QtCore.QRect(20, 30, 151, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_37.setFont(font)
self.label_37.setObjectName("label_37")
self.spinBoxMinSpeedFan3 = QtWidgets.QSpinBox(self.groupBoxConfigFan3)
self.spinBoxMinSpeedFan3.setGeometry(QtCore.QRect(190, 30, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxMinSpeedFan3.setFont(font)
self.spinBoxMinSpeedFan3.setMaximum(100)
self.spinBoxMinSpeedFan3.setSingleStep(1)
self.spinBoxMinSpeedFan3.setProperty("value", 35)
self.spinBoxMinSpeedFan3.setObjectName("spinBoxMinSpeedFan3")
self.label_38 = QtWidgets.QLabel(self.groupBoxConfigFan3)
self.label_38.setGeometry(QtCore.QRect(20, 60, 241, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_38.setFont(font)
self.label_38.setObjectName("label_38")
self.spinBoxStartIncreaseSpeedFan3 = QtWidgets.QSpinBox(self.groupBoxConfigFan3)
self.spinBoxStartIncreaseSpeedFan3.setGeometry(QtCore.QRect(190, 60, 42, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.spinBoxStartIncreaseSpeedFan3.setFont(font)
self.spinBoxStartIncreaseSpeedFan3.setMaximum(100)
self.spinBoxStartIncreaseSpeedFan3.setSingleStep(1)
self.spinBoxStartIncreaseSpeedFan3.setProperty("value", 40)
self.spinBoxStartIncreaseSpeedFan3.setObjectName("spinBoxStartIncreaseSpeedFan3")
self.label_39 = QtWidgets.QLabel(self.groupBoxConfigFan3)
self.label_39.setGeometry(QtCore.QRect(240, 90, 101, 21))
font = QtGui.QFont()
font.setPointSize(8)
self.label_39.setFont(font)
self.label_39.setObjectName("label_39")
gitextract_1foj5539/ ├── LICENSE ├── README.md ├── grid-control/ │ ├── __init__.py │ ├── grid.py │ ├── gridcontrol.py │ ├── helper.py │ ├── kraken.py │ ├── openhwmon.py │ ├── polling.py │ ├── settings.py │ └── ui/ │ ├── __init__.py │ ├── mainwindow.py │ ├── mainwindow.ui │ ├── resources.qrc │ └── resources_rc.py └── requirements.txt
SYMBOL INDEX (75 symbols across 9 files)
FILE: grid-control/grid.py
function get_serial_ports (line 19) | def get_serial_ports():
function setup_serial (line 23) | def setup_serial(ser, port, lock):
function open_serial (line 40) | def open_serial(ser, lock):
function initialize_grid (line 52) | def initialize_grid(ser, lock):
function set_fan (line 103) | def set_fan(ser, fan, voltage, lock):
function read_fan_rpm (line 161) | def read_fan_rpm(ser, lock):
function read_fan_voltage (line 217) | def read_fan_voltage(ser, lock):
function calculate_voltage (line 275) | def calculate_voltage(percent):
FILE: grid-control/gridcontrol.py
class GridControl (line 23) | class GridControl(QtWidgets.QMainWindow):
method __init__ (line 36) | def __init__(self):
method setup_ui_logic (line 115) | def setup_ui_logic(self):
method validate_fan_config (line 253) | def validate_fan_config(self):
method setup_ui_design (line 299) | def setup_ui_design(self):
method init_communication (line 344) | def init_communication(self):
method reset_data (line 433) | def reset_data(self):
method initialize_fans (line 469) | def initialize_fans(self):
method disable_enable_sliders (line 479) | def disable_enable_sliders(self):
method update_fan_speed (line 526) | def update_fan_speed(self):
method simulate_temperatures (line 601) | def simulate_temperatures(self):
method restart (line 640) | def restart(self):
method thread_exception_handling (line 647) | def thread_exception_handling(self, msg):
method add_cpu_sensors (line 658) | def add_cpu_sensors(self):
method add_gpu_sensors (line 675) | def add_gpu_sensors(self):
method remove_cpu_sensors (line 691) | def remove_cpu_sensors(self):
method remove_gpu_sensors (line 698) | def remove_gpu_sensors(self):
method get_cpu_sensor_ids (line 705) | def get_cpu_sensor_ids(self):
method get_gpu_sensor_ids (line 716) | def get_gpu_sensor_ids(self):
method change_fan_icon (line 727) | def change_fan_icon(self, icon, fan):
method closeEvent (line 743) | def closeEvent(self, event):
method changeEvent (line 763) | def changeEvent(self, event):
method toggle_visibility (line 773) | def toggle_visibility(self):
method minimize_to_tray (line 779) | def minimize_to_tray(self):
method restore_from_tray (line 783) | def restore_from_tray(self):
class SystemTrayIcon (line 790) | class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
method __init__ (line 792) | def __init__(self, icon, parent=None):
method on_systemTrayIcon_activated (line 805) | def on_systemTrayIcon_activated(self, reason):
FILE: grid-control/helper.py
function excepthook (line 14) | def excepthook(excType, excValue, tracebackobj):
function exception_message_qthread (line 45) | def exception_message_qthread(excType, excValue, tracebackobj):
function show_error (line 61) | def show_error(message):
function show_notification (line 77) | def show_notification(message):
class CustomDialog (line 93) | class CustomDialog(QtWidgets.QDialog):
method __init__ (line 95) | def __init__(self, parent=None):
method closeEvent (line 98) | def closeEvent(self, event):
FILE: grid-control/kraken.py
class Cooler (line 10) | class Cooler:
method _check_color (line 19) | def _check_color(cls, color):
method _validate (line 26) | def _validate(self):
method __init__ (line 39) | def __init__(self, vid, pid, **kwargs):
method _start_transaction (line 61) | def _start_transaction(self):
method _send_pump_speed (line 64) | def _send_pump_speed(self, speed):
method _send_fan_speed (line 67) | def _send_fan_speed(self, speed):
method _send_color (line 70) | def _send_color(self, color, alternate_color, interval, mode):
method _receive_status (line 83) | def _receive_status(self):
method update (line 93) | def update(self):
FILE: grid-control/openhwmon.py
function initialize_hwmon (line 17) | def initialize_hwmon():
function populate_tree (line 35) | def populate_tree(hwmon, treeWidget, start_silently):
function get_temperature_sensors (line 177) | def get_temperature_sensors(hwmon):
function get_temp (line 184) | def get_temp(hwmon, id):
function get_sensor_name (line 193) | def get_sensor_name(hwmon, id):
function get_hardware_name (line 202) | def get_hardware_name(id, hardwares):
FILE: grid-control/polling.py
class PollingThread (line 23) | class PollingThread(QtCore.QThread):
method __init__ (line 65) | def __init__(self, polling_interval, ser, lock, cpu_sensor_ids, gpu_se...
method __del__ (line 91) | def __del__(self):
method stop (line 94) | def stop(self):
method set_temp_calc (line 107) | def set_temp_calc(self, cpu_calc, gpu_calc):
method update_polling_interval (line 113) | def update_polling_interval(self, new_polling_interval):
method update_sensors (line 118) | def update_sensors(self, cpu_sensor_ids, gpu_sensor_ids):
method calculate_temp (line 124) | def calculate_temp(self, temperature_sensors, type):
method run (line 185) | def run(self):
FILE: grid-control/settings.py
function read_settings (line 12) | def read_settings(config, ui, hwmon):
function save_settings (line 161) | def save_settings(config, ui):
FILE: grid-control/ui/mainwindow.py
class Ui_MainWindow (line 11) | class Ui_MainWindow(object):
method setupUi (line 12) | def setupUi(self, MainWindow):
method retranslateUi (line 1999) | def retranslateUi(self, MainWindow):
FILE: grid-control/ui/resources_rc.py
function qInitResources (line 16782) | def qInitResources():
function qCleanupResources (line 16785) | def qCleanupResources():
Condensed preview — 16 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,812K chars).
[
{
"path": "LICENSE",
"chars": 35141,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 5432,
"preview": "# Grid Control\nGrid Control is a free and open source alternative to the CAM application from NZXT.\n\n<img src=\"https://g"
},
{
"path": "grid-control/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "grid-control/grid.py",
"chars": 11787,
"preview": "\"\"\"\n grid.py\n -------\n Implements serial communication with the Grid+ V2 unit,\n e.g. \"initalization\", \"set f"
},
{
"path": "grid-control/gridcontrol.py",
"chars": 39581,
"preview": "\"\"\"\n gridcontrol.py\n --------------\n This is the main module of Grid Control. Implements the UI and business lo"
},
{
"path": "grid-control/helper.py",
"chars": 3109,
"preview": "\"\"\"\n helper.py\n ---------\n Implements various helper functions, e.g. to display messages using a QT Message box"
},
{
"path": "grid-control/kraken.py",
"chars": 3668,
"preview": "\"\"\"\n The below code comes from the \"leviathan\" project by jaksi\n https://github.com/jaksi/leviathan\n\"\"\"\n\nimport us"
},
{
"path": "grid-control/openhwmon.py",
"chars": 8047,
"preview": "\"\"\"\n openhwmon.py\n ------------\n Implements communication with OpenHardwareMonitor using WMI.\n The module al"
},
{
"path": "grid-control/polling.py",
"chars": 12936,
"preview": "\"\"\"\n polling.py\n ----------\n Implements a QThread for polling the Grid unit for fan rpm and voltage data,\n a"
},
{
"path": "grid-control/settings.py",
"chars": 14910,
"preview": "\"\"\"\n settings.py\n -----------\n Implements functions for reading and writing UI configuration using a QSettings "
},
{
"path": "grid-control/ui/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "grid-control/ui/mainwindow.py",
"chars": 115832,
"preview": "# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file 'mainwindow.ui'\n#\n# Created by: PyQt5 UI c"
},
{
"path": "grid-control/ui/mainwindow.ui",
"chars": 136878,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>MainWindow</class>\n <widget class=\"QMainWindow\" name=\""
},
{
"path": "grid-control/ui/resources.qrc",
"chars": 217,
"preview": "<RCC>\n <qresource prefix=\"/\">\n <file>icons/green-led-on.png</file>\n <file>icons/grid.png</file>\n "
},
{
"path": "grid-control/ui/resources_rc.py",
"chars": 1105498,
"preview": "# -*- coding: utf-8 -*-\n\n# Resource object code\n#\n# Created by: The Resource Compiler for PyQt5 (Qt v5.7.0)\n#\n# WARNING!"
},
{
"path": "requirements.txt",
"chars": 55,
"preview": "WMI==1.4.9\nPyQt5==5.10.1\npyserial==3.4\npypiwin32==223\n\n"
}
]
About this extraction
This page contains the full source code of the akej74/grid-control GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 16 files (1.4 MB), approximately 710.4k tokens, and a symbol index with 75 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.