mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 07:07:58 +00:00
feat: make client compatible with python3/clover0.23
This commit is contained in:
@@ -6,7 +6,7 @@ After=clover.service
|
||||
[Service]
|
||||
WorkingDirectory=/home/pi/clever-show/drone
|
||||
ExecStart=/bin/bash -c ". /home/pi/catkin_ws/devel/setup.sh; \
|
||||
ROS_HOSTNAME=`hostname`.local /usr/bin/python /home/pi/clever-show/drone/client.py"
|
||||
ROS_HOSTNAME=`hostname`.local /usr/bin/python3 /home/pi/clever-show/drone/client.py"
|
||||
KillSignal=SIGKILL
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
@@ -7,7 +7,7 @@ After=network.target
|
||||
User=pi
|
||||
WorkingDirectory=/home/pi/clever-show/drone
|
||||
ExecStart=/bin/bash -c ". /home/pi/catkin_ws/devel/setup.sh; \
|
||||
ROS_HOSTNAME=`hostname`.local /usr/bin/python /home/pi/clever-show/drone/failsafe.py"
|
||||
ROS_HOSTNAME=`hostname`.local /usr/bin/python3 /home/pi/clever-show/drone/failsafe.py"
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import logging
|
||||
import datetime
|
||||
import threading
|
||||
import subprocess
|
||||
from collections import namedtuple
|
||||
from watchdog.observers import Observer
|
||||
from watchdog.events import FileSystemEventHandler
|
||||
|
||||
@@ -89,11 +88,11 @@ emergency = False
|
||||
|
||||
logging.basicConfig( # TODO all prints as logs
|
||||
level=logging.DEBUG, # INFO
|
||||
stream=sys.stdout,
|
||||
format="%(asctime)s [%(name)-7.7s] [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s",
|
||||
handlers=[
|
||||
logging.StreamHandler(sys.stdout),
|
||||
])
|
||||
]
|
||||
)
|
||||
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
handler.setLevel(logging.DEBUG)
|
||||
@@ -763,7 +762,10 @@ class Telemetry:
|
||||
|
||||
@classmethod
|
||||
def get_git_version(cls):
|
||||
return subprocess.check_output("git log --pretty=format:'%h' -n 1", shell=True)
|
||||
result = subprocess.check_output("git log --pretty=format:'%h' -n 1", shell=True, universal_newlines=True)
|
||||
if isinstance(result, bytes):
|
||||
result = result.decode("ascii")
|
||||
return result.strip()
|
||||
|
||||
@classmethod
|
||||
def get_config_version(cls):
|
||||
|
||||
@@ -41,7 +41,6 @@ emergency_land_decrease_thrust_after = config.emergency_land_decrease_thrust_aft
|
||||
|
||||
logging.basicConfig( # TODO all prints as logs
|
||||
level=logging.DEBUG, # INFO
|
||||
stream=sys.stdout,
|
||||
format="%(asctime)s [%(name)-7.7s] [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s",
|
||||
handlers=[
|
||||
logging.StreamHandler(sys.stdout),
|
||||
|
||||
Reference in New Issue
Block a user