The issue in your code might be due to the incorrect usage of the call_back_fun function. It seems that you are trying to call the call_back_fun function with the content parameter, but the content is not being passed correctly.

To fix the issue, you can modify your code as follows:

stopScanMap: async function (agvId, call_back_fun) {
    var res = await getAgvModule().stopSlam(agvId, (res, content) => {
        call_back_fun(content); // Pass the content as an argument to the callback function
    });
    return res;
}

webApi.stopScanMap(25, function (content) {
    console.log("停止扫图", JSON.stringify(content));
    // Make sure that the `content` variable is not `undefined`
});

This should ensure that the content variable is passed correctly to the call_back_fun function and prevent it from being undefined

stopScanMap async function agvId call_back_fun var res = await getAgvModulestopSlamagvId rescontent = call_back_funcallcontent; ;return res;webApistopScanMap25 function content consolelog停止扫图

原文地址: http://www.cveoy.top/t/topic/iHtW 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录