If no cell is connected, the connectors are usually shorted. However, the measured voltage may not be exactly 0, often floating around 0. This can result in negative values being measured, causing incorrect cell detection. The Technical Reference Manual (Table 12-1) describes these values as i2. By using int16_t for voltage, negative values are correctly read as -1 instead of 65535, improving detection accuracy.
If no cell is connected, the connectors are usually shorted. However, the measured voltage may not be exactly 0, often floating around 0. This can result in negative values being measured, causing incorrect cell detection. The Technical Reference Manual (Table 12-1) describes these values as i2. By using int16_t for voltage, negative values are correctly read as -1 instead of 65535, improving detection accuracy.