Made the max transmit calculation right in MaxLengthStream
This commit is contained in:
parent
983c947b8b
commit
7081a03b57
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
public BabyStepsStream(GCodeStream internalStream)
|
||||
: base(null)
|
||||
{
|
||||
maxLengthStream = new MaxLengthStream(internalStream, 2);
|
||||
maxLengthStream = new MaxLengthStream(internalStream, 1);
|
||||
offsetStream = new OffsetStream(maxLengthStream, new Vector3(0, 0, 0));
|
||||
base.internalStream = offsetStream;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
int numSegmentsToCutInto = (int)Math.Ceiling(length / MaxSegmentLength);
|
||||
|
||||
// segments = (((mm/min) / (60s/min))mm/s / s/segment)segments*mm / mm
|
||||
double maxSegmentsCanTransmit = ((currentDestination.feedRate / 60) / maxSecondsPerSegment) / length;
|
||||
double maxSegmentsCanTransmit = 1 / (((currentDestination.feedRate / 60) * maxSecondsPerSegment) / length);
|
||||
|
||||
int numSegmentsToSend = Math.Max(1, Math.Min(numSegmentsToCutInto, (int)maxSegmentsCanTransmit));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue