beautypg.com

PNI TCM User Manual

Page 72

background image

PNI Sensor Corporation

DOC#1014688 r06

TCM User Manual

– July 2013

Page 67

/ / go back t o l ook i ng f or t he l engt h by t es .

mSt ep = 1 ;

}

el se

{

/ / Ti c ks i s a t i mer f unct i on. 1 t i ck = 10ms ec .

i f ( Ti c ks ( ) > mTi me)

{

/ / Cor r upt ed mes sage. We di d not get t he l engt h we wer e
/ / expec t i ng wi t hi n 1/ 2sec of r ec ei vi ng t he l engt h byt es . Cl ear
/ / ever y t hi ng i n t he i nput buf f er s i nce t he dat a i s unr el i abl e

mSer i al Por t - >I nCl ear ( ) ;

mSt ep = 1 ;

/ / Look f or t he next l engt h byt es

}

}

br eak ;

}

def aul t :

br eak ;

}

}