diff options
Diffstat (limited to 'src/modules/systemlib')
-rw-r--r-- | src/modules/systemlib/cpuload.c | 3 | ||||
-rw-r--r-- | src/modules/systemlib/hx_stream.h | 4 | ||||
-rw-r--r-- | src/modules/systemlib/mcu_version.h | 4 | ||||
-rw-r--r-- | src/modules/systemlib/mixer/mixer_group.cpp | 4 | ||||
-rw-r--r-- | src/modules/systemlib/pwm_limit/pwm_limit.h | 3 | ||||
-rw-r--r-- | src/modules/systemlib/systemlib.c | 5 |
6 files changed, 14 insertions, 9 deletions
diff --git a/src/modules/systemlib/cpuload.c b/src/modules/systemlib/cpuload.c index 7aa2f3a5f..b41896abd 100644 --- a/src/modules/systemlib/cpuload.c +++ b/src/modules/systemlib/cpuload.c @@ -97,7 +97,8 @@ void cpuload_initialize_once() system_load.tasks[system_load.total_count].start_time = now; system_load.tasks[system_load.total_count].total_runtime = 0; system_load.tasks[system_load.total_count].curr_start_time = 0; - system_load.tasks[system_load.total_count].tcb = sched_gettcb(system_load.total_count); // it is assumed that these static threads have consecutive PIDs + system_load.tasks[system_load.total_count].tcb = sched_gettcb( + system_load.total_count); // it is assumed that these static threads have consecutive PIDs system_load.tasks[system_load.total_count].valid = true; } } diff --git a/src/modules/systemlib/hx_stream.h b/src/modules/systemlib/hx_stream.h index 1f3927222..b674f192d 100644 --- a/src/modules/systemlib/hx_stream.h +++ b/src/modules/systemlib/hx_stream.h @@ -103,7 +103,7 @@ __EXPORT extern void hx_stream_reset(hx_stream_t stream); /** * Prepare to send a frame. * - * Use this in conjunction with hx_stream_send_next to + * Use this in conjunction with hx_stream_send_next to * set the frame to be transmitted. * * Use hx_stream_send() to write to the stream fd directly. @@ -124,7 +124,7 @@ __EXPORT extern int hx_stream_start(hx_stream_t stream, * calling hx_stream_start first. * * @param stream A handle returned from hx_stream_init. - * @return The byte to send, or -1 if there is + * @return The byte to send, or -1 if there is * nothing left to send. */ __EXPORT extern int hx_stream_send_next(hx_stream_t stream); diff --git a/src/modules/systemlib/mcu_version.h b/src/modules/systemlib/mcu_version.h index e951e1e39..f40ac069e 100644 --- a/src/modules/systemlib/mcu_version.h +++ b/src/modules/systemlib/mcu_version.h @@ -50,7 +50,7 @@ enum MCU_REV { /** * Reports the microcontroller unique id. * - * This ID is guaranteed to be unique for every mcu. + * This ID is guaranteed to be unique for every mcu. * @param uid_96_bit A uint32_t[3] array to copy the data to. */ __EXPORT void mcu_unique_id(uint32_t *uid_96_bit); @@ -62,6 +62,6 @@ __EXPORT void mcu_unique_id(uint32_t *uid_96_bit); * @param revstr The full chip name string * @return The silicon revision / version number as integer */ -__EXPORT int mcu_version(char* rev, char** revstr); +__EXPORT int mcu_version(char *rev, char **revstr); __END_DECLS diff --git a/src/modules/systemlib/mixer/mixer_group.cpp b/src/modules/systemlib/mixer/mixer_group.cpp index 3ed99fba0..4220b168d 100644 --- a/src/modules/systemlib/mixer/mixer_group.cpp +++ b/src/modules/systemlib/mixer/mixer_group.cpp @@ -76,8 +76,9 @@ MixerGroup::add_mixer(Mixer *mixer) mpp = &_first; - while (*mpp != nullptr) + while (*mpp != nullptr) { mpp = &((*mpp)->_next); + } *mpp = mixer; mixer->_next = nullptr; @@ -185,6 +186,7 @@ MixerGroup::load_from_buf(const char *buf, unsigned &buflen) /* only adjust buflen if parsing was successful */ buflen = resid; debug("SUCCESS - buflen: %d", buflen); + } else { /* diff --git a/src/modules/systemlib/pwm_limit/pwm_limit.h b/src/modules/systemlib/pwm_limit/pwm_limit.h index 6a667ac6f..6ec9f4b7e 100644 --- a/src/modules/systemlib/pwm_limit/pwm_limit.h +++ b/src/modules/systemlib/pwm_limit/pwm_limit.h @@ -72,7 +72,8 @@ typedef struct { __EXPORT void pwm_limit_init(pwm_limit_t *limit); -__EXPORT void pwm_limit_calc(const bool armed, const unsigned num_channels, const uint16_t *disarmed_pwm, const uint16_t *min_pwm, const uint16_t *max_pwm, const float *output, uint16_t *effective_pwm, pwm_limit_t *limit); +__EXPORT void pwm_limit_calc(const bool armed, const unsigned num_channels, const uint16_t *disarmed_pwm, + const uint16_t *min_pwm, const uint16_t *max_pwm, const float *output, uint16_t *effective_pwm, pwm_limit_t *limit); __END_DECLS diff --git a/src/modules/systemlib/systemlib.c b/src/modules/systemlib/systemlib.c index 82183b0d7..280c30023 100644 --- a/src/modules/systemlib/systemlib.c +++ b/src/modules/systemlib/systemlib.c @@ -66,10 +66,11 @@ systemreset(bool to_bootloader) /* XXX wow, this is evil - write a magic number into backup register zero */ *(uint32_t *)0x40002850 = 0xb007b007; } + up_systemreset(); /* lock up here */ - while(true); + while (true); } static void kill_task(FAR struct tcb_s *tcb, FAR void *arg); @@ -87,7 +88,7 @@ static void kill_task(FAR struct tcb_s *tcb, FAR void *arg) kill(tcb->pid, SIGUSR1); } -int task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, main_t entry, char * const argv[]) +int task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, main_t entry, char *const argv[]) { int pid; |