Skip to content

Commit 5dc9c16

Browse files
committed
解决logger中polling_topic_sub指针判断错误
Signed-off-by: latercomer <[email protected]>
1 parent 8837ce8 commit 5dc9c16

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/build-action-test.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,27 @@ jobs:
5050
with:
5151
python-version: "3.11"
5252

53-
- name: Install Build Toolchain
53+
- name: Setup Compile System
5454
shell: bash
5555
run: |
56+
sudo apt-get update -y
57+
sudo apt-get upgrade -y
5658
sudo apt-get install gcc gdb-multiarch -y
5759
sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi -y
5860
sudo apt-get install qemu-system-arm -y
5961
# sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev -y
6062
python3 -m pip install -r tools/install/requirements_v3.txt
6163
64+
- name: Display Toolchain Info
65+
shell: bash
66+
run: |
67+
echo "python: $(python3 -V), $(which python3)"
68+
echo "pip: $(pip3 -V)"
69+
echo "scons: $(which scons)"
70+
echo "$(scons --version)"
71+
echo "gcc: $(which arm-none-eabi-gcc)"
72+
echo "$(arm-none-eabi-gcc --version)"
73+
6274
- name: Build bsps/silt/qemu
6375
shell: bash
6476
run: |

apps/storage/logger/logger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ void Logger::run() {
634634
}
635635

636636
/* init the update timer */
637-
struct hrt_call timer_call {};
637+
struct hrt_call timer_call{};
638638

639639
rt_sem_init(&_timer_callback_data.semaphore, "callback_lock", 0, RT_IPC_FLAG_PRIO);
640640
/* timer_semaphore use case is a signal */
@@ -645,7 +645,7 @@ void Logger::run() {
645645
if (_polling_topic_meta) {
646646
polling_topic_sub = orb_subscribe(_polling_topic_meta);
647647

648-
if (polling_topic_sub < 0) {
648+
if (!polling_topic_sub) {
649649
PX4_ERR("Failed to subscribe (%i)", errno);
650650
}
651651

@@ -913,7 +913,7 @@ void Logger::run() {
913913
// stop the writer thread
914914
_writer.thread_stop();
915915

916-
if (polling_topic_sub >= 0) {
916+
if (polling_topic_sub) {
917917
orb_unsubscribe(polling_topic_sub);
918918
}
919919

0 commit comments

Comments
 (0)