mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-03-04 17:14:38 -07:00
hall_filament_width_sensor: Improve query outputs
QUERY_FILAMENT_WIDTH - format the calculated width in mm to four decimal places. QUERY_FILAMENT_WIDTH_RAW - remove an extra space before the ADC1 value. Signed-off-by: Ben Lye ben@lye.co.nz
This commit is contained in:
parent
393fc453de
commit
8a2bfb5c9b
1 changed files with 2 additions and 4 deletions
|
|
@ -200,8 +200,7 @@ class HallFilamentWidthSensor:
|
|||
def cmd_M407(self, gcmd):
|
||||
response = ""
|
||||
if self.diameter > 0:
|
||||
response += ("Filament dia (measured mm): "
|
||||
+ str(self.diameter))
|
||||
response += ("Filament dia (measured mm): %.4f" % (self.diameter))
|
||||
else:
|
||||
response += "Filament NOT present"
|
||||
gcmd.respond_info(response)
|
||||
|
|
@ -246,8 +245,7 @@ class HallFilamentWidthSensor:
|
|||
cmd_QUERY_RAW_FILAMENT_WIDTH_help = (
|
||||
"Report the raw filament width sensor values")
|
||||
def cmd_Get_Raw_Values(self, gcmd):
|
||||
response = "ADC1="
|
||||
response += (" "+str(self.lastFilamentWidthReading))
|
||||
response = "ADC1="+str(self.lastFilamentWidthReading)
|
||||
response += (" ADC2="+str(self.lastFilamentWidthReading2))
|
||||
response += (" RAW="+
|
||||
str(self.lastFilamentWidthReading
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue