13,26 → 13,26 |
#define SPI_CMD_VERSION 14 |
|
typedef struct { |
uint8_t Sync1; |
uint8_t Sync2; |
uint8_t Command; |
int16_t IntegralPitch; |
int16_t IntegralRoll; |
int16_t AccPitch; |
int16_t AccRoll; |
int16_t GyroHeading; |
int16_t GyroPitch; |
int16_t GyroRoll; |
int16_t GyroYaw; |
union { |
int8_t sByte[12]; |
uint8_t Byte[12]; |
int16_t Int[6]; |
int32_t Long[3]; |
float Float[3]; |
} Param; |
uint8_t Chksum; |
} __attribute__((packed)) ToNaviCtrl_t; |
uint8_t Sync1; |
uint8_t Sync2; |
uint8_t Command; |
int16_t IntegralPitch; |
int16_t IntegralRoll; |
int16_t AccPitch; |
int16_t AccRoll; |
int16_t GyroHeading; |
int16_t GyroPitch; |
int16_t GyroRoll; |
int16_t GyroYaw; |
union { |
int8_t sByte[12]; |
uint8_t Byte[12]; |
int16_t Int[6]; |
int32_t Long[3]; |
float Float[3]; |
} Param; |
uint8_t Chksum; |
}__attribute__((packed)) ToNaviCtrl_t; |
|
#define SPI_CMD_OSD_DATA 100 |
#define SPI_CMD_GPS_POS 101 |
40,39 → 40,39 |
#define SPI_KALMAN 103 |
|
typedef struct { |
uint8_t Command; |
int16_t GPSStickPitch; |
int16_t GPSStickRoll; |
int16_t GPS_Yaw; |
int16_t CompassHeading; |
int16_t Status; |
uint16_t BeepTime; |
union { |
int8_t Byte[12]; |
int16_t Int[6]; |
int32_t Long[3]; |
float Float[3]; |
} Param; |
uint8_t Chksum; |
} __attribute__((packed)) FromNaviCtrl_t; |
uint8_t Command; |
int16_t GPSStickPitch; |
int16_t GPSStickRoll; |
int16_t GPS_Yaw; |
int16_t CompassHeading; |
int16_t Status; |
uint16_t BeepTime; |
union { |
int8_t Byte[12]; |
int16_t Int[6]; |
int32_t Long[3]; |
float Float[3]; |
} Param; |
uint8_t Chksum; |
}__attribute__((packed)) FromNaviCtrl_t; |
|
typedef struct { |
uint8_t Major; |
uint8_t Minor; |
uint8_t Patch; |
uint8_t Compatible; |
// unsigned char Hardware; |
} __attribute__((packed)) SPI_VersionInfo_t; |
uint8_t Major; |
uint8_t Minor; |
uint8_t Patch; |
uint8_t Compatible; |
// unsigned char Hardware; |
}__attribute__((packed)) SPI_VersionInfo_t; |
|
extern ToNaviCtrl_t toNaviCtrl; |
extern FromNaviCtrl_t fromNaviCtrl; |
extern ToNaviCtrl_t toNaviCtrl; |
extern FromNaviCtrl_t fromNaviCtrl; |
|
typedef struct { |
int8_t KalmanK; |
int8_t KalmanMaxDrift; |
int8_t KalmanMaxFusion; |
uint8_t SerialDataOkay; |
} __attribute__((packed)) NCData_t; |
int8_t KalmanK; |
int8_t KalmanMaxDrift; |
int8_t KalmanMaxFusion; |
uint8_t SerialDataOkay; |
}__attribute__((packed)) NCData_t; |
|
extern uint8_t NCDataOkay; |
extern uint8_t NCSerialDataOkay; |