首先,按照我的文章(https://blog.csdn.net/lwpo2008/article/details/131445737)通过kiauh安装klipper、moonraker以及fluid之后,出现了报错信息:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/thermal/thermal_zone0/temp'
这是因为海纳斯系统没有标准处理linux系统的温度信息,并没有生成‘/sys/class/thermal/thermal_zone0/temp
’文件。海纳斯系统将温度保存在了“/proc/msp/pm_cpu
”文件当中。为了使得klipper正常使用,需要改变“~/klipper/klippy/extras/temperature_host.py
"的代码。
然后打开~/klipper/klippy/extras/temperature_host.py
文件,
将所有代码删掉,换成以下代码:
# Support for Raspberry Pi temperature sensor
#
# Copyright (C) 2020 Al Crate <[email protected]>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging
import re #add module
HOST_REPORT_TIME = 1.0
RPI_PROC_TEMP_FILE = "/proc/msp/pm_cpu"
class Temperature_HOST: