mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:03:34 +08:00
libuavcan testing: TestNetwork<> helper
This commit is contained in:
@@ -30,9 +30,9 @@ struct GlobalTimeSyncTestNetwork
|
||||
, master_low(120)
|
||||
, master_high(8)
|
||||
{
|
||||
slave.can.other = &master_low.can;
|
||||
master_low.can.other = &slave.can;
|
||||
master_high.can.other = &slave.can;
|
||||
slave.can.others.insert(&master_low.can);
|
||||
master_low.can.others.insert(&slave.can);
|
||||
master_high.can.others.insert(&slave.can);
|
||||
}
|
||||
|
||||
void spinAll(uavcan::MonotonicDuration duration = uavcan::MonotonicDuration::fromMSec(9))
|
||||
|
||||
@@ -109,7 +109,7 @@ TEST(GlobalTimeSyncSlave, Basic)
|
||||
master2_clock.monotonic_auto_advance = 1000;
|
||||
master2_clock.preserve_utc = true;
|
||||
PairableCanDriver master2_can(master2_clock);
|
||||
master2_can.other = &nodes.can_a;
|
||||
master2_can.others.insert(&nodes.can_a);
|
||||
TestNode master2_node(master2_can, master2_clock, 8);
|
||||
|
||||
uavcan::Publisher<uavcan::protocol::GlobalTimeSync> gts_pub2(master2_node);
|
||||
|
||||
Reference in New Issue
Block a user