finally works
This commit is contained in:
@ -37,7 +37,7 @@ void I2cTestClass::battInit() {
|
||||
if (ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) {
|
||||
sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl;
|
||||
}
|
||||
cmdBuf[0] = BpxBattery::PORT_PING;
|
||||
cmdBuf[0] = bpxBat::PORT_PING;
|
||||
cmdBuf[1] = 0x42;
|
||||
sendLen = 2;
|
||||
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
||||
@ -66,7 +66,7 @@ void I2cTestClass::battPeriodic() {
|
||||
if (ioctl(bpxInfo.fd, I2C_SLAVE, bpxInfo.addr) < 0) {
|
||||
sif::error << "Failed to acquire bus access and/or talk to slave" << std::endl;
|
||||
}
|
||||
cmdBuf[0] = BpxBattery::PORT_GET_HK;
|
||||
cmdBuf[0] = bpxBat::PORT_GET_HK;
|
||||
sendLen = 1;
|
||||
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
||||
if (result != returnvalue::OK) {
|
||||
|
Reference in New Issue
Block a user