Fix Sensor
All checks were successful
Test compiling project / test (push) Successful in 2m46s

This commit is contained in:
2025-04-18 20:57:09 +02:00
parent 82455c830f
commit 0f581a54c5
5 changed files with 13 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ float INA233::getBusVoltage() {
float INA233::getShuntVoltage() {
uint16_t rawVoltage = get_word(INA233::_address, REGISTER_READ_VSHUNT);
float voltage = rawVoltage * pow(10,-4);
float voltage = rawVoltage * 2.5e-6;
return voltage;
}
@@ -186,4 +186,8 @@ uint16_t INA233::getConfigRegister() {
void INA233::reset() {
sendByte(INA233::_address, 0x12, 0x00);
}
void INA233::setCalibrationRegister(int value) {
sendWord(INA233::_address, 0xD4, value);
}

View File

@@ -49,6 +49,8 @@ class INA233{
void reset();
void setCalibrationRegister(int value);
bool isConnected(void);
private: