Pr auto protocol#78
Conversation
7490f39 to
f6b3823
Compare
|
PonomarevDA
left a comment
There was a problem hiding this comment.
Please, update the submodule.
| sitl_dronecan: checks clean | ||
| mkdir -p ${BUILD_DIR}/dronecan_sitl/obj | ||
| cd ${BUILD_DIR}/dronecan_sitl/obj && cmake -DCAN_PROTOCOL=dronecan -DUSE_PLATFORM_UBUNTU=ON -G "Unix Makefiles" ../../.. && make | ||
| cd ${BUILD_DIR}/dronecan_sitl/obj && cmake -DCAN_PROTOCOL=dronecan -DCMAKE_BUILD_TYPE=DEBUG -DUSE_PLATFORM_UBUNTU=ON -G "Unix Makefiles" ../../.. && make |
| } | ||
|
|
||
| void DronecanModule::spin_once() { | ||
| if (uavcanCheckProtocol() == CanardFrameProtocol::CANARD_FRAME_CYPHAL) { |
There was a problem hiding this comment.
Consider modifying ModuleManager::get_active_protocol() instead. It is better to perform protocol check once on the initialization stage rather that check it in each spin call of each module.
| | pwm4.max | PWM duration when setpoint is max (RawCommand is 8191 or Command is 1.0) | | ||
| | pwm4.def | PWM duration when setpoint is negative or there is no setpoint at all. | | ||
| | pwm.cmd_type | 0 means RawCommand, 1 means ArrayCommand, 2 is reserved for hardpoint.Command. | | ||
| | imu.mode | Bit mask to enable IMU features: </br> Bit 1 - enable RawImu publisher, </br> Bit 2 - enable vibration metric publishing to RawImu.integration_interval, </br> Bit 3 - enable FFT acceleration publishing to RawImu.accelerometer_integral, </br> Bit 4 - enable FFT acceleration publishing to RawImu.rate_gyro_integral, </br> By default 15 that mean enable all publishers | |
There was a problem hiding this comment.
We have a conflict with dronecan mini v2 and v3. This should be fixed somehow. We either should have a separated docs for each target or to include imu params to mini v2, but to keep them always disabled (min=max=def=0). But this is out of the scope of this PR.
| return protocol; | ||
| } | ||
|
|
||
| void Module::set_protocol(Module::Protocol new_protocol) { |
There was a problem hiding this comment.
This function should not be public.



This PR adds auto network protocol determination
Test coverage