Slight fixes to motion and music library
This commit is contained in:
parent
8600cbd3e0
commit
37f714e3d3
@ -51,7 +51,7 @@ Motion::Motion(MOTION m){
|
||||
_fcb = NULL;
|
||||
};
|
||||
|
||||
void Motion::init(INPUT sensor)
|
||||
void Motion::init(SENSOR_INPUT sensor)
|
||||
{
|
||||
if(!motion_reg_init){
|
||||
//TCNT1 = 500; //4 ms (TCNT1)
|
||||
@ -67,13 +67,14 @@ void Motion::init(INPUT sensor)
|
||||
m = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
void Motion::set_force_callback(force_callback fcb, PHY physics) {
|
||||
_fcb = fcb;
|
||||
_fcb_phy = physics;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
float Motion::calculateFAVX(int x_in)
|
||||
{
|
||||
F = k * (x_in - X) - (d * V);
|
||||
@ -82,7 +83,7 @@ float Motion::calculateFAVX(int x_in)
|
||||
X += V * T;
|
||||
return F;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
int Motion::getX()
|
||||
{
|
||||
|
||||
@ -53,6 +53,8 @@ public:
|
||||
|
||||
void update_mass_spring_damper();
|
||||
|
||||
int getX();
|
||||
|
||||
// raw position vector
|
||||
int _xv[N];
|
||||
int _ix;
|
||||
|
||||
@ -364,12 +364,48 @@ float MMusic::getGainFloat()
|
||||
}
|
||||
|
||||
|
||||
float MMusic::getGain1Float()
|
||||
{
|
||||
return float(gain1)/65535.0;
|
||||
}
|
||||
|
||||
|
||||
float MMusic::getGain2Float()
|
||||
{
|
||||
return float(gain2)/65535.0;
|
||||
}
|
||||
|
||||
|
||||
float MMusic::getGain3Float()
|
||||
{
|
||||
return float(gain3)/65535.0;
|
||||
}
|
||||
|
||||
|
||||
uint16_t MMusic::getGain()
|
||||
{
|
||||
return gain;
|
||||
}
|
||||
|
||||
|
||||
uint16_t MMusic::getGain1()
|
||||
{
|
||||
return gain1;
|
||||
}
|
||||
|
||||
|
||||
uint16_t MMusic::getGain2()
|
||||
{
|
||||
return gain2;
|
||||
}
|
||||
|
||||
|
||||
uint16_t MMusic::getGain3()
|
||||
{
|
||||
return gain3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
@ -93,8 +93,14 @@ public:
|
||||
void setGain1(float value); // 0.0 - 1.0 USE THIS
|
||||
void setGain2(float value); // 0.0 - 1.0 USE THIS
|
||||
void setGain3(float value); // 0.0 - 1.0 USE THIS
|
||||
float getGain1Float(); // 0.0 - 1.0 USE THIS
|
||||
float getGain2Float(); // 0.0 - 1.0 USE THIS
|
||||
float getGain3Float(); // 0.0 - 1.0 USE THIS
|
||||
float getGainFloat(); // 0.0 - 1.0 USE THIS
|
||||
uint16_t getGain();
|
||||
uint16_t getGain1();
|
||||
uint16_t getGain2();
|
||||
uint16_t getGain3();
|
||||
|
||||
// NOTE FUNCTIONS
|
||||
void noteOn(uint8_t note, uint8_t vel); // 0 - 255
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user