Support opizero2w/opizero3 Ubuntu24.04

This commit is contained in:
toolsmanhehe
2024-09-11 21:00:33 +08:00
committed by baiywt
parent a0a22dc9bb
commit c8894b658c
48 changed files with 580 additions and 20 deletions

View File

@@ -329,9 +329,9 @@ can_transmit_to_channel() {
if [[ $USE_IWCONFIG -eq 0 ]]; then
if [[ $FREQ_BAND == 2.4 ]]; then
CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " 24[0-9][0-9] MHz \[${CHANNEL_NUM}\]")
CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " \(24[0-9][0-9]\|24[0-9][0-9].[0-9]\) MHz \[${CHANNEL_NUM}\]")
else
CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " \(49[0-9][0-9]\|5[0-9]\{3\}\) MHz \[${CHANNEL_NUM}\]")
CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " \(49[0-9][0-9].[0-9]\|5[0-9]\{3\}.[0-9]\|49[0-9][0-9]\|5[0-9]\{3\}\) MHz \[${CHANNEL_NUM}\]")
fi
[[ -z "${CHANNEL_INFO}" ]] && return 1
[[ "${CHANNEL_INFO}" == *no\ IR* ]] && return 1

View File

@@ -5,7 +5,7 @@ release=$(lsb_release -cs)
sudo apt update
if [[ $release =~ focal|bionic|buster ]]; then
sudo apt-get -y install qt5-default qttools5-dev-tools qtbase5-doc-html qt5-assistant qt5-doc
elif [[ $release =~ bullseye|bookworm|jammy ]]; then
elif [[ $release =~ bullseye|bookworm|jammy|noble ]]; then
sudo apt-get -y install qttools5-dev-tools qtbase5-doc-html qt5-assistant qt5-doc qt5-qmake qt5-qmake-bin
else
echo "Unsupported system!"

View File

@@ -71,4 +71,23 @@ if [[ $version == "ros2" && $release =~ jammy ]]; then
fi
if [[ $version == "ros2" && $release =~ noble ]]; then
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
echo "deb [arch=$(dpkg --print-architecture)] ${mirror_url}/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt install -y ros-jazzy-desktop
sudo apt install -y ros-dev-tools
sudo sh -c 'echo "source /opt/ros/jazzy/setup.bash" >> /root/.bashrc'
echo "source /opt/ros/jazzy/setup.bash" >> /home/orangepi/.bashrc
source /opt/ros/jazzy/setup.bash
ros2 -h
exit
fi
echo "Unsupported System!"

View File

@@ -27,3 +27,12 @@ if [[ -f /opt/ros/humble/setup.bash ]]; then
ros2 run demo_nodes_py listener
fi
if [[ -f /opt/ros/jazzy/setup.bash ]]; then
source /opt/ros/jazzy/setup.bash
ros2 run demo_nodes_cpp talker &
ros2 run demo_nodes_py listener
fi