hh
Diff: PositionSensor/PositionSensor.cpp
- Revision:
- 52:8e74c22ed89f
- Parent:
- 48:74a40481740c
--- a/PositionSensor/PositionSensor.cpp Wed Jul 17 03:40:12 2019 +0000 +++ b/PositionSensor/PositionSensor.cpp Sun Jul 21 21:42:49 2019 +0000 @@ -8,7 +8,7 @@ PositionSensorAM5147::PositionSensorAM5147(int CPR, float offset, int ppairs){ //_CPR = CPR; _CPR = CPR; - _ppairs = ppairs; + //_ppairs = ppairs; ElecOffset = offset; rotations = 0; spi = new SPI(PC_12, PC_11, PC_10); @@ -125,7 +125,11 @@ void PositionSensorAM5147::WriteLUT(int new_lut[128]){ memcpy(offset_lut, new_lut, sizeof(offset_lut)); } - + +void PositionSensorAM5147::SetNPP(int npp) +{ + _ppairs = npp; +} PositionSensorEncoder::PositionSensorEncoder(int CPR, float offset, int ppairs) {