Bitcoin Forum
December 04, 2016, 02:35:08 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: pyADL - Python AMD ADL Wrapper  (Read 4908 times)
nzbtc
Jr. Member
*
Offline Offline

Activity: 40


View Profile
May 26, 2011, 10:59:49 PM
 #21

Does this run on windows?

13EXX23oQX7CA1qLrM2EDemnYNZDdmngsS
1480862108
Hero Member
*
Offline Offline

Posts: 1480862108

View Profile Personal Message (Offline)

Ignore
1480862108
Reply with quote  #2

1480862108
Report to moderator
1480862108
Hero Member
*
Offline Offline

Posts: 1480862108

View Profile Personal Message (Offline)

Ignore
1480862108
Reply with quote  #2

1480862108
Report to moderator
1480862108
Hero Member
*
Offline Offline

Posts: 1480862108

View Profile Personal Message (Offline)

Ignore
1480862108
Reply with quote  #2

1480862108
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
disq
Jr. Member
*
Offline Offline

Activity: 41



View Profile
May 26, 2011, 11:08:56 PM
 #22

Good work. Though I wish it exposed a "detected device list" of some sort as well.

1LFWHcXqRAfq6GiS3s7disq1p7iKkinshp <-- just to show off my address, who tips to forum signatures anyway?

Rug Monitor - Monitor your mining rigs, generate useful if not pretty charts.
brocktice
Sr. Member
****
Offline Offline

Activity: 292


Apparently I inspired this image.


View Profile WWW
June 30, 2011, 03:35:30 PM
 #23

Just to save everyone some grief, to initialize you now should run
Code:
ADL.setIndex(0)
or whatever index you want, instead of
Code:
ADL.SetupADL(0)
.

http://media.witcoin.com/p/1608/8----This-is-nuts

My #bitcoin-otc ratings: http://bitcoin-otc.com/viewratingdetail.php?nick=brocktice&sign=ANY&type=RECV

Like my post? Leave me a tip: 15Cgixqno9YzoKNEA2DRFyEAfMH5htssRg
kaerf
Hero Member
*****
Offline Offline

Activity: 631


View Profile
August 18, 2011, 04:55:15 AM
 #24

thanks for this, netxshare.

i noticed some functions like getTemp() weren't working that well (value was set only when setIndex() was called), so i updated it a little.

i also added the setFanAuto() function to reset the fan speed to automatic..i know aticonfig pplib-cmd set fanspeed doesn't quite work, so this turned out to be a nice solution.

don't think i can upload attachments so here's the patch inline.


--- pyADL.cpp   2011-06-09 12:45:32.000000000 -0700
+++ pyADL-new.cpp   2011-08-17 21:47:14.967520700 -0700
@@ -70,6 +70,7 @@
 
    if (adl->GetSupportedFeatures() & ADL::FEAT_GET_ACTIVITY)
    {
+      adl->UpdateData();
       Results = Py_BuildValue("i", adl->mODActivity.iActivityPercent);
       return Results;
    }
@@ -85,6 +86,7 @@
    PyObject *Results;
    if (adl->GetSupportedFeatures() & ADL::FEAT_GET_TEMPERATURE)
    {
+      adl->UpdateData();
       Results = Py_BuildValue("f", (float)adl->mTemperature.iTemperature/1000.0);
       return Results;
    }
@@ -102,6 +104,7 @@
    PyObject *Results;
    if ((adl->GetSupportedFeatures() & ADL::FEAT_GET_FANSPEED_INFO) && (adl->GetSupportedFeatures() & ADL::FEAT_GET_FANSPEED))
    {
+      adl->UpdateData();
       Results = Py_BuildValue("i", adl->mCurrentFanSpeed.iFanSpeed * 100 / adl->mFanSpeedInfo.iMaxRPM);
       return Results;
    }
@@ -120,6 +123,7 @@
 
    if ((adl->GetSupportedFeatures() & ADL::FEAT_GET_FANSPEED_INFO) && (adl->GetSupportedFeatures() & ADL::FEAT_GET_FANSPEED))
    {
+      adl->UpdateData();
       Results = Py_BuildValue("i", adl->mCurrentFanSpeed.iFanSpeed);
       return Results;
    }
@@ -139,6 +143,7 @@
 
    if (adl->GetSupportedFeatures() & ADL::FEAT_GET_OD_PARAMETERS)
    {
+      adl->UpdateData();
       Results =  Py_BuildValue("i", adl->mpODPerformanceLevels->aLevels[adl->mODActivity.iCurrentPerformanceLevel].iEngineClock/100);
       return Results;
    }
@@ -157,6 +162,7 @@
 
    if (adl->GetSupportedFeatures() & ADL::FEAT_GET_OD_PARAMETERS)
    {
+      adl->UpdateData();
       Results = Py_BuildValue("i", adl->mpODPerformanceLevels->aLevels[adl->mODActivity.iCurrentPerformanceLevel].iMemoryClock/100);
       return Results;
    }
@@ -173,6 +179,7 @@
    PyObject *Results;
    if (adl->GetSupportedFeatures() & ADL::FEAT_GET_OD_PARAMETERS)
    {
+      adl->UpdateData();
       Results = Py_BuildValue("f", (float)adl->mpODPerformanceLevels->aLevels[adl->mODActivity.iCurrentPerformanceLevel].iVddc/1000.0);
       return Results;
    }
@@ -221,6 +228,29 @@
 }
 
 
+static PyObject *setFanAuto(PyObject *self, PyObject *noargs)
+{
+   if (adl->GetSupportedFeatures() & ADL::FEAT_GET_FANSPEED)
+        {
+      if(SAVE_CALL(adl->ADL_Overdrive5_FanSpeedToDefault_Set)(adl->GetGPUIndex(), 0)
+!= ADL_OK)
+      {
+                        Py_INCREF(Py_False);
+                        return Py_False;
+                }
+                else
+                {
+                        ACT_LOG("Fan speed set to AUTO");
+                        Py_INCREF(Py_True);
+                        return Py_True;
+                }
+
+        }
+
+        Py_INCREF(Py_False);
+        return Py_False;
+}   
+
 static PyObject *setCoreClockSpeed(PyObject *self, PyObject *args)
 {
    int Level,CoreSpeed;
@@ -373,6 +403,7 @@
    {"getMemoryClockSpeed", getMemoryClockSpeed, METH_NOARGS, "Returns Current Memory Clock Speed."},
    {"getVoltage", getVoltage, METH_NOARGS, "Returns Current Voltage."},
    {"setFanSpeed", setFanSpeed, METH_VARARGS, "Sets The Fan Speed."},
+   {"setFanAuto", setFanAuto, METH_NOARGS, "Sets The Fan Speed To Automatic."},
    {"setCoreClockSpeed", setCoreClockSpeed, METH_VARARGS, "Sets The Core Clock Speed."},
    {"setMemoryClockSpeed", setMemoryClockSpeed, METH_VARARGS, "Sets The Memory Clock Speed."},
    {"setVoltage", setVoltage, METH_VARARGS, "Sets The GPU Voltage."},
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!