Sfoglia il codice sorgente

Fix compiler warnings

Christopher Mullins 6 anni fa
parent
commit
0dd2be3ca9
2 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 2 2
      lib/Radio/PL1167_nRF24.cpp
  2. 1 0
      src/main.cpp

+ 2 - 2
lib/Radio/PL1167_nRF24.cpp

@@ -33,10 +33,10 @@ int PL1167_nRF24::open() {
 }
 
 int PL1167_nRF24::recalc_parameters() {
-  int nrf_address_length = _syncwordLength;
+  size_t nrf_address_length = _syncwordLength;
 
   // +2 for CRC
-  int packet_length = _maxPacketLength + 2;
+  size_t packet_length = _maxPacketLength + 2;
 
   // Read an extra byte if we don't include the trailer in the syncword
   if (_syncwordLength < 5) {

+ 1 - 0
src/main.cpp

@@ -280,6 +280,7 @@ void applySettings() {
     case WifiMode::G:
       wifiMode = WIFI_PHY_MODE_11G;
       break;
+    default:
     case WifiMode::N:
       wifiMode = WIFI_PHY_MODE_11N;
       break;