You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#ifndef __CALIBRATEDSENSOR_H__
#define __CALIBRATEDSENSOR_H__
#include "common/base_classes/Sensor.h"
#include "BLDCMotor.h"
#include "StepperMotor.h"
#include "common/base_classes/FOCMotor.h"
class CalibratedSensor: public Sensor{
public:
// constructor of class with pointer to base class sensor and driver
CalibratedSensor(Sensor& wrapped);
~CalibratedSensor();
/*
Override the update function
*/
virtual void update() override;
/**
* Calibrate method computes the LUT for the correction
*/
virtual void calibrate(BLDCMotor& motor);
virtual void calibrate(StepperMotor& motor);
is enough. The calculations about the electrical angles are for a BLDC motor, these might not fit to a stepper motor which has 90 degrees between its poles instead of 120 degrees.
May be somebody can provide the right calculations?
The text was updated successfully, but these errors were encountered:
I'd like to use the calibratedSensor on a stepper motor with:
Currently only BLDCmotor is implemented.
I am not sure if just duplicating the code in CalibratedSensor.cpp and replacing
void CalibratedSensor::calibrate(BLDCMotor& motor){
by
void CalibratedSensor::calibrate(StepperMotor& motor){
and changing CalibratedSensor.h (add last line)
to:
is enough. The calculations about the electrical angles are for a BLDC motor, these might not fit to a stepper motor which has 90 degrees between its poles instead of 120 degrees.
May be somebody can provide the right calculations?
The text was updated successfully, but these errors were encountered: