Using lgtm.com and fixing found alerts (#1452)

* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
This commit is contained in:
George Hotz
2020-05-02 12:07:34 -07:00
committed by GitHub
parent 846a58507f
commit 1295cfe06c
33 changed files with 27 additions and 164 deletions
+1 -4
View File
@@ -1,7 +1,5 @@
#!/usr/bin/env python3
import carla
import os
import time, termios, tty, sys
import time
import math
import atexit
import numpy as np
@@ -9,7 +7,6 @@ import threading
import random
import cereal.messaging as messaging
import argparse
import queue
from common.params import Params
from common.realtime import Ratekeeper
from lib.can import can_function, sendcan_function
-11
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
import time
import cereal.messaging as messaging
from opendbc.can.parser import CANParser
from opendbc.can.packer import CANPacker
@@ -92,13 +91,3 @@ def sendcan_function(sendcan):
return (gas, brake, steer_torque)
if __name__ == "__main__":
pm = messaging.PubMaster(['can'])
sendcan = messaging.sub_sock('sendcan')
idx = 0
while 1:
sendcan_function(sendcan)
can_function(pm, 10.0, idx)
time.sleep(0.01)
idx += 1