mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 15:43:35 +08:00
All unit tests compile, but crash. This is the most horrifying commit I've ever made.
This commit is contained in:
+2
-2
@@ -207,7 +207,7 @@ public:
|
||||
* storage backend using key 'cluster_size'.
|
||||
* Returns negative error code.
|
||||
*/
|
||||
int init(uint8_t init_cluster_size = ClusterSizeUnknown)
|
||||
int init(const uint8_t init_cluster_size, const TransferPriority priority)
|
||||
{
|
||||
/*
|
||||
* Figuring out the cluster size
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
{
|
||||
return res;
|
||||
}
|
||||
(void)discovery_pub_.setPriority(TransferPriorityLow);
|
||||
discovery_pub_.setPriority(priority);
|
||||
|
||||
res = discovery_sub_.start(DiscoveryCallback(this, &ClusterManager::handleDiscovery));
|
||||
if (res < 0)
|
||||
|
||||
@@ -727,7 +727,7 @@ public:
|
||||
* value from the persistent storage will be used. If not set and there's no such key
|
||||
* in the persistent storage, initialization will fail.
|
||||
*/
|
||||
int init(uint8_t cluster_size = ClusterManager::ClusterSizeUnknown)
|
||||
int init(const uint8_t cluster_size, const TransferPriority priority)
|
||||
{
|
||||
/*
|
||||
* Initializing state variables
|
||||
@@ -748,7 +748,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
res = cluster_.init(cluster_size);
|
||||
res = cluster_.init(cluster_size, priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
|
||||
@@ -246,12 +246,14 @@ public:
|
||||
, node_discoverer_(node, tracer, *this)
|
||||
{ }
|
||||
|
||||
int init(const UniqueID& own_unique_id, const uint8_t cluster_size = ClusterManager::ClusterSizeUnknown)
|
||||
int init(const UniqueID& own_unique_id,
|
||||
const uint8_t cluster_size = ClusterManager::ClusterSizeUnknown,
|
||||
const TransferPriority priority = TransferPriority::OneHigherThanLowest)
|
||||
{
|
||||
/*
|
||||
* Initializing Raft core first, because the next step requires Log to be loaded
|
||||
*/
|
||||
int res = raft_core_.init(cluster_size);
|
||||
int res = raft_core_.init(cluster_size, priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
@@ -276,13 +278,13 @@ public:
|
||||
/*
|
||||
* Misc
|
||||
*/
|
||||
res = allocation_request_manager_.init();
|
||||
res = allocation_request_manager_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
||||
res = node_discoverer_.init();
|
||||
res = node_discoverer_.init(priority);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user