Skip to content

Commit

Permalink
fix for move command buffer synchronization (skipped segments could c…
Browse files Browse the repository at this point in the history
…ause not full buffer flushes)
  • Loading branch information
MaikStohn committed May 12, 2016
1 parent d0f68be commit df3efeb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions UP3DTRANSCODE/umcwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,16 @@ void umcwriter_planner_add(double X, double Y, double A, double F)
void umcwriter_planner_sync()
{
segment_up3d_t *pseg;
while( st_get_next_segment_up3d(&pseg) )
while( plan_get_block_buffer_count() )
{
umcwriter_print_time += ((double)pseg->p2*(double)pseg->p1)/F_CPU;
if( st_get_next_segment_up3d(&pseg) )
{
umcwriter_print_time += ((double)pseg->p2*(double)pseg->p1)/F_CPU;

UP3D_BLK blk;
UP3D_PROG_BLK_MoveL(&blk,pseg->p1,pseg->p2,pseg->p3,pseg->p4,pseg->p5,pseg->p6,pseg->p7,pseg->p8);
_umcwriter_write_file(&blk, 1);
UP3D_BLK blk;
UP3D_PROG_BLK_MoveL(&blk,pseg->p1,pseg->p2,pseg->p3,pseg->p4,pseg->p5,pseg->p6,pseg->p7,pseg->p8);
_umcwriter_write_file(&blk, 1);
}
}
}

Expand Down

0 comments on commit df3efeb

Please sign in to comment.