#pragma once #include #define SENSOR_NODE_NAME "xiao_c6_sensor_node" #define SENSOR_NODE_FIRMWARE_VERSION "0.1.0" #define SENSOR_NODE_SCHEMA_VERSION 1 #define RS485_DE_PIN D2 #define RS485_TX_PIN D4 #define RS485_RX_PIN D5 #define BNO086_SDA_PIN D7 #define BNO086_SCL_PIN D8 #define GPS_RX_PIN D9 #define GPS_TX_PIN D10 #define BNO086_I2C_ADDRESS 0x4B #define BNO086_I2C_CLOCK_HZ 100000 #define BNO086_INIT_ATTEMPTS 8 #define BNO086_INIT_RETRY_DELAY_MS 250 #define BNO086_RUNTIME_RETRY_MS 5000 #define GPS_BAUD 38400 #define RS485_BAUD 115200 #define IMU_REPORT_INTERVAL_US 20000 #define IMU_STABILITY_INTERVAL_US 100000 #define TELEMETRY_INTERVAL_MS 200 #define SENSOR_STALE_MS 2000 #define USB_TELEMETRY_ENABLED 1 #define LEVEL_CALIBRATION_DURATION_MS 5000 #define LEVEL_CALIBRATION_MIN_SAMPLES 100 #define LEVEL_CALIBRATION_MAX_MOVEMENT_DEGREES 2.0f #define RS485_COMMAND_MAX_LENGTH 192