xboxscene.org forums

OG Xbox Forums => Official Team UIX Forums => Dashboard Forums => User.Interface.X (UIX) Code => Topic started by: CompFreak07 on January 10, 2005, 02:39:00 PM

Title: Add Fan Speed To Config
Post by: CompFreak07 on January 10, 2005, 02:39:00 PM
This is a code snippet to let you change your fan speed in the Dash Config.  You can set it on intervals of 10 only starting from 20 - 100. (example 30 or 40 not 33 or 41 ext)  I also added a safety feature that is if by accident it gets set to somthing besides a interval of 10 then your fan wont stop working it will automaticaly set it to 100 % speed.   Open default.xip/default.xap.
Locate:
CODE

   theAmbientSound3.Play();

theXboxNetwork.StartServices();
theXboxNetwork.StartFTPServices();


And right after that insert:
CODE
SetFanSpeed();


At the end of default.xap paste:
CODE

// Function to set Fan Speed

function SetFanSpeed() //Exiles
{
var IniFile = new Settings;
IniFile.SetIniSection( "Sys Config" );
var FanSpeedST = IniFile.GetIniValue( "FanSpeed" );
var FanSpeedS = ReturnInteger(FanSpeedST);
if (FanSpeedS==20) { theConfig.SetFanSpeed(20); }
else if (FanSpeedS==30) { theConfig.SetFanSpeed(30); }
else if (FanSpeedS==40) { theConfig.SetFanSpeed(40); }
else if (FanSpeedS==50) { theConfig.SetFanSpeed(50); }
else if (FanSpeedS==60) { theConfig.SetFanSpeed(60); }
else if (FanSpeedS==70) { theConfig.SetFanSpeed(70); }
else if (FanSpeedS==80) { theConfig.SetFanSpeed(80); }
else if (FanSpeedS==90) { theConfig.SetFanSpeed(90); }
else if (FanSpeedS==100) { theConfig.SetFanSpeed(100); }
else { theConfig.SetFanSpeed(100); }
}



Save default.xap and default.xip.

Open default.xip / config.xap

Locate:
CODE
function BuildMainList()


Scroll down until you see
CODE
ClearText();
UpdateText();
}


right above that paste:
CODE
configList = "Fan Speed:";
configValues = "c-Sys Config-FanSpeed";
configSelect = "ConfigKeyB()";
i = i + 1;



Finally add this on the bottom of your uix.ini
CODE

[Sys Config]
FanSpeed=100

ph34r.gif
Title: Add Fan Speed To Config
Post by: CrakkedOut on January 10, 2005, 03:40:00 PM
mmmmm code......  :beer:
Title: Add Fan Speed To Config
Post by: grindbg on January 10, 2005, 05:27:00 PM
good job, but why fanspeed=100?
Title: Add Fan Speed To Config
Post by: Infamous_One on January 10, 2005, 06:50:00 PM
QUOTE(grindbg @ Jan 11 2005, 01:58 AM)
good job, but why fanspeed=100?
*



you change it damn it. is not 100 if you dont want to.




Great Code.  :beer:
Title: Add Fan Speed To Config
Post by: CompFreak07 on January 10, 2005, 07:05:00 PM
Fan Speed is 100 because that is what I always run it on because I have a upgraded Hard Drive.  You can change it to whatever you want.  If any of you are using the "Hard Drive, Free And Used Space Display" I added to it to show your fan speed.  Click Here to see it

This post has been edited by CompFreak07: Jan 11 2005, 03:07 AM
Title: Add Fan Speed To Config
Post by: grindbg on January 10, 2005, 08:10:00 PM
QUOTE(Infamous_One @ Jan 11 2005, 03:14 AM)
you change it damn it. is not 100 if you dont want to.
Great Code.  :beer:
*



What's wrong to ask? I don't wanna fry my xbox, my bios runs fanspeed 30 but for the dash 100 looks suspicious and now when I know whats was the reason for that everything is ok and I am so grateful, thax CompFreak07 realy great code.
Title: Add Fan Speed To Config
Post by: CompFreak07 on January 10, 2005, 08:32:00 PM
No problem, I dont mind anyone asking questions.  The more questions people ask the more stuff that might get done.
Title: Add Fan Speed To Config
Post by: motofo on January 11, 2005, 06:54:00 AM
great code....was tryin to figure out same code myself.....now I see what I was missin! Thnx again!
            m0t0
Title: Add Fan Speed To Config
Post by: Blasterjumper on January 11, 2005, 09:53:00 AM
Does changing the speed make the xbox alot louder?  Also is there a tuturoil on how to write you own code?  I know a little bit of java and i think i could catch on if i had a guide explaining the syntax.
Title: Add Fan Speed To Config
Post by: CompFreak07 on January 22, 2005, 01:59:00 AM
For any of you who have used this code you would know you have to type in the fan speed you want on the xbox keyboard app.  Well I have mafe it eaiser so all you have to do is click on it in the config and it will go from 20 to 30 and then from 30 to 40 and so on.  Open up Default.xip/Config.xap.  Then search for :
CODE

