   else {
     Serial.print("Setting Ki to: ");
     Serial.println(sVal);    
+    xv_config.Ki = sVal;
+    rpmPID.SetTunings(xv_config.Kp, xv_config.Ki, xv_config.Kd);
   }
 }
 

#include "EEPROMAnything.h"
#include <SerialCommand.h>

#define DEBUG_MOTOR_RPM false

struct EEPROM_Config
{
  byte id;

}

void initSerialCommands() {
  sCmd.addCommand("help",       help);
  sCmd.addCommand("Help",       help);
  sCmd.addCommand("GetConfig",  getConfig);
  sCmd.addCommand("SaveConfig", saveConfig);
  sCmd.addCommand("ResetConfig",initEEPROM);

  sCmd.addCommand("SetRPM",  setRPM);
  sCmd.addCommand("SetKp",   setKp);
  sCmd.addCommand("SetKi",   setKi);
  sCmd.addCommand("SetKd",   setKd);

  sCmd.addCommand("ShowRPM",       showRPM);
  sCmd.addCommand("HideRPM",       hideRPM);
  sCmd.addCommand("MotorOff",      motorOff);
  sCmd.addCommand("MotorOn",       motorOn);
  sCmd.addCommand("RetransmitOff", retransmitOff);
  sCmd.addCommand("RetransmitOn",  retransmitOn);

  // XV Commands  
  sCmd.addCommand("GetPrompt",  getPrompt);
  sCmd.addCommand("GetVersion",  getVersion);
}

void showRPM() {
  debug_motor_rpm = true;
  Serial.println("Showing RPM data");
}

void hideRPM() {
  debug_motor_rpm = false;
  Serial.println("Hiding RPM data");
}

void motorOff() {
