+ packet = None;
+
+ # catch a packet and check its db4 value
+ while (packet == None):
+ packet=self.client.rxpacket();
+
+
+ newTemp = int(math.ceil(level/1.8 + 22))
+ #print "Fake MPH = 1.617(%d)-63.5 = %d" %(newSpeed, mph)
+
+
+ newPacket = [SIDhigh, SIDlow, 0x00,0x00, # pad out EID regs
+ 0x08, # bit 6 must be set to 0 for data frame (1 for RTR)
+ # lower nibble is DLC
+ newTemp,ord(packet[6]),ord(packet[7]),ord(packet[8]),ord(packet[9]),ord(packet[10]),ord(packet[11]),ord(packet[12])]
+
+ # load new packet into TXB0 and check time
+ self.multiPacketSpit(packet0=newPacket, packet0rts=True)
+ starttime = time.time()
+
+ # spit new value for 1 second
+ while (time.time()-starttime < 10):
+ self.multiPacketSpit(packet0rts=True)
+