openpnp - Warning - Unknown firmware

news/2024/10/17 19:33:18/

文章目录

    • openpnp - Warning - Unknown firmware
    • 概述
    • 笔记
    • https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares
    • 备注
    • END

openpnp - Warning - Unknown firmware

概述

接上飞达控制板后, 显示未知固件的警告
在这里插入图片描述
开始没看源码之前, 总以为是回答的版本号不合适, 就照着冰沙板子回的版本号来回固件版本. 还是有这个警告.
现在已经在使用自己编译出来的openpnp, 就想去看看这个警告咋来的.

笔记

判断是否有未知固件的函数为 findIssues()
D:\my_openpnp\openpnp_dev_2022_0801\src\main\java\org\openpnp\machine\reference\solutions\GcodeDriverSolutions.java

public void findIssues(Solutions solutions) {
// ...
if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Smoothieware")) {firmware = (gcodeDriver.getFirmwareProperty("X-GRBL_MODE", "").contains("1"))? FirmwareType.SmoothiewareGrblSyntax : gcodeDriver.getFirmwareProperty("FIRMWARE_VERSION", "").contains("chmt-")?FirmwareType.SmoothiewareChmt : FirmwareType.Smoothieware;firmwareAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("X-AXES", "0"));if (firmware == FirmwareType.SmoothiewareChmt) {// OK, CHMT STM32 Smoothieware board. Take PAXES == 5 if missing (legacy build).firmwarePrimaryAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("X-PAXES", "5"));}else if (gcodeDriver.getFirmwareProperty("X-SOURCE_CODE_URL", "").contains("best-for-pnp")) {// OK, regular Smoothieboard with pnp firmware.firmwarePrimaryAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("X-PAXES", "3"));}else {solutions.add(new Solutions.PlainIssue(gcodeDriver, "There is a better Smoothieware firmware available. "+gcodeDriver.getDetectedFirmware(), "Please upgrade to the special PnP version. See info link.", Severity.Error, "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#smoothieware"));}if (firmwarePrimaryAxesCount != null && firmwarePrimaryAxesCount != firmwareAxesCount) {solutions.add(new Solutions.PlainIssue(gcodeDriver, "Smoothieware firmware should be built with the PAXIS="+firmwareAxesCount+" option.", "Download up-to-date firmware optimized for OpenPnP, or if you build the firmware yourself, please use the `make AXIS="+firmwareAxesCount+" PAXIS="+firmwareAxesCount+"` command. See info link.", Severity.Warning, "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#smoothieware"));}}else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Duet")) {firmware = FirmwareType.Duet;String firmwareVersion = gcodeDriver.getFirmwareProperty("FIRMWARE_VERSION", "0.0");Integer major = null;Integer minor = null;try {Matcher matcher =Pattern.compile("(?<major>-?\\d+)\\.(?<minor>-?\\d+).*").matcher(firmwareVersion);matcher.matches();major = Integer.parseUnsignedInt(matcher.group("major"));minor = Integer.parseUnsignedInt(matcher.group("minor"));}catch (Exception e) {Logger.warn(e);}if (major == null || minor == null|| major < 3 || (major == 3 && minor < 3)) {solutions.add(new Solutions.PlainIssue(gcodeDriver,"Duet3D firmware was improved for OpenPnP, please use version 3.3beta or newer. Current version is "+firmwareVersion,"Get the new version through the linked web page.",Severity.Error,"https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#duet"));}if (gcodeDriver.getConfiguredAxes() != null) {try {Matcher matcher =Pattern.compile(".*\\s(?<axes>-?\\d+)\\saxes\\svisible.*").matcher(gcodeDriver.getConfiguredAxes());matcher.matches();firmwareAxesCount = Integer.parseUnsignedInt(matcher.group("axes"));}catch (NumberFormatException e) {// ignore}if (gcodeDriver.getConfiguredAxes().contains("(r)")) {solutions.add(new Solutions.PlainIssue(gcodeDriver,"Axes should be configured as linear in feedrate calculations on the Duet controller. See the linked web page.","Use the M584 S0 option in your config.g file.",Severity.Error,"https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping"));}else {firmwarePrimaryAxesCount = firmwareAxesCount;}}}else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Marlin")) {firmware = FirmwareType.Marlin;firmwareAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("AXIS_COUNT", "0"));if (firmwareAxesCount > 3) { firmwarePrimaryAxesCount = firmwareAxesCount;}else {solutions.add(new Solutions.PlainIssue(gcodeDriver, "Marlin firmware is not reporting support for rotation axes (A B C). "+gcodeDriver.getDetectedFirmware(), "Please upgrade the firmware and/or axis configuration. See the info link.", Severity.Error, "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#marlin-20"));}}else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("TinyG")) {// Having a response already means we have a new firmware.firmware = FirmwareType.TinyG;}else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Grbl")) {firmware = FirmwareType.Grbl;}else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("GcodeServer")) {firmware = FirmwareType.Generic;}else { solutions.add(new Solutions.PlainIssue(gcodeDriver, "Unknown firmware. "+gcodeDriver.getDetectedFirmware(), "Check out firmwares known to be well supported. See info link.", Severity.Warning, "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares"));}// ...
}

看了判断是否为未知固件的实现, 明白了.
原来openpnp只支持几种御用固件, 其他的固件都是未知固件.
在代码中, 看到openpnp支持的御用固件如下:

Smoothieware
Duet
Marlin
TinyG
Grbl
GcodeServer

以前和一个同学讨论, 他问一个主板是否支持openpnp, 我当时现去查, 看到有个openpnp硬件项目拟采用那个主板, 才知道那个主板可以用做openpnp的主板.

现在看了代码就很清楚了, openpnp就支持有限的几种御用主板.

如果不是openpnp主板, 而是辅助用的飞达控制板, 出现这种未知固件的警告是不用担心的, 将这个警告禁止掉就行.
飞达控制板不涉及到openpnp硬件的运动位置, 只在固定位置送料, 这种只要送料控制好使就行.

下面是openpnp未知主板固件的提示信息

                else { solutions.add(new Solutions.PlainIssue(gcodeDriver, "Unknown firmware. "+gcodeDriver.getDetectedFirmware(), "Check out firmwares known to be well supported. See info link.", Severity.Warning, "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares"));}

看到给出了官方openpnp支持的主板固件的wiki连接.
看了一下, 知道了如果用于openpnp, 主板需要支持哪些特性(GCode)

https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares

主板固件支持异步GCode驱动和高级运动控制.
不过异步GCode驱动停危险的, 同步GCode驱动就够用了.
异步GCode驱动的官方wiki GcodeAsyncDriver
高级运动控制的官方wiki Advanced Motion Control

openpnp要求的主板关键特性:

  • 支持M115命令, 用来向openpnp上报固件版本, 好让openpnp能判断固件.
  • 必须支持除了X, Y, Z之外的附加轴(A, B, C)控制, 而且可以使多个轴的混合控制好使.
  • 支持M114命令, 用来上报所有轴的位置.
  • 支持G92命令, 用来让每个轴位置归零.
  • 支持M400命令, 用来等待移动完成. 在移动完成之前, 通讯必须是阻塞的. (在M400之后, 可能会发送其他命令, 但是移动完成之前, 必须阻塞住, 不能执行后续的指令)
  • 必须支持M204(加速度控制), M201.3(禁止加速)
  • 最好内置GcodeServer控制器模拟器(可选), 用来和openpnp联调, 用来确定openpnp发送的指令能产生正确的动作和效果.

官方御用的主板和固件如下:
Duet3D => https://docs.duet3d.com/en/Duet3D_hardware/Hardware_overview

RepRapFirmware

只是固件, 板子支持多种, 没细看.

Smoothieware 官方特意说, 不支持中国同学做的山寨版冰沙, 不过都是吓唬人, 用起来挺好的.
冰沙有第三方出的新固件 => makr.zone: “Smoothieware: New Firmware for PnP”

Marlin 2.0

TinyG

备注

对换冰沙主板之外的板子, 不感兴趣. 因为都是钱和时间啊, 等以后时机到了, 再折腾其他主板.

END


http://www.ppmy.cn/news/1185687.html

相关文章

微信投票小程序源码系统+多模板一键替换 带完整的部署教程

随着微信小程序的普及&#xff0c;越来越多的企业和活动组织者选择使用微信投票小程序来实现快速、高效的投票系统。然而&#xff0c;对于许多非技术用户来说&#xff0c;开发和部署一个投票小程序可能会面临一定的困难。下面罗峰就来给大家分享一款微信投票小程序源码系统&…

分布式数据库Apache Doris HA集群部署

&#x1f4e2;&#x1f4e2;&#x1f4e2;&#x1f4e3;&#x1f4e3;&#x1f4e3; 哈喽&#xff01;大家好&#xff0c;我是【IT邦德】&#xff0c;江湖人称jeames007&#xff0c;10余年DBA及大数据工作经验 一位上进心十足的【大数据领域博主】&#xff01;&#x1f61c;&am…

038-第三代软件开发-简易视频播放器-自定义Slider (二)

第三代软件开发-简易视频播放器-自定义Slider (二) 文章目录 第三代软件开发-简易视频播放器-自定义Slider (二)项目介绍简易视频播放器自定义Slider (二)横向纵向 关键字&#xff1a; Qt、 Qml、 关键字3、 关键字4、 关键字5 项目介绍 欢迎来到我们的 QML & C 项目&…

8 模型查看

查看检查模型的方法 1 torchsummary2 netron3 tensorboardX参考 查看检查模型的方法&#xff1a; 1 torchsummary 仅仅只是打印模型&#xff0c;并不能检测模型是否准确。 summary 会计算参数量&#xff0c;等等信息&#xff0c;还会对尺寸不匹配进行报错。 1&#xff0c;安…

【资源分享】官网wukong下载太慢?完整train、test、val资源分享

【资源分享】官网wukong下载太慢&#xff1f;完整train、test、val资源分享

【影刀演示_发送邮件的格式化HTML留存】

发送邮件的格式化HTML留存 纯文本&#xff1a; 亲爱的小张: 端午节将至&#xff0c;公司为了感谢大家一年以来的辛勤工作和付出&#xff0c;特别为大家准备了京客隆超市福利卡&#xff0c;希望为大家带来些许便利和节日的喜悦。 以下是您的福利卡卡号和密码&#xff0c;请您…

Python打包成.exe文件直接运行

文章目录 前言pyinstaller.exe文件具体步骤第一步&#xff1a;安装pyinstaller第二步&#xff1a;进入要打包文件的目录第三步&#xff1a;执行文件第四步&#xff1a;发给好友 拓展尾声 前言 很多小伙伴在阅读了博主的文章后都积极与博主交流&#xff0c;在这里博主很感谢大家…

opencv 连通域操作示例代码记录connectedComponentsWithStats()函数示例

void CrelaxMyFriendDlg::OnBnClickedOk() {hdc this->GetDC()->GetSafeHdc();// TODO: 在此添加控件通知处理程序代码string imAddr "c:/Users/actorsun/Pictures/";string imAddr1 imAddr"rice.png";Mat relax1, positive;relax1 imread(imAdd…