Merge pull request #3 from trackdork/patch-1

Fix for issue #2 previously created
This commit is contained in:
telliottosceola 2016-11-23 11:23:12 -06:00 committed by GitHub
commit ffc239eee1

View file

@ -114,8 +114,9 @@ void readStoredEvents(){
for(int eventIndex = 0; eventIndex < numberOfEvents; eventIndex++){
Serial.printf("Event at location %i: ",eventIndex);
for(int i = startIndex; i < startIndex+36; i+=4){
EEPROM.get(i, eventArray[eventIndex][(i-1)/4]);
Serial.printf("%i, ", eventArray[eventIndex][(i-1)/4]);
int arrayIndex = ((i-1)/4) % 9;
EEPROM.get(i, eventArray[eventIndex][arrayIndex);
Serial.printf("%i, ", eventArray[eventIndex][arrayIndex);
}
Serial.printf("Event at location %i: ",eventIndex);
Serial.println();
@ -255,4 +256,4 @@ void executeCommand(int commandID, int commandData){
controller.toggleRelay(commandData);
break;
}
}
}