Skip to content

Commit ef741d9

Browse files
committed
Fix invalid escape sequence warnings from halcompile and hal components.
1 parent 0b94f5e commit ef741d9

8 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/hal/components/bldc.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Note that a number of incorrect commutations will have non-zero net torque which
131131

132132
If your motor lacks documentation it might be worth trying every pattern.
133133

134-
.ie '\*[.T]'html' \\{\\
134+
.ie '\\*[.T]'html' \\{\\
135135
.HTML \\
136136
<STYLE> \\
137137
#pattern TD { text-align: center; padding-left: .5ex; padding-right: .5ex } \\
@@ -313,7 +313,7 @@ This can be over-ridden by the \\fBT\\fR tag. Sinusoidal commutation is signific
313313
To use an encoder for commutation a reference 0-degrees point must be found.
314314
The component uses the convention that motor zero is the point that an unloaded
315315
motor aligns to with a positive voltage on the A (or U) terminal and the B & C
316-
(or V and W) terminals connected together and to \-ve voltage. There will be
316+
(or V and W) terminals connected together and to -ve voltage. There will be
317317
two such positions on a 4-pole motor, 3 on a 6-pole and so on. They are all
318318
functionally equivalent as far as driving the motor is concerned.
319319
If the motor has Hall sensors then the motor can be started in trapezoidal

src/hal/components/histobins.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Usage:
55
Read availablebins pin for the number of bins available.
66
Set the minvalue, binsize, and nbins pins.
77
Ensure nbins <= availablebins
8-
For nbins = N, the bins are numbered: 0 ... N\-1
8+
For nbins = N, the bins are numbered: 0 ... N-1
99
Iterate:
1010
Set index pin to a bin number: 0 <= index < nbins.
1111
Read check pin and verify that check pin == index pin.
@@ -15,7 +15,7 @@ Usage:
1515
(nextra is count for all bins < minvalue)
1616

1717
If index is out of range (index < 0 or index > maxbinnumber)
18-
then binvalue == \-1.
18+
then binvalue == -1.
1919
The input-error pin is set when input rules are violated
2020
and updates cease.
2121
The reset pin may be used to restart.

src/hal/components/joyhandle.comp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ The component \\fBjoyhandle\\fR uses the following formula for a non linear joyp
3030

3131
The parameters a and b are adjusted in such a way, that the function starts at (deadband,offset) and ends at (1,scale+offset).
3232

33-
Negative values will be treated point symmetrically to origin. Values \-deadband < x < +deadband will be set to zero.
33+
Negative values will be treated point symmetrically to origin. Values -deadband < x < +deadband will be set to zero.
3434

