Skip to content

Commit

Permalink
testing arcs
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenhart committed Sep 14, 2015
1 parent 0336c90 commit d785510
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
5 changes: 3 additions & 2 deletions firmware/tinyg/plan_arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ static stat_t _compute_arc()
float end_0 = arc.gm.target[arc.plane_axis_0] - arc.position[arc.plane_axis_0] - arc.offset[arc.plane_axis_0];
float end_1 = arc.gm.target[arc.plane_axis_1] - arc.position[arc.plane_axis_1] - arc.offset[arc.plane_axis_1];
float err = fabs(hypotf(end_0, end_1) - arc.radius); // end radius - start radius
if ( (err > ARC_RADIUS_ERROR_MAX) ||
((err > ARC_RADIUS_ERROR_MIN) && (err > arc.radius * ARC_RADIUS_TOLERANCE)) ) {
if ( (err > ARC_RADIUS_ERROR_MAX) ||
((err < ARC_RADIUS_ERROR_MIN) &&
(err > arc.radius * ARC_RADIUS_TOLERANCE)) ) {
// return (STAT_ARC_HAS_IMPOSSIBLE_CENTER_POINT);
return (STAT_ARC_SPECIFICATION_ERROR);
}
Expand Down
8 changes: 0 additions & 8 deletions firmware/tinyg/plan_arc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#ifndef PLAN_ARC_H_ONCE
#define PLAN_ARC_H_ONCE

#ifdef __cplusplus
extern "C"{
#endif

// Arc radius tests. See http://linuxcnc.org/docs/html/gcode/gcode.html#sec:G2-G3-Arc
//#define ARC_RADIUS_ERROR_MAX ((float)0.5) // max allowable mm between start and end radius
#define ARC_RADIUS_ERROR_MAX ((float)1.0) // max allowable mm between start and end radius
Expand Down Expand Up @@ -78,8 +74,4 @@ void cm_arc_init(void);
stat_t cm_arc_callback(void);
void cm_abort_arc(void);

#ifdef __cplusplus
}
#endif

#endif // End of include guard: PLAN_ARC_H_ONCE
2 changes: 1 addition & 1 deletion firmware/tinyg/tinyg.cproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<InterfaceName>PDI</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
<ToolNumber>J41800021149</ToolNumber>
<ToolNumber>J41800004081</ToolNumber>
<ToolName>Atmel-ICE</ToolName>
</com_atmel_avrdbg_tool_atmelice>
<UseGdb>True</UseGdb>
Expand Down
2 changes: 1 addition & 1 deletion firmware/tinyg/tinyg.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/****** REVISIONS ******/

#ifndef TINYG_FIRMWARE_BUILD
#define TINYG_FIRMWARE_BUILD 440.19 // fix for Makercam / PartKam giant arcs
#define TINYG_FIRMWARE_BUILD 440.20 // arc test

#endif
#define TINYG_FIRMWARE_VERSION 0.97 // firmware major version
Expand Down

0 comments on commit d785510

Please sign in to comment.