Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fixes for Wayland #666

Closed
wants to merge 3 commits into from
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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clan
endif ()
endif ()

if (DEFINED ENV{WAYLAND_DISPLAY})
add_definitions(-D_GLFW_WAYLAND)
endif ()

if (MROVER_IS_JETSON)
add_definitions(-DMROVER_IS_JETSON)
endif ()
Expand Down
5 changes: 4 additions & 1 deletion scripts/build_dawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

git submodule update --init deps/dawn

DAWN_USE_WAYLAND=$( [ ! -z "${WAYLAND_DISPLAY}" ] && echo "ON" || echo "OFF" )

pushd deps/dawn || exit
CC=clang CXX=clang++ cmake \
-B out/Release \
Expand All @@ -20,5 +22,6 @@ CC=clang CXX=clang++ cmake \
-D DAWN_USE_GLFW=OFF \
-D TINT_BUILD_CMD_TOOLS=OFF \
-D TINT_BUILD_DOCS=OFF \
-D TINT_BUILD_TESTS=OFF
-D TINT_BUILD_TESTS=OFF \
-D DAWN_USE_WAYLAND="$DAWN_USE_WAYLAND"
cmake --build out/Release
6 changes: 1 addition & 5 deletions src/teleoperation/backend/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,7 @@ def drive_status_callback(self, msg):
)

def cmd_vel_callback(self, msg):
self.send(
text_data=json.dumps(
{"type": "cmd_vel", "linear_x": msg.linear.x, "angular_z": msg.angular.z}
)
)
self.send(text_data=json.dumps({"type": "cmd_vel", "linear_x": msg.linear.x, "angular_z": msg.angular.z}))

def gps_fix_callback(self, msg):
self.send(
Expand Down
Loading