Use framecount technique to improve performance
This commit is contained in:
parent
d8a962d969
commit
5264de9b7f
4 changed files with 16 additions and 13 deletions
|
@ -240,7 +240,9 @@ var IESIRecipient =
|
|||
NewIESIRecipient.MainScreen = canvas_IESI.new("Aircraft/A320-family/Models/Instruments/IESI/res/iesi.svg", "A320 IESI");
|
||||
}
|
||||
|
||||
if (math.mod(notifications.frameNotification.FrameCount,2) == 0) {
|
||||
NewIESIRecipient.MainScreen.update(notification);
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_OK;
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||
|
|
|
@ -972,14 +972,14 @@ var UpperECAMRecipient =
|
|||
EWDRecipient.MainScreen = canvas_upperECAM.new("Aircraft/A320-family/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg", "A320 E/WD CFM", "CFM");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (math.mod(notifications.frameNotification.FrameCount,2) == 0) {
|
||||
if (EWDRecipient.type) {
|
||||
EWDRecipient.MainScreen.updateIAE(notification);
|
||||
} else {
|
||||
EWDRecipient.MainScreen.updateCFM(notification);
|
||||
|
||||
}
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_OK;
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||
|
|
|
@ -352,12 +352,13 @@ var ECAMRecipient =
|
|||
{
|
||||
if (notification.NotificationType == "FrameNotification")
|
||||
{
|
||||
debug.dump(notifications.frameNotification.FrameCount);
|
||||
if (notifications.frameNotification.FrameCount == 5){
|
||||
if (math.mod(notifications.frameNotification.FrameCount,5) == 0) {
|
||||
ECAM.loop(notification);
|
||||
} elsif (notifications.frameNotification.FrameCount == 7){
|
||||
}
|
||||
if (math.mod(notifications.frameNotification.FrameCount,10) == 0) {
|
||||
phaseLoop();
|
||||
} elsif (notifications.frameNotification.FrameCount == 10){
|
||||
}
|
||||
if (math.mod(notifications.frameNotification.FrameCount,10) == 5) {
|
||||
ECAM_controller.loop(notification);
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_OK;
|
||||
|
|
|
@ -24,7 +24,7 @@ var cur_frame_inc = 0.05;
|
|||
var execLoop = func
|
||||
{
|
||||
notifications.frameNotification.fetchvars();
|
||||
if (notifications.frameNotification.FrameCount > 10) {
|
||||
if (notifications.frameNotification.FrameCount > 20) {
|
||||
notifications.frameNotification.FrameCount = 0;
|
||||
}
|
||||
emesary.GlobalTransmitter.NotifyAll(notifications.frameNotification);
|
||||
|
|
Loading…
Reference in a new issue