Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion launch_chffrplus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ if [ -z "$PASSIVE" ]; then
export PASSIVE="1"
fi

[ ! -d "/data/community" ] && mkdir /data/community

if [ ! -d "/data/community/logs" ]; then
mkdir /data/community/logs
echo "Created directory /data/community/logs"
fi

DATE=$(date +%d-%m-%y--%I:%M%p)
LOG_DIR="/data/community/logs/$DATE"

STAGING_ROOT="/data/safe_staging"

function launch {
Expand Down Expand Up @@ -121,7 +131,7 @@ function launch {

# start manager
cd selfdrive
./manager.py
./manager.py |& tee "$LOG_DIR"

# if broken, keep on screen error
while true; do sleep 1; done
Expand Down
2 changes: 0 additions & 2 deletions launch_openpilot.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/bash

export PASSIVE="0"
exec ./launch_chffrplus.sh

4 changes: 3 additions & 1 deletion selfdrive/crash.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def install():
if username is not None and isinstance(username, str):
error_tags['username'] = username

if 'github.com/ShaneSmiskol' in origin: # only send errors if my fork
if 'github.com/shanesmiskol' in origin: # only send errors if my fork
sentry_uri = 'https://7f66878806a948f9a8b52b0fe7781201@o237581.ingest.sentry.io/5252098'
print('FORK!!!!!')
else: # else use stock
print('STOCK!!!!!')
sentry_uri = 'https://1994756b5e6f41cf939a4c65de45f4f2:cefebaf3a8aa40d182609785f7189bd7@app.getsentry.com/77924'
client = Client(sentry_uri,
install_sys_hook=False, transport=HTTPTransport, release=version, tags=error_tags)
Expand Down
17 changes: 17 additions & 0 deletions selfdrive/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,26 @@ def unblock_stdout():
import traceback
from multiprocessing import Process


class Logger(object):
def __init__(self):
self.terminal = sys.stdout
self.log = open("/data/community/logs/test.log", "a")

def write(self, message):
self.terminal.write(message)
self.log.write(message)

def flush(self):
# this flush method is needed for python 3 compatibility.
# this handles the flush command by doing nothing.
# you might want to specify some extra behavior here.
pass

# Run scons
spinner = Spinner()
spinner.update("0")
print("DEBUG TEXT!")

if not prebuilt:
for retry in [True, False]:
Expand Down
2 changes: 2 additions & 0 deletions selfdrive/thermald/thermald.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ def thermald_thread():
msg.thermal.batteryCurrent = get_battery_current()
msg.thermal.batteryVoltage = get_battery_voltage()
msg.thermal.usbOnline = get_usb_present()
tmp = 54
tmp /= 0

# Fake battery levels on uno for frame
if is_uno:
Expand Down