Skip to content

Commit 5fa46f3

Browse files
author
Richard Unger
committed
fix initialization of MT6701 SSI mode
1 parent 43c122d commit 5fa46f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/encoders/mt6701/MagneticSensorMT6701SSI.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ MagneticSensorMT6701SSI::~MagneticSensorMT6701SSI() {
1313

1414
void MagneticSensorMT6701SSI::init(SPIClass* _spi) {
1515
this->spi=_spi;
16-
this->Sensor::init();
1716
if (nCS >= 0) {
1817
pinMode(nCS, OUTPUT);
1918
digitalWrite(nCS, HIGH);
2019
}
20+
this->spi->begin();
21+
this->Sensor::init();
2122
}
2223

2324
// check 40us delay between each read?

0 commit comments

Comments
 (0)