mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-24 13:55:51 +08:00
readded dynamic priority
This commit is contained in:
@@ -47,7 +47,7 @@ void actuators_set(bool_t motors_on) {
|
||||
actuators_mkk.status = BUSY;
|
||||
actuators_mkk.i2c_done = FALSE;
|
||||
actuators_mkk.idx = 0;
|
||||
i2c0_buf[0] = supervision_commands[actuators_mkk.idx];
|
||||
i2c0_buf[0] = supervision.commands[actuators_mkk.idx];
|
||||
i2c0_transmit(actuators_addr[actuators_mkk.idx], 1, &actuators_mkk.i2c_done);
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ extern const uint8_t actuators_addr[];
|
||||
#define ActuatorsMkkI2cHandler() { \
|
||||
actuators_mkk.idx++; \
|
||||
if (actuators_mkk.idx<ACTUATORS_MKK_NB) { \
|
||||
i2c0_buf[0] = supervision_commands[actuators_mkk.idx]; \
|
||||
i2c0_buf[0] = supervision.commands[actuators_mkk.idx]; \
|
||||
i2c0_transmit(actuators_addr[actuators_mkk.idx], 1, &actuators_mkk.i2c_done); \
|
||||
} \
|
||||
else \
|
||||
|
||||
@@ -2,10 +2,17 @@
|
||||
#define BOOZ_SUPERVISION_H
|
||||
|
||||
#include "std.h"
|
||||
#include "airframe.h"
|
||||
|
||||
struct BoozSupervision {
|
||||
int32_t commands[SUPERVISION_NB_MOTOR];
|
||||
int32_t trim[SUPERVISION_NB_MOTOR];
|
||||
uint32_t nb_failure;
|
||||
};
|
||||
|
||||
extern struct BoozSupervision supervision;
|
||||
|
||||
extern void supervision_init(void);
|
||||
extern void supervision_run(bool_t motors_on, int32_t in_cmd[]);
|
||||
|
||||
extern int32_t supervision_commands[];
|
||||
|
||||
#endif /* BOOZ_SUPERVISION_H */
|
||||
|
||||
@@ -43,14 +43,14 @@ struct BoozFmsTestSignal {
|
||||
|
||||
extern struct BoozFmsTestSignal fms_test_signal;
|
||||
|
||||
#define booz_fms_test_signal_SetPeriod(_val) { \
|
||||
fms_test_signal.period = _val; \
|
||||
fms_test_signal.counter = 0; \
|
||||
#define booz_fms_test_signal_SetPeriod(_val) { \
|
||||
fms_test_signal.period = _val; \
|
||||
fms_test_signal.counter = 0; \
|
||||
}
|
||||
|
||||
#define booz_fms_test_signal_SetMode(_val) { \
|
||||
fms_test_signal.mode = _val; \
|
||||
fms_test_signal.counter = 0; \
|
||||
#define booz_fms_test_signal_SetMode(_val) { \
|
||||
fms_test_signal.mode = (enum fms_ts_mode)(_val); \
|
||||
fms_test_signal.counter = 0; \
|
||||
}
|
||||
|
||||
#endif /* BOOZ_FMS_TEST_SIGNAL_H */
|
||||
|
||||
Reference in New Issue
Block a user