Skip to content

Commit

Permalink
src/daq_sensor.c: in case of error, continue instead of break
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Schmid <tom@lfence.de>
  • Loading branch information
rckTom committed Aug 11, 2023
1 parent ac51bc3 commit 9be571b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions boards/arm/alturia_v1_2/alturia_v1_2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
servos: servos {
compatible = "servos";
servo1 {
pwms = <&pwm4 3 50000000 PWM_POLARITY_NORMAL>;
pwms = <&pwm4 3 5000000 PWM_POLARITY_NORMAL>;
};
servo2 {
pwms = <&pwm4 4 50000000 PWM_POLARITY_NORMAL>;
pwms = <&pwm4 4 5000000 PWM_POLARITY_NORMAL>;
};
};
};
Expand Down
5 changes: 3 additions & 2 deletions src/daq_sensor.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "daq.h"
#include <zephyr/kernel.h>
#include <zephyr/zephyr.h>
#include <zephyr/logging/log.h>
#include "alturia.h"
Expand Down Expand Up @@ -137,14 +138,14 @@ static void multi_sensor_sample_thread(struct sensor_thread_data *data, int len)
// wait for sample timer signal
if (k_mutex_lock(&condvar_lock, K_FOREVER) != 0) {
LOG_DBG("unable to block trigger mutex");
break;
continue;
}

k_condvar_wait(&sample_timer_sync_condvar, &condvar_lock, K_FOREVER);

if (k_mutex_unlock(&condvar_lock) != 0) {
LOG_DBG("unable to unlock trigger mutex");
break;
continue;
}

for(int i = 0; i < len; i++) {
Expand Down

0 comments on commit 9be571b

Please sign in to comment.