private int DutyCycle = -1; // To force a Duty Cycle on the first run. public void FixedUpdate() { if (!this.started) { this.Start(); // Unity, by some reason, is not calling the Start callback! } if (this.softDisabled) { return; } // Save some CPU on slower machines. See UpdateDutyCycle on Settings. Must be [1, 50]. The bigger, less times per second this is called. // 1 = Runs every cycle // 50 = Runs once each 50 cycles. // Log.dbg("Fixed Update {0} {1}", DutyCycle, Settings.UpdateDutyCycle); if (0 != (DutyCycle = ((1 + DutyCycle) % Settings.UpdateDutyCycle))) { return; } // Log.dbg("Fixed Update Duty!"); if (PreUpdate()) { gpwsFunc.UpdateGPWS(); } saveData(); }
void UpdateGPWS() { gpwsFunc.UpdateGPWS(); }