Bläddra i källkod

right constant; cache 10 instead of 100

Chris Mullins 8 år sedan
förälder
incheckning
7026cd25d8
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      lib/MiLightState/GroupStateStore.cpp
  2. 1 1
      lib/Settings/Settings.h
  3. 1 1
      src/main.cpp

+ 1 - 1
lib/MiLightState/GroupStateStore.cpp

@@ -30,7 +30,7 @@ void GroupStateStore::trackEviction() {
 
 void GroupStateStore::flush() {
   ListNode<GroupCacheNode*>* curr = cache.getHead();
-  
+
   while (curr != NULL && curr->data->state.isDirty()) {
     persistence.set(curr->data->id, curr->data->state);
     curr->data->state.clearDirty();

+ 1 - 1
lib/Settings/Settings.h

@@ -17,7 +17,7 @@
 #endif
 
 #ifndef MILIGHT_MAX_STATE_ITEMS
-#define MILIGHT_MAX_STATE_ITEMS 100
+#define MILIGHT_MAX_STATE_ITEMS 10
 #endif
 
 #define SETTINGS_FILE  "/config.json"

+ 1 - 1
src/main.cpp

@@ -28,7 +28,7 @@ MiLightHttpServer *httpServer = NULL;
 MqttClient* mqttClient = NULL;
 MiLightDiscoveryServer* discoveryServer = NULL;
 uint8_t currentRadioType = 0;
-GroupStateStore stateStore(MILIGHT_MAX_PACKET_LENGTH);
+GroupStateStore stateStore(MILIGHT_MAX_STATE_ITEMS);
 
 int numUdpServers = 0;
 MiLightUdpServer** udpServers;