Configtool: add some formatting to collected help texts.

Tooltips don't size their box after line lengths, but have their
own idea on how wide to make it. Accordingly one should display
text with newlines only for paragraph delimiters.

This also required adjustments to all the board and printer
description comments. No functional change there.

This should solve issue #148.
This commit is contained in:
Markus Hitter 2015-05-25 16:40:23 +02:00
parent 2f8ed0dbeb
commit 0991e4a41f
17 changed files with 101 additions and 66 deletions

View File

@ -196,8 +196,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO14, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -187,8 +187,9 @@ DEFINE_TEMP_SENSOR(noheater, TT_INTERCOM, AIO0, 0)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -191,8 +191,9 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, AIO5, THERMISTOR_EXTRUDER)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -200,8 +200,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO2, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -201,8 +201,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO0, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -197,8 +197,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -200,8 +200,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO14, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -200,8 +200,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO11, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -198,8 +198,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -198,8 +198,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -198,8 +198,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO0, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -196,8 +196,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -196,8 +196,9 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO0, THERMISTOR_BED)
device has the index 0 (zero).
Set 'pwm' to ...
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
1 for using PWM on a PWM-able pin and on/off on other pins.
0 for using on/off on a PWM-able pin, too.
Using PWM usually gives smoother temperature control but can conflict
with slow switches, like solid state relays. PWM frequency can be
influenced globally with FAST_PWM, see below.

View File

@ -10,13 +10,15 @@
Valid values (see dda_kinematics.h):
KINEMATICS_STRAIGHT Motors move axis directions directly. This is the
traditional type, found in many printers, including
Mendel, Prusa i3, Mendel90, Ormerod, Mantis.
KINEMATICS_STRAIGHT
Motors move axis directions directly. This is the
traditional type, found in many printers, including
Mendel, Prusa i3, Mendel90, Ormerod, Mantis.
KINEMATICS_COREXY A bot using CoreXY kinematics. Typical for CoreXY are
long and crossing toothed belts and a print head moving
on the X-Y-plane.
KINEMATICS_COREXY
A bot using CoreXY kinematics. Typical for CoreXY
are long and crossing toothed belts and a print head
moving on the X-Y-plane.
*/
#define KINEMATICS KINEMATICS_STRAIGHT
@ -26,7 +28,7 @@
All numbers are integers, so no decimal point, please :-)
Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm)
Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm)
*/
#define STEPS_PER_M_X 40000
#define STEPS_PER_M_Y 40000
@ -65,9 +67,9 @@
endstops, more for optical ones. You can set it to zero, in which case
SEARCH_FEEDRATE_{XYZ} is used, but expect very slow homing movements.
Units: micrometers
Sane values: 0 to 20000 (0 to 20 mm)
Valid range: 0 to 1000000
Units: micrometers
Sane values: 0 to 20000 (0 to 20 mm)
Valid range: 0 to 1000000
*/
#define ENDSTOP_CLEARANCE_X 1000
#define ENDSTOP_CLEARANCE_Y 1000
@ -109,8 +111,8 @@
How fast to accelerate when using ACCELERATION_RAMPING. Start with 10 for
milling (high precision) or 1000 for printing.
Units: mm/s^2
Useful range: 1 to 10'000
Units: mm/s^2
Useful range: 1 to 10'000
*/
#define ACCELERATION 1000
@ -139,9 +141,9 @@
G-code are small and your printer runs through entire curves full speed,
there's no point in raising the values.
Units: mm/min
Sane values: 0 to 400
Valid range: 0 to 65535
Units: mm/min
Sane values: 0 to 400
Valid range: 0 to 65535
*/
#define MAX_JERK_X 200
#define MAX_JERK_Y 200
@ -168,7 +170,7 @@
temperature is considered to be achieved. Also, BANG_BANG tries to stay
within half of this hysteresis.
Unit: degree Celsius
Unit: degree Celsius
*/
#define TEMP_HYSTERESIS 10
@ -177,7 +179,7 @@
+- TEMP_HYSTERESIS) for this long before target is achieved (and a M116
succeeds).
Unit: seconds
Unit: seconds
*/
#define TEMP_RESIDENCY_TIME 60
@ -190,7 +192,7 @@
quicker but rougher. If you need to use this, set the PID parameter to zero
(M132 S0) to make the PID loop insensitive to noise.
Valid range: 0.001 to 1.0
Valid range: 0.001 to 1.0
*/
#define TEMP_EWMA 1.0
@ -292,8 +294,9 @@
false alarm sometimes, Teacup debounces them by counting a number of
consecutive positives.
Valid range: 1...255. Use 4 or less for reliable endstops, 8 or even more
for flaky ones.
Use 4 or less for reliable endstops, 8 or even more for flaky ones.
Valid range: 1...255.
*/
#define ENDSTOP_STEPS 4

View File

@ -10,13 +10,15 @@
Valid values (see dda_kinematics.h):
KINEMATICS_STRAIGHT Motors move axis directions directly. This is the
traditional type, found in many printers, including
Mendel, Prusa i3, Mendel90, Ormerod, Mantis.
KINEMATICS_STRAIGHT
Motors move axis directions directly. This is the
traditional type, found in many printers, including
Mendel, Prusa i3, Mendel90, Ormerod, Mantis.
KINEMATICS_COREXY A bot using CoreXY kinematics. Typical for CoreXY are
long and crossing toothed belts and a print head moving
on the X-Y-plane.
KINEMATICS_COREXY
A bot using CoreXY kinematics. Typical for CoreXY
are long and crossing toothed belts and a print head
moving on the X-Y-plane.
*/
#define KINEMATICS KINEMATICS_STRAIGHT
@ -26,7 +28,7 @@
All numbers are integers, so no decimal point, please :-)
Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm)
Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm)
*/
#define STEPS_PER_M_X 1280000
#define STEPS_PER_M_Y 1280000
@ -65,9 +67,9 @@
endstops, more for optical ones. You can set it to zero, in which case
SEARCH_FEEDRATE_{XYZ} is used, but expect very slow homing movements.
Units: micrometers
Sane values: 0 to 20000 (0 to 20 mm)
Valid range: 0 to 1000000
Units: micrometers
Sane values: 0 to 20000 (0 to 20 mm)
Valid range: 0 to 1000000
*/
#define ENDSTOP_CLEARANCE_X 1000
#define ENDSTOP_CLEARANCE_Y 1000
@ -109,8 +111,8 @@
How fast to accelerate when using ACCELERATION_RAMPING. Start with 10 for
milling (high precision) or 1000 for printing.
Units: mm/s^2
Useful range: 1 to 10'000
Units: mm/s^2
Useful range: 1 to 10'000
*/
#define ACCELERATION 100
@ -139,9 +141,9 @@
G-code are small and your printer runs through entire curves full speed,
there's no point in raising the values.
Units: mm/min
Sane values: 0 to 400
Valid range: 0 to 65535
Units: mm/min
Sane values: 0 to 400
Valid range: 0 to 65535
*/
#define MAX_JERK_X 20
#define MAX_JERK_Y 20
@ -168,7 +170,7 @@
temperature is considered to be achieved. Also, BANG_BANG tries to stay
within half of this hysteresis.
Unit: degree Celsius
Unit: degree Celsius
*/
#define TEMP_HYSTERESIS 10
@ -177,7 +179,7 @@
+- TEMP_HYSTERESIS) for this long before target is achieved (and a M116
succeeds).
Unit: seconds
Unit: seconds
*/
#define TEMP_RESIDENCY_TIME 60
@ -190,7 +192,7 @@
quicker but rougher. If you need to use this, set the PID parameter to zero
(M132 S0) to make the PID loop insensitive to noise.
Valid range: 0.001 to 1.0
Valid range: 0.001 to 1.0
*/
#define TEMP_EWMA 1.0
@ -292,8 +294,9 @@
false alarm sometimes, Teacup debounces them by counting a number of
consecutive positives.
Valid range: 1...255. Use 4 or less for reliable endstops, 8 or even more
for flaky ones.
Use 4 or less for reliable endstops, 8 or even more for flaky ones.
Valid range: 1...255.
*/
#define ENDSTOP_STEPS 4

View File

@ -237,6 +237,14 @@ class BoardPanel(wx.Panel):
if gatheringHelpText:
if reHelpTextEnd.match(ln):
gatheringHelpText = False
helpTextString = helpTextString.strip()
# Keep paragraphs with double-newline.
helpTextString = helpTextString.replace("\n\n ", "\n\n")
# Keep indented lines, typically a list.
helpTextString = helpTextString.replace("\n\n ", "\n\n ")
helpTextString = helpTextString.replace("\n ", "\n\n ")
# Remove all other newlines and indents.
helpTextString = helpTextString.replace("\n ", " ")
hk = helpKey.split()
for k in hk:
self.helpText[k] = helpTextString

View File

@ -191,6 +191,14 @@ class PrinterPanel(wx.Panel):
if gatheringHelpText:
if reHelpTextEnd.match(ln):
gatheringHelpText = False
helpTextString = helpTextString.strip()
# Keep paragraphs with double-newline.
helpTextString = helpTextString.replace("\n\n ", "\n\n")
# Keep indented lines, typically a list.
helpTextString = helpTextString.replace("\n\n ", "\n\n ")
helpTextString = helpTextString.replace("\n ", "\n\n ")
# Remove all other newlines and indents.
helpTextString = helpTextString.replace("\n ", " ")
hk = helpKey.split()
for k in hk:
self.helpText[k] = helpTextString