Revision f12b953d
devices/PowerManagement/main.cpp | ||
---|---|---|
888 | 888 |
return; |
889 | 889 |
} |
890 | 890 |
|
891 |
|
|
892 |
void setGlobalStrategy(BaseSequentialStream *chp, int argc, char *argv[]){ |
|
893 |
uint8_t strategy = 0; |
|
894 |
if(argc == 1){ |
|
895 |
strategy = atoi(argv[0]); |
|
896 |
} |
|
897 |
// send over can |
|
898 |
// global.strategyTest = strategy; |
|
899 |
// global.triggerCan = true; |
|
900 |
global.robot.setStrategy(strategy); |
|
901 |
} |
|
902 |
|
|
903 |
|
|
891 | 904 |
static const ShellCommand commands[] = { |
892 | 905 |
{"shutdown", shellRequestShutdown}, |
893 | 906 |
{"check", shellRequestCheck}, |
... | ... | |
907 | 920 |
{"shell_board", shellSwitchBoardCmd}, |
908 | 921 |
{"get_bootloader_info", shellRequestGetBootloaderInfo}, |
909 | 922 |
{"wii_steering", shellRequestWiiSteering}, |
923 |
{"setStrategy", setGlobalStrategy}, |
|
910 | 924 |
{NULL, NULL} |
911 | 925 |
}; |
912 | 926 |
|
Also available in: Unified diff