Esempio n. 1
0
def storageLoad():
    storageLoadList = []
    for sensor in w.Sensor():
        for device in pcInfo:
            if sensor.sensortype == "Load" and device.HardwareType == "HDD":
                storageLoadList.append([sensor.name, sensor.value])
    return storageLoadList
Esempio n. 2
0
def gpuClocks():
    tgpuClocksList = []
    for sensor in w.Sensor():
        if sensor.sensortype == "Clock" and sensor.name[0] == "G":
            tgpuClocksList.append([sensor.name, sensor.value])
    return tgpuClocksList
Esempio n. 3
0
def gpuTemps():
    tgpuTempsList = []
    for sensor in w.Sensor():
        if sensor.sensortype == "Temperature" and sensor.name[0] == "G":
            tgpuTempsList.append([sensor.name, sensor.value])
    return tgpuTempsList
Esempio n. 4
0
def cpuLoads():
    tcpuLoadsList = []
    for sensor in w.Sensor():
        if sensor.sensortype == "Load" and sensor.name[0] == "C":
            tcpuLoadsList.append([sensor.name, sensor.value])
    return tcpuLoadsList
Esempio n. 5
0
ctx.init(800, 450, "Hardware Rating")

### Create a function to that fetches every temp and put it in a dict or anything else.
### Then run that function on a second thread
## AKA
# import threading

# def fetchTempFunction():
#   return to array and use the array to fill in the values
# cool_thread = threading.Thread(target = fetchTempFunction())
# cool_thread.start()

if __name__ == "__main__":
    while (not ctx.should_close()):
        with ctx:
            w.Sensor()

            # intro window
            b.set_next_window_pos(b.Vec2(12, 15), b.Condition.Once)
            b.set_next_window_size(b.Vec2(765, 80), b.Condition.Once)
            b.begin("Hardware-Rating")

            b.text("Welcome to Hardware-Rating,")
            b.same_line()
            b.text(realUser)
            b.text(
                "Below are your listed computer components and any other useful information per device."
            )

            # CPU window
            b.set_next_window_pos(b.Vec2(12, 100), b.Condition.Once)