Repository navigation
Check lighthouse config files and add lh config check - #38
Merged
Merged
Conversation
Files are checked before connecting: the type, the version ('1', or '2'
from earlier cfcli versions) and the base stations. Only Lighthouse V2
base stations are supported: a file with systemType 1 is refused. Base
stations are written in ID order, so reading the same configuration twice
gives the same file, and top-level fields cfcli doesn't know are kept.
The number of base stations the firmware supports (4 by default, up to 16
with CONFIG_DECK_LIGHTHOUSE_MAX_N_BS) is found from the size of the
lighthouse memory. Reads only go through those, and a write with base
station IDs the firmware doesn't have is refused before anything is
written.
`lh config check` compares the Crazyflie's configuration with a file, per
base station: how far the geometry moved and turned, and whether the
calibration belongs to another base station (the Crazyflie takes the
calibration of a base station with another UID). It exits with the new
exit code 60 when they differ.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #37.
Checking files
'1', or'2'from earlier cfcli versions), and that the base station IDs and values are valid.systemType: 1is refused. A missingsystemTypemeans V2, as in cflib.Number of base stations
cfcli gets the number of base stations the firmware supports from the size of the lighthouse memory: 4 by default, up to 16 with
CONFIG_DECK_LIGHTHOUSE_MAX_N_BS. Reads only go through those IDs. A write with IDs the firmware doesn't have is refused before anything is written.lh config checkCompares the Crazyflie's configuration with a file (
-i FILEor stdin), per base station:It exits with the new exit code 60 (
Differs) when they differ.--csvis supported.Testing
lh config checkwas run with three files:lh config readsaved from it: exit 0