API for a STEPPERONLINE Nema 17 Bipolar Linear Stepper Motor. Provides speed, direction, and revolution control.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mikermarza
Date:
Wed Apr 29 04:00:45 2020 +0000
Parent:
10:6d272b433f26
Commit message:
Updated Documentation

Changed in this revision

lin_step_mtr.cpp Show annotated file Show diff for this revision Revisions of this file
lin_step_mtr.h Show annotated file Show diff for this revision Revisions of this file
--- a/lin_step_mtr.cpp	Tue Apr 28 21:10:15 2020 +0000
+++ b/lin_step_mtr.cpp	Wed Apr 29 04:00:45 2020 +0000
@@ -53,11 +53,6 @@
         min_rev_cnt = rc;   
 }
 
-double LinStepMtr::get_min_rev_cnt()
-{
-    return min_rev_cnt;
-}
-
 void LinStepMtr::set_max_rev_cnt(double rc)
 {
     if(rc < MIN_DOUBLE_VAL || rc > MAX_DOUBLE_VAL)
@@ -66,6 +61,11 @@
         max_rev_cnt = rc; 
 }
 
+double LinStepMtr::get_min_rev_cnt()
+{
+    return min_rev_cnt;
+}
+
 double LinStepMtr::get_max_rev_cnt()
 {
     return max_rev_cnt;
--- a/lin_step_mtr.h	Tue Apr 28 21:10:15 2020 +0000
+++ b/lin_step_mtr.h	Wed Apr 29 04:00:45 2020 +0000
@@ -110,20 +110,33 @@
      */
     double get_rev();
     
-    /** Getters for {min,max}_rev_cnt, these revolution counts are used as software
-     * stops to prevent the motor from going too far. Default to max/min double
+    /** Sets the value of min_rev_cnt. This value is used as a software stop to 
+     * prevent the motor from rotating any farther while going counterclockwise.
+     * Defaults to the minimum value of a double.
      *
-     * @return the minimum or maximum revevolution count limit
+     * @param rc new minimum revolution count limit value
+     */
+    void set_min_rev_cnt(double rc);
+    
+    /** Sets the value of max_rev_cnt. This value is used as a software stop to 
+     * prevent the motor from rotating any farther while going clockwise
+     * Defaults to the maximum value of a double.
+     *
+     * @param rc new maximum revolution count limit value
+     */
+    void set_max_rev_cnt(double rc);
+    
+    /** Gets the value of the current minumum revolution count
+     *
+     * @return the current minimum revevolution count limit
      */
     double get_min_rev_cnt();
-    double get_max_rev_cnt();
     
-    /** Getters and Setters for {min,max}_rev_cnt
+    /** Gets the value of the current maximum revolution count
      *
-     * @param rc new revolution count limit value
+     * @return the current maximum revevolution count limit
      */
-    void set_min_rev_cnt(double rc);
-    void set_max_rev_cnt(double rc);
+    double get_max_rev_cnt();
     
     /** Rests the revolution count limits to max/min of double
     */