Update PrinterMiscPanel to modify G-code scripts for LCD and BEEPER control
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

- Changed the script for controlling the LCD backlight to use the SET_PIN command with the appropriate pin name.
- Updated the BEEPER control script to utilize the SET_PIN command, adjusting the value format for consistency in handling sound output.
This commit is contained in:
Tom Butcher 2026-08-01 19:37:02 +01:00
parent 1cc77390df
commit 00f55d44bf

View File

@ -103,7 +103,7 @@ const PrinterMiscPanel = ({
sendObjectAction(id, 'printer', {
type: 'gcodeScript',
data: {
script: `SET_LCD LCD=lcd_backlight BRIGHTNESS=${value}`
script: `SET_PIN PIN=LCD_backlight_pin VALUE=${value}`
}
})
}
@ -114,7 +114,7 @@ const PrinterMiscPanel = ({
sendObjectAction(id, 'printer', {
type: 'gcodeScript',
data: {
script: `M300 S440 P200 V${Math.round(value * 100)}`
script: `SET_PIN PIN=BEEPER_pin VALUE=${Math.round(value * 1000)}.00`
}
})
}