diff --git a/library.properties b/library.properties index ceb15a5..a754aa2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_AlvikCarrier -version=1.0.4 +version=1.1.0 author=Arduino, Giovanni di Dio Bruno, Lucio Rossi maintainer=Arduino sentence=Library and firmware for Arduino Alvik Carrier board diff --git a/src/Arduino_AlvikCarrier.cpp b/src/Arduino_AlvikCarrier.cpp index bf8f04f..24a61c4 100644 --- a/src/Arduino_AlvikCarrier.cpp +++ b/src/Arduino_AlvikCarrier.cpp @@ -277,7 +277,7 @@ int Arduino_AlvikCarrier::beginBMS(){ void Arduino_AlvikCarrier::updateBMS(){ voltage = bms->readVCell(); state_of_charge = bms->readSoc(); - if (bms->isCharging()){ + if (bms->readCurrent()>=0){ charging = 1.0; } else{ diff --git a/src/definitions/robot_definitions.h b/src/definitions/robot_definitions.h index 8f606b9..bae10e0 100644 --- a/src/definitions/robot_definitions.h +++ b/src/definitions/robot_definitions.h @@ -92,8 +92,8 @@ const float MOTION_FX_PERIOD = (1000U / MOTION_FX_FREQ); // Library version #define VERSION_BYTE_HIGH 1 -#define VERSION_BYTE_MID 0 -#define VERSION_BYTE_LOW 4 +#define VERSION_BYTE_MID 1 +#define VERSION_BYTE_LOW 0 // Battery stats #define BATTERY_ALERT_MINIMUM_CHARGE 20.0