                     Serial.print("Invalid owner "); Serial.println(owner);
                     break;
             }
-        }
-        Serial.print((char *)command); Serial.print(" - ");Serial.print(command[0],DEC);Serial.print(": "); 
-        Serial.print("owner "); Serial.print(owner,DEC); Serial.print(", percent "); Serial.println(percent,DEC); 
+            Serial.print((char *)command); Serial.print(" - ");
+            Serial.print("owner "); Serial.print(owner,DEC); Serial.print(", percent "); Serial.println(percent,DEC); 
+        }
     }
 
     // If we're in the process of getting a serial command, don't service the LEDs: this process disables interrupts,

            if ( in_index < (sizeof(command)/sizeof(command[0])) - 2 ) {
                in_index++;
            }
            status = IN_PROGRESS;
            //if( in_index >= 32 ) //sizeof(command) )
            //  in_index = 0;
        } else {
            status = IN_PROGRESS;
        }
    }
    // If we've received the start of a command, return that we're 'in progress'
    if (status == IN_PROGRESS) Serial.println("In progress");
    return status;
}



const unsigned long LED_UPDATE_PERIOD = 5; // in ms. Time between drawing a frame on _any_ LED strip.

//const long BAUD_RATE = 115200;
const long BAUD_RATE = 9600;

// Command format:
// Fnnnnnnnnp12345678mmmm\n
// F = faction: EeRrNn. Capitalized on state change; lowercase if same as before
// n = resonator level
// p = portal health percentage
// 1-8 = resonator health percentage
// m = mod status
//
// percentage health encoded as single character. Space (' ') is 0%, and then each ASCII character
// above it is 2% greater, up to 'R' for 100%
//
// Mods:
// ' ' - No mod present in this slot
// '0' - FA Force Amp
// '1' - HS-C Heat Shield, Common
// '2' - HS-R Heat Shield, Rare
// '3' - HS-VR Heat Shield, Very Rare
// '4' - LA-R Link Amplifier, Rare
// '5' - LA-VR Link Amplifier, Very Rare
// '6' - SBUL SoftBank Ultra Link
// '7' - MH-C MultiHack, Common
// '8' - MH-R MultiHack, Rare
// '9' - MH-VR MultiHack, Very Rare
// 'A' - PS-C Portal Shield, Common
// 'B' - PS-R Portal Shield, Rare
// 'C' - PS-VR Portal Sheild, Very Rare
// 'D' - AXA AXS Shield
// 'E' - T Turret

const unsigned int COMMAND_LENGTH = 22;
const unsigned int PORTAL_STRENGTH_INDEX = 9;

enum Direction { NORTH = 0, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, NORTHWEST };
enum Ownership {  neutral = 0, enlightened, resistance, initial };
enum SerialStatus { IDLE, IN_PROGRESS, COMMAND_COMPLETE };

// Static animation implementations singleton
