mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
- pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344
* add pylint to pre-commit and make everything pass
* Remove uncommented stuff
Co-authored-by: J <user@4800.lan>
old-commit-hash: bd06434243
18 lines
392 B
Python
Executable File
18 lines
392 B
Python
Executable File
#!/usr/bin/env python3
|
|
# pylint: skip-file
|
|
|
|
import cereal.messaging as messaging
|
|
import pcap
|
|
|
|
def main():
|
|
ethernetData = messaging.pub_sock('ethernetData')
|
|
|
|
for ts, pkt in pcap.pcap('eth0'):
|
|
dat = messaging.new_message('ethernetData', 1)
|
|
dat.ethernetData[0].ts = ts
|
|
dat.ethernetData[0].pkt = str(pkt)
|
|
ethernetData.send(dat.to_bytes())
|
|
|
|
if __name__ == "__main__":
|
|
main()
|