Skip to content Skip to main navigation Skip to footer

Power Control

Start automatic recharging

Method name: startNaviToAutoChargeAction

Calling method:

RobotApi.getInstance().startNaviToAutoChargeAction(reqId, timeout, new ActionListener() {    
    @Override    
    public void onResult(int status, String responseString) throws RemoteException {        
        switch (status) {            
            case Definition.RESULT_OK:                
                //Charged successfully                
                break;            
            case Definition.RESULT_FAILURE:                
                //Charging failed                
                break;        
        }    
    }    
    @Override    
    public void onStatusUpdate(int status, String data) throws RemoteException {        
        switch (status) {            
            case Definition.STATUS_NAVI_GLOBAL_PATH_FAILED:                
                //Global path planning failed                
                break;            
            case Definition.STATUS_NAVI_OUT_MAP:                
                //The target point cannot be reached, and the leading destination is outside the map. It is possible that the map does not match the location point. Please reset the location point                
                break;            
            case Definition.STATUS_NAVI_AVOID:                
                //The route to the recharge point has been blocked by obstacles                
                break;            
            case Definition.STATUS_NAVI_AVOID_END:                
                //Obstacles have been removed                
                break;            
            default:                
                break;        
        }    
    }
});

Parameter Description:

  • timeout : Navigation timeout time. If the charging pile is not reached within this time, it is considered that the recharge has failed.

Applicable Platform:

GreetBotMiniLuckiDeliverBotBigScreenBot
YesYesNoNoNo

End of automatic recharge

Method name: stopAutoChargeAction

Calling method:

RobotApi.getInstance().stopAutoChargeAction(reqId, true);

Applicable Platform:

GreetBotMiniLuckiDeliverBotBigScreenBot
YesYesNoNoNo

Get robot battery level

Calling method:

RobotSettingApi.getInstance().getRobotString(Definition.ROBOT_SETTINGS_BATTERY_INFO);

Applicable Platform:

GreetbotMiniLuckiBaoxiaodi MAXBaodaping
YesYesNoNoNo

Stop charging and leave the charging pile

Method name: stopChargingByApp

Calling method:

RobotApi.getInstance().stopChargingByApp();

Applicable Platform:

GreetBotMiniLuckiDeliverBotBigScreenBot
YesYesNoNoNo

Note1: The line charging method cannot be used to disconnect from charging Note2: To use this api, you have to call RobotApi.getInstance().disableBattery(); first. To disable system battery control