BowlerKernel
GCodeHeater.java
Go to the documentation of this file.
1 package com.neuronrobotics.sdk.addons.kinematics.gcodebridge;
2 
3 import com.neuronrobotics.sdk.addons.kinematics.AbstractLink;
4 import com.neuronrobotics.sdk.addons.kinematics.LinkConfiguration;
5 
6 public class GCodeHeater extends AbstractLink implements IGCodeChannel {
7 
8  private GcodeDevice device;
9  private String axis = "";
10  private double value =0;
11  public GCodeHeater(LinkConfiguration conf, String gcodeAxis,GcodeDevice device) {
12  super(conf);
13  // TODO Auto-generated constructor stub
14  this.axis = gcodeAxis;
15  this.device = device;
16  }
17 
18  @Override
19  public void cacheTargetValueDevice() {
20  // TODO Auto-generated method stub
21 
22  }
23 
24  @Override
25  public void flushDevice(double time) {
26  if(axis.contains("B")){
27  device.runLine("M104 S"+getTargetValue());
28  }
29  if(axis.contains("T")){
30  device.runLine("M140 S"+getTargetValue());
31  }
32  }
33 
34  @Override
35  public void flushAllDevice(double time) {
36  device.flush(time);
37  }
38 
39  @Override
40  public double getCurrentPosition() {
41  // TODO Auto-generated method stub
42  return value;
43  }
44 
45  @Override
46  public String getAxis() {
47  // TODO Auto-generated method stub
48  return axis;
49  }
50 
51  @Override
52  public void setValue(double value) {
53  this.value=value;
54  }
55 
56 }
GCodeHeater(LinkConfiguration conf, String gcodeAxis, GcodeDevice device)