changed because of naming conflict
Fork of LinearBlend by
LinearBlend.cpp
- Committer:
- perr1940
- Date:
- 2014-11-24
- Revision:
- 3:3503662f78fb
- Parent:
- 2:8e81d72bf792
- Child:
- 4:a25456624155
File content as of revision 3:3503662f78fb:
#include "LinearBlend.h" #include "mbed.h" /*********************************************************** Constructor ***********************************************************/ LinearBlend::LinearBlend():start(0),slope(0) { } /*********************************************************** Initialize Blend Function ***********************************************************/ //Function that sets the blend global variables to ready for blending calculations. /*void LinearBlend::init(float end, float s, int t_blend) { slope=(end-s)/t_blend; start=s; } /*********************************************************** Calculate Blend Function ***********************************************************/ //Function that calculates the blending trajectory, point by point. /*float* LinearBlend::blend(float ref[]) { //Pointer to the variable to store the trajectory point for the left side for(int i=0; i<=t_blend; i++) { ref[i]=slope*i+start; } return ref; }*/ float* LinearBlend::blend(float end, float s, int t_blend, float ref[]) { slope=(end-s)/t_blend; //Pointer to the variable to store the trajectory point for the left side for(int i=0; i<t_blend; i++) { ref[i]=slope*i+s; } return ref; }