VCM: reduce aff stations to 7

This commit is contained in:
emanuel 2022-11-21 09:08:12 +00:00
parent d8dff27d83
commit 5f0a5370df
2 changed files with 4 additions and 3 deletions

View File

@ -444,10 +444,10 @@ static int intersection_detected(VCM_t* vcm, mc_neighbour_s* neighbour) {
neighbour->intersecting = true;
neighbour->t_iid = now_us;
uint32_t intneigh[15];
uint32_t intneigh[MC_AFF_STATIONS_N_MAX];
intneigh[0] = neighbour->station_id;
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) {
continue;
}
@ -685,6 +685,7 @@ int vcm_check(VCM_t* vcm) {
now < neighbour->t_proposal + MC_RESOLUTION_TIMEOUT /* issued reply */
) { /* in maneuver */
log_debug("[coordination] ignoring VCM - currently in maneuver");
// TODO dont ignore-> reject
} else { /* not in maneuver OR timeout reached */
if (coordination->session.req) { /* clear previous request if exists */

View File

@ -9,7 +9,7 @@
#define MC_MAX_NEIGHBOURS 256
#define MC_RESOLUTION_TIMEOUT 500
#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
typedef struct {