diff --git a/src/peripherals/valve/ValveScheduler.hpp b/src/peripherals/valve/ValveScheduler.hpp index ef875d1c..dc31e099 100644 --- a/src/peripherals/valve/ValveScheduler.hpp +++ b/src/peripherals/valve/ValveScheduler.hpp @@ -39,9 +39,10 @@ class ValveSchedule { return duration; } - const time_point start; - const seconds period; - const seconds duration; +private: + time_point start; + seconds period; + seconds duration; }; struct ValveStateUpdate { diff --git a/test/ValveSchedulerTest.cpp b/test/ValveSchedulerTest.cpp index 13851943..584da257 100644 --- a/test/ValveSchedulerTest.cpp +++ b/test/ValveSchedulerTest.cpp @@ -31,9 +31,9 @@ class ValveSchedulerTest : public testing::Test { TEST_F(ValveSchedulerTest, can_create_schedule) { ValveSchedule schedule(base, hours { 1 }, minutes { 1 }); - EXPECT_EQ(schedule.start, base); - EXPECT_EQ(schedule.period, hours { 1 }); - EXPECT_EQ(schedule.duration, minutes { 1 }); + EXPECT_EQ(schedule.getStart(), base); + EXPECT_EQ(schedule.getPeriod(), hours { 1 }); + EXPECT_EQ(schedule.getDuration(), minutes { 1 }); } // TEST_F(ValveSchedulerTest, can_create_schedule_from_json) {