getYValueFromToco method
- int bpm
Converts TOCO value to screen y-coordinate
bpm
is the TOCO value.
Returns the y-coordinate on the screen.
Implementation
double getYValueFromToco(int bpm) {
double adjustedBPM = bpm.toDouble();
adjustedBPM = adjustedBPM / 2; //scaled down version for mobile phone
double yValue = yTocoOrigin - (adjustedBPM * pixelsPerOneMM!);
//Log.i("bpmvalue", bpm + " " + adjustedBPM + " " + y_value);
return yValue;
}