196 def merge(self,mobj,override=False):
197 "Merge the given StatusObj into the list, ANDing (default) or override"
198 if (mobj.start>=mobj.stop):
203 while (ix<len(self._seq)):
206 if (mobj.start<self._seq[ix].start
and mobj.stop>oldstop):
208 nstart=
max(oldstop,mobj.start)
209 nstop=
min(self._seq[ix].start,mobj.stop)
213 self._seq.insert(ix,StatusObj(nstart,nstop,mobj.code,mobj.deadfrac,mobj.thrust,mobj.nconfig,mobj.nworking,mobj.comment))
216 if (mobj.start<self._seq[ix].stop
and mobj.stop>self._seq[ix].start):
221 (mobj.code<=self._seq[ix].code
and mobj.code!=0)
or
222 (self._seq[ix].code==0)):
224 ecode=self._seq[ix].code
225 edeadfrac=self._seq[ix].deadfrac
226 ethrust=self._seq[ix].thrust
227 enconfig=self._seq[ix].nconfig
228 enworking=self._seq[ix].nworking
229 ecomment=self._seq[ix].comment
230 estart=self._seq[ix].start
231 estop=self._seq[ix].stop
234 if (mobj.start>estart):
236 self._seq.insert(ix,StatusObj(estart,mobj.start,ecode,edeadfrac,ethrust,enconfig,enworking,ecomment))
239 if (mobj.stop<estop):
241 self._seq.insert(ix+1,StatusObj(mobj.stop,estop,ecode,edeadfrac,ethrust,enconfig,enworking,ecomment))
244 self._seq[iy]=StatusObj(
max(mobj.start,estart),
min(mobj.stop,estop),mobj.code,mobj.deadfrac,mobj.thrust,mobj.nconfig,mobj.nworking,mobj.comment)
246 oldstop=self._seq[ix].stop
250 if (len(self._seq)>0):
251 oldstop=self._seq[-1].stop
252 if (mobj.stop>oldstop):
253 nstart=
max(oldstop,mobj.start)
254 self._seq+=[StatusObj(nstart,mobj.stop,mobj.code,mobj.deadfrac,mobj.thrust,mobj.nconfig,mobj.nworking,mobj.comment)]