Skip to content

Commit

Permalink
Fix typos thanks @michmela44 for raising them
Browse files Browse the repository at this point in the history
Fix discrepancy between Interface setting and probe panel for probethickness setting thanks @michmela44 for raising it
Fix bug for step validation due to bug with float and operator %
Fix glitch UI when error in Probe panel (Note Probe button is not yet disabled if any error,  need to add API for that later)
Add missing blur  / haptic in buttons of probecnc and lasercnc panels
Bump version
Rebuild packages
  • Loading branch information
luc-github committed Dec 30, 2023
1 parent 7b1a520 commit 71331cb
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 26 deletions.
Binary file modified dist/CNC/GRBL/index.html.gz
Binary file not shown.
Binary file modified dist/CNC/GRBLHal/index.html.gz
Binary file not shown.
Binary file modified dist/Plotter/HP-GL/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin-embedded/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Repetier/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Smoothieware/index.html.gz
Binary file not shown.
Binary file modified dist/SandTable/GRBL/index.html.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions languages/cncgrblhalpack/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@
"CN77": "Enable mist coolant",
"CN78": "Enable flood coolant",
"CN79": "Disable coolant",
"CN80": "Toogle controls",
"CN81": "Toogle spindle state",
"CN82": "Toogle flood state",
"CN83": "Toogle mist state",
"CN80": "Toggle controls",
"CN81": "Toggle spindle state",
"CN82": "Toggle flood state",
"CN83": "Toggle mist state",
"CN84": "Maximum power",
"CN85": "Test duration",
"CN86": "Test",
Expand Down
8 changes: 4 additions & 4 deletions languages/cncgrblpack/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@
"CN77": "Enable mist coolant",
"CN78": "Enable flood coolant",
"CN79": "Disable coolant",
"CN80": "Toogle controls",
"CN81": "Toogle spindle state",
"CN82": "Toogle flood state",
"CN83": "Toogle mist state",
"CN80": "Toggle controls",
"CN81": "Toggle spindle state",
"CN82": "Toggle flood state",
"CN83": "Toggle mist state",
"CN84": "Maximum power",
"CN85": "Test duration",
"CN86": "Test",
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
import { h } from 'preact'
import { webUIbuild } from '../../targets'
export const webUIversion = '3.0.0-a46'
export const webUIversion = '3.0.0-a47'
export const Esp3dVersion = () => (
<span>
{webUIversion}.{webUIbuild}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Panels/LaserCNC.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const LaserPanel = () => {
command: "M3 S#",
desc: "M3",
mode: "spindle_mode",
onclick: () => {
onclick: (e) => {
const commands = [
"G1 F1",
() => {
Expand Down Expand Up @@ -220,6 +220,8 @@ const LaserPanel = () => {
},
"M5 S0",
]
e.target.blur()
useUiContextFn.haptic()
commands.forEach((command) => {
if (typeof command === "function") {
sendCommand(command())
Expand Down
35 changes: 31 additions & 4 deletions src/components/Panels/ProbeCNC.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,24 +307,34 @@ const ProbePanel = () => {
type: 'number',
label: 'CN94',
tooltip: 'CN94',
min: 1,
min: 0,
step: "0.1",
value: probethickness,
append: 'CN96',
variableName: '#probe_thickness#',
},
],
},

{
id: 'spacer',
elements: [
{
id: 'spacer',
type: 'm2',
},
],
},
{
id: 'probe_buttons',
elements: [
{
id: 'probe_button',
m2: true,
icon: <Underline />,
type: 'button',
label: 'CN37',
tooltip: 'CN100',
onclick: () => {
onclick: (e) => {
const commands = [
'G91',
() => {
Expand All @@ -349,7 +359,8 @@ const ProbePanel = () => {
.getValue('probepostcommand')
.split(';'),
]

e.target.blur()
useUiContextFn.haptic()
commands.forEach((command) => {
if (typeof command === 'function') {
sendCommand(command())
Expand Down Expand Up @@ -406,6 +417,11 @@ const ProbePanel = () => {
return (
<div class="states-buttons-container">
{control.elements.map((element) => {
if (element.type === 'm2') {
return (
<div class="m-2" />
)
} else
if (element.type === 'button') {
let classname = 'tooltip'
return (
Expand Down Expand Up @@ -474,6 +490,15 @@ const ProbePanel = () => {
element.options
)[0].value
}
if (typeof element.step!=="undefined") {
//hack to avoid float precision issue
const mult=1/element.step
console.log(element.value.current,element.step,mult, (element.value.current * mult ) % (element.step* mult))
if ((element.value.current * mult ) % (element.step* mult) != 0) {
console.log("not valid", )
validation.valid = false
}
}
if (
element.type ===
'number' &&
Expand All @@ -490,6 +515,7 @@ const ProbePanel = () => {
// validation.message = T("S42");
validation.valid = false
}

element.value.valid =
validation.valid
return validation
Expand Down Expand Up @@ -526,6 +552,7 @@ const ProbePanel = () => {
)}
min={element.min}
max={element.max}
step={element.step}
value={
element.value
.current
Expand Down
8 changes: 5 additions & 3 deletions src/tabs/interface/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ const InterfaceTab = () => {
})
}
} else {
if (fieldData.step) {
if (fieldData.value % fieldData.step !== 0) {
if (typeof fieldData.step!=="undefined") {
//hack to avoid float precision issue
const mult=1/fieldData.step
if ((fieldData.value * mult ) % (fieldData.step* mult) != 0) {
validation.message = <Flag size="1rem" color="red" />
validation.valid = false
}
}
}
if (fieldData.type == "list") {
const stringified = JSON.stringify(fieldData.value)
//check new item or modified item
Expand Down
3 changes: 2 additions & 1 deletion src/targets/CNC/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@
"label": "CN93",
"value": 15,
"append": "CN96",
"min": 1
"min": 0
},
{
"id": "probethickness",
"type": "number",
"label": "CN94",
"value": "1",
"step": "0.1",
"append": "CN96",
"min": 0
},
Expand Down
8 changes: 4 additions & 4 deletions src/targets/CNC/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
"CN77": "Enable mist coolant",
"CN78": "Enable flood coolant",
"CN79": "Disable coolant",
"CN80": "Toogle controls",
"CN81": "Toogle spindle state",
"CN82": "Toogle flood state",
"CN83": "Toogle mist state",
"CN80": "Toggle controls",
"CN81": "Toggle spindle state",
"CN82": "Toggle flood state",
"CN83": "Toggle mist state",
"CN84": "Maximum power",
"CN85": "Test duration",
"CN86": "Test",
Expand Down
2 changes: 1 addition & 1 deletion src/targets/Plotter/HP-GL/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"btnjogup": "Button jog top",
"btnjogdown": "Button jog bottom",
"btnpark": "Park Pen",
"btnPen": "Toogle Pen",
"btnPen": "Toggle Pen",
"btndistSel+": "Next jog distance",
"btndistSel-": "Previous jog distance",
"btnStop": "Stop",
Expand Down
2 changes: 1 addition & 1 deletion src/targets/Printer3D/Marlin-embedded/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const getFeedRate = (str) => {

////////////////////////////////////////////////////////
//
// Printer capabbility
// Printer capabilities
//Format is:
//FIRMWARE_NAME:Marlin 2.0.9.1 (Sep 8 2021 17:07:06) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:MRR ESPA EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
//Cap:SERIAL_XON_XOFF:0
Expand Down
2 changes: 1 addition & 1 deletion src/targets/Printer3D/Repetier/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const getFlowRate = (str) => {

////////////////////////////////////////////////////////
//
// Printer capabbility
// Printer capabilities
//Format is:
//FIRMWARE_NAME:Repetier_1.0.4 COMPILED:Apr 30 2022 FIRMWARE_URL:https://github.com/repetier/Repetier-Firmware/ PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1 REPETIER_PROTOCOL:3
//Cap:PROGRESS:1
Expand Down
2 changes: 1 addition & 1 deletion src/targets/Printer3D/Smoothieware/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const getFeedRate = (str) => {

////////////////////////////////////////////////////////
//
// Printer capabbility
// Printer capabilities
//Format is:
//FIRMWARE_NAME:Smoothieware, FIRMWARE_URL:http%3A//smoothieware.org, X-SOURCE_CODE_URL:https://github.com/Smoothieware/Smoothieware, FIRMWARE_VERSION:edge-f7df5f1, PROTOCOL_VERSION:1.0, X-FIRMWARE_BUILD_DATE:Aug 14 2021 21:01:19, X-SYSTEM_CLOCK:100MHz, X-AXES:5, X-GRBL_MODE:0, X-ARCS:1, X-CNC:0, X-MSD:1, X-WARNING:deprecated_MCU
//...
Expand Down

0 comments on commit 71331cb

Please sign in to comment.