add another crc to make sure we don't get corrupt data
This commit is contained in:
@@ -15,80 +15,83 @@
|
||||
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
char syncPhrase[10];
|
||||
uint32_t packetIndex;
|
||||
uint8_t packetType;
|
||||
uint32_t missionTimer;
|
||||
char syncPhrase[10]; //10
|
||||
uint32_t packetIndex; //14
|
||||
uint8_t packetType; //15
|
||||
uint32_t missionTimer; //19
|
||||
uint32_t CRCCheck;
|
||||
} DownBoundPacket;
|
||||
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
// MPU data
|
||||
int16_t accelerationX;
|
||||
int16_t accelerationY;
|
||||
int16_t accelerationZ;
|
||||
int16_t gyroX;
|
||||
int16_t gyroY;
|
||||
int16_t gyroZ;
|
||||
int16_t magnetX;
|
||||
int16_t magnetY;
|
||||
int16_t magnetZ;
|
||||
int16_t accelerometer_temperature;
|
||||
int16_t accelerationX;//21
|
||||
int16_t accelerationY; //23
|
||||
int16_t accelerationZ;//25
|
||||
int16_t gyroX;//27
|
||||
int16_t gyroY;//29
|
||||
int16_t gyroZ;//31
|
||||
int16_t magnetX;//33
|
||||
int16_t magnetY;//35
|
||||
int16_t magnetZ;//37
|
||||
int16_t accelerometer_temperature;//39
|
||||
|
||||
// CCS data
|
||||
uint16_t eCO2;
|
||||
uint16_t tvoc;
|
||||
uint8_t currentCCS;
|
||||
uint16_t rawCCSData;
|
||||
uint16_t eCO2;//41
|
||||
uint16_t tvoc;//43
|
||||
uint8_t currentCCS;//44
|
||||
uint16_t rawCCSData;//46
|
||||
|
||||
// INA data
|
||||
uint16_t volts;
|
||||
uint16_t current;
|
||||
uint16_t power;
|
||||
uint16_t volts;//48
|
||||
uint16_t current;//50
|
||||
uint16_t power;//52
|
||||
|
||||
// BME DATA
|
||||
uint32_t temperature;
|
||||
uint16_t humidity;
|
||||
uint32_t pressure;
|
||||
uint16_t gas;
|
||||
bool gas_valid;
|
||||
bool heater_stable;
|
||||
uint8_t gas_range;
|
||||
uint8_t gas_index;
|
||||
uint32_t temperature;//56
|
||||
uint16_t humidity;//58
|
||||
uint32_t pressure;//62
|
||||
uint16_t gas;//64
|
||||
bool gas_valid;//later
|
||||
bool heater_stable;//later
|
||||
uint8_t gas_range;//65
|
||||
uint8_t gas_index;//66
|
||||
|
||||
float air_temperature; /*!< air temperature in degrees celsius */
|
||||
float relative_humidity; /*!< relative humidity in percent */
|
||||
float barometric_pressure; /*!< barometric pressure in hecto-pascal */
|
||||
float gas_resistance; /*!< gas resistance in ohms */
|
||||
uint16_t iaq_score; /*!< air quality index (0..500) */
|
||||
float temperature_score;
|
||||
float humidity_score;
|
||||
float gas_score;
|
||||
float air_temperature; /*!< air temperature in degrees celsius */ //70
|
||||
float relative_humidity; /*!< relative humidity in percent */ //74
|
||||
float barometric_pressure; /*!< barometric pressure in hecto-pascal */ //78
|
||||
float gas_resistance; /*!< gas resistance in ohms */ //82
|
||||
uint16_t iaq_score; /*!< air quality index (0..500) */ //84
|
||||
float temperature_score; //88
|
||||
float humidity_score; //92
|
||||
float gas_score; //96
|
||||
|
||||
// GPS DATA
|
||||
uint32_t time_seconds; // Seconds since start of day
|
||||
int32_t latitude_centi_degrees; // Latitude * 10,000
|
||||
int32_t longitude_centi_degrees; // Longitude * 10,000
|
||||
int16_t altitude_centi_meters; // Altitude * 100
|
||||
uint8_t fix_quality;
|
||||
uint8_t num_satellites;
|
||||
uint16_t date_yyddmm; // YYDDMM (from GPRMC)
|
||||
uint16_t speed_centi_knots; // Speed * 100 (from GPRMC)
|
||||
uint32_t time_seconds; // Seconds since start of day //100
|
||||
int32_t latitude_centi_degrees; // Latitude * 10,000 //104
|
||||
int32_t longitude_centi_degrees; // Longitude * 10,000 //108
|
||||
int16_t altitude_centi_meters; // Altitude * 100 //110
|
||||
uint8_t fix_quality; //111
|
||||
uint8_t num_satellites; //112
|
||||
uint16_t date_yyddmm; // YYDDMM (from GPRMC) //114
|
||||
uint16_t speed_centi_knots; // Speed * 100 (from GPRMC) //116
|
||||
|
||||
int32_t predicted_latitude_centi_degrees; // Latitude * 10,000
|
||||
int32_t predicted_longitude_centi_degrees; // Longitude * 10,000
|
||||
int16_t predicted_altitude_centi_meters; // Altitude * 100
|
||||
int32_t predicted_latitude_centi_degrees; // Latitude * 10,000 //120
|
||||
int32_t predicted_longitude_centi_degrees; // Longitude * 10,000 //124
|
||||
int16_t predicted_altitude_centi_meters; // Altitude * 100 //126
|
||||
|
||||
// ADC DATA
|
||||
int32_t NH3;
|
||||
int32_t CO;
|
||||
int32_t NO2;
|
||||
int32_t UVC;
|
||||
int32_t NH3; //130
|
||||
int32_t CO; //134
|
||||
int32_t NO2; //138
|
||||
int32_t UVC; //142
|
||||
|
||||
int16_t currentServoA;
|
||||
int16_t targetServoA;
|
||||
int16_t currentServoB;
|
||||
int16_t targetServoB;
|
||||
int16_t currentServoA; //144
|
||||
int16_t targetServoA; //146
|
||||
int16_t currentServoB; //148
|
||||
int16_t targetServoB; //150
|
||||
|
||||
uint8_t telemetryIndex; //151
|
||||
|
||||
} TelemetryPacket;
|
||||
|
||||
@@ -97,6 +100,7 @@ typedef struct __attribute__((packed))
|
||||
char syncPhrase[10];
|
||||
uint32_t packetIndex;
|
||||
uint8_t packetType;
|
||||
uint32_t CRCCheck;
|
||||
} UplinkPacket;
|
||||
|
||||
typedef struct __attribute__((packed))
|
||||
|
Reference in New Issue
Block a user