Bitcoin Forum
May 14, 2024, 12:06:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: pyADL - Python AMD ADL Wrapper  (Read 5589 times)
nzbtc
Newbie
*
Offline Offline

Activity: 40
Merit: 0


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

Does this run on windows?
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715645172
Hero Member
*
Offline Offline

Posts: 1715645172

View Profile Personal Message (Offline)

Ignore
1715645172
Reply with quote  #2

1715645172
Report to moderator
disq
Newbie
*
Offline Offline

Activity: 41
Merit: 0



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.
brocktice
Sr. Member
****
Offline Offline

Activity: 292
Merit: 250


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
Merit: 500


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!