FastLED version 3.0.3 Arduino 1.0.6 Arduino Nano w/ ATMega 328 I need help with

FastLED version 3.0.3
Arduino 1.0.6
Arduino Nano w/ ATMega 328

I need help with some code for a switch, the code is set up to change an array of leds from green to red, which i do by reading a pin. Problem is that my code never gets past this statment set. Could someone tell me why?
int getMode(int d5, int d6, int d7) {
int rtn = 0;

if (d7 == 0 && d6 == 0 && d5 == 0) {
rtn = 1;
}

if (d7 == 0 && d6 == 0 && d5 == 1) {
rtn = 0;
}

How stable is the input on the pins? I.e is it a (relatively speaking) slow moving dip switch or a push button?
Where is this code block, inside loop() ?
What is the state of each input when you reach this block of code?

To test the code i currently have a wire going from the expected pin to a ground on the board.
Yes, its inside loop
Pin is set as input

Would an entire copy of my current code help?

WS2811 based led controller, by the way

Hi,

You snippet just shows a stand alone function. We cant see how its being called, or where the digitalRead() happens.

As a block of code it groks ok, but then i don’t know what the expected behaviour should be.

So yes, seeing all the code would help.

paste it @ http://pastebin.com/

and post the link here.

Its ok, i figured out the problem. Thanks for the help!

no problem, don’t forget to post back and #showoffyourwork