Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CurrentControl.h Source File

CurrentControl.h

00001 #ifndef CURRENTCONTROL_H
00002 #define CURRENTCONTROL_H
00003 
00004 #include "libs/Kernel.h"
00005 #include "libs/nuts_bolts.h"
00006 #include "libs/utils.h"
00007 #include "libs/Pin.h"
00008 #include "DigipotBase.h"
00009 
00010 #define alpha_current_checksum                  CHECKSUM("alpha_current")
00011 #define beta_current_checksum                   CHECKSUM("beta_current")
00012 #define gamma_current_checksum                  CHECKSUM("gamma_current")
00013 #define delta_current_checksum                  CHECKSUM("delta_current")
00014 #define epsilon_current_checksum                CHECKSUM("epsilon_current")
00015 #define zeta_current_checksum                   CHECKSUM("zeta_current")
00016 #define eta_current_checksum                    CHECKSUM("eta_current")
00017 #define theta_current_checksum                  CHECKSUM("theta_current")
00018 #define currentcontrol_module_enable_checksum   CHECKSUM("currentcontrol_module_enable")
00019 #define digipotchip_checksum                    CHECKSUM("digipotchip")
00020 #define digipot_max_current                     CHECKSUM("digipot_max_current")
00021 #define digipot_factor                          CHECKSUM("digipot_factor")
00022 
00023 #define mcp4451_checksum                        CHECKSUM("mcp4451")
00024 #define ad5206_checksum                         CHECKSUM("ad5206")
00025 
00026 class CurrentControl : public Module {
00027     public:
00028         CurrentControl();
00029         virtual ~CurrentControl() {};
00030 
00031         void on_module_loaded();
00032         void on_gcode_received(void *);
00033 
00034     private:
00035         float alpha_current;
00036         float beta_current;
00037         float gamma_current;
00038         float delta_current;
00039         float epsilon_current;
00040         float zeta_current;
00041         float eta_current;
00042         float theta_current;
00043         float original_delta_current;
00044 
00045         DigipotBase* digipot;
00046 
00047 };
00048 
00049 
00050 
00051 
00052 
00053 #endif