File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 186186    #define  OLED_RST     -1
187187#endif 
188188
189- #if  !defined(LIGHTGATEWAY_1_0 ) &&  !defined(HELTEC_HTCT62 ) &&  !defined(HELTEC_WSL_V3 ) &&  !defined(ESP32C3_DIY_1W_LoRa ) &&  !defined(ESP32C3_DIY_1W_LoRa_915 ) &&  !defined(WEMOS_S2_MINI_DIY_LoRa )
189+ 
190+ #if  !defined(HELTEC_HTCT62 ) &&  !defined(HELTEC_WSL_V3 ) &&  !defined(ESP32C3_DIY_1W_LoRa ) &&  !defined(ESP32C3_DIY_1W_LoRa_915 ) &&  !defined(WEMOS_S2_MINI_DIY_LoRa )
190191    #define  HAS_DISPLAY 
191192#endif 
192193
Original file line number Diff line number Diff line change @@ -67,20 +67,22 @@ void displaySetup() {
6767                    digitalWrite (OLED_RST, HIGH);
6868                #endif 
6969
70-                 if (!display.begin (SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) { 
71-                     Serial.println (F (" SSD1306 allocation failed" 
72-                     for (;;); //  Don't proceed, loop forever
73-                 }
74-                 if  (Config.display .turn180 ) {
70+                 if (display.begin (SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
71+                     if  (Config.display .turn180 ) {
7572                    display.setRotation (2 );
73+                     }
74+                     display.clearDisplay ();
75+                     display.setTextColor (WHITE);
76+                     display.setTextSize (1 );
77+                     display.setCursor (0 , 0 );
78+                     display.ssd1306_command (SSD1306_SETCONTRAST);
79+                     display.ssd1306_command (1 );
80+                     display.display ();
81+                 } else  {
82+                     // Serial.println(F("SSD1306 allocation failed"));
83+                     #undef  HAS_DISPLAY
7684                }
77-                 display.clearDisplay ();
78-                 display.setTextColor (WHITE);
79-                 display.setTextSize (1 );
80-                 display.setCursor (0 , 0 );
81-                 display.ssd1306_command (SSD1306_SETCONTRAST);
82-                 display.ssd1306_command (1 );
83-                 display.display ();
85+                 
8486            #endif 
8587        #endif 
8688        delay (1000 );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments