polished speedometer hack method a bit, going to go test it now
authorchrishoder <chrishoder@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 25 Feb 2013 14:33:38 +0000 (14:33 +0000)
committerchrishoder <chrishoder@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 25 Feb 2013 14:33:38 +0000 (14:33 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1534 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/FordExperiments.py

index f359bfa..e4b5f39 100644 (file)
@@ -263,7 +263,7 @@ class FordExperiments(experiments):
                        #send packets
                        self.multpackSpit(packet0rts=True,packet1rts=True,packet2rts=True)
                        
                        #send packets
                        self.multpackSpit(packet0rts=True,packet1rts=True,packet2rts=True)
                        
-    def speedometerHack(self):
+    def speedometerHack(self, inputs):
         
         self.client.serInit()
         self.spitSetup(500)
         
         self.client.serInit()
         self.spitSetup(500)
@@ -286,7 +286,7 @@ class FordExperiments(experiments):
             print "Current MPH = 1.617(%d)-63.5 = %d" %(packet[9], mph)
                 
             # calculate our new mph and db4 value
             print "Current MPH = 1.617(%d)-63.5 = %d" %(packet[9], mph)
                 
             # calculate our new mph and db4 value
-            mph = mph + 15;
+            mph = mph + inputs[0];
             packet[9] = ( mph + 63.5 ) / 1.617
 
             # load new packet into TXB0 and check time
             packet[9] = ( mph + 63.5 ) / 1.617
 
             # load new packet into TXB0 and check time
@@ -332,7 +332,7 @@ if __name__ == "__main__":
     fe = FordExperiments("../../contrib/ThayerData/");
     
     if( args.verb == 'speedometerHack'):
     fe = FordExperiments("../../contrib/ThayerData/");
     
     if( args.verb == 'speedometerHack'):
-        fe.speedometerHack()
+        fe.speedometerHack(inputs=inputs)
     elif( args.verb == 'fakeVIN'):
         fe.fakeVIN()
         
     elif( args.verb == 'fakeVIN'):
         fe.fakeVIN()