Skip to content

Commit a7a796f

Browse files
committed
fixed bms check
1 parent 45aae84 commit a7a796f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Arduino_AlvikCarrier.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ int Arduino_AlvikCarrier::begin(){
137137

138138
beginServo();
139139

140-
if (beginBMS()!=0){
140+
if (!beginBMS()){
141141
errorLed(ERROR_BMS);
142142
}
143143

@@ -270,8 +270,7 @@ void Arduino_AlvikCarrier::disconnectExternalI2C(){
270270

271271
int Arduino_AlvikCarrier::beginBMS(){
272272
while(digitalRead(NANO_CHK)==HIGH){}
273-
bms->begin();
274-
return 0;
273+
return bms->begin();
275274
}
276275

277276
void Arduino_AlvikCarrier::updateBMS(){

0 commit comments

Comments
 (0)