LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

HALUI - added pin mdi_is_running #2945

Open zz912 opened 3 months ago

zz912 commented 3 months ago

I added another HAL pin for halui.

mdi_is_running is TRUE while MDI_COMMAND is running

mdi_is_running exists only if some MDI_COMMAND exists

mdi_is_running can be used for: 1) GUI developer for disable switching display modes MDI / manual 2) GUI developer for waiting finish 3) users they need know finish of MDI_COMMANDS

mdi_is_running is not same as status "NOT IDLE" mdi_is_running is TRUE before activate MDI mode mdi_is_running is FALSE after leaving MDI mode

halui_mdi_is_running osciloscop

zz912 commented 3 months ago

I dont know why some checks were not successful. Any idea? RIP compilation on physical PC was without problems.

hansu commented 3 months ago

I dont know why some checks were not successful. Any idea? RIP compilation on physical PC was without problems.

Does the test tests/halui/jogging succeeds on your machine?

zz912 commented 3 months ago

I dont know why some checks were not successful. Any idea? RIP compilation on physical PC was without problems.

Does the test tests/halui/jogging succeeds on your machine?

No, thank you.

zz912 commented 3 months ago

1) Checks are successful: The code made problems in situation: num_mdi_commands = 0 It is fixed now

2) Added waiting after change program_is_idle and mode_is_mdi. halscope-mdi-is-running Sleep time in halui component is longer only if mode_is_mdi == 1

c-morley commented 3 months ago

'mdi_is_running' - that name implies any mdi command is running. Is this pin only for halui's mdi commands running?

zz912 commented 3 months ago

Is this pin only for halui's mdi commands running?

Yes

If you can think of a better pin name, it's not a problem to change it.

halui_mdi_is_running ? hal_mdi_is_run ? halui_mdi_run ? ...

The full name is halui.mdi_is_running

andypugh commented 3 months ago

I don't think that this belongs in 2.9 as that it meant to now be bugfixes only. Can you rebase it on master? (it's probably neater to cherry-pick it in git rather than try to use the actual rebase command)

zz912 commented 3 months ago

Checks are not succesfull in master branch. I must fix it.

zz912 commented 2 months ago

I would like to ask @c-morley to comment on the naming of the pin. I have no problem changing it, but I need to know what is acceptable.

c-morley commented 1 month ago

@zz912 I think halui.halui-mdi-is-running (hyphens not underscore)