VCM: reduce aff stations to 7
This commit is contained in:
parent
d8dff27d83
commit
5f0a5370df
|
|
@ -444,10 +444,10 @@ static int intersection_detected(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
||||||
neighbour->intersecting = true;
|
neighbour->intersecting = true;
|
||||||
neighbour->t_iid = now_us;
|
neighbour->t_iid = now_us;
|
||||||
|
|
||||||
uint32_t intneigh[15];
|
uint32_t intneigh[MC_AFF_STATIONS_N_MAX];
|
||||||
intneigh[0] = neighbour->station_id;
|
intneigh[0] = neighbour->station_id;
|
||||||
int n_intneigh = 1;
|
int n_intneigh = 1;
|
||||||
for (int n = 0; n < coordination->neighbours_len && n_intneigh < 15; ++n) {
|
for (int n = 0; n < coordination->neighbours_len && n_intneigh < MC_AFF_STATIONS_N_MAX; ++n) {
|
||||||
if (coordination->neighbours[n].station_id == neighbour->station_id) {
|
if (coordination->neighbours[n].station_id == neighbour->station_id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -685,6 +685,7 @@ int vcm_check(VCM_t* vcm) {
|
||||||
now < neighbour->t_proposal + MC_RESOLUTION_TIMEOUT /* issued reply */
|
now < neighbour->t_proposal + MC_RESOLUTION_TIMEOUT /* issued reply */
|
||||||
) { /* in maneuver */
|
) { /* in maneuver */
|
||||||
log_debug("[coordination] ignoring VCM - currently in maneuver");
|
log_debug("[coordination] ignoring VCM - currently in maneuver");
|
||||||
|
// TODO dont ignore-> reject
|
||||||
|
|
||||||
} else { /* not in maneuver OR timeout reached */
|
} else { /* not in maneuver OR timeout reached */
|
||||||
if (coordination->session.req) { /* clear previous request if exists */
|
if (coordination->session.req) { /* clear previous request if exists */
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#define MC_MAX_NEIGHBOURS 256
|
#define MC_MAX_NEIGHBOURS 256
|
||||||
#define MC_RESOLUTION_TIMEOUT 500
|
#define MC_RESOLUTION_TIMEOUT 500
|
||||||
#define MC_TRAJECTORIES_N_MAX 4
|
#define MC_TRAJECTORIES_N_MAX 4
|
||||||
#define MC_AFF_STATIONS_N_MAX 15
|
#define MC_AFF_STATIONS_N_MAX 7
|
||||||
#define MC_HASH_LINK_LEN 32
|
#define MC_HASH_LINK_LEN 32
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue