forked from Archive/PX4-Autopilot
Revert "Intrusive changes made for UAVCAN profiling. Will be reverted in the next commit (this one is needed to keep the changes in history)"
This reverts commit 4c301d9dcf180e39186fa6753c7a3d3215b3cfa7.
This commit is contained in:
parent
6bbacc4271
commit
d87bb4dfcb
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
# Default to auto-start mode.
|
||||
#
|
||||
set MODE none
|
||||
set MODE autostart
|
||||
|
||||
set FRC /fs/microsd/etc/rc.txt
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
|
@ -656,9 +656,6 @@ then
|
|||
# End of autostart
|
||||
fi
|
||||
|
||||
param set UAVCAN_ENABLE 1
|
||||
sh /etc/init.d/rc.uavcan
|
||||
|
||||
# There is no further processing, so we can free some RAM
|
||||
# XXX potentially unset all script variables.
|
||||
unset TUNE_ERR
|
||||
|
|
|
@ -105,7 +105,7 @@ ARCHDEFINES += -DCONFIG_ARCH_BOARD_$(CONFIG_BOARD)
|
|||
# optimisation flags
|
||||
#
|
||||
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
|
||||
-g3 \
|
||||
-g \
|
||||
-fno-strict-aliasing \
|
||||
-fno-strength-reduce \
|
||||
-fomit-frame-pointer \
|
||||
|
|
|
@ -98,11 +98,11 @@ void UavcanEscController::update_outputs(float *outputs, unsigned num_outputs)
|
|||
/*
|
||||
* Rate limiting - we don't want to congest the bus
|
||||
*/
|
||||
// const auto timestamp = _node.getMonotonicTime();
|
||||
// if ((timestamp - _prev_cmd_pub).toUSec() < (1000000 / MAX_RATE_HZ)) {
|
||||
// return;
|
||||
// }
|
||||
// _prev_cmd_pub = timestamp;
|
||||
const auto timestamp = _node.getMonotonicTime();
|
||||
if ((timestamp - _prev_cmd_pub).toUSec() < (1000000 / MAX_RATE_HZ)) {
|
||||
return;
|
||||
}
|
||||
_prev_cmd_pub = timestamp;
|
||||
|
||||
/*
|
||||
* Fill the command message
|
||||
|
|
|
@ -357,16 +357,6 @@ int UavcanNode::run()
|
|||
_actuator_direct_poll_fd_num = add_poll_fd(_actuator_direct_sub);
|
||||
}
|
||||
|
||||
_esc_controller.arm_all_escs(true);
|
||||
while (true) {
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
node_spin_once();
|
||||
_outputs.noutputs = 8;
|
||||
_esc_controller.update_outputs(_outputs.output, _outputs.noutputs);
|
||||
}
|
||||
::usleep(1000);
|
||||
}
|
||||
|
||||
while (!_task_should_exit) {
|
||||
// update actuator controls subscriptions if needed
|
||||
if (_groups_subscribed != _groups_required) {
|
||||
|
|
Loading…
Reference in New Issue