Browse Source

shuffle around some yields

Chris Mullins 8 years ago
parent
commit
6376e8f430
3 changed files with 3 additions and 2 deletions
  1. 0 1
      lib/MiLight/MiLightClient.cpp
  2. 3 0
      lib/MiLight/PL1167_nRF24.cpp
  3. 0 1
      src/main.cpp

+ 0 - 1
lib/MiLight/MiLightClient.cpp

@@ -64,7 +64,6 @@ void MiLightClient::write(const MiLightRadioType radioType,
   
   for (int i = 0; i < resendCount; i++) {
     radio->write(packet, MILIGHT_PACKET_LENGTH);
-    yield();
   }
 }
 

+ 3 - 0
lib/MiLight/PL1167_nRF24.cpp

@@ -191,6 +191,7 @@ int PL1167_nRF24::transmit(uint8_t channel)
     if (retval < 0) {
       return retval;
     }
+    yield();
   }
 
   _radio.stopListening();
@@ -260,6 +261,8 @@ int PL1167_nRF24::transmit(uint8_t channel)
       buffer_fill -= 8;
     }
   }
+  
+  yield();
 
   _radio.write(tmp, outp);
   return 0;

+ 0 - 1
src/main.cpp

@@ -327,7 +327,6 @@ void loop() {
   
   if (udpServers) {
     for (size_t i = 0; i < settings.numGatewayConfigs; i++) {
-      yield();
       udpServers[i]->handleClient();
     }
   }