configList = "Fan Speed:";


Below that where it says :
CODE

configSelect = "ConfigKeyB()";


replace that with :
CODE

configSelect = "ToggleFan()";


Now at the end of Default.xip/Config.xap add :
CODE

function ToggleFan()
{
    var c = theConfigPanel.children[0].children[0];
    var b = c.theRightSlots.children[LV2Item].children[0].geometry.text;
    if(b.toLowerCase() == "20") { RefreshMenu("30"); }
    else if(b.toLowerCase() == "30") { RefreshMenu("40"); }
   else if(b.toLowerCase() == "40") { RefreshMenu("50"); }
   else if(b.toLowerCase() == "50") { RefreshMenu("60"); }
   else if(b.toLowerCase() == "60") { RefreshMenu("70"); }
   else if(b.toLowerCase() == "70") { RefreshMenu("80"); }
   else if(b.toLowerCase() == "80") { RefreshMenu("90"); }
   else if(b.toLowerCase() == "90") { RefreshMenu("100"); }
   else if(b.toLowerCase() == "100") { RefreshMenu("20"); }
}


That should do it.  Restart your xbox and enjoy
Title: Add Fan Speed To Config
Post by: DaBeast77 on January 22, 2005, 02:16:00 AM
Great code
Title: Add Fan Speed To Config
Post by: CompFreak07 on January 22, 2005, 02:17:00 AM
thx
Title: Add Fan Speed To Config
Post by: Godflesh on May 28, 2005, 03:48:00 AM
Can't get this to work...

I can change the fanspeed in the "System Settings Menu" ..to for instance 80 or something, but when I reboot etc the fan is still at 20 % speed..nothing happens.

What am I doing wrong?

Title: Add Fan Speed To Config
Post by: Godflesh on May 28, 2005, 04:45:00 AM
Could someone please have a look at my files and fix em so they will work? Been trying for about 2 hours now ..and still no luck.



http://www.xs4all.nl/~godflesh/lol/uixfanspeed.rar



p.s. XBMC has a nice feature called "Auto Temperature Control" ...would be awesome if UIX had the some option build within it like thise. ..if for instance you play a game the fan automaticly starts to spin harder etc.
They more heat is generated (Movie / Games) the harder it cools.

This post has been edited by Godflesh: May 28 2005, 11:46 AM
Title: Add Fan Speed To Config
Post by: BlackWraith on May 28, 2005, 05:46:00 AM
Do me and everyone else a favor before you decide to post links to files.  Read the God Damned rules!  Sorry for the brashness, but man you cannot have links to xips or the such on the forums.  Post your xap as a text file if necessary.  Kill the link immediately.

This post has been edited by BlackWraith: May 28 2005, 12:49 PM
Title: Add Fan Speed To Config
Post by: midas on May 28, 2005, 11:06:00 AM
The least you could do is move/rename the file.
Title: Add Fan Speed To Config
Post by: fixxxer575 on May 30, 2005, 02:52:00 PM
I tried to add this code to the Commemorative Build and when I boot up all I see is the dna strings on the screen.  The fan doesn't sound any louder.  I can still ftp UIX.  Any idea what the problem could be?
Title: Add Fan Speed To Config
Post by: kevhonda on January 02, 2006, 02:22:00 AM
I tried this mod and when i transfered default.xip and uix.ini , uix was doing the screensaver thing where the orb goes to the back and the background spins.  Once i hit a button on the controller the dash froze so I rebooted and after the animation where it shows the xbox logo (right before it goes into uix) the xbox freezes.  Of course I backed up the files i modded so I booted to the chip and ftp'ed the original files back and it does the same thing. WTF, i have transfered the originals over 3 times to make sure...still locking up.   I have added the 4th tab mod and the info panel mod and the only other code editing ive done to it is un-commenting the background.xbx so the backgrounds in the skins will show up, but its worked fine for almost a year now.  

Unfortunatly its tooo late for me to troubleshoot it tonight so I posted this, If someone could help out before I ge t off work tom. and re-install UIX it would be much appreicated.. TIA
Title: Add Fan Speed To Config
Post by: kevhonda on January 03, 2006, 11:16:00 AM
thanks for the help guys ...j/k really seems that at least the code portion of UIX is slow.  I wish more people would post code snippets in here, if I understood the code a little more I would myself.  Anyway I fixed my own problem for some reason transfering the backup using the xenium ftp funtion would transfer but wouldnt fix the problem.  So last night I booted from a evox bootdisk that I made a while back and transfered the backups (xips) back to the xbox when i rebooted it worked.  Im almost willing to bet that it might have worked by just booting to the cd. However,  it works now for anyone who might have this same problem.