public void Write(CalibrationExerciseResultPitaco result, CalibrationExercisePitaco exercise, float value)
        {
            switch (exercise)
            {
            case CalibrationExercisePitaco.ExpiratoryPeak:
            case CalibrationExercisePitaco.InspiratoryPeak:
                FlowDataDevice.FlowData.Add(new FlowData
                {
                    Date  = DateTime.Now,
                    Value = PitacoFlowMath.ToLitresPerMinute(value)
                });
                break;

            case CalibrationExercisePitaco.RespiratoryFrequency:
                FlowDataDevice.FlowData.Add(new FlowData
                {
                    Date  = DateTime.Now,
                    Value = value * 60f
                });
                break;

            default:
                FlowDataDevice.FlowData.Add(new FlowData
                {
                    Date  = DateTime.Now,
                    Value = value / 1000f
                });
                break;
            }
        }
 public void Write(CalibrationExerciseResultPitaco result, CalibrationExercisePitaco exercise, float value)
 {
     if (exercise == CalibrationExercisePitaco.ExpiratoryPeak || exercise == CalibrationExercisePitaco.InspiratoryPeak)
     {
         _sb.AppendLine($"{DateTime.Now:s};{result};{exercise};{FlowMath.ToLitresPerMinute(value)};");
     }
     else if (exercise == CalibrationExercisePitaco.RespiratoryFrequency)
     {
         _sb.AppendLine($"{DateTime.Now:s};{result};{exercise};{value * 60f};");
     }
     else
     {
         _sb.AppendLine($"{DateTime.Now:s};{result};{exercise};{value / 1000f};");
     }
 }