MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / reset_all

Method reset_all

Software/C/GoPiGo3.cpp:698–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696}
697
698int GoPiGo3::reset_all(){
699 int res1 = set_grove_type(GROVE_1 + GROVE_2, GROVE_TYPE_CUSTOM);
700 int res2 = set_motor_power(MOTOR_LEFT + MOTOR_RIGHT, MOTOR_FLOAT);
701 int res3 = set_motor_limits(MOTOR_LEFT + MOTOR_RIGHT, 0, 0);
702 int res4 = set_led((LED_EYE_LEFT + LED_EYE_RIGHT + LED_BLINKER_LEFT + LED_BLINKER_RIGHT), 0, 0, 0);
703 int res5 = set_grove_pwm_duty(GROVE_1 + GROVE_2, 0);
704 int res6 = set_grove_pwm_frequency(GROVE_1 + GROVE_2);
705 if(res1){
706 return res1;
707 }else if(res2){
708 return res2;
709 }else if(res3){
710 return res3;
711 }else if(res4){
712 return res4;
713 }else if(res5){
714 return res5;
715 }else if(res6){
716 return res6;
717 }
718 return ERROR_NONE;
719}

Callers 9

BalanceBot.pyFile · 0.45
SafeExitFunction · 0.45
cleanupFunction · 0.45
GoPiGo3_resetFunction · 0.45
exit_signal_handlerFunction · 0.45
exit_signal_handlerFunction · 0.45
exit_signal_handlerFunction · 0.45
exit_signal_handlerFunction · 0.45
exit_signal_handlerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected