docs: fix pin/param documentation errors found by a docs-vs-code sweep - #4606
Conversation
…eric.9 hy_vfd.1 documented spindle-reverse/spindle-on as '(bin, in)', a type name that never existed; both are bool IN pins (hy_vfd.c). demux_generic.9 kept 'bit-to-bit' where mux_generic.9 was updated to 'bool-to-bool'.
stepgen: no default step_type (load fails without it), MAX_CHAN is 16, step types run 0-15 with type 15 user-defined via user_step_type. pwmgen: scale/offset/pwm-freq/dither-pwm/min-dc/max-dc/curr-dc are pins (HAL_IO/HAL_OUT), not parameters; document the offset pin. encoder: latch-input defaults FALSE, latch-rising defaults TRUE; .time values are output pins, .tmax/.tmax-increased are per-function params without a channel prefix; fix update-counter.tmax typo; document velocity-rpm. pid: saturated-s/saturated-count/do-pid-calcs use dashes; document command-deriv, feedback-deriv, FF3, maxcmdDDD, index-enable, error-previous-target, the tune-* pins and the remaining debug pins. sim_encoder: ppr and scale are HAL_IO pins, not parameters; document rawcounts. debounce: no default cfg (load fails without it), macro is MAX_GROUP, group size limited to MAX_GROUP_SIZE 50. siggen: document clock and reset pins.
vfs11.adoc: drop nonexistent output-voltage pin; frequency-limit is a pin (real out), not an RO parameter. pmx485.adoc: prose used dashed pin names; the Python component registers mode_set/current_set/pressure_set with underscores. mitsub-vfd.adoc: status-bit-N is stat-bit-N. gm.adoc: index-enable (not index-enabled); counts-per-rev is uint R/W; invert-serial is bool; can-gm position-fb is an output and the example pin is position-fb; watchdog-timeout-ns is uint; switch pins live under gm.N.axis.N (not joint); estop in/in-not are pins, not parameters; relay pins are inputs; rs485 module numbering is %02d; fix stepspace example typo. pico-ppmc.adoc: setup-time/pulse-width/pulse-space-min gain the -ns suffix; stepgen frequency is freq; DAC8 value pin uses a dot; DAC value is an input. mb2hal.adoc: stale bit/float/s32 type words renamed; first bit example is .00 (numbering is zero-based).
halui.1: tool.length_offset.* uses underscores (9 pins); drop garbled 'bit in in' leftovers in jog prose. vfs11_vfd.1: drop nonexistent output-voltage pin; frequency-limit and error-count are output pins, max-rpm is an output pin. xhc-hb04.1: enable pins have the jog. prefix (jog.enable-x etc). xhc-whb04b-6.1: remove nonexistent whb.halui.home-all pin; feed-override.scale and spindle-override.scale are outputs, max-velocity.value is an input. moveoff_gui.1: pin is mv.move-enable. io.1: document iocontrol.0.tool-from-pocket. sendkeys.1: document sendkeys.N.trigger-MM pins. gs2_vfd.1: document the enable and initialized pins.
The hal64 docs update left an 8-column spec on a table whose rows now have 6 cells, making asciidoctor drop cells with 'dropping cells from incomplete row'.
Factual fixes verified against the driver sources (the bulk old-type rename for these pages is a separate change): hostmot2.9: dpll.prescale is an output; no_clear_on_index uses underscores; encoder probe-enable/probe-invert are inputs; count_latch is count-latched; muxed-skew is u32; encoder timer-number is an input pin; ssi/biss data-incomplete is data-invalid (out); ssi timer-number-num is ssi.MM.timer-number; fanuc batt/valid are batt_fail/pos_invalid; resolver joint-pos-fb is float; 3pwmgen sample-time is float; periodm averages is u32 and invert is io; stepgen position-latched is position-latch; stepgen index-invert/probe-invert are input pins; swap_step_dir is an r/w param; gpio example uses in_not. sserial.9: run_state is port_state; error-count is fault-count; 7i76/7i77/7i71 output pins are 'in' and input-NN-not pins are 'out'; 7i70/7i71 swrevision copy-paste prefixes; 7i73 encN expanded to count/rawcounts/position/index-enable/reset; 7i73 output-00-invert is bit rw. hm2_eth.9: packet-error-decrement is ro.
Bulk rename of type-position bit/float/s32/u32 to bool/real/sint/uint, which the HAL API docs update (LinuxCNC#4596-LinuxCNC#4599) did not cover. Prose uses (bit stream, firmware bit files, 16/18-bit galvanometer protocol widths) are left alone.
ea6fb57 to
528b2c7
Compare
|
Just as I noted in one of the review comments... There are many inconsistencies in the hostmot2 docs. Also remember why I had not yet done them... too much thinking needed ;-) |
|
I'll do the thinking tomorrow, brain is off |
Unify the suffix zoo to (<type>, <dir>) with dirs from in/out/io/ro/rw: r/w and read/write => rw, in/out and IO => io, input/output => in/out, and the periodm bare r/w abbreviations => real HAL directions verified against the driver sources. Add a leading dot to entries that dropped the HAL name prefix. Add missing type/dir tags in the fanuc section, split the combined 8I20 status/fault entry, fix the jammed SSI encoder parameter block (and its r.w typo), correct inm pin names (input-MM, input-MM-not, raw-input-MM, input-MM-slow) and inm parameter directions (scan_rate, fast_scans, slow_scans, encN_4xmode are RW parameters, scan_width is RO), complete the sserial.port-N prefix on the port pins/parameters, move the xy2mod timer numbers to the pin list and fix its underscore pin names (posx-cmd, velx-cmd, accx-cmd, posx-fb, velx-fb, posx-scale), correct the rcpwmgen rate/width/offset/scale pins to HAL_IN, restore "bit" prose in the SSI bitfield and xy2mod control descriptions, and fix the status.current-lim-not typo. A leading period at the start of a line is an asciidoc block title and breaks the definition list markup, so indent the dotted entries by one space; the dot stays visible in both the HTML and manpage output. Also fix the malformed line continuation in the 8I20 fault/status list that rendered a literal plus sign.
9c53729 to
88f4362
Compare
|
hostmot2.9.adoc:
sserial.9.adoc:
|
|
Have more to write... fault and status: .status.*::
.brake-old, .brake-old-not;;
bla bla
.brake-on, .brake-on-not;;
bla bla
.bus-underv, .bus-underv-not;;
.current-lim, .current-lim-not;;
.ext-reset, .ext-reset-not;;
.no-enable, .no-enable-not;;
.pid-on, .pid-on-not;;
.sw-reset, .sw-reset-not;;
.wd-reset, status.wd-reset-not;;And then actually take the description out of the manual and add it here? Section 8I20: Section 7I69, 7I70, 7I71, 7I73: |
…sserial man pages Every section now states its HAL name prefix once in the standard bold/italic form and the pin and parameter entries use the .name (type, dir):: form relative to it. This covers the dpll, encoder (module-global pins and timer-number moved to the pin list), SSI, BiSS and Fanuc sections, the stepgen timer-number (also corrected to sint, in; it is a module-global HAL_IN pin), the 3pwmgen prefix markup (which lost the boldface to a ___triple-underscore___ span), and the xy2mod section which had no prefix specification at all. On the sserial page the PORTS section gains the prefix specification, and the 7I64/7I69/7I70/7I71/7I73 entries drop the hardcoded instance numbers (.7i64.0.0. etc.) in favour of a stated prefix; the 7I73 notes that the analog inputs live on channel 0 and the remaining pins on channel 1. Restructure the 8I20 status/fault entry per review: the two groups are now .status.* and .fault.* labeled-list entries with a nested ;; sublist of the actual pins, with descriptions taken from the 8I20 manual. The bare parameter list drops its hardcoded hm2_5i25.0.8i20.0.1. prefixes. Convert the 7I69/7I70/7I71/7I73 MODE lists to tables, attach the oneshot trigger table to its list item with a + continuation, fix the malformed indented + continuations in the dpll timer-us description that rendered literal plus signs, write .in, .in_not with a comma in the GPIO section, italicize the MM placeholder in the inm/inmux pin names, fix the SSERIAL(9) all-caps reference and the bold-broken sserial(9) link, and add sserial(9) to SEE ALSO.
|
Agreed, time to paint the bike shed, it was indeed all rusty ;-) |
|
All points addressed in e8e7e66, rendering verified in the built HTML. On the bold-italic question: the 3pwmgen line was the only real case, it used 7I64 got the same prefix treatment as 7I69-7I73. 7I76/7I77 still carry literal instance numbers since the 7I77 analog section really lives on channel 1; happy to do those next if you want them relative too. The 8I20 descriptions come from the manual (mesanet.com is serving spam these days, so via the Wayback Machine). Also found while verifying: the dpll timer-us text had the same literal |
Only if I may determine its colour ;-) |
|
Since we are painting,... In hostmot2 section encoder you have: That trailing period is other places as well, but not everywhere. All like some tiles are red and others became green (by some divine intervention?). I suggest we blend some blue in there as well :-) After this I will shut up, unless the formatting breaks badly. Time to do other work. |
…ages All prefix specifications now use the same form: **hm2_**__<BoardType>__**.**__<BoardNum>__**.<comp>.**__<Instance>__** with no enclosing double quotes and no trailing period, since the leading period belongs to the relative pin entries. Fixes the stray trailing quote in the encoder section, the unclosed bold span in the resolver section, and the single-underscore italics in the rcpwmgen, stepgen, inm/inmux, ssr, outm, watchdog and HAL function name specs.
Asciidoctor does not parse ** immediately following an __x__ span, so the trailing ** left on twelve prefix specification lines rendered as literal asterisks in the HTML output. Removed them; the prefix lines now end at the italic placeholder. Verified no literal ** remains in either the HTML or the manpage backend output.
A docs-vs-code sweep following the HAL API docs update (#4596 - #4599). While the type renames are now consistent, the sweep found a set of long-standing factual errors in pin and parameter documentation: wrong names, wrong types, wrong directions, parameters that are actually pins, pins that do not exist, and defaults the code does not have. Each fix was verified against the component or driver source.
The final commit covers the bulk old-type-name rename for hostmot2(9), sserial(9) and hm2_eth(9) (the three pages the rename PRs did not cover), folded in as requested in review. It only touches type words in pin/param tags and leaves prose (bit fields, 16/18-bit counts, bit streams) alone.
HAL manual (rtcomps.adoc)
Man pages
Driver docs
Rendering