Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi bs non experimental #1092

Merged
merged 6 commits into from Aug 15, 2022
Merged

Multi bs non experimental #1092

merged 6 commits into from Aug 15, 2022

Conversation

knmcguire
Copy link
Member

This PR does two things

  • Updating the default amount of basestations to 4
  • Triming the dev documentation and just give instructions to have more than 4 basestations

@knmcguire
Copy link
Member Author

Firmware compiled with 4:

Version extracted from git
Flash |  253156/1032192 (25%),  779036 free | text: 245808, data: 7348, ccmdata: 0
RAM   |   83336/131072  (64%),   47736 free | bss: 75988, data: 7348
CCM   |   59408/65536   (91%),    6128 free | ccmbss: 59408, ccmdata: 0

compared to when compiling for 2:

Flash |  253156/1032192 (25%),  779036 free | text: 245808, data: 7348, ccmdata: 0
RAM   |   82400/131072  (63%),   48672 free | bss: 75052, data: 7348
CCM   |   59408/65536   (91%),    6128 free | ccmbss: 59408, ccmdata: 0

Copy link
Contributor

@krichardsson krichardsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only worry is what happens in a LH1 system that only supports 2 base stations.

  • Does the code work for LH1 when set to 4 base stations?
  • I suppose the client will show 4 base stations also for LH1, is that OK?

@knmcguire
Copy link
Member Author

This is what it looks like in the cfclient:
image

@knmcguire
Copy link
Member Author

If we would need to change it further in the firmware, it will be either changing all DECK_LIGHTHOUSE_MAX_N_BS to a variable or we do something with the baseStationAvailabledMap parameter?

PARAM_ADD_CORE(PARAM_UINT16 | PARAM_RONLY, bsAvailable, &baseStationAvailabledMap)

The problem is that it is only being set and used in the lighthouseCoreInit()

void lighthouseCoreInit() {
  lighthouseStorageInitializeSystemTypeFromStorage();
  lighthousePositionEstInit();

  for (int i = 0; i < CONFIG_DECK_LIGHTHOUSE_MAX_N_BS; i++) {
    modifyBit(&baseStationAvailabledMap, i, true);
  }
}

Maybe we can continously modify the bit everytime the lighthouse type switched:

static void lighthouseUpdateSystemType() {
// Switch to new pulse processor
switch(systemType) {
case lighthouseBsTypeV1:
pulseProcessorProcessPulse = pulseProcessorV1ProcessPulse;
break;
case lighthouseBsTypeV2:
pulseProcessorProcessPulse = pulseProcessorV2ProcessPulse;
break;

@knmcguire
Copy link
Member Author

Tried this in the client and it does not work... bitcraze/crazyflie-clients-python#623

Read only params and get_param is not meant for this functionality so I will need to turn it into a logging variable as well (since the param one is a core variable). Let's see how it goes.

@knmcguire knmcguire marked this pull request as draft August 11, 2022 14:29
@knmcguire knmcguire marked this pull request as ready for review August 15, 2022 11:34
@krichardsson krichardsson merged commit 4134bae into master Aug 15, 2022
@krichardsson krichardsson deleted the multi-bs-non-experimental branch August 15, 2022 11:53
@krichardsson krichardsson added this to the 2022.09 milestone Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants