Closed dfarrell07 closed 11 years ago
Also, I suggest running check_pep8.sh script before committing. Its output explodes if the repo contains anything like the PEP8 problems above.
daniel:~/robot/current/bot$ ./scripts/check_pep8.sh [69/1834]
./driver/mech_driver.py:26:5: W191 indentation contains tabs
./driver/mech_driver.py:26:5: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:40:1: W191 indentation contains tabs
./driver/mech_driver.py:40:1: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:40:1: W293 blank line contains whitespace
./driver/mech_driver.py:42:5: E303 too many blank lines (2)
./driver/mech_driver.py:59:9: E303 too many blank lines (2)
./driver/mech_driver.py:59:39: E225 missing whitespace around operator
./driver/mech_driver.py:59:42: E225 missing whitespace around operator
./driver/mech_driver.py:59:51: E225 missing whitespace around operator
./driver/mech_driver.py:60:40: E225 missing whitespace around operator
./driver/mech_driver.py:60:43: E225 missing whitespace around operator
./driver/mech_driver.py:60:53: E225 missing whitespace around operator
./driver/mech_driver.py:61:38: E225 missing whitespace around operator
./driver/mech_driver.py:61:41: E225 missing whitespace around operator
./driver/mech_driver.py:61:51: E225 missing whitespace around operator
./driver/mech_driver.py:62:39: E225 missing whitespace around operator
./driver/mech_driver.py:62:42: E225 missing whitespace around operator
./driver/mech_driver.py:62:51: E225 missing whitespace around operator
./driver/mech_driver.py:63:1: W191 indentation contains tabs
./driver/mech_driver.py:63:1: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:63:1: W293 blank line contains whitespace
./driver/mech_driver.py:64:1: W191 indentation contains tabs
./driver/mech_driver.py:64:1: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:65:80: E501 line too long (95 characters)
./driver/mech_driver.py:65:1: W191 indentation contains tabs
./driver/mech_driver.py:65:1: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:66:1: W191 indentation contains tabs
./driver/mech_driver.py:66:1: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:67:1: W191 indentation contains tabs
./driver/mech_driver.py:67:1: E101 indentation contains mixed spaces and tabs
./driver/mech_driver.py:68:1: W191 indentation contains tabs
<snip>
Sorry about that. I worked on fixing these but haven't gotten around to commiting them.
I've been having trouble with git bash so I finally got around to installing a linux dual boot, but I'm still having some trouble getting everything working on that.
Also, I suggest running check_pep8.shhttps://github.com/NCSUhardware/bot/blob/master/scripts/check_pep8.shscript before committing. Its output explodes if the repo contains anything like the PEP8 problems above.
daniel:~/robot/current/bot$ ./scripts/check_pep8.sh
[69/1834] ./driver/mech_driver.py:26:5: W191 indentation contains tabs ./driver/mech_driver.py:26:5: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:40:1: W191 indentation contains tabs ./driver/mech_driver.py:40:1: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:40:1: W293 blank line contains whitespace ./driver/mech_driver.py:42:5: E303 too many blank lines (2) ./driver/mech_driver.py:59:9: E303 too many blank lines (2) ./driver/mech_driver.py:59:39: E225 missing whitespace around operator ./driver/mech_driver.py:59:42: E225 missing whitespace around operator ./driver/mech_driver.py:59:51: E225 missing whitespace around operator ./driver/mech_driver.py:60:40: E225 missing whitespace around operator ./driver/mech_driver.py:60:43: E225 missing whitespace around operator ./driver/mech_driver.py:60:53: E225 missing whitespace around operator ./driver/mech_driver.py:61:38: E225 missing whitespace around operator ./driver/mech_driver.py:61:41: E225 missing whitespace around operator ./driver/mech_driver.py:61:51: E225 missing whitespace around operator ./driver/mech_driver.py:62:39: E225 missing whitespace around operator ./driver/mech_driver.py:62:42: E225 missing whitespace around operator ./driver/mech_driver.py:62:51: E225 missing whitespace around operator ./driver/mech_driver.py:63:1: W191 indentation contains tabs ./driver/mech_driver.py:63:1: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:63:1: W293 blank line contains whitespace ./driver/mech_driver.py:64:1: W191 indentation contains tabs ./driver/mech_driver.py:64:1: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:65:80: E501 line too long (95 characters) ./driver/mech_driver.py:65:1: W191 indentation contains tabs ./driver/mech_driver.py:65:1: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:66:1: W191 indentation contains tabs ./driver/mech_driver.py:66:1: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:67:1: W191 indentation contains tabs ./driver/mech_driver.py:67:1: E101 indentation contains mixed spaces and tabs ./driver/mech_driver.py:68:1: W191 indentation contains tabs
I'm sure quite a few team members would be able to help out with any Linux problems you're having. Feel free to reach out to us. :)
I believe that all of these problems have been corrected. Good job, closing issue.
Recent changes to mech_driver introduced some minor problems.
self.max_speed
.For example, here's a quick test in an interactive Python shell as well as the logger output (logging statements added by me, not in the repo).
front_left_ds = min(front_left_ds, 100)
. The same idea can be applied to all of the similar conditionals in the code. It may also be more elegant to store these values in a dict. You would then be able to iterate over all the vars, repeating this check for each. Passing them to iowrite could also be a single call with the full dict as a param. Just a thought, very low priority.