17 #include "../../src/ISComm.h" 18 #include "../../src/serialPortPlatform.h" 24 printf(
"INS TimeOfWeek: %.3fs, LLA: %3.7f,%3.7f,%5.2f, Euler: %5.1f,%5.1f,%5.1f\r\n",
37 printf(
"IMU Time: %.3fs, PQR: %5.1f,%5.1f,%5.1f, ACC: %5.1f,%5.1f,%5.1f,\r\n",
47 float rotation[3] = { 90.0f*
C_DEG2RAD_F, 0.0f, 0.0f };
51 printf(
"Failed to encode and write set INS rotation\r\n");
65 printf(
"Failed to encode and write stop broadcasts message\r\n");
81 printf(
"Failed to write save persistent message\r\n");
95 printf(
"Failed to encode and write get INS message\r\n");
104 printf(
"Failed to encode and write get GPS message\r\n");
114 printf(
"Failed to encode and write get IMU message\r\n");
122 int main(
int argc,
char* argv[])
126 printf(
"Please pass the com port as the only argument\r\n");
134 uint8_t buffer[2048];
153 printf(
"Failed to open serial port on com port %s\r\n", argv[1]);
167 #if 0 // STEP 5: Set configuration 182 #if 0 // STEP 7: (Optional) Save currently enabled streams as persistent messages enabled after reboot
int serialPortReadCharTimeout(serial_port_t *serialPort, unsigned char *c, int timeoutMilliseconds)
int serialPortOpen(serial_port_t *serialPort, const char *port, int baudRate, int blocking)
size_t count(InputIterator first, InputIterator last, T const &item)
protocol_type_t is_comm_parse_byte(is_comm_instance_t *instance, uint8_t byte)
int is_comm_get_data(is_comm_instance_t *instance, uint32_t dataId, uint32_t offset, uint32_t size, uint32_t periodMultiple)
int enable_message_broadcasting_get_data(serial_port_t *serialPort, is_comm_instance_t *comm)
int main(int argc, char *argv[])
int set_configuration(serial_port_t *serialPort, is_comm_instance_t *comm)
int save_persistent_messages(serial_port_t *serialPort, is_comm_instance_t *comm)
static void handleInsMessage(ins_1_t *ins)
int is_comm_set_data(is_comm_instance_t *instance, uint32_t dataId, uint32_t offset, uint32_t size, void *data)
static void handleImuMessage(dual_imu_t *imu)
#define _DID_FLASH_CONFIG
int serialPortWrite(serial_port_t *serialPort, const unsigned char *buffer, int writeCount)
int stop_message_broadcasting(serial_port_t *serialPort, is_comm_instance_t *comm)
#define _DID_INS_LLA_EULER_NED
static void handleGpsMessage(gps_pos_t *pos)
void is_comm_init(is_comm_instance_t *instance, uint8_t *buffer, int bufferSize)
int is_comm_stop_broadcasts_all_ports(is_comm_instance_t *instance)