Revision a0033dcb

View differences:

devices/PowerManagement/main.cpp
889 889
}
890 890

  
891 891

  
892
void setGlobalStrategy(BaseSequentialStream *chp, int argc, char *argv[]){
892
void shellRequestSetGlobalStrategy(BaseSequentialStream *chp, int argc, char *argv[]){
893 893
  uint8_t strategy = 0;
894 894
  if(argc == 1){
895 895
    strategy = atoi(argv[0]); 
......
900 900
  global.robot.setStrategy(strategy);
901 901
}
902 902

  
903
void shellRequestGetPower(BaseSequentialStream *chp, int argc, char *argv[]){
904

  
905
  // send over can
906
  // global.strategyTest = strategy;
907
  // global.triggerCan = true;
908
  types::power_status state = global.robot.getPowerStatus();
909
  global.bq27500[constants::PowerManagement::BAT_A].selftest();
910
  chprintf(chp, "-----------------------------------------------\n");
911
  global.bq27500[constants::PowerManagement::BAT_B].selftest();
912
  chprintf(chp, "State of charge: %d\n", state.state_of_charge);
913
}
914

  
903 915

  
904 916
static const ShellCommand commands[] = {
905 917
  {"shutdown", shellRequestShutdown},
......
920 932
  {"shell_board", shellSwitchBoardCmd},
921 933
  {"get_bootloader_info", shellRequestGetBootloaderInfo},
922 934
  {"wii_steering", shellRequestWiiSteering},
923
  {"setStrategy", setGlobalStrategy},
935
  {"setStrategy", shellRequestSetGlobalStrategy},
936
  {"getBatteryState", shellRequestGetPower},
924 937
  {NULL, NULL}
925 938
};
926 939

  

Also available in: Unified diff