Skip to content

Commit 6854b48

Browse files
author
Sven
committed
Updated accessibility levels.
1 parent 8c61766 commit 6854b48

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

ReaderWriter/3rdPartyFormatAdapters/GCODE/GCodeReaderWriter/GCodeCommand.cs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ public class GCodeCommand
7979
public readonly string comment;
8080

8181
// Dictionary of all unassignable parameters in a GCode line
82-
private protected Dictionary<char, float> miscParams;
82+
public Dictionary<char, float> miscParams;
8383

8484
// List of all recorded parameters in a GCode line
85-
private protected List<char> recordedParams;
85+
public readonly List<char> recordedParams;
8686

8787
// Dicionary mapping parameter characters to their respective class variables
8888
protected static Dictionary<char, Action<float>> parameterMap;
@@ -144,14 +144,16 @@ public override string ToString()
144144
public abstract class MovementCommand : GCodeCommand
145145
{
146146
// Target position in mm, feedrate in mm/min and acceleration in mm/min^2 of movement commands
147-
internal float? xPosition;
148-
internal float? yPosition;
149-
internal float? zPosition;
150-
internal float? feedRate;
151-
internal float? acceleration;
147+
public float? xPosition;
148+
public float? yPosition;
149+
public float? zPosition;
150+
public float? feedRate;
151+
public float? acceleration;
152152

153-
public MovementCommand(PrepCode prepCode, int codeNumber, float? xPosition, float? yPosition, float? zPosition, float? feedRate, float? acceleration, string comment = null) : base(prepCode, codeNumber, null, comment)
153+
public MovementCommand(PrepCode prepCode, int codeNumber, float? xPosition, float? yPosition, float? zPosition, float? feedRate, float? acceleration, Dictionary<char, float> miscParams = null, string comment = null)
154+
: base(prepCode, codeNumber, null, comment)
154155
{
156+
this.miscParams = miscParams;
155157
this.xPosition = xPosition;
156158
this.yPosition = yPosition;
157159
this.zPosition = zPosition;
@@ -204,11 +206,12 @@ public override string ToString()
204206
public class LinearInterpolationCmd : MovementCommand
205207
{
206208
// Operational move or travel move
207-
internal bool isOperation;
209+
public bool isOperation;
208210

209-
public LinearInterpolationCmd(PrepCode prepCode, int codeNumber, float? xPosition, float? yPosition, float? zPosition = null, float? feedRate = null, float? acceleration = null, string comment = null) : base(prepCode, codeNumber, xPosition, yPosition, zPosition, feedRate, acceleration, comment)
211+
public LinearInterpolationCmd(PrepCode prepCode, int codeNumber, bool isOperation, float? xPosition, float? yPosition, float? zPosition = null, float? feedRate = null, float? acceleration = null, Dictionary<char, float> miscParams = null, string comment = null)
212+
: base(prepCode, codeNumber, xPosition, yPosition, zPosition, feedRate, acceleration, miscParams, comment)
210213
{
211-
CheckOperation();
214+
this.isOperation = isOperation;
212215
}
213216

214217
public LinearInterpolationCmd(PrepCode prepCode, int codeNumber, Dictionary<char, float> commandParams = null, string comment = null) : base(prepCode, codeNumber, commandParams, comment)
@@ -250,14 +253,16 @@ public override string ToString()
250253
public class CircularInterpolationCmd : MovementCommand
251254
{
252255
// Center of the circle relative to the start position in mm
253-
internal float? xCenterRel;
254-
internal float? yCenterRel;
256+
public float? xCenterRel;
257+
public float? yCenterRel;
255258

256259
// Direction of the circular interpolation
257-
internal bool isClockwise;
260+
public bool isClockwise;
258261

259-
public CircularInterpolationCmd(PrepCode prepCode, int codeNumer, float? xPosition, float? yPosition, float? xCenterRel, float? yCenterRel, float? feedRate, float? acceleration, string comment = null) : base(prepCode, codeNumer, xPosition, yPosition, null, feedRate, acceleration, comment)
262+
public CircularInterpolationCmd(PrepCode prepCode, int codeNumer, bool isClockwise, float? xPosition, float? yPosition, float? xCenterRel, float? yCenterRel, float? feedRate, float? acceleration, Dictionary<char, float> miscParams = null, string comment = null)
263+
: base(prepCode, codeNumer, xPosition, yPosition, null, feedRate, acceleration, miscParams, comment)
260264
{
265+
this.isClockwise = isClockwise;
261266
this.xCenterRel = xCenterRel;
262267
this.yCenterRel = yCenterRel;
263268
}
@@ -309,7 +314,7 @@ public override string ToString()
309314
public class PauseCommand : GCodeCommand
310315
{
311316
// Duration of the pause in ms
312-
internal float? duration;
317+
public float? duration;
313318

314319
public PauseCommand(PrepCode prepCode, int codeNumber, float? duration, string comment = null) : base(prepCode, codeNumber, null, comment)
315320
{
@@ -352,7 +357,7 @@ public override string ToString()
352357

353358
public class ToolChangeCommand : GCodeCommand
354359
{
355-
internal ToolParams toolParams;
360+
public ToolParams toolParams;
356361

357362
public ToolChangeCommand(PrepCode prepCode, int codeNumber, ToolParams toolParams, string comment = null) : base(prepCode, codeNumber, null, comment)
358363
{

0 commit comments

Comments
 (0)