Skip to content

Commit 1df47f7

Browse files
chore: add surgical light system context
1 parent bfcb6bd commit 1df47f7

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

room_control_unit/src/config/ContextProvider.h

+13-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "../app/io/environment/HeatingModule.h"
2626
#include "../app/io/environment/VentilationSystem.h"
2727
#include "../app/io/environment/LightImpl.h"
28+
#include "../app/io/environment/SurgicalLightImpl.h"
2829
#include "../app/logic/baseio/HumiditySensor.h"
2930
#include "../app/logic/baseio/PresenceSensor.h"
3031
#include "../app/model/event/Event.h"
@@ -37,6 +38,7 @@
3738
#include "../app/logic/fsm/commandlistener/CommandListener.h"
3839
#include "../app/logic/fsm/hvacsystem/HvacSystem.h"
3940
#include "../app/logic/fsm/ambientlightsystem/AmbientLightSystem.h"
41+
#include "../app/logic/fsm/orsurgicalightsystem/ORSurgicalLightSystem.h"
4042

4143

4244

@@ -149,7 +151,7 @@ HvacSystemContext* getHvacSystemContextPreOperatingRoom(List<Event*>* eventList,
149151
};
150152
}
151153

152-
AmbientLightSystemContext* getAmbientLightContextOperatingRoom(List<Event*>* eventList, Command** currentCommand) {
154+
AmbientLightSystemContext* getAmbientLightSystemContextOperatingRoom(List<Event*>* eventList, Command** currentCommand) {
153155
return new AmbientLightSystemContext {
154156
eventList,
155157
currentCommand,
@@ -158,7 +160,7 @@ AmbientLightSystemContext* getAmbientLightContextOperatingRoom(List<Event*>* eve
158160
};
159161
}
160162

161-
AmbientLightSystemContext* getAmbientLightContextPreOperatingRoom(List<Event*>* eventList, Command** currentCommand) {
163+
AmbientLightSystemContext* getAmbientLightSystemContextPreOperatingRoom(List<Event*>* eventList, Command** currentCommand) {
162164
return new AmbientLightSystemContext {
163165
eventList,
164166
currentCommand,
@@ -167,4 +169,13 @@ AmbientLightSystemContext* getAmbientLightContextPreOperatingRoom(List<Event*>*
167169
};
168170
}
169171

172+
ORSurgicalLightSystemContext* getORSurgicalLightSystemContext(List<Event*>* eventList, Command** currentCommand) {
173+
return new ORSurgicalLightSystemContext {
174+
eventList,
175+
currentCommand,
176+
Room(OPERATING_ROOM_ID),
177+
new SurgicalLightImpl(SURGICAL_LIGHT_ID, SURGICAL_LIGHT_PIN)
178+
};
179+
}
180+
170181
#endif

0 commit comments

Comments
 (0)