Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int hwZones = 3; // Left, Top, Right
- int hwColours = 3; // R, G, B
- int hwChannels = hwZones * hwColours;
- int hwBytesPerSecond = Convert.ToInt32(comboBaud.Text, 10) / 8;
- // = 9600/8 = 1200 (divided by 8 (bits))
- double hwCyclesPerSecond = hwBytesPerSecond / hwChannels;
- // = 1200/9 = ~133
- double hwSafeCyclesPerSecond = (int)(hwCyclesPerSecond * 0.85);
- // = ~133 - 15%
- // (safe 15% allows to perform Aggressive Attack immediately)
- // Calculate IntelliInterval Speed
- global.var_Interval = (int)(1000 / hwSafeCyclesPerSecond);
- // = (1sec / Cycles)
- if (global.var_Interval < 1) global.var_Interval = 1;
- IntelliInterval.Value = global.var_Interval;
- int defMovieFrameRate = 30;
- double swRealFrames = defMovieFrameRate / 2;
- // = 30 / 2 = 15
- // Display 50% real frames
- global.var_MaxSmoothRadius = (int)(hwCyclesPerSecond / swRealFrames);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement