-
-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I2cDev_PPmod periodic sensor query (#2315)
* Add more data tx from esp * command enum rework. +1 for JT * filter 0 query interval * i2c timeouts and sanity check on ppmod
- Loading branch information
Showing
5 changed files
with
181 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#ifndef I2CDEV_PPMOD_HELPER_H | ||
#define I2CDEV_PPMOD_HELPER_H | ||
|
||
#include <cstdint> | ||
|
||
enum class SupportedFeatures : uint64_t { | ||
FEAT_NONE = 0, | ||
FEAT_EXT_APP = 1 << 0, | ||
FEAT_UART = 1 << 1, | ||
FEAT_GPS = 1 << 2, | ||
FEAT_ORIENTATION = 1 << 3, | ||
FEAT_ENVIRONMENT = 1 << 4, | ||
FEAT_LIGHT = 1 << 5, | ||
FEAT_DISPLAY = 1 << 6 | ||
}; | ||
|
||
typedef struct | ||
{ | ||
uint8_t hour; /*!< Hour */ | ||
uint8_t minute; /*!< Minute */ | ||
uint8_t second; /*!< Second */ | ||
uint16_t thousand; /*!< Thousand */ | ||
} gps_time_t; | ||
|
||
typedef struct | ||
{ | ||
uint8_t day; /*!< Day (start from 1) */ | ||
uint8_t month; /*!< Month (start from 1) */ | ||
uint16_t year; /*!< Year (start from 2000) */ | ||
} gps_date_t; | ||
|
||
typedef struct | ||
{ | ||
float latitude; /*!< Latitude (degrees) */ | ||
float longitude; /*!< Longitude (degrees) */ | ||
float altitude; /*!< Altitude (meters) */ | ||
uint8_t sats_in_use; /*!< Number of satellites in use */ | ||
uint8_t sats_in_view; /*!< Number of satellites in view */ | ||
float speed; /*!< Ground speed, unit: m/s */ | ||
gps_date_t date; /*!< Fix date */ | ||
gps_time_t tim; /*!< time in UTC */ | ||
} gpssmall_t; | ||
|
||
typedef struct | ||
{ | ||
float angle; | ||
float tilt; | ||
} orientation_t; | ||
|
||
typedef struct | ||
{ | ||
float temperature; | ||
float humidity; | ||
float pressure; | ||
} environment_t; | ||
|
||
// light is uint16_t | ||
|
||
#endif |
This file contains 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