diff --git a/src/controllerSoftware/app.py b/src/controllerSoftware/app.py index 4512787..a6f000e 100644 --- a/src/controllerSoftware/app.py +++ b/src/controllerSoftware/app.py @@ -150,13 +150,15 @@ def index(): return render_template('index.html', matrix=initial_matrix) +@app.route('/set_color', methods=['POST']) +# Updated part of your app.py @app.route('/set_color', methods=['POST']) def set_color(): data = request.get_json() lamps_to_update = data.get('lamps', []) - r = data.get('r') - g = data.get('g') - b = data.get('b') + r = data.get('ww') + g = data.get('cw') + b = data.get('blue') if not lamps_to_update: return jsonify(success=False, message="No lamps selected") diff --git a/src/controllerSoftware/templates/index.html b/src/controllerSoftware/templates/index.html index 26e1708..11686bd 100644 --- a/src/controllerSoftware/templates/index.html +++ b/src/controllerSoftware/templates/index.html @@ -1,271 +1,291 @@ - RGB Lamp Matrix Control - + Lamp Matrix Control +
-

RGB Lamp Matrix Control

+

Lamp Matrix Control

@@ -282,44 +302,27 @@ {% endfor %}
-
-

Center Lamp

-
-
- White 3000K - - -
-
- White 6500K - - -
-
+
+
+

Center Lamp

+
+ Warm White (3000K) + + Cool White (6500K) + Blue - - +
-
-
-

Region

-
-
- White 3000K - - -
-
- White 6500K - - -
-
+
+
+ Warm White (3000K) + + Cool White (6500K) + Blue - - +