Contact me: hankecnc@gmail.com

支持Marlin的进阶ok #557

推推 grbl 3年前 (2023-02-03) 276次浏览
打开
cheton 打开了这个问题 2020 年 1 月 18 日 · 1条评论
打开

支持Marlin的进阶ok#557

cheton 打开了这个问题 2020 年 1 月 18 日 · 1条评论

注释

支持Marlin的进阶ok #557
合作者

CNCjs 无法将高级 ok 消息识别为正确的 ok,只是挂在等待状态。根据响应高级 ok 消息的 Marlin 代码,以下是一些可能的组合:

ok P15 B3
ok N10 P15 B3

马林:gcode/queue.cpp

https://github.com/MarlinFirmware/Marlin/blob/2.0.x/Marlin/src/gcode/queue.cpp?fbclid=IwAR1NxIYkG8diSEoc3EEIrn6RNJImfJvdxO7wWWDHLchlub9ZNzMl8RyKdEI

/**
 * Send an "ok" message to the host, indicating
 * that a command was successfully processed.
 *
 * If ADVANCED_OK is enabled also include:
 *   N<int>  Line number of the command, if any
 *   P<int>  Planner space remaining
 *   B<int>  Block queue space remaining
 */
void GCodeQueue::ok_to_send() {
  #if NUM_SERIAL > 1
    const int16_t pn = port[index_r];
    if (pn < 0) return;
    PORT_REDIRECT(pn);
  #endif
  if (!send_ok[index_r]) return;
  SERIAL_ECHOPGM(MSG_OK);
  #if ENABLED(ADVANCED_OK)
    char* p = command_buffer[index_r];
    if (*p == 'N') {
      SERIAL_ECHO(' ');
      SERIAL_ECHO(*p++);
      while (NUMERIC_SIGNED(*p))
        SERIAL_ECHO(*p++);
    }
    SERIAL_ECHOPGM(" P"); SERIAL_ECHO(int(BLOCK_BUFFER_SIZE - planner.movesplanned() - 1));
    SERIAL_ECHOPGM(" B"); SERIAL_ECHO(BUFSIZE - length);
  #endif
  SERIAL_EOL();
}
支持Marlin的进阶ok #557 cheton 自己分配了这个 2020 年 1 月 18 日
支持Marlin的进阶ok #557 cheton 更改了标题 支持Marlin高级ok响应 支持Marlin的进阶ok 2020 年 1 月 18 日
支持Marlin的进阶ok #557 奇顿 添加了 马林鱼 标签 2020 年 1 月 18 日
支持Marlin的进阶ok #557 cheton 通过1.10将此 添加到Needs triage自动化 2020 年 1 月 18 日
支持Marlin的进阶ok #557

哇!很高兴我找到了这个,这很有道理!我现在可以关闭它,但我同意这个功能请求!

免费注册 在 GitHub 上加入此对话。已有帐户? 登录评论
项目
1.10

  
需要分流
状态:无状态
发展

没有分支机构或拉取请求

2名参加者
支持Marlin的进阶ok #557支持Marlin的进阶ok #557

喜欢 (0)