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

271 optimizing lh2 code #1

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions bsp/lh2_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,10 @@

//=========================== defines ==========================================

#define LH2_4_LOCATIONS_COUNT 2 ///< Number of computed locations
#define LH2_4_BASESTATION_COUNT 4 ///< Number of supported concurrent basestations

#define LH2_4_SWEEP_COUNT 2 ///< Number of laser sweeps per basestations rotation


/// LH2 internal state
typedef enum {
DB_LH2_4_IDLE, ///< the lh2 engine is idle
DB_LH2_4_RUNNING, ///< the lh2 engine is running
DB_LH2_4_RAW_DATA_READY, ///< some lh2 raw data is available
DB_LH2_4_LOCATION_READY, ///< some lh2 location is ready to be read
} db_lh2_4_state_t;

/// LH2 data ready buffer state
typedef enum {
DB_LH2_4_NO_NEW_DATA, ///< The data occupying this spot of the buffer has already been sent.
Expand All @@ -59,7 +49,6 @@ typedef struct __attribute__((packed)) {

/// LH2 instance (one row per laser sweep, and one column per basestation.)
typedef struct {
db_lh2_4_state_t state; ///< current state of the lh2 engine
db_lh2_4_raw_data_t raw_data[2][LH2_4_BASESTATION_COUNT]; ///< raw data decoded from the lighthouse
db_lh2_4_location_t locations[2][LH2_4_BASESTATION_COUNT]; ///< buffer holding the computed locations
uint32_t timestamps[2][LH2_4_BASESTATION_COUNT]; ///< timestamp of when the raw data was received
Expand Down
Loading
Loading