mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
HAL_ChibiOS: run can loop much more often
this allows for much higher ESC and servo rates, as it gives more changes for frames to get out
This commit is contained in:
parent
0dc77421e8
commit
afb36ec168
@ -76,8 +76,6 @@ void CANManager::_timer_tick()
|
||||
|
||||
if (p_uavcan != nullptr) {
|
||||
p_uavcan->do_cyclic();
|
||||
} else {
|
||||
hal.console->printf("p_uavcan is nullptr");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@
|
||||
#define MAX_NUMBER_OF_CAN_DRIVERS 2
|
||||
#define CAN_STM32_RX_QUEUE_SIZE 64
|
||||
class AP_UAVCAN;
|
||||
using namespace uavcan_stm32;
|
||||
|
||||
namespace ChibiOS {
|
||||
/**
|
||||
@ -76,8 +75,8 @@ private:
|
||||
AP_UAVCAN *p_uavcan;
|
||||
bool initialized_;
|
||||
uint32_t bitrate_;
|
||||
CanInitHelper<CAN_STM32_RX_QUEUE_SIZE> can_helper;
|
||||
uavcan_stm32::CanInitHelper<CAN_STM32_RX_QUEUE_SIZE> can_helper;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -313,7 +313,7 @@ void Scheduler::_uavcan_thread(void *arg)
|
||||
sched->delay_microseconds(20000);
|
||||
}
|
||||
while (true) {
|
||||
sched->delay_microseconds(1000);
|
||||
sched->delay_microseconds(100);
|
||||
for (int i = 0; i < MAX_NUMBER_OF_CAN_INTERFACES; i++) {
|
||||
if(hal.can_mgr[i] != nullptr) {
|
||||
CANManager::from(hal.can_mgr[i])->_timer_tick();
|
||||
|
Loading…
Reference in New Issue
Block a user