我建议使用以下内容:
val = 12 *(int16_t)((MSB 以下为原文
I think your conversion function is not correct. Why are you multiplying the raw value by 3000 and then divide by 2^12?
I would suggest to use following:
val = 12 * (int16_t) ((MSB << 8) | LSB) / 16;
It is valid for 24G range, according to datasheet the sensitivity is 12mg/digit.
Best regards
Miroslav