From e6dbc5fb9eb755c56b71292721ce2291801dbcfc Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 18 Dec 2023 14:12:20 +0100 Subject: [PATCH] bcbBattery: Fix compilation with YARP 3.9.0 (#920) --- src/libraries/icubmod/bcbBattery/bcbBattery.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libraries/icubmod/bcbBattery/bcbBattery.h b/src/libraries/icubmod/bcbBattery/bcbBattery.h index 648b45fe14..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_STANBY; +#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),