Previously valid SVG strings such as
m 547.56916,962.17731 c 10e-6,25.66886
M831,144.861c-0.236,0.087-0.423,0.255-0.629,
would fail to parse.
Fix by Henning STALHKE
- Transfer encoding rewritten to handle negative numbers properly and fix scaling.
- Change the "no receive method" to be just a warning as it is unwise rather than
being wrong.
Emesary MP bridge fixes from Nikolai
OutgoingBridge:
- When transmitting queue, make sure transmitted
messages cannot remain in the queue when not completely emptied, and
thus be sent again, and eventually fill up the queue.
- Also allow smaller messages to sent even though there was not room for
a larger message (the removal of the 'break' command).
- To prevent coding the same message again with the 'break' removed,
store an already coded string that was rejected due to too little room
inside the message so when there is room for it, it was coded only
once.
- Stop recalculating MessageExpiryTime when there is no
room for a notification. If it has asked to expire after expire time,
let it expire.
IncomingBridge:
- Make sure listeners on emesary[x] properties are
removed when a mp aircraft is invalid, otherwise a hidden bridge will
sit in background and process same notifications a new bridge is
already processing.
- Change order of setting IncomingMessageIndex to ease
debugging in reciever.
- Since a bridge class can handle multiple emesary
properties on same aircraft, use a vector per aircraft to store the
bridge instances in, to make sure Remove can be called on all
instances listening to same aircraft.
The partition processor is a simple class that allows lists of data to be processed in chunks per invocation. It is designed to minimise per frame processing whilst keeping the code simple and the performance acceptable.
test code (use with F-14):
var pptest = func{
var xx= frame_utils.PartitionProcessor.new("TEST", 6);
var obj = {}; # just for testing
for (ii=0;ii<5;ii+=1) {
xx.process(obj, awg_9.tgts_list,
func(pp, obj, data){
print("init");
obj.designated = -1;
obj.search = "Nimitz";
obj.completed = 0;
}
,
func(pp, obj, u){
printf("%-5d : %s",pp.data_index, u.Callsign.getValue());
if (u.Callsign.getValue() == obj.search)
obj.designated = pp.data_index;
return 1;
},
func(pp, obj, data)
{
obj.completed = 1;
printf("Completed: %s = %d\n", obj.search, obj.designated);
}
);
if (obj.completed)
break;
}
if (!obj.completed)
print("partial list processed");
}
pptest();