diff --git a/configs/sim/axis/plasma/imperial.ini b/configs/sim/axis/plasma/imperial.ini index a86417ab27d..191753ece71 100644 --- a/configs/sim/axis/plasma/imperial.ini +++ b/configs/sim/axis/plasma/imperial.ini @@ -30,7 +30,7 @@ MAX_FEED_OVERRIDE = 1.5 PROGRAM_PREFIX = ../../nc_files INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 1 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INCREMENTS = 1, .1, .01, .001, .0001 MDI_HISTORY_FILE = imperial_mdi_history.txt OPEN_FILE = "" diff --git a/configs/sim/axis/plasma/metric.ini b/configs/sim/axis/plasma/metric.ini index d9d7d8ad745..59eda7ede61 100644 --- a/configs/sim/axis/plasma/metric.ini +++ b/configs/sim/axis/plasma/metric.ini @@ -30,7 +30,7 @@ MAX_FEED_OVERRIDE = 1.5 PROGRAM_PREFIX = ../../nc_files INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 1 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INCREMENTS = 10, 1, .1, .01, .001 MDI_HISTORY_FILE = metric_mdi_history.txt OPEN_FILE = "" diff --git a/configs/sim/axis/plasma/plasmac2/migrate.py b/configs/sim/axis/plasma/plasmac2/migrate.py index ed38d79b384..3eb1b12a49e 100755 --- a/configs/sim/axis/plasma/plasmac2/migrate.py +++ b/configs/sim/axis/plasma/plasmac2/migrate.py @@ -263,7 +263,7 @@ def do_ini_file(self): config[lNum] = 'TOOL_EDITOR = tooledit x y\n' done.append('te') elif section[lNum].startswith('CYCLE_TIME') and 'ct' not in done: - config[lNum] = 'CYCLE_TIME = 100\n' + config[lNum] = 'CYCLE_TIME = 0.100\n' done.append('ct') elif section[lNum].startswith('USER_COMMAND_FILE') and 'uc' not in done: config[lNum] = 'USER_COMMAND_FILE = ./plasmac2/plasmac2.py\n' @@ -282,7 +282,7 @@ def do_ini_file(self): elif option == 'te' and option not in done: config.insert(insert,'TOOL_EDITOR = tooledit x y\n') elif option == 'ct' and option not in done: - config.insert(insert,'CYCLE_TIME = 100\n') + config.insert(insert,'CYCLE_TIME = 0.100\n') elif option == 'uc' and option not in done: config.insert(insert,'USER_COMMAND_FILE = ./plasmac2/plasmac2.py\n') elif option == 'po' and option not in done: diff --git a/configs/sim/gmoccapy/6_axis.ini b/configs/sim/gmoccapy/6_axis.ini index 4a1a0179f8c..d57fc01caca 100644 --- a/configs/sim/gmoccapy/6_axis.ini +++ b/configs/sim/gmoccapy/6_axis.ini @@ -5,7 +5,7 @@ MACHINE = gmoccapy_9_axis [DISPLAY] DISPLAY = gmoccapy -CYCLE_TIME = 150 +CYCLE_TIME = 0.150 POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/7_axis.ini b/configs/sim/gmoccapy/7_axis.ini index e5d25e7fddb..67c05bc2fce 100644 --- a/configs/sim/gmoccapy/7_axis.ini +++ b/configs/sim/gmoccapy/7_axis.ini @@ -5,7 +5,7 @@ MACHINE = gmoccapy_9_axis [DISPLAY] DISPLAY = gmoccapy -CYCLE_TIME = 150 +CYCLE_TIME = 0.150 POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/7_axis_tool.ini b/configs/sim/gmoccapy/7_axis_tool.ini index 62c9b2578a3..0269d15b12c 100644 --- a/configs/sim/gmoccapy/7_axis_tool.ini +++ b/configs/sim/gmoccapy/7_axis_tool.ini @@ -5,7 +5,7 @@ MACHINE = gmoccapy_9_axis [DISPLAY] DISPLAY = gmoccapy -CYCLE_TIME = 150 +CYCLE_TIME = 0.150 POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/8_axis.ini b/configs/sim/gmoccapy/8_axis.ini index bbfd5b65dde..6e430399001 100644 --- a/configs/sim/gmoccapy/8_axis.ini +++ b/configs/sim/gmoccapy/8_axis.ini @@ -5,7 +5,7 @@ MACHINE = gmoccapy_9_axis [DISPLAY] DISPLAY = gmoccapy -CYCLE_TIME = 150 +CYCLE_TIME = 0.150 POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/9_axis.ini b/configs/sim/gmoccapy/9_axis.ini index 33fac9bce8d..6651d3cfad3 100644 --- a/configs/sim/gmoccapy/9_axis.ini +++ b/configs/sim/gmoccapy/9_axis.ini @@ -5,7 +5,7 @@ MACHINE = gmoccapy_9_axis [DISPLAY] DISPLAY = gmoccapy -CYCLE_TIME = 150 +CYCLE_TIME = 0.150 POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL PROGRAM_PREFIX = ../../nc_files/ diff --git a/configs/sim/gmoccapy/gmoccapy.ini b/configs/sim/gmoccapy/gmoccapy.ini index 217ae378d61..dbc8d1aa030 100644 --- a/configs/sim/gmoccapy/gmoccapy.ini +++ b/configs/sim/gmoccapy/gmoccapy.ini @@ -19,7 +19,7 @@ DISPLAY = gmoccapy # ERROR -q # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_4_axis.ini b/configs/sim/gmoccapy/gmoccapy_4_axis.ini index 34e0bd18085..8d07a7ab90a 100644 --- a/configs/sim/gmoccapy/gmoccapy_4_axis.ini +++ b/configs/sim/gmoccapy/gmoccapy_4_axis.ini @@ -9,7 +9,7 @@ DEBUG = 0 DISPLAY = gmoccapy # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_800x600.ini b/configs/sim/gmoccapy/gmoccapy_800x600.ini index 8c2f29bdca9..4db0639daf0 100644 --- a/configs/sim/gmoccapy/gmoccapy_800x600.ini +++ b/configs/sim/gmoccapy/gmoccapy_800x600.ini @@ -18,7 +18,7 @@ DISPLAY = gmoccapy -i # ERROR -q # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_XYZAB.ini b/configs/sim/gmoccapy/gmoccapy_XYZAB.ini index 75c0997fcd4..4cf30ac3fae 100644 --- a/configs/sim/gmoccapy/gmoccapy_XYZAB.ini +++ b/configs/sim/gmoccapy/gmoccapy_XYZAB.ini @@ -31,7 +31,7 @@ DISPLAY = gmoccapy # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_XYZAC.ini b/configs/sim/gmoccapy/gmoccapy_XYZAC.ini index 1b9348e4742..6c6fc6c8022 100644 --- a/configs/sim/gmoccapy/gmoccapy_XYZAC.ini +++ b/configs/sim/gmoccapy/gmoccapy_XYZAC.ini @@ -22,7 +22,7 @@ EMBED_TAB_LOCATION = box_right EMBED_TAB_COMMAND = gladevcp -H pendant_5_axis.hal pendant_5_axis.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_XYZCW.ini b/configs/sim/gmoccapy/gmoccapy_XYZCW.ini index 9fbb984d4f7..9e66f49c30f 100644 --- a/configs/sim/gmoccapy/gmoccapy_XYZCW.ini +++ b/configs/sim/gmoccapy/gmoccapy_XYZCW.ini @@ -18,7 +18,7 @@ DEBUG = 0 DISPLAY = gmoccapy # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_blockdelete.ini b/configs/sim/gmoccapy/gmoccapy_blockdelete.ini index 4043aa966d9..929290c0eaf 100644 --- a/configs/sim/gmoccapy/gmoccapy_blockdelete.ini +++ b/configs/sim/gmoccapy/gmoccapy_blockdelete.ini @@ -18,7 +18,7 @@ EMBED_TAB_LOCATION = box_custom_4 EMBED_TAB_COMMAND = gladevcp -x {XID} -c blockdelete -H blockdelete.hal -u blockdelete.py blockdelete.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_left_panel.ini b/configs/sim/gmoccapy/gmoccapy_left_panel.ini index 52c9d8b3a30..bb62baed7d8 100644 --- a/configs/sim/gmoccapy/gmoccapy_left_panel.ini +++ b/configs/sim/gmoccapy/gmoccapy_left_panel.ini @@ -18,7 +18,7 @@ EMBED_TAB_LOCATION = box_left EMBED_TAB_COMMAND = gladevcp -x {XID} -H v_buttonlist.hal v_buttonlist.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_messages.ini b/configs/sim/gmoccapy/gmoccapy_messages.ini index 705f051028f..039686670ff 100644 --- a/configs/sim/gmoccapy/gmoccapy_messages.ini +++ b/configs/sim/gmoccapy/gmoccapy_messages.ini @@ -14,7 +14,7 @@ DEBUG = 0 DISPLAY = gmoccapy # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_pedant.ini b/configs/sim/gmoccapy/gmoccapy_pedant.ini index 8ca75a3fd8c..9fc0762038e 100644 --- a/configs/sim/gmoccapy/gmoccapy_pedant.ini +++ b/configs/sim/gmoccapy/gmoccapy_pedant.ini @@ -18,7 +18,7 @@ EMBED_TAB_LOCATION = box_right EMBED_TAB_COMMAND = gladevcp -H pendant.hal pendant.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini b/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini index 6bfc5c446a9..6021a9d6ccf 100644 --- a/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini +++ b/configs/sim/gmoccapy/gmoccapy_pyngcgui.ini @@ -46,7 +46,7 @@ NGCGUI_SUBFILE = "" # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini b/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini index de4a5e50836..f36ef79e999 100644 --- a/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini +++ b/configs/sim/gmoccapy/gmoccapy_pyngcgui_gcmc.ini @@ -58,7 +58,7 @@ TTT_PREAMBLE = in_std.ngc # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_qt_messages.ini b/configs/sim/gmoccapy/gmoccapy_qt_messages.ini index d15480633da..e9440ee6f90 100644 --- a/configs/sim/gmoccapy/gmoccapy_qt_messages.ini +++ b/configs/sim/gmoccapy/gmoccapy_qt_messages.ini @@ -18,7 +18,7 @@ DISPLAY = gmoccapy -d # ERROR -q # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_right_panel.ini b/configs/sim/gmoccapy/gmoccapy_right_panel.ini index 62213d687d5..412af001374 100644 --- a/configs/sim/gmoccapy/gmoccapy_right_panel.ini +++ b/configs/sim/gmoccapy/gmoccapy_right_panel.ini @@ -14,7 +14,7 @@ EMBED_TAB_LOCATION = box_right EMBED_TAB_COMMAND = gladevcp -x {XID} -H vcp_box.hal vcp_box.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini b/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini index 704e64d796d..33822c1fc38 100644 --- a/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini +++ b/configs/sim/gmoccapy/gmoccapy_sim_hardware_button.ini @@ -21,7 +21,7 @@ EMBED_TAB_LOCATION = box_right EMBED_TAB_COMMAND = gladevcp -g 995x64+0+805 -H h_buttonlist.hal h_buttonlist.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini b/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini index 37daf107549..43a0adfa928 100644 --- a/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini +++ b/configs/sim/gmoccapy/gmoccapy_tool_sensor.ini @@ -26,7 +26,7 @@ EMBED_TAB_LOCATION = box_right EMBED_TAB_COMMAND = gladevcp -x {XID} -H tool_sensor.hal tool_sensor.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini b/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini index 9ac53efa54b..31150bbacc1 100644 --- a/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini +++ b/configs/sim/gmoccapy/gmoccapy_with_user_tabs.ini @@ -38,7 +38,7 @@ EMBED_TAB_COMMAND = gladevcp -q -x {XID} -H vcp_box.hal vcp_box.glade #EMBED_TAB_COMMAND = camview-emc -w {XID} # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/lathe_configs/lathe.ini b/configs/sim/gmoccapy/lathe_configs/lathe.ini index 71da9ff283d..18e6ed4b9ed 100644 --- a/configs/sim/gmoccapy/lathe_configs/lathe.ini +++ b/configs/sim/gmoccapy/lathe_configs/lathe.ini @@ -16,7 +16,7 @@ LATHE = 1 BACK_TOOL_LATHE = 0 # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/lathe_configs/lathe_C.ini b/configs/sim/gmoccapy/lathe_configs/lathe_C.ini index b47ec8d569d..a07b51b5709 100644 --- a/configs/sim/gmoccapy/lathe_configs/lathe_C.ini +++ b/configs/sim/gmoccapy/lathe_configs/lathe_C.ini @@ -16,7 +16,7 @@ LATHE = 1 BACK_TOOL_LATHE = 0 # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/lathe_configs/lathe_CW.ini b/configs/sim/gmoccapy/lathe_configs/lathe_CW.ini index e5bd6640c33..8fece8c3c4f 100644 --- a/configs/sim/gmoccapy/lathe_configs/lathe_CW.ini +++ b/configs/sim/gmoccapy/lathe_configs/lathe_CW.ini @@ -16,7 +16,7 @@ LATHE = 1 BACK_TOOL_LATHE = 0 # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/lathe_configs/lathe_backtool.ini b/configs/sim/gmoccapy/lathe_configs/lathe_backtool.ini index b49ae755431..f2d412ca466 100644 --- a/configs/sim/gmoccapy/lathe_configs/lathe_backtool.ini +++ b/configs/sim/gmoccapy/lathe_configs/lathe_backtool.ini @@ -16,7 +16,7 @@ LATHE = 1 BACK_TOOL_LATHE = 1 # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/lathe_configs/lathe_imperial.ini b/configs/sim/gmoccapy/lathe_configs/lathe_imperial.ini index e95ffdd29ac..192c788ece7 100644 --- a/configs/sim/gmoccapy/lathe_configs/lathe_imperial.ini +++ b/configs/sim/gmoccapy/lathe_configs/lathe_imperial.ini @@ -17,7 +17,7 @@ LATHE = 1 BACK_TOOL_LATHE = 0 # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/lathe_configs/lathe_macros.ini b/configs/sim/gmoccapy/lathe_configs/lathe_macros.ini index c3a49f61433..537baf04c69 100644 --- a/configs/sim/gmoccapy/lathe_configs/lathe_macros.ini +++ b/configs/sim/gmoccapy/lathe_configs/lathe_macros.ini @@ -16,7 +16,7 @@ LATHE = 1 BACK_TOOL_LATHE = 0 # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gmoccapy/plasma_config/gmoccapy_plasma.ini b/configs/sim/gmoccapy/plasma_config/gmoccapy_plasma.ini index 5e0dffb5895..5fa36351a20 100644 --- a/configs/sim/gmoccapy/plasma_config/gmoccapy_plasma.ini +++ b/configs/sim/gmoccapy/plasma_config/gmoccapy_plasma.ini @@ -23,7 +23,7 @@ EMBED_TAB_LOCATION = box_coolant_and_spindle EMBED_TAB_COMMAND = gladevcp -x {XID} -u plasma.py -H plasma.hal plasma.glade # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/gscreen/gscreen.ini b/configs/sim/gscreen/gscreen.ini index 42b90a1c5f5..3a0f44fa253 100644 --- a/configs/sim/gscreen/gscreen.ini +++ b/configs/sim/gscreen/gscreen.ini @@ -23,7 +23,7 @@ DEBUG = 0 DISPLAY = gscreen # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_SPINDLE_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/gscreen_custom/9axis.ini b/configs/sim/gscreen/gscreen_custom/9axis.ini index 89ff1072083..df7d9e91fd3 100644 --- a/configs/sim/gscreen/gscreen_custom/9axis.ini +++ b/configs/sim/gscreen/gscreen_custom/9axis.ini @@ -22,7 +22,7 @@ DEBUG = 0 DISPLAY = gscreen -c 9_axis # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_SPINDLE_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/gscreen_custom/gaxis_no_plot.ini b/configs/sim/gscreen/gscreen_custom/gaxis_no_plot.ini index e91dd76845b..2fc76719e4b 100644 --- a/configs/sim/gscreen/gscreen_custom/gaxis_no_plot.ini +++ b/configs/sim/gscreen/gscreen_custom/gaxis_no_plot.ini @@ -23,7 +23,7 @@ DEBUG = 0 DISPLAY = gscreen -c gaxis_no_plot -c # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_FEED_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/gscreen_custom/gscreen_gaxis.ini b/configs/sim/gscreen/gscreen_custom/gscreen_gaxis.ini index d27ba0bd229..cbd2800de43 100644 --- a/configs/sim/gscreen/gscreen_custom/gscreen_gaxis.ini +++ b/configs/sim/gscreen/gscreen_custom/gscreen_gaxis.ini @@ -23,7 +23,7 @@ DEBUG = 0 DISPLAY = gscreen -c gaxis -c # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_FEED_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/gscreen_custom/industrial.ini b/configs/sim/gscreen/gscreen_custom/industrial.ini index 0aa100bbfd8..f46be2e76b8 100644 --- a/configs/sim/gscreen/gscreen_custom/industrial.ini +++ b/configs/sim/gscreen/gscreen_custom/industrial.ini @@ -22,7 +22,7 @@ DEBUG = 0 DISPLAY = gscreen -c industrial -d # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_FEED_OVERRIDE = 1.2 diff --git a/configs/sim/gscreen/gscreen_custom/tester.ini b/configs/sim/gscreen/gscreen_custom/tester.ini index 3b6f6145815..797bb238e63 100644 --- a/configs/sim/gscreen/gscreen_custom/tester.ini +++ b/configs/sim/gscreen/gscreen_custom/tester.ini @@ -23,7 +23,7 @@ DEBUG = 0 DISPLAY = gscreen -c tester -d # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Prefix to be used PROGRAM_PREFIX = ../../../nc_files/ diff --git a/configs/sim/gscreen/gscreen_custom/tester_metric.ini b/configs/sim/gscreen/gscreen_custom/tester_metric.ini index e9d51848396..09ac01794fb 100644 --- a/configs/sim/gscreen/gscreen_custom/tester_metric.ini +++ b/configs/sim/gscreen/gscreen_custom/tester_metric.ini @@ -23,7 +23,7 @@ DEBUG = 0 DISPLAY = gscreen -c tester -d # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_SPINDLE_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/gscreen_mm.ini b/configs/sim/gscreen/gscreen_mm.ini index fb27c3da7c8..2c3e28fc05c 100644 --- a/configs/sim/gscreen/gscreen_mm.ini +++ b/configs/sim/gscreen/gscreen_mm.ini @@ -23,7 +23,7 @@ DEBUG = 0 DISPLAY = gscreen # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 # Highest / lowest value that will be allowed for overrides, 1.0 = 100% MAX_SPINDLE_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/ngcgui/pyngcgui_gscreen.ini b/configs/sim/gscreen/ngcgui/pyngcgui_gscreen.ini index bbc2903e276..dd440ecb6d3 100644 --- a/configs/sim/gscreen/ngcgui/pyngcgui_gscreen.ini +++ b/configs/sim/gscreen/ngcgui/pyngcgui_gscreen.ini @@ -33,7 +33,7 @@ NGCGUI_SUBFILE = iquad.ngc NGCGUI_SUBFILE = qpocket.ngc NGCGUI_SUBFILE = "" -CYCLE_TIME = 300 +CYCLE_TIME = 0.300 MAX_SPINDLE_OVERRIDE = 2.0 MIN_SPINDLE_OVERRIDE = .5 MAX_FEED_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/ngcgui/pyngcgui_gscreen_popupkeyboard.ini b/configs/sim/gscreen/ngcgui/pyngcgui_gscreen_popupkeyboard.ini index cba1b603180..fb90d8ac85b 100644 --- a/configs/sim/gscreen/ngcgui/pyngcgui_gscreen_popupkeyboard.ini +++ b/configs/sim/gscreen/ngcgui/pyngcgui_gscreen_popupkeyboard.ini @@ -33,7 +33,7 @@ NGCGUI_SUBFILE = iquad.ngc NGCGUI_SUBFILE = qpocket.ngc NGCGUI_SUBFILE = "" -CYCLE_TIME = 300 +CYCLE_TIME = 0.300 MAX_SPINDLE_OVERRIDE = 2.0 MIN_SPINDLE_OVERRIDE = .5 MAX_FEED_OVERRIDE = 2.0 diff --git a/configs/sim/gscreen/silverdragon/silverdragon.ini b/configs/sim/gscreen/silverdragon/silverdragon.ini index fe2e27123d9..853bef42ae3 100644 --- a/configs/sim/gscreen/silverdragon/silverdragon.ini +++ b/configs/sim/gscreen/silverdragon/silverdragon.ini @@ -13,7 +13,7 @@ DEBUG = 0 [DISPLAY] DISPLAY = gscreen -c silverdragon # Cycle time, in milliseconds, that display will sleep between polls -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 #PREFERENCE_FILE_PATH = /home/jim/linuxcnc/configs/sim.gscreen.gscreen_custom/silverdragon.pref # Values that will be allowed for override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 diff --git a/configs/sim/qtaxis/non-trivial/scara/scara.ini b/configs/sim/qtaxis/non-trivial/scara/scara.ini index 00ea3d2a1ca..e1a9c853255 100644 --- a/configs/sim/qtaxis/non-trivial/scara/scara.ini +++ b/configs/sim/qtaxis/non-trivial/scara/scara.ini @@ -41,7 +41,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyz.ini b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyz.ini index 8c16d5e1d20..18c3edcbdf0 100644 --- a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyz.ini +++ b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyz.ini @@ -43,7 +43,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyzw.ini b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyzw.ini index b3614ef512a..daa6718844d 100644 --- a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyzw.ini +++ b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyyzw.ini @@ -43,7 +43,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzy.ini b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzy.ini index 1430466c4dc..fd2dd0b8d56 100644 --- a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzy.ini +++ b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzy.ini @@ -43,7 +43,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzya.ini b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzya.ini index e37a803deae..10c703c6084 100644 --- a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzya.ini +++ b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_xyzya.ini @@ -47,7 +47,7 @@ MAX_ANGULAR_VELOCITY = 360 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_yyxz.ini b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_yyxz.ini index 54631bbbfd8..08fae5bc0b4 100644 --- a/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_yyxz.ini +++ b/configs/sim/qtdragon/qtdragon_multi_joint/qtdragon_yyxz.ini @@ -43,7 +43,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_tool_probe/qtdragon_auto_tool_probe.ini b/configs/sim/qtdragon/qtdragon_tool_probe/qtdragon_auto_tool_probe.ini index cd8c1cd4ae7..70844e7f20b 100644 --- a/configs/sim/qtdragon/qtdragon_tool_probe/qtdragon_auto_tool_probe.ini +++ b/configs/sim/qtdragon/qtdragon_tool_probe/qtdragon_auto_tool_probe.ini @@ -48,7 +48,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_inch.ini b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_inch.ini index 4be20c9b004..83eccf6aebe 100644 --- a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_inch.ini +++ b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_inch.ini @@ -46,7 +46,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric.ini b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric.ini index c246e1d6845..7c1bf4d7612 100644 --- a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric.ini +++ b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric.ini @@ -46,7 +46,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric_debug.ini b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric_debug.ini index b2bb0b8ddd2..d57b371d4ef 100644 --- a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric_debug.ini +++ b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_metric_debug.ini @@ -46,7 +46,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_xyza.ini b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_xyza.ini index 466f0e98085..4001459e73e 100644 --- a/configs/sim/qtdragon/qtdragon_xyz/qtdragon_xyza.ini +++ b/configs/sim/qtdragon/qtdragon_xyz/qtdragon_xyza.ini @@ -51,7 +51,7 @@ ANGULAR_INCREMENTS = 0.1 deg, 1 deg, 10 deg, 22.5 deg, 30 deg, 45 deg, 90 deg # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyza.ini b/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyza.ini index 59e43f1cb63..803ef74a639 100644 --- a/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyza.ini +++ b/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyza.ini @@ -47,7 +47,7 @@ MAX_ANGULAR_VELOCITY = 360 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzab.ini b/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzab.ini index 41dbf6364b5..fd1a3f8d3ec 100644 --- a/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzab.ini +++ b/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzab.ini @@ -47,7 +47,7 @@ MAX_ANGULAR_VELOCITY = 360 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzac.ini b/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzac.ini index 01fc99beefe..a36eca0591d 100644 --- a/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzac.ini +++ b/configs/sim/qtdragon/qtdragon_xyz45/qtdragon_xyzac.ini @@ -47,7 +47,7 @@ MAX_ANGULAR_VELOCITY = 360 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini index 605f9700ce1..4155051b119 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini @@ -49,7 +49,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini index d8e88f3b704..9db772bcd4e 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini @@ -53,7 +53,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini index 25283374243..e0f6067a822 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini @@ -49,7 +49,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyza.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyza.ini index b206ed1a7db..677819c2de4 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyza.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyza.ini @@ -50,7 +50,7 @@ INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch # Display grid increments GRIDS = 0, .1 mm, 1 mm, 2 mm, 5 mm, 10 mm, .25 in, .5 in -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzab.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzab.ini index a489db176c6..422049a2c41 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzab.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzab.ini @@ -47,7 +47,7 @@ MAX_ANGULAR_VELOCITY = 360 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzac.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzac.ini index 2d2c97b1e17..aec578684a6 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzac.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyzac.ini @@ -47,7 +47,7 @@ MAX_ANGULAR_VELOCITY = 360 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_next_xyz.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_next_xyz.ini index aaf67603a23..4e6fc2c6125 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_next_xyz.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_next_xyz.ini @@ -43,7 +43,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/qtdragon_hd_z_compensation.ini b/configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/qtdragon_hd_z_compensation.ini index 274443940af..a5d62164956 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/qtdragon_hd_z_compensation.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_z_compensation/qtdragon_hd_z_compensation.ini @@ -43,7 +43,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtvcp_screens/non-trivial/scara/scara.ini b/configs/sim/qtvcp_screens/non-trivial/scara/scara.ini index 97f588c2e34..9856cf54e46 100644 --- a/configs/sim/qtvcp_screens/non-trivial/scara/scara.ini +++ b/configs/sim/qtvcp_screens/non-trivial/scara/scara.ini @@ -42,7 +42,7 @@ DEFAULT_LINEAR_VELOCITY = 50.0 # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = silver_dragon.png INTRO_TIME = 2 diff --git a/configs/sim/qtvcp_screens/qtdragon/qtdragon_mpg.ini b/configs/sim/qtvcp_screens/qtdragon/qtdragon_mpg.ini index a28b0a1e885..9ac966639f9 100644 --- a/configs/sim/qtvcp_screens/qtdragon/qtdragon_mpg.ini +++ b/configs/sim/qtvcp_screens/qtdragon/qtdragon_mpg.ini @@ -27,7 +27,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 DEFAULT_ANGULAR_VELOCITY = 0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 0 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker.ini b/configs/sim/woodpecker/woodpecker.ini index fc6b389dc99..b2a69f96b05 100644 --- a/configs/sim/woodpecker/woodpecker.ini +++ b/configs/sim/woodpecker/woodpecker.ini @@ -26,7 +26,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 DEFAULT_ANGULAR_VELOCITY = 0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 0 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker_auto_tool_probe.ini b/configs/sim/woodpecker/woodpecker_auto_tool_probe.ini index e8fe3935119..cca4c3747bd 100644 --- a/configs/sim/woodpecker/woodpecker_auto_tool_probe.ini +++ b/configs/sim/woodpecker/woodpecker_auto_tool_probe.ini @@ -28,7 +28,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 DEFAULT_ANGULAR_VELOCITY = 0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 0 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker_xyz.ini b/configs/sim/woodpecker/woodpecker_xyz.ini index 911f2c576b0..a1ab67d0140 100644 --- a/configs/sim/woodpecker/woodpecker_xyz.ini +++ b/configs/sim/woodpecker/woodpecker_xyz.ini @@ -30,7 +30,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 60 DEFAULT_ANGULAR_VELOCITY = 30 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker_xyza.ini b/configs/sim/woodpecker/woodpecker_xyza.ini index 1226c5e7e00..c4a3a2765fe 100644 --- a/configs/sim/woodpecker/woodpecker_xyza.ini +++ b/configs/sim/woodpecker/woodpecker_xyza.ini @@ -31,7 +31,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 60 DEFAULT_ANGULAR_VELOCITY = 30 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker_xyzab.ini b/configs/sim/woodpecker/woodpecker_xyzab.ini index d6229b133c6..94f47afdc0e 100644 --- a/configs/sim/woodpecker/woodpecker_xyzab.ini +++ b/configs/sim/woodpecker/woodpecker_xyzab.ini @@ -36,7 +36,7 @@ NGCGUI_SUBFILE_PATH = /home/.../linuxcnc/nc_files/ngcgui_lib/ # specify filenames only, files must be in the NGCGUI_SUBFILE_PATH NGCGUI_SUBFILE = slot.ngc NGCGUI_SUBFILE = qpocket.ngc -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker_xyzy.ini b/configs/sim/woodpecker/woodpecker_xyzy.ini index 18f793993f4..89f69995419 100644 --- a/configs/sim/woodpecker/woodpecker_xyzy.ini +++ b/configs/sim/woodpecker/woodpecker_xyzy.ini @@ -29,7 +29,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 60 DEFAULT_ANGULAR_VELOCITY = 30 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/configs/sim/woodpecker/woodpecker_xyzya.ini b/configs/sim/woodpecker/woodpecker_xyzya.ini index 3f0ba0c3b57..e133abe5bc0 100644 --- a/configs/sim/woodpecker/woodpecker_xyzya.ini +++ b/configs/sim/woodpecker/woodpecker_xyzya.ini @@ -32,7 +32,7 @@ DEFAULT_LINEAR_JOG_VEL = 50.0 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 60 DEFAULT_ANGULAR_VELOCITY = 30 -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 2 PROGRAM_PREFIX = ~/linuxcnc/nc_files diff --git a/docs/src/config/ini-config.adoc b/docs/src/config/ini-config.adoc index 4980de30b1d..0ad3317d03e 100644 --- a/docs/src/config/ini-config.adoc +++ b/docs/src/config/ini-config.adoc @@ -356,11 +356,12 @@ Descriptions of the interfaces are in the Interfaces section of the User Manual. The `PROGRAM_PREFIX` directory is searched before the directories listed in `[RS274]SUBROUTINE_PATH` and `[RS274]USER_M_PATH`. * `INTRO_GRAPHIC = emc2.gif` - The image shown on the splash screen. * `INTRO_TIME = 5` - The maximum time to show the splash screen, in seconds. -* `CYCLE_TIME = 100` - Cycle time of the display GUI. - Depending on the screen, this can be in seconds or ms (ms preferred). - This is often the update rate rather then sleep time between updates. +* `CYCLE_TIME = 0.100` - Cycle time of the display GUI, in seconds. + A value from 0.001 up to but not including 1.0 is in seconds; a value of 1.0 or more is read as milliseconds, so `100` also means 0.1 s. + Any other value (zero, negative or not a number) gives a warning and the GUI uses 0.150 s, as it does when the setting is missing. + This is often the update rate rather than sleep time between updates. If the update time is not set right the screen can become unresponsive or very jerky. - A value of 100 ms (0.1 s) is a common setting though a range of 50 - 200 ms (.05 - .2 s) may be useable. + A value of 0.1 s is a common setting though a range of 0.05 - 0.2 s may be useable. An under powered CPU may see improvement with a longer setting. Usually the default is fine. * `PREVIEW_TIMEOUT = 5` - Timeout (in seconds) for loading graphical preview of G-code. Currently AXIS only. diff --git a/docs/src/gui/axis.adoc b/docs/src/gui/axis.adoc index caa94c9d104..341ea500526 100644 --- a/docs/src/gui/axis.adoc +++ b/docs/src/gui/axis.adoc @@ -34,15 +34,14 @@ works see the <> and the <> of the INI Configuration Chapter. -* 'CYCLE_TIME' - Adjust the response rate of the GUI in - milliseconds. Typical 100, useable range 50 - 200 + - (will accept time in seconds (.05 -.2) for legacy reasons - - milliseconds preferred to match other screens). +* 'CYCLE_TIME' - Adjust the response rate of the GUI, in seconds. + Typical 0.1, useable range 0.05 - 0.2, default 0.15. + A value of 1.0 or more is read as milliseconds. [source,ini] ---- [DISPLAY] -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 ---- * 'PREVIEW_TIMEOUT' - Set timeout in seconds for loading G-code preview. diff --git a/docs/src/gui/gui-dev-reference.adoc b/docs/src/gui/gui-dev-reference.adoc index f126756f2dc..1ba52f6ee20 100644 --- a/docs/src/gui/gui-dev-reference.adoc +++ b/docs/src/gui/gui-dev-reference.adoc @@ -52,13 +52,15 @@ ICON = silver_dragon.png ==== Cycle Time If settable, this is how to set the cycle time of the display GUI. + -This is often the update rate rather then sleep time between updates. + -A value of 100 ms (0.1 s) is a common setting though a range of 50 - 200 ms is not unheard of. +This is often the update rate rather than sleep time between updates. + +The value is in seconds: 0.1 s is a common setting though a range of 0.05 - 0.2 s is not unheard of. + +A value from 0.001 up to but not including 1.0 is in seconds; a value of 1.0 or more is read as milliseconds. + +Python screens read it with `display_cycle_time()` from `common.cycle_time`, which returns milliseconds and reports invalid values. [source,ini] ---- [DISPLAY] -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 ---- ==== File Paths diff --git a/docs/src/gui/qtvcp.adoc b/docs/src/gui/qtvcp.adoc index c280f369bc4..428ca9ffe8e 100644 --- a/docs/src/gui/qtvcp.adoc +++ b/docs/src/gui/qtvcp.adoc @@ -124,13 +124,14 @@ QtVCP will first search the LinuxCNC configuration directory that was launched f [source,ini] ---- [DISPLAY] -CYCLE_TIME = 100 +CYCLE_TIME = 0.100 GRAPHICS_CYCLE_TIME = 100 -HALPIN_CYCLE = 100 +HALPIN_CYCLE_TIME = 100 ---- -Adjusts the response rate of the GUI updates in milliseconds. -Defaults to 100, useable range 50 - 200. +Adjusts the response rate of the GUI updates, useable range 0.05 - 0.2 s. +`CYCLE_TIME` is in seconds, default 0.15; a value of 1.0 or more is read as milliseconds. +`GRAPHICS_CYCLE_TIME` and `HALPIN_CYCLE_TIME` are in milliseconds, default 100. The widgets, graphics and HAL pin update can be set separately. diff --git a/lib/python/common/cycle_time.py b/lib/python/common/cycle_time.py new file mode 100644 index 00000000000..822d4748e3f --- /dev/null +++ b/lib/python/common/cycle_time.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# vim: sts=4 sw=4 et +""" +[DISPLAY]CYCLE_TIME handling shared by the GUIs and VCPs. + +The value is in seconds: from 0.001 up to but not including 1.0. A value +of 1.0 or more is read as milliseconds. Anything else (zero, negative, +non-numeric) is reported and replaced by the default of 0.150 s. A +missing value silently uses the default. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +""" + +import math +import sys + +DEFAULT_MS = 150 + +_reported = set() + + +def parse_cycle_time(value): + """Convert a raw [DISPLAY]CYCLE_TIME string to milliseconds. + + Returns (milliseconds, message). message is None unless the value + is present but invalid, in which case milliseconds is DEFAULT_MS. + """ + if value is None: + return DEFAULT_MS, None + try: + t = float(value) + except (TypeError, ValueError): + t = math.nan + if math.isfinite(t): + if 0.001 <= t < 1.0: + return int(math.floor(t * 1000.0 + 0.5)), None + if t >= 1.0: + return int(math.floor(t + 0.5)), None + return DEFAULT_MS, ("[DISPLAY]CYCLE_TIME = {} is invalid, expected seconds " + "(0.001 to below 1.0) or milliseconds (1 or more): " + "using {:.3f} s".format(value, DEFAULT_MS / 1000.0)) + + +def display_cycle_time(inifile, warn=None): + """Read [DISPLAY]CYCLE_TIME from a linuxcnc.ini object, in milliseconds. + + warn is called with the message for an invalid value. Without warn + the message goes to stderr, unless another reader in the same process + already reported it. + """ + ms, message = parse_cycle_time(inifile.find("DISPLAY", "CYCLE_TIME")) + if message: + if warn is not None: + warn(message) + elif message not in _reported: + print(message, file=sys.stderr) + _reported.add(message) + return ms diff --git a/lib/python/common/hal_glib.py b/lib/python/common/hal_glib.py index 6227a3dae3b..23f714f2b37 100644 --- a/lib/python/common/hal_glib.py +++ b/lib/python/common/hal_glib.py @@ -12,6 +12,7 @@ # Set up logging from . import logger +from .cycle_time import display_cycle_time, DEFAULT_MS # log instance holder variable LOG = None @@ -38,15 +39,10 @@ except: pass try: - # get cycle time which could be in ms or seconds - # convert to ms - use this to set update time - ct = inifile.getreal('DISPLAY', 'CYCLE_TIME', fallback=100) - if ct < 1: - CYCLE_TIME = int(ct * 1000) - else: - CYCLE_TIME = int(ct) + # update time in ms, see common/cycle_time.py for the units + CYCLE_TIME = display_cycle_time(inifile) except: - CYCLE_TIME = 100 + CYCLE_TIME = DEFAULT_MS class GPin(GObject.Object, hal.Pin): __gtype_name__ = 'GPin' diff --git a/lib/python/common/iniinfo.py b/lib/python/common/iniinfo.py index 2f429affe6b..d1e969681e4 100644 --- a/lib/python/common/iniinfo.py +++ b/lib/python/common/iniinfo.py @@ -5,6 +5,7 @@ # Set up logging from . import logger +from .cycle_time import display_cycle_time # log instance holder variable LOG = None @@ -57,13 +58,9 @@ def __init__(self, ini=None): self.update() def update(self): - ct = self.INI.getreal('DISPLAY', 'CYCLE_TIME', fallback=100) # possibly in seconds or ms - if ct < 1: - self.CYCLE_TIME = int(ct * 1000) - else: - self.CYCLE_TIME = int(ct) - self.GRAPHICS_CYCLE_TIME = self.INI.getint('DISPLAY', 'GRAPHICS_CYCLE_TIME', fallback=100) # in seconds - self.HALPIN_CYCLE_TIME = self.INI.getint('DISPLAY', 'HALPIN_CYCLE_TIME', fallback=100) # in seconds + self.CYCLE_TIME = display_cycle_time(self.INI, LOG.warning) # in ms + self.GRAPHICS_CYCLE_TIME = self.INI.getint('DISPLAY', 'GRAPHICS_CYCLE_TIME', fallback=100) # in ms + self.HALPIN_CYCLE_TIME = self.INI.getint('DISPLAY', 'HALPIN_CYCLE_TIME', fallback=100) # in ms self.MDI_HISTORY_PATH = self.INI.getstring('DISPLAY', 'MDI_HISTORY_FILE', fallback='~/.axis_mdi_history') self.QTVCP_LOG_HISTORY_PATH = self.INI.getstring('DISPLAY', 'LOG_FILE', fallback='~/qtvcp.log') self.MACHINE_LOG_HISTORY_PATH = self.INI.getstring('DISPLAY', 'MACHINE_LOG_PATH', fallback='~/.machine_log_history') diff --git a/src/emc/usr_intf/axis/scripts/axis.py b/src/emc/usr_intf/axis/scripts/axis.py index 9477cca0332..58c7d3d770a 100755 --- a/src/emc/usr_intf/axis/scripts/axis.py +++ b/src/emc/usr_intf/axis/scripts/axis.py @@ -72,6 +72,7 @@ def tkerror(self, arg): import bwidget from math import hypot, atan2, sin, cos, pi, sqrt import linuxcnc +from common.cycle_time import display_cycle_time from glnav import * if "AXIS_NO_HAL" in os.environ: @@ -3660,11 +3661,7 @@ def bind_axis(a, b, d): homing_order_defined = 0 break -ct = inifile.getreal('DISPLAY', 'CYCLE_TIME', fallback=.020) -if ct < 1: - update_ms = int(ct * 1000) -else: - update_ms = int(ct) +update_ms = display_cycle_time(inifile) interpname = inifile.getstring("TASK", "INTERPRETER", fallback="") s = linuxcnc.stat(); diff --git a/src/emc/usr_intf/gmoccapy/getiniinfo.py b/src/emc/usr_intf/gmoccapy/getiniinfo.py index 7bae0da9975..ab71eca9c70 100644 --- a/src/emc/usr_intf/gmoccapy/getiniinfo.py +++ b/src/emc/usr_intf/gmoccapy/getiniinfo.py @@ -30,6 +30,7 @@ # Set up logging from common import logger +from common.cycle_time import display_cycle_time LOG = logger.getLogger(__name__) # Force the log level for this module @@ -47,20 +48,7 @@ def __init__(self): sys.exit() def get_cycle_time(self): - temp = self.inifile.getreal("DISPLAY", "CYCLE_TIME") - if temp is not None: - # Can be in seconds or milliseconds and, regardless, - # the result must be larger than zero to be valid. - # This brings gmoccapy in line with f.ex. AXIS. - if temp >= 0.001 and temp < 1.0: - return int(temp * 1000.0) # Assume seconds - elif temp >= 1.0: - return int(temp) # Assume milliseconds - # Otherwise, undefined or less or equal to zero - message = ("Wrong entry [DISPLAY] CYCLE_TIME in INI File! ") - message += ("Will use gmoccapy default 150") - LOG.warning(message) - return 150 + return display_cycle_time(self.inifile, LOG.warning) def get_postgui_halfile(self): postgui_halfile = self.inifile.findall("HAL", "POSTGUI_HALFILE") or None diff --git a/src/emc/usr_intf/gscreen/gscreen.py b/src/emc/usr_intf/gscreen/gscreen.py index 6a89904ca69..f82df55baf9 100755 --- a/src/emc/usr_intf/gscreen/gscreen.py +++ b/src/emc/usr_intf/gscreen/gscreen.py @@ -196,6 +196,7 @@ def _print_help(): pass import linuxcnc import axis_kinds +from common.cycle_time import display_cycle_time from gscreen import emc_interface from gscreen import mdi from gscreen import preferences @@ -855,13 +856,10 @@ def __init__(self): self.halcomp.ready() # timers for display updates - temp = self.inifile.getreal("DISPLAY","CYCLE_TIME") - if not temp: - self.add_alarm_entry(_("CYCLE_TIME in [DISPLAY] of INI file is missing: defaulting to 100ms")) - temp = 100 - elif temp < 50: - self.add_alarm_entry(_("CYCLE_TIME in [DISPLAY] of INI file is too small: defaulting to 100ms")) - temp = 100 + def cycle_time_warning(message): + LOG.warning(message) + self.add_alarm_entry(message) + temp = display_cycle_time(self.inifile, cycle_time_warning) #print(_("timeout %d" % int(temp))) if "timer_interrupt" in dir(self.handler_instance): GLib.timeout_add(int(temp), self.handler_instance.timer_interrupt) diff --git a/src/emc/usr_intf/pncconf/build_INI.py b/src/emc/usr_intf/pncconf/build_INI.py index 379978a4cff..0df0b969672 100644 --- a/src/emc/usr_intf/pncconf/build_INI.py +++ b/src/emc/usr_intf/pncconf/build_INI.py @@ -134,7 +134,7 @@ def write_inifile(self, base): if self.d.frontend != _PD._QTPLASMAC: print("EDITOR = %s"% self.d.editor, file=file) print("GEOMETRY = %s"% self.d.geometry, file=file) - print("CYCLE_TIME = 100", file=file) + print("CYCLE_TIME = 0.100", file=file) # set up MDI macro buttons if self.d.frontend == _PD._QTDRAGON: diff --git a/tcl/tklinuxcnc.tcl b/tcl/tklinuxcnc.tcl index d35db338406..6c0f89981ac 100755 --- a/tcl/tklinuxcnc.tcl +++ b/tcl/tklinuxcnc.tcl @@ -107,12 +107,19 @@ for {set idx 0} {$idx < $::MAX_JOINTS} {incr idx} { set jointlabel$idx "$idx" } -# set the cycle time for display updating +# set the cycle time for display updating, in ms +# the INI value is seconds, 0.001 to below 1.0; 1 or more is read as ms +set displayCycleTime 150 set temp [emc_ini "CYCLE_TIME" "DISPLAY"] -if {[string length $temp] == 0} { - set temp 0.200 +if {[string length $temp] != 0} { + if {[string is double -strict $temp] && $temp >= 0.001 && $temp < 1.0} { + set displayCycleTime [expr {round($temp * 1000)}] + } elseif {[string is double -strict $temp] && $temp >= 1.0 && $temp < Inf} { + set displayCycleTime [expr {round($temp)}] + } else { + puts stderr "$::prog: \[DISPLAY\]CYCLE_TIME = $temp is invalid, expected seconds (0.001 to below 1.0) or milliseconds (1 or more): using 0.150 s" + } } -set displayCycleTime [expr {int($temp * 1000 + 0.5)}] set syncDelayTime $displayCycleTime ;#increasing improves slider behavior # set the debounce time for key repeats diff --git a/tests/display-cycle-time/expected b/tests/display-cycle-time/expected new file mode 100644 index 00000000000..ac0535cdb63 --- /dev/null +++ b/tests/display-cycle-time/expected @@ -0,0 +1,25 @@ +None => 150 ok +'0.0009' => 150 warning +'0.001' => 1 ok +'0.1' => 100 ok +'0.5' => 500 ok +'0.999' => 999 ok +'1' => 1 ok +'1.0' => 1 ok +'100' => 100 ok +'150.4' => 150 ok +'-0.1' => 150 warning +'-100' => 150 warning +'0' => 150 warning +'' => 150 warning +'abc' => 150 warning +'100ms' => 150 warning +'nan' => 150 warning +'inf' => 150 warning +250 +150 +150 +callback: [DISPLAY]CYCLE_TIME = -5 is invalid, expected seconds (0.001 to below 1.0) or milliseconds (1 or more): using 0.150 s +150 stderr: (none) +150 stderr: [DISPLAY]CYCLE_TIME = x is invalid, expected seconds (0.001 to below 1.0) or milliseconds (1 or more): using 0.150 s +150 stderr: (none) diff --git a/tests/display-cycle-time/test b/tests/display-cycle-time/test new file mode 100755 index 00000000000..088f37147d9 --- /dev/null +++ b/tests/display-cycle-time/test @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 +# [DISPLAY]CYCLE_TIME parsing shared by the Python GUIs (issue #4424): +# 0.001 <= value < 1.0 is seconds, value >= 1.0 is milliseconds, +# anything else warns and uses 150 ms, as a missing value does. + +import contextlib +import io + +from common.cycle_time import parse_cycle_time, display_cycle_time + +for raw in [None, "0.0009", "0.001", "0.1", "0.5", "0.999", "1", "1.0", + "100", "150.4", "-0.1", "-100", "0", "", "abc", "100ms", + "nan", "inf"]: + ms, message = parse_cycle_time(raw) + print("{!r} => {} {}".format(raw, ms, "warning" if message else "ok")) + + +class FakeIni: + def __init__(self, value): + self.value = value + + def find(self, section, key): + assert (section, key) == ("DISPLAY", "CYCLE_TIME") + return self.value + + +warnings = [] +print(display_cycle_time(FakeIni("0.25"), warnings.append)) +print(display_cycle_time(FakeIni(None), warnings.append)) +print(display_cycle_time(FakeIni("-5"), warnings.append)) +for w in warnings: + print("callback:", w) + +# without a callback: stderr, but only if not yet reported in this process +for value in ["-5", "x", "x"]: + err = io.StringIO() + with contextlib.redirect_stderr(err): + ms = display_cycle_time(FakeIni(value)) + print(ms, "stderr:", err.getvalue().strip() or "(none)")