cleanup and removing StepGen from active code
This commit is contained in:
@@ -17,21 +17,7 @@ void indexPulseEncoderCB1(void)
|
||||
{
|
||||
Encoder1.indexPulse();
|
||||
}
|
||||
#if 0
|
||||
#include "StepGen.h"
|
||||
void timerCallbackStep1(void);
|
||||
StepGen Step1(TIM1, 4, PA_11, PA12, timerCallbackStep1);
|
||||
void timerCallbackStep1(void)
|
||||
{
|
||||
Step1.timerCB();
|
||||
}
|
||||
void timerCallbackStep2(void);
|
||||
StepGen Step2(TIM3, 4, PC_9, PC10, timerCallbackStep2);
|
||||
void timerCallbackStep2(void)
|
||||
{
|
||||
Step2.timerCB();
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "StepGen2.h"
|
||||
void pulseTimerCallback(void);
|
||||
void startTimerCallback(void);
|
||||
@@ -45,25 +31,15 @@ void cb_set_outputs(void) // Master outputs gets here, slave inputs, first opera
|
||||
{
|
||||
Encoder1.setLatch(Obj.IndexLatchEnable);
|
||||
Encoder1.setScale(Obj.EncPosScale);
|
||||
#if 0
|
||||
Step1.reqPos(Obj.StepGenIn1.CommandedPosition);
|
||||
Step1.setScale(Obj.StepGenIn1.StepsPerMM);
|
||||
Step1.enable(Obj.Enable1);
|
||||
Step2.reqPos(Obj.StepGenIn2.CommandedPosition);
|
||||
Step2.setScale(Obj.StepGenIn2.StepsPerMM);
|
||||
Step2.enable(Obj.Enable1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void handleStepper(void)
|
||||
{
|
||||
Step.enabled = true;
|
||||
Step.commandedPosition = Obj.StepGenIn1.CommandedPosition;
|
||||
Obj.StepGenOut1.ActualPosition = Step.commandedPosition;
|
||||
|
||||
#if 0
|
||||
Step1.handleStepper();
|
||||
Step2.handleStepper();
|
||||
#endif
|
||||
Step.handleStepper();
|
||||
}
|
||||
|
||||
void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
|
||||
@@ -72,10 +48,7 @@ void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
|
||||
Obj.EncPos = Encoder1.currentPos();
|
||||
Obj.EncFrequency = Encoder1.frequency(ESCvar.Time);
|
||||
Obj.IndexByte = Encoder1.getIndexState();
|
||||
#if 0
|
||||
Obj.StepGenOut1.ActualPosition = Step1.actPos();
|
||||
Obj.StepGenOut2.ActualPosition = Step2.actPos();
|
||||
#endif
|
||||
|
||||
uint32_t dTim = nowTime - thenTime; // Debug. Getting jitter over the last 200 milliseconds
|
||||
Tim.push(dTim);
|
||||
uint32_t max_Tim = 0, min_Tim = UINT32_MAX;
|
||||
@@ -189,9 +162,6 @@ uint16_t dc_checker(void)
|
||||
{
|
||||
// Indicate we run DC
|
||||
ESCvar.dcsync = 1;
|
||||
#if 0
|
||||
StepGen::sync0CycleTime = ESC_SYNC0cycletime() / 1000; // usecs
|
||||
#endif
|
||||
StepGen2::sync0CycleTime = ESC_SYNC0cycletime() / 1000; // usecs
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user