try to fix submodule

This commit is contained in:
2023-11-09 19:02:15 -05:00
parent c1d45aa443
commit deea94b076
366 changed files with 40228 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
#include "GenericSensor.h"
/*
GenericSensor( float (*readCallback)() )
- readCallback - pointer to the function which reads the sensor angle.
*/
GenericSensor::GenericSensor(float (*readCallback)(), void (*initCallback)()){
// if function provided add it to the
if(readCallback != nullptr) this->readCallback = readCallback;
if(initCallback != nullptr) this->initCallback = initCallback;
}
void GenericSensor::init(){
// if init callback specified run it
if(initCallback != nullptr) this->initCallback();
this->Sensor::init(); // call base class init
}
/*
Shaft angle calculation
*/
float GenericSensor::getSensorAngle(){
return this->readCallback();
}