🐛 fix(optic_mag_driver): 修正光泵磁力计数据单位
- 将数据单位从 0.0001 nT 改为 0.001 nT - 更新注释中的示例值以匹配新的单位换算
This commit is contained in:
parent
bc37e14fba
commit
047ef08318
@ -43,7 +43,7 @@ typedef struct __attribute__((packed)) {
|
|||||||
float gps_longitude;
|
float gps_longitude;
|
||||||
float gps_altitude;
|
float gps_altitude;
|
||||||
#endif
|
#endif
|
||||||
uint32_t optical_mag; // 单位 0.0001 nT,例如 123456789 = 12345.6789 nT
|
uint32_t optical_mag; // 单位 0.001 nT,例如 123456789 = 123456.789 nT
|
||||||
} DataPacketWithOptic_t;
|
} DataPacketWithOptic_t;
|
||||||
|
|
||||||
// ─── 校正数据包 ───────────────────────────────────────────────────────────────
|
// ─── 校正数据包 ───────────────────────────────────────────────────────────────
|
||||||
@ -75,7 +75,7 @@ typedef struct __attribute__((packed)) {
|
|||||||
float gps_longitude;
|
float gps_longitude;
|
||||||
float gps_altitude;
|
float gps_altitude;
|
||||||
#endif
|
#endif
|
||||||
uint32_t optical_mag; // 单位 0.0001 nT
|
uint32_t optical_mag; // 单位 0.001 nT
|
||||||
} CorrectedDataPacketWithOptic_t;
|
} CorrectedDataPacketWithOptic_t;
|
||||||
|
|
||||||
// ─── 函数声明 ─────────────────────────────────────────────────────────────────
|
// ─── 函数声明 ─────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
#define OPTIC_MAG_FRAME_END 0xA5
|
#define OPTIC_MAG_FRAME_END 0xA5
|
||||||
#define OPTIC_MAG_DATA_BYTES 10
|
#define OPTIC_MAG_DATA_BYTES 10
|
||||||
|
|
||||||
// 单位 0.0001 nT,忽略末位BCD数字,取前9位
|
// 单位 0.001 nT,忽略末位BCD数字,取前9位
|
||||||
// 例如 123456789 表示 12345.6789 nT
|
// 例如 123456789 表示 123456.789 nT
|
||||||
extern volatile uint32_t g_optic_mag_value;
|
extern volatile uint32_t g_optic_mag_value;
|
||||||
extern volatile uint8_t g_optic_mag_fresh;
|
extern volatile uint8_t g_optic_mag_fresh;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user