private void trackBar1_Scroll(object sender, EventArgs e) { BoundValue bv = new BoundValue("", trackBar1.Value - 100); tbValue.Text = trackBar1.Value.ToString(); tbOptimazedVal.Text = s0.NormalizeModal(bv).ToString(); }
public CapleLeg() { rightSensor = new BoundValue("RS"); leftSensor = new BoundValue("LS"); upSensor = new BoundValue("US"); downSensor = new BoundValue("DS"); rightEff = new BoundValue("RE"); leftEff = new BoundValue("LE"); upEff = new BoundValue("UE"); downEff = new BoundValue("DE"); pl = new BoundValue("PL"); }
public sS1(string name) { sectionName = name; Starget = new BoundValue("Starget", BoundValue.MaxValue); }
public sS0(string name) { sectionName = name; Sangle = new BoundValue("Sangle"); Sdistance = new BoundValue("Sdistance"); }
void UpdateSensor(double a, double b, ref BoundValue sa, ref BoundValue sb) { a -= b; if (a > 0) { if (sa.Value + a > BoundValue.MaxValue) sa.Value = BoundValue.MaxValue; else sa.Value += a; sb.ValueModal = BoundValue.MaxValueModal - sa.ValueModal; } }
public static double NormalizeModal(BoundValue val) { // =(-1600/(A101-125)-12,8)/51,2 const double onePercent = (BoundValue.MaxValue - BoundValue.MinValue)/100.0; double percents = val.ValueModal / onePercent; return val.ValueModal * (-1600.0 / (percents - 125.0) - 12.8) / 51.2; }