35-
Values x > 1 and x < \-1 will be skipped to \\(+-(scale+offset). Invert transforms the function to a progressive movement.
35+
Values x > 1 and x < -1 will be skipped to \\(+-(scale+offset). Invert transforms the function to a progressive movement.
3636

3737
With power one can adjust the nonlinearity (default = 2). Default for deadband is 0.
3838

39-
Valid values are: power >= 1.0 (reasonable values are 1.x .. 4\(hy5, take higher power\(hyvalues for higher deadbands (>0.5), if you want to start with a nearly horizontal slope), 0 <= deadband < 0.99 (reasonable 0.1).
39+
Valid values are: power >= 1.0 (reasonable values are 1.x .. 4\\(hy5, take higher power\\(hyvalues for higher deadbands (>0.5), if you want to start with a nearly horizontal slope), 0 <= deadband < 0.99 (reasonable 0.1).
4040

4141
An additional offset component can be set in special cases (default = 0).
4242

src/hal/components/latencybins.comp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ component latencybins
33

44
Usage:
55
Read availablebins pin for the number of bins available.
6-
Set the maxbinnumber pin for the number of \(+- bins.
6+
Set the maxbinnumber pin for the number of \\(+- bins.
77
Ensure maxbinnumber <= availablebins
88
For maxbinnumber = N, the bins are numbered:
9-
\-N ... 0 ... + N bins
10-
(the \-0 bin is not populated)
9+
-N ... 0 ... + N bins
10+
(the -0 bin is not populated)
1111
(total effective bins = 2*maxbinnumber +1)
1212
Set nsbinsize pin for the binsize (ns)
1313
Iterate:
1414
Set index pin to a bin number: 0 <= index <= maxbinnumber.
1515
Read check pin and verify that check pin == index pin.
1616
Read output pins:
1717
pbinvalue is count for bin = +index
18-
nbinvalue is count for bin = \-index
18+
nbinvalue is count for bin = -index
1919
pextra is count for all bins > maxbinnumber
2020
nextra is count for all bins < maxbinnumber
2121
latency-min is max negative latency
2222
latency-max is max positive latency
2323

2424
If index is out of range ( index < 0 or index > maxbinnumber)
25-
then pbinvalue = nbinvalue = \-1.
25+
then pbinvalue = nbinvalue = -1.
2626
The reset pin may be used to restart.
2727
The latency pin outputs the instantaneous latency.
2828

src/hal/components/lut5.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ TRUE whenever exactly one of the inputs is true, so the correct value for
4040
connected to signals, because if any other bit is \\fBTRUE\\fR then the output
4141
will be \\fBFALSE\\fR.
4242
.PP
43-
.ie '\*[.T]'html' \\{\\
43+
.ie '\\*[.T]'html' \\{\\
4444
.HTML \\
4545
<STYLE> \\
4646
#weight TD { text-align: center; padding-left: .5ex; padding-right: .5ex } \\

src/hal/components/sim_parport.comp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ description
55
Sim_parport is used to replace the pins of a real parport without changing
66
any of the pins names in the rest of the config.
77
.br
8-
It has pass-through pins (ending in \-fake) that allows connecting to other components.
8+
It has pass-through pins (ending in -fake) that allows connecting to other components.
99

10-
eg pin\-02\-in will follow pin\-02\-in\-fake 's logic.
10+
eg pin-02-in will follow pin-02-in-fake 's logic.
1111
.br
12-
pin_01_out\-fake will follow pin_01_out (possibly modified by pin_01_out\-invert)
12+
pin_01_out-fake will follow pin_01_out (possibly modified by pin_01_out-invert)
1313

1414
It creates all possible pins of both 'in' and 'out' options of the hal_parport component.
1515
.br

src/hal/components/toggle2nist.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Toggle2nist can be used with a momentary push button
66
to control a device that has separate on and off inputs
77
and an is-on output.
88

9-
\[bu] On a rising edge on pin \\fIin\\fR when \\fIis-on\\fR is low: It sets \\fIon\\fR until \\fIis-on\\fR becomes high.
9+
\\[bu] On a rising edge on pin \\fIin\\fR when \\fIis-on\\fR is low: It sets \\fIon\\fR until \\fIis-on\\fR becomes high.
1010

11-
\[bu] On a rising edge on pin \\fIin\\fR when \\fIis-on\\fR is high: It sets \\fIoff\\fR until \\fIis-on\\fR becomes low.
11+
\\[bu] On a rising edge on pin \\fIin\\fR when \\fIis-on\\fR is high: It sets \\fIoff\\fR until \\fIis-on\\fR becomes low.
1212

1313

1414
       ┐     ┌─────xxxxxxxxxxxx┐           ┌─────xxxxxxxxxxxx┐

src/hal/utils/halcompile.g

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ parser Hal:
2828
token NAME: "[a-zA-Z_][a-zA-Z0-9_]*"
2929
token STARREDNAME: "[*]*[a-zA-Z_][a-zA-Z0-9_]*"
3030
token HALNAME: "[#a-zA-Z_][-#a-zA-Z0-9_.]*"
31-
token FPNUMBER: "-?([0-9]*\.[0-9]+|[0-9]+\.?)([Ee][+-]?[0-9]+)?f?"
31+
token FPNUMBER: "-?([0-9]*\\.[0-9]+|[0-9]+\\.?)([Ee][+-]?[0-9]+)?f?"
3232
token NUMBER: "0x[0-9a-fA-F]+|[+-]?[0-9]+"
3333
token STRING: "\"(\\.|[^\\\"])*\""
3434
token HEADER: "<.*?>"
@@ -63,9 +63,9 @@ parser Hal:
6363
rule Personality: {{ pp = [] }} (PersonalityPart {{ pp.append(PersonalityPart) }} )* {{ return " ".join(pp) }}
6464
rule PersonalityPart: NUMBER {{ return NUMBER }}
6565
| POP {{ return POP }}
66-
rule OptSimpleArray: "\[" NUMBER "\]" {{ return int(NUMBER) }}
66+
rule OptSimpleArray: "\\[" NUMBER "\\]" {{ return int(NUMBER) }}
6767
| {{ return 0 }}
68-
rule OptArray: "\[" NUMBER OptArrayPersonality "\]" {{ return OptArrayPersonality and (int(NUMBER), OptArrayPersonality) or int(NUMBER) }}
68+
rule OptArray: "\\[" NUMBER OptArrayPersonality "\\]" {{ return OptArrayPersonality and (int(NUMBER), OptArrayPersonality) or int(NUMBER) }}
6969
| {{ return 0 }}
7070
rule OptArrayPersonality: ":" Personality {{ return Personality }}
7171
| {{ return None }}

0 commit comments

Comments
 (0)