diff --git a/src/libraries/icubmod/bcbBattery/bcbBattery.h b/src/libraries/icubmod/bcbBattery/bcbBattery.h index ef439c50d0..5e9113ced1 100644 --- a/src/libraries/icubmod/bcbBattery/bcbBattery.h +++ b/src/libraries/icubmod/bcbBattery/bcbBattery.h @@ -45,7 +45,11 @@ class batteryReaderThread : public PeriodicThread double battery_current = 0; std::string battery_info = "icub battery system v1.0"; int backpack_status = 0; - IBattery::Battery_status battery_status = IBattery::Battery_status::BATTERY_OK_STANDBY; +#if YARP_VERSION_MAJOR == 3 && YARP_VERSION_MINOR <= 8 + IBattery::Battery_status battery_status = IBattery::Battery_status::BATTERY_OK_STANBY; +#else + IBattery::Battery_status battery_status = IBattery::Battery_status::BATTERY_OK_STANDBY; +#endif batteryReaderThread (ISerialDevice *_iSerial, double period) : PeriodicThread((double)